Main Content

Solver reset method

Option to specify whether solver recomputes Jacobian matrix during solver reset

Model Configuration Pane: Solver

Description

The Solver reset method specifies whether the solver recomputes the Jacobian matrix during solver resets. Solver resets happen in response to certain simulation conditions, such as zero crossings. Recomputing the Jacobian improves the accuracy of simulation results but requires additional computations that can slow simulation. 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.

Programmatic Use

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

Version History

Introduced before R2006a