Main Content


Maximum elapsed wall clock time to stop simulation


MaximumWallClock is a property of a Configset object. This property sets the maximum elapsed wall clock time (seconds) criteria to stop a simulation.

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 toObject: Configset
Data typedouble
Data valuesPositive scalar. Default is Inf.


Set Maximum Wall Clock Criteria to Stop Simulation

Set the maximum wall clock time (in seconds) that triggers a simulation to stop.

Create a model object named cell and save it in a variable named modelObj.

modelObj  = sbiomodel('cell');

Retrieve the configuration set from modelObj and save it in a variable named configsetObj.

configsetObj = getconfigset(modelObj);

Configure the simulation stop criteria by setting the MaximumWallClock property to 20 seconds. Leave the StopTime and MaximumNumberOfLogs properties at their default values of 10 seconds and Inf, respectively.

set(configsetObj, 'MaximumWallClock', 20)

View the properties of 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: 10
           MaximumNumberOfLogs: Inf
              MaximumWallClock: 20
                     TimeUnits: 'second'
                   AmountUnits: '<automatic>'
                     MassUnits: '<automatic>'
                          Type: 'configset'

When you simulate modelObj, the simulation stops when the simulation time reaches 10 seconds or the wall clock time reaches 20 seconds, whichever comes first.