SolverOptions

Specify model solver options

Description

The SolverOptions property is an object that holds the model solver options in the configset object. Changing the property SolverType changes the options specified in the SolverOptions object.

Properties of SolverOptions are summarized in Property Summary.

Property Summary

AbsoluteToleranceAbsolute error tolerance applied to state value during simulation
AbsoluteToleranceScalingControl scaling of absolute error tolerance during simulation
AbsoluteToleranceStepSizeInitial guess for time step size for scaling of absolute error tolerance
ErrorToleranceSpecify explicit or implicit tau error tolerance
LogDecimationSpecify frequency to log stochastic simulation output
MaxIterationsSpecify nonlinear solver maximum iterations in implicit tau
MaxStepSpecify upper bound on ODE solver step size
OutputTimesSpecify times to log deterministic simulation output
RandomStateSet random number generator
RelativeToleranceAllowable error tolerance relative to state value during a simulation
SensitivityAnalysisEnable or disable sensitivity analysis
TypeDisplay SimBiology object type

Characteristics

Applies toObject: configset
Data typeObject
Data valuesSolver options depending on SolverType. Default is SolverOptions for default SolverType (ode15s).
AccessRead-only

Examples

This example shows the changes in SolverOptions for various SolverType settings.

  1. Retrieve the configset object from the modelObj.

    modelObj  = sbiomodel('cell');
    configsetObj = getconfigset(modelObj);
  2. Configure the SolverType to ode45.

    set(configsetObj, 'SolverType', 'ode45');
    get(configsetObj, 'SolverOptions')
    
    
    Solver Settings: (ode)
    
         AbsoluteTolerance:    1.000000e-006
         RelativeTolerance:    1.000000e-003
  3. Configure the SolverType to ssa.

    set(configsetObj, 'SolverType', 'ssa');
    get(configsetObj, 'SolverOptions')
    
    
    Solver Settings: (ssa)
    
         LogDecimation:        1
         RandomState:          []
    
  4. Configure the SolverType to impltau.

    set(configsetObj, 'SolverType', 'impltau');
    get(configsetObj, 'SolverOptions')
    
    
    Solver Settings: (impltau)
    
         ErrorTolerance:       3.000000e-002
         LogDecimation:        1
         AbsoluteTolerance:    1.000000e-002
         RelativeTolerance:    1.000000e-002
         MaxIterations:        15
         RandomState:          []
  5. Configure the SolverType to expltau.

    set(configsetObj, 'SolverType', 'expltau');
    get(configsetObj, 'SolverOptions')
    
    
    Solver Settings: (expltau)
    
         ErrorTolerance:       3.000000e-002
         LogDecimation:        1
         RandomState:          []
Was this topic helpful?