run | Reference Home |

Runs a simulation.

run[sys, {t, tstart, tend},
options]

run[sys, {tstart, tend},
options]

run[sys, options]

sys is the output of interpret.

vars is a list of variables in sim. If omitted all variables will be plotted. vars can only be omitted if the time span is also omitted.

t is the name of the time variable (default is Global`t).

tstart and tend give the timespan of the simulation.

The return value is a list of InterpolatingFunctions's.

Options include:

"IC"→{} - Gives a list of initial conditions. Variables for which initial conditions are omitted are given default initial conditions of zero at tstart. Each initial condition may be specified as either variable[tzero]==value or variable→value. Any combination of these two forms may be used.

initialConditions→{} - deprecated version of "IC".

"plot"→False - If True plots the results of the variables listed in "plotVariables" and/or "gridPlotVariables". See runPlot or gridPlot. Plotting options can not be sent to Plot via run; this must be done by invoking runPlot or gridPlot after run.

"plotVariables"→{} - gives a list of variables to be plotted on a single plot. See runPlot.

"gridPlotVariables"→{} - gives a list of variables to be plotted in a grid, one variable per plot. See gridPlot.

"Parameters"→{} - list of rules defining parameter values. Unassigned parameters will be set equal to 1.

rates→{} - deprecated version of "Parameters".

"TimeSpan"→100 - duration of run in units of the time variable (t).

timeSpan→{} - deprecated version of "TimeSpan".

timeVariable→Global`t

"BoundaryConditions"→{v1[t]→f1[t], v2[t]→f2[t],..} - replace each reference to a species v1 with an explicit formula that depends on time, given by f1[t], etc. Any references to the variables v1,v2,... in the list of reactions is treated as a frozen variable and is not used to produce and ode term. For an example, click here

Any options for NDSolve may also be used.

Example (Download as Mathematica Notebook)

Implementation Notes

run is a wrapper for NDSolve.