-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Enable equations in the DSL #736
Conversation
(this pr depends on #735) |
Currently
We are missing something for returning reactions only. Intuitively, that should be It would also be useful to have something to extract non-species variables only. |
38e82f4
to
fcb5206
Compare
fcb5206
to
4644e03
Compare
I think this PR has gotten messed up due to all of the interlocking branch dependencies (depending on two different things in addition to master), not sure how to fix. |
Git history not sustainable anymore, reuploaded as #801 |
Adds the
@equations
option to the DSL, enabling equations to be added. E.g. to create a model of a cell with a volume (V
) which grows with a growth factor (G
), where growth depletes some nutrition (N
) we can use:Additional details
D(X)
(whereX
is any symbol) occurs in an equation, a differentialD = Differential($(DEFAULT_IV_SYM))
is automatically created and used. If this is used whenD
is used as a species, variable, or parameter name, an error is thrown.D(X)
only,X
is automatically inferred to be a variable (and created as such). Any other symbol occurring in an equation must be declared elsewhere.begin ... end
block can be omitted (e.g.@equations D(V) ~ k*G
).Further considerations
ODAEProblem
s to be created in these cases, and do some additional stuff there. I have asked about this on Slack.@differentials
if the user wants to create custom differentials. However,ODEProblem
s currently do not support differentials on more than one iv. Hence, the only real use of this option is to create a different name for the default differential (if e.g. one has a species calledD
).