Mathematical Expressions

Each of the species initial amounts, the propensity factors for mass-action kinetic laws, and the parameter values are interpreted as Python expressions. Python supports the standard numerical operations. Additionally you can use the functions and constants defined in the math module.

For kinetic laws which are not mass-action, the propensity function must be a valid C++ expression. Both Python and C++ use the C math library, so the syntax is almost the same. One difference to note: C++ does not support the power operator x**y. Use pow(x, y) instead. You can use any of standard math functions without the std namespace qualification as well as the constants pi and e. Of course you can also use the model parameters. Use the species identifiers to denote the species populations.