This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


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.