m = pwAddODE(m, *ID, *rhs)
 m = pwAddODE(m, interactive)

 Adds one ordinary differential equation to the model.


Arguments for pwAddODE

 ID   Must be the ID of a dynamic variable X, e.g. 'R'.
      The initial value of the species and other
      properties must be specified using pwAddX.
 rhs  Right-hand side. The differential equation for the given variable,
      e.g. '- R_act*R*L + R_deact*pR'

 Alternative function call for interactive specification:
 interactive   If true, the user is prompted to enter the properties
               into a user interface.



 PottersWheel must be able to determine the class of each token of the
 right-hand side, e.g. dynamic variable x, dynamic parameter k,
 driving input u, or algebraic expression a. Since the right-hand side
 is specified as a string, all elements must be specified explicitely
 using pwAddX, pwAddK, pwAddU, or pwAddA.


Piecewise definition

 Time-dependent piecewise functions should be implemented using pwAddU or
 pwAddTE. For other situations, PottersWheel supports the function

  piecewise(value1, condition1, value2, condition2, ..., defaultValue)

 with an arbitrary number of value/condition pairs and one required default value.
 The conditions should be specified using the functions

less thanlt(value1, value2)
greater thangt(value1, value2)
equalseq(value1, value2)
greater or equalge(value1, value2)
less or equalle(value1, value2)
andand(bool1, bool2)
oror(bool1, bool2)
Examples: Returning a value of 1 for a > 5, else 0: piecewise(1, gt(a, 5), 0) Returning b for c < d, e for f >= g, else h: piecewise(b, lt(c, d), e, ge(f, g), h) It is recommended to reduce the maximum integration step size, in order to accurately detect the event, when a different branch of the piecewise function should be evaluated. Please note that model integration and parameter calibration may be hampered when using piecewise functions, due to the non-analytic properties at the switches. Also, the Jacobian matrices for integration and calibration can not be determined, affecting e.g. the results of the profile likelihood estimation.


 m = pwAddODE(m, 'R', '- R_act*R*L + R_deact*pR');

See also