Closed exe0cdc closed 7 years ago
Hi, your workaround is the proper way to do it.
Forcing functions are assignments that use/assign to model variables/parameters so if you want to use stuff in a forcing function it should be declared as such, somewhere in the model.
For one thing it is slightly more complicated to parse and extract the parameters in an arbitrary expression, compared to a kinetic equation (where the reagents/variables are specified).
So, in short, consider forcing functions to be rules you apply to existing model (global) elements. Make sense?
It seems that whenever a symbol that does not appear elsewhere in a specific model is defined using a forcing function, it is not added to the parameters list of the instantiated model. This is contrary to the behaviour for conventionally defined symbols. So in the following case:
For a model "
mod
",mod.parameters
will only containX
if it is in a rate equation (if it is a substrate/product it will appear inmod.species
), while Y will appear in the parameter list.Is this the intended behaviour? A workaround for this issue is to add
X=0
to the model file before usingX
in the forcing function, but I'm not sure if this could have unintended side effects.