addconfigset (model)

Create configuration set object and add to model object


configsetObj = addconfigset(modelObj, 'NameValue')

configsetObj = addconfigset(..., 'PropertyName', PropertyValue, ...)


modelObjModel object. Enter a variable name.
NameValueDescriptive name for a configuration set object. Reserved words 'active' and 'default' are not allowed.
configsetObjConfiguration set object.


configsetObj = addconfigset(modelObj, 'NameValue') creates a configuration set object and returns to configsetObj.

In the configuration set object, this method assigns a value (NameValue) to the property Name.

configsetObj = addconfigset(..., 'PropertyName', PropertyValue, ...)
constructs a configuration set object, configsetObj, and configures configsetObj with property value pairs. The property name/property value pairs can be in any format supported by the function set (for example, name-value string pairs, structures, and name-value cell array pairs). The configsetObj properties are listed in Property Summary.

A configuration set stores simulation specific information. A model object can contain multiple configuration sets, with one being active at any given time. The active configuration set contains the settings that are used during a simulation. configsetObj is not automatically set to active. Use the function setactiveconfigset to define the active configset for modelObj.

Use the method copyobj to copy a configset object and add it to the modelObj.

You can additionally view configuration set object properties with the command get. You can modify additional configuration set object properties with the command set.

Method Summary

Methods for configuration set objects

copyobj (any object)Copy SimBiology object and its children
delete (any object)Delete SimBiology object
display (any object)Display summary of SimBiology object
set (any object)Set object properties

Property Summary

Properties for configuration set objects

ActiveIndicate object in use during simulation
CompileOptionsDimensional analysis and unit conversion options
MaximumNumberOfLogsMaximum number of logs criteria to stop simulation
MaximumWallClockMaximum elapsed wall clock time to stop simulation
NameSpecify name of object
NotesHTML text describing SimBiology object
RuntimeOptionsOptions for logged species
SensitivityAnalysisOptionsSpecify sensitivity analysis options
SolverOptionsSpecify model solver options
SolverTypeSelect solver type for simulation
StopTimeSimulation time criteria to stop simulation
TimeUnitsShow time units for dosing and simulation
TypeDisplay SimBiology object type


  1. 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');
  2. 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)
                            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'
  3. 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)
Was this topic helpful?