Main Content

Solver reset method

Option to specify whether solver recomputes Jacobian matrix during solver reset

Model Configuration Pane: Solver

Description

Solver resets happen in response to certain simulation conditions, such as zero crossings. Use this parameter to prioritize solver reset speed against computational accuracy as needed for your model.

Dependencies

To enable this parameter:

  • Set the solver Type to Variable-step.

  • Set the Solver parameter to ode15s (stiff/NDF), ode23t (mod. stiff/Trapezoidal), or ode23tb (stiff/TR-BDF2).

Settings

Fast (default) | Robust
Fast

The solver does not recompute the Jacobian matrix for each solver reset.

Selecting this option can improve simulation performance but simulations might produce inaccurate results.

Robust

The solver does recompute the Jacobian matrix for each solver reset.

If you suspect simulation results are incorrect, simulate with the robust solver reset method. If the simulation results do not change, revert back to the fast solver reset method.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: SolverResetMethod
Type: string | character vector
Value: 'Fast' | 'Robust'
Default: 'Fast'

Version History

Introduced before R2006a