SolverType
Select solver type for simulation
Description
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.
Characteristics
Applies to | Object: Configset |
Data type | enum |
Data values | 'ode15s' , 'ode23t' , 'ode45' , 'sundials' , 'ssa' , 'expltau' , 'impltau' .
Default is 'ode15s' .Note
|
Access | Read/write |
Examples
Retrieve the
configset
object from themodelObj
.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
toode45
.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