sbioensemblerun
Multiple stochastic ensemble runs of SimBiology model
Syntax
simdataObj
= sbioensemblerun(modelObj
, Numruns
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, Interpolation
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, configsetObj
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, configsetObj
, Interpolation
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, variantObj
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, variantObj
, Interpolation
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, configsetObj
, variantObj
)
simdataObj = sbioensemblerun(modelObj
, Numruns
, configsetObj
, variantObj
, Interpolation
)
Arguments
simdataObj | An array of SimData objects containing simulation
data generated by sbioensemblerun . All elements
of simdataObj contain data for the same
states in the same model. |
modelObj | Model object to be simulated. |
Numruns | Integer scalar representing the number of stochastic runs to make. |
Interpolation | Character vector or string denoting the interpolation scheme to be used if data should
be interpolated to get a consistent time vector. Valid values are
|
configsetObj | Specify the configuration set object to use in the ensemble
simulation. For more information about configuration sets, see Configset object . |
variantObj | Specify the variant object to apply to the model during the
ensemble simulation. For more information about variant objects, see Variant object . |
Description
performs
a stochastic ensemble run of the SimBiology® model object (simdataObj
= sbioensemblerun(modelObj
, Numruns
)modelObj
),
and returns the results in simdataObj
,
an array of SimData objects
. The active configset
and the active variants are used during simulation and are saved in
the output, SimData object (
).simdataObj
sbioensemblerun
uses the settings in the
active configset on the model object (
)
to perform the repeated simulation runs. The modelObj
SolverType
property
of the active configset must be set to one of the stochastic solvers: 'ssa'
, 'expltau'
,
or 'impltau'
. sbioensemblerun
generates
an error if the SolverType
property is set to any
of the deterministic (ODE) solvers.
simdataObj = sbioensemblerun(
performs
a stochastic ensemble run of a model object (modelObj
, Numruns
, Interpolation
)
),
and interpolates the results of the ensemble run onto a common time
vector using the interpolation scheme (modelObj
).Interpolation
simdataObj = sbioensemblerun(
performs
an ensemble run of a model object (modelObj
, Numruns
, configsetObj
)
),
using the specified configuration set (modelObj
).configsetObj
simdataObj = sbioensemblerun(
performs
an ensemble run of a model object (modelObj
, Numruns
, configsetObj
, Interpolation
)
),
using the specified configuration set (modelObj
),
and interpolates the results of the ensemble run onto a common time
vector using the interpolation scheme (configsetObj
).Interpolation
simdataObj = sbioensemblerun(
performs
an ensemble run of a model object (modelObj
, Numruns
, variantObj
)
),
using the variant object or array of variant objects (modelObj
).variantObj
simdataObj = sbioensemblerun(
performs
an ensemble run of a model object (modelObj
, Numruns
, variantObj
, Interpolation
)
),
using the variant object or array of variant objects (modelObj
),
and interpolates the results of the ensemble run onto a common time
vector using the interpolation scheme (variantObj
).Interpolation
simdataObj = sbioensemblerun(
performs
an ensemble run of a model object (modelObj
, Numruns
, configsetObj
, variantObj
)
),
using the configuration set (modelObj
),
and the variant object or array of variant objects (configsetObj
).
If the configuration set object (variantObj
)
is empty, the active configset on the model is used for simulation.
If the variant object (configsetObj
)
is empty, then no variant (not even the active variants in the model)
is used for the simulation. variantObj
simdataObj = sbioensemblerun(
performs
an ensemble run of a model object (modelObj
, Numruns
, configsetObj
, variantObj
, Interpolation
)
),
using the configuration set (modelObj
),
and the variant object or array of variant objects (configsetObj
),
and interpolates the results of the ensemble run onto a common time
vector using the interpolation scheme (variantObj
).Interpolation
Examples
This example shows how to perform an ensemble run and generate a 2-D distribution plot.
The project file,
radiodecay.sbproj
, contains a model stored in a variable calledm1
. Loadm1
into the MATLAB® workspace.sbioloadproject('radiodecay.sbproj','m1');
Change the solver of the active configset to be
ssa
. Also, adjust theLogDecimation
property on theSolverOptions
property of the configuration set.cs = getconfigset(m1, 'active'); set(cs, 'SolverType', 'ssa'); so = get(cs, 'SolverOptions'); set(so, 'LogDecimation', 10);
Tip
The
LogDecimation
property lets you define how often the simulation data is recorded as output. If your model has high concentrations or amounts of species, or a long simulation time (for example,600s
), you can record simulation data less often to manage the amount of data generated. Be aware that by doing so you might miss some transitions if your model is very dynamic. Try settingLogDecimation
to 10 or more.Perform an ensemble of 20 runs with linear interpolation to get a consistent time vector.
simdata = sbioensemblerun(m1, 20, 'linear');
Create a 2-D distribution plot of the species
'z'
at a time = 1.0.FH = sbioensembleplot(simdata, 'z', 1.0);
Version History
Introduced in R2006a
See Also
addconfigset
| getconfigset
| sbioensemblestats
| sbioensembleplot
| setactiveconfigset
| SimData object