Simulation time criteria to stop simulation
StopTime
is a property of a Configset
object.
This property sets the maximum simulation time criteria to stop a
simulation. Time units are specified by the TimeUnits
property
of the Configset
object.
A simulation stops when it meets any of the criteria specified
by StopTime
, MaximumNumberOfLogs
,
or MaximumWallClock
. However, if you specify the OutputTimes
property
of the SolverOptions
property of the Configset
object,
then StopTime
and MaximumNumberOfLogs
are
ignored. Instead, the last value in OutputTimes
is
used as the StopTime
criteria, and the length of OutputTimes
is
used as the MaximumNumberOfLogs
criteria.
Applies to | Object: Configset |
Data type | double |
Data values | Nonnegative scalar. Default is 10 . |
Access | Read/write |
Create a model
object named cell
and
save it in a variable named modelObj
. Retrieve
the configuration set from modelObj
and save it
in a variable named configsetObj
.
modelObj = sbiomodel('cell');
configsetObj = getconfigset(modelObj);
Configure the simulation stop criteria by setting
the StopTime
property to 20
seconds.
Leave the MaximumNumberOfLogs
and MaximumWallClock
properties
at their default values of Inf
.
set(configsetObj, 'StopTime', 20)
get(configsetObj)
Active: 1
CompileOptions: [1x1 SimBiology.CompileOptions]
Name: 'default'
Notes: ''
RuntimeOptions: [1x1 SimBiology.RuntimeOptions]
SensitivityAnalysisOptions: [1x1 SimBiology.SensitivityAnalysisOptions]
SolverOptions: [1x1 SimBiology.ODESolverOptions]
SolverType: 'ode15s'
StopTime: 20
MaximumNumberOfLogs: Inf
MaximumWallClock: Inf
TimeUnits: 'second'
Type: 'configset'
When you simulate modelObj
, the simulation
stops when the simulation time reaches 20
seconds.