Converting a Python expression string to a "polyglot" string (for example, changing the Python exponent operator ** to an explicit call to pow()) occurs for Reaction.propensity_functionhere, but only the stochastic propensity function is parsed and converted.
Any model which makes use of the Reaction.ode_propensity_function property will not be converted. As a result an unmodified Python expression will be passed to the C++ solver, and certain operations will either return unexpected results (namely the ^ operator) or fail to compile (the ** operator).
Can be replicated by attempting to import this SBML model. Should be addressed in PR #582, but as a temporary workaround the ** and ^ operators in ode_propensity_function may be manually replaced, for example change x**2 to pow(x, 2).
Converting a Python expression string to a "polyglot" string (for example, changing the Python exponent operator
**
to an explicit call topow()
) occurs forReaction.propensity_function
here, but only the stochastic propensity function is parsed and converted.Any model which makes use of the
Reaction.ode_propensity_function
property will not be converted. As a result an unmodified Python expression will be passed to the C++ solver, and certain operations will either return unexpected results (namely the^
operator) or fail to compile (the**
operator).Can be replicated by attempting to import this SBML model. Should be addressed in PR #582, but as a temporary workaround the
**
and^
operators inode_propensity_function
may be manually replaced, for example changex**2
topow(x, 2)
.