-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mortality in dynamical equations and change default parameter values. #72
Add mortality in dynamical equations and change default parameter values. #72
Conversation
Just made a new commit to export two functions that I need for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great :) Again this is good work and I see no problem with the implementation so I can only nitpick here and there. I'm still confused why a new method for the functor is needed (with (B, network)
signature), can you explain?
Unrelatedly, you have made use of |>
operator which I'm unfamiliar with.. and which I think could improve the package ergonomics a lot from the user POV. Cheers! Stay tuned :D [EDIT] see #73
@@ -492,6 +495,22 @@ function (F::FunctionalResponse)(B) | |||
end | |||
(F::FunctionalResponse)(B, _::EcologicalNetwork) = F(B) | |||
|
|||
function (F::ClassicResponse)(B, network::FoodWeb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry I don't understand why this new method is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long version in a comment below.
Short version: to compute the classic functional response, I need the species biomasses M
which is stored in the network
.
Thanks for your review, I'm gonna incorporate the changes you suggested. Let you know when it's done. For the new signature, now I also need to pass the network to the the functional response (specifically to the For the pipe operator do you think of things like |
Yes, I would reserve pipe syntax for functions with only 1 argument.. or with very, very, overly-used defaults. See #73 about that ;) |
50561ba
to
7707ac2
Compare
16b46de
to
6f9fb03
Compare
Here is the modifications you requested @iago-lito (last commit). |
f84ccb9
to
28ac93e
Compare
Mainly aesthetic stuff.
:finger_crossed:
- Ease/Force systematic testing of the three simulation flavours. - Use `extinct_species` in `:raw` generated code. - Use `extinct_species` in `:compact` generated code.
+ some tambouille about sol.k
- Reference #65 to explain why setting `B[i_extinct] = 0` is needed in `dBdt!`. - Simplify calculation of initial `extinct_sp` values. - Avoid checking `isa(extinction_threshold, Number)` on every timestep.
Not yet integrated in the ODEs.
Also added few tests. Still have to update the doc.
Forgot one term in the denominator of the classic functional response.
28ac93e
to
db1c874
Compare
Main features of this PR:
ModelParameters
anddBdt!
)