Class: ODE

ODE(eq, state_vector, pars, diff_rates, ode_name)

The ODE class is used to call the odex.js library and numerically solve ODEs

Constructor

new ODE(eq, state_vector, pars, diff_rates, ode_name)

The constructor function for a @ODE object.
Parameters:
Name Type Description
eq function Function that describes the ODE (see examples starting with ode)
state_vector Array Initial state vector
pars Array Array of parameters for the ODEs
diff_rates Array Array of rates at which each state diffuses to neighbouring grid point (Has to be less than 0.25!)
ode_name String Name of this ODE
Source:

Methods

Prints the current state to the console
Source:

solveTimestep(delta_t, opt_pos)

Numerically solve the ODE
Parameters:
Name Type Default Description
delta_t float 0.1 Step size
opt_pos bool When enabled, negative values are set to 0 automatically
Source: