Set active configuration set for model object
configsetObj
=
setactiveconfigset(modelObj
, 'NameValue
')
configsetObj2
=
setactiveconfigset(modelObj
, configsetObj1
)
sets
the configuration set configsetObj
=
setactiveconfigset(modelObj
, 'NameValue
')
to
be the active configuration set for the NameValue
model
object
and
returns to modelObj
.configsetObj
sets
the configsetObj2
=
setactiveconfigset(modelObj
, configsetObj1
)configset
to
be the active configsetObj1
configset
for
and
returns to modelObj
.
Any change in one of these two configset objects configsetObj2
and configsetObj1
is
reflected in the other. To copy over a configsetObj2
configset
object
from one model object
to another,
use the copyobj
method.
The active configuration set contains the settings that are be used during a simulation. A default configuration set is attached to any new model.
Create a model object by importing the oscillator.xml
file,
and add a Configset
object to the model.
modelObj = sbmlimport('oscillator'); configsetObj = addconfigset(modelObj, 'myset');
Configure the simulation stop criteria by setting
the StopTime
, MaximumNumberOfLogs
,
and MaximumWallClock
properties of the Configset
object.
Set the stop criteria to a simulation time of 3000
seconds, 50
logs,
or a wall clock time of 10
seconds, whichever comes
first.
set(configsetObj, 'StopTime', 3000, 'MaximumNumberOfLogs', 50,... 'MaximumWallClock', 10) get(configsetObj) Active: 0 CompileOptions: [1x1 SimBiology.CompileOptions] Name: 'myset' Notes: '' RuntimeOptions: [1x1 SimBiology.RuntimeOptions] SensitivityAnalysisOptions: [1x1 SimBiology.SensitivityAnalysisOptions] SolverOptions: [1x1 SimBiology.ODESolverOptions] SolverType: 'ode15s' StopTime: 3000 MaximumNumberOfLogs: 50 MaximumWallClock: 10 TimeUnits: 'second' Type: 'configset'
Set the new Configset
object to
be active, simulate the model using the new Configset
object,
and plot the result.
setactiveconfigset(modelObj, configsetObj); [t,x] = sbiosimulate(modelObj); plot (t,x)