StopTime
Simulation time criteria to stop simulation
Description
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.
Characteristics
Applies to | Object: Configset |
Data type | double |
Data values | Nonnegative scalar. Default is 10 . |
Access | Read/write |
Examples
Set Simulation Time Criteria to Stop Simulation
Create a
model
object namedcell
and save it in a variable namedmodelObj
. Retrieve the configuration set frommodelObj
and save it in a variable namedconfigsetObj
.modelObj = sbiomodel('cell'); configsetObj = getconfigset(modelObj);
Configure the simulation stop criteria by setting the
StopTime
property to20
seconds. Leave theMaximumNumberOfLogs
andMaximumWallClock
properties at their default values ofInf
.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 reaches20
seconds.