Select solver type for simulation
The SolverType
property lets you specify
the solver to use for a simulation. For a discussion about solver
types, see Choosing a Simulation Solver.
Changing the solver type changes the options (properties) specified
in the SolverOptions
property of the configset
object.
If you change any SolverOptions
, these changes
are persistent when you switch SolverType
. For
example, if you set the ErrorTolerance
for the expltau
solver
and then change to impltau
when you switch back
to expltau
, the ErrorTolerance
will
have the value you assigned.
Applies to | Object: Configset |
Data type | enum |
Data values | 'ode15s' , 'ode23t' , 'ode45' , 'sundials' , 'ssa' , 'expltau' , 'impltau' .
Default is 'ode15s' .Note
|
Access | Read/write |
Retrieve the configset
object from
the modelObj
.
modelObj = sbiomodel('cell');
configsetObj = getconfigset(modelObj)
Configuration Settings - default (active)
SolverType: ode15s
StopTime: 10.000000
SolverOptions:
AbsoluteTolerance: 1.000000e-006
RelativeTolerance: 1.000000e-003
SensitivityAnalysis: false
RuntimeOptions:
StatesToLog: all
CompileOptions:
UnitConversion: false
DimensionalAnalysis: true
SensitivityAnalysisOptions:
Inputs: 0
Outputs: 0
Configure the SolverType
to ode45
.
set(configsetObj, 'SolverType', 'ode45') configsetObj Configuration Settings - default (active) SolverType: ode45 StopTime: 10.000000 SolverOptions: AbsoluteTolerance: 1.000000e-006 RelativeTolerance: 1.000000e-003 SensitivityAnalysis: false RuntimeOptions: StatesToLog: all CompileOptions: UnitConversion: false DimensionalAnalysis: true SensitivityAnalysisOptions: Inputs: 0 Outputs: 0