Main Content

Solver Pane

The Solver pane includes parameters for selecting and configuring the solver for a model and for specifying the start and stop times for simulation. A solver computes the states of a dynamic system for each simulation time step over the specified time span for the simulation.

Once the model compiles, the Solver Information tooltip displays:

  • The compiled solver name

  • The compiled step size, typically specified by the Max step size parameter or the Fixed-step size (fundamental sample time) parameter.

Once the model compiles, the status bar displays the solver used for compiling and a carat (^) when:

  • The software selects a different solver during compilation.

  • You set the step size to auto or the solver determines a step size that is different from the specified value of the Max step size parameter or the Fixed-step size (fundamental sample time) parameter. The Solver Information tooltip displays the step size that the software determined.

When configuring the solver, consider that:

  • Simulation time is not the same as clock time. For example, running a simulation for 10 seconds usually does not take 10 seconds. Total simulation time depends on factors such as model complexity, solver step sizes, and computer speed.

  • Code generation requires selecting a fixed-step solver.

  • Selecting a variable-step solver can significantly shorten the time required to simulate models in which states change rapidly or contain discontinuities.

The tables summarize the parameters available on the Solver pane of the Configuration Parameters dialog box.

Simulation Time

ParameterDescription

Start time

Simulation start time

Stop time

Simulation stop time

Solver Selection

ParameterDescription

Type

Choice of variable- or fixed-step solver

Solver

Solver that computes states and outputs for simulation

To see these parameters, click the arrow to expand the Solver Details section.

Variable-Step Solver Details

ParameterDescription

Max step size

Maximum step size to allow in simulations that use variable-step solvers

Min step size

Minimum step size for variable-step solver

Initial step size

Size of first step for variable-step solver

Relative tolerance

Relative tolerance for solver tolerance calculation

Absolute tolerance

Absolute tolerance for solver tolerance calculation

Auto scale absolute tolerance

Option to scale absolute tolerance based on state values

Shape preservation

Option to preserve shape of states using derivative information at each time step

Number of consecutive min steps

Number of steps less than or equal to minimum step size allowed before minimum step size violation occurs

Solver reset method

Option to specify whether solver recomputes Jacobian matrix during solver reset

Solver Jacobian Method

Method implicit solvers use to compute Jacobian matrix

Integration method

Integration for nonadaptive odeN variable-step solver

Maximum order

Order of numerical differentiation formulas used for ode15s solver

Daessc mode

Mode of operation for daessc solver

Continuous state refinement method

Method daessc solver uses to refine continuous state values

Variable-Step Zero-Crossing Detection

ParameterDescription

Zero-crossing control

Option to control how zero-crossing detection is enabled in the model

Algorithm

Choice of variable-step zero-crossing detection algorithm

Time tolerance

Definition of consecutive zero crossings

Signal threshold

State value at which adaptive zero-crossing algorithm can stop bracketing

Number of consecutive zero crossings

Threshold for issuing diagnostic due to consecutive zero crossings

Fixed-Step Solver Details

ParameterDescription

Fixed-step size (fundamental sample time)

Step size for fixed-step solver

Solver Jacobian Method

Method implicit solvers use to compute Jacobian matrix

Number of Newton's iterations

Number of Newton's method iterations used by ode14x and ode1be solvers

Extrapolation order

Extrapolation order for ode14x fixed-step solver

Fixed-Step Zero-Crossing Detection

ParameterDescription

Enable zero-crossing detection for fixed-step simulation

Option to use zero-crossing detection with fixed-step solver

Maximum number of bracketing iterations

Maximum number of iterations performed when locating zero crossing

Maximum number of zero-crossings per step

Maximum number of zero crossings to locate in a single time step

Tasking and Sample Time Options

  

Periodic sample time constraint

Option to specify constraints on model sample times

Sample time properties

Discrete sample time periods, offsets, and priorities

Treat each discrete rate as a separate task

Option to enable multitasking execution

Allow tasks to execute concurrently on target

Option to enable concurrent tasking behavior for model

Automatically handle rate transition for data transfer

Option to ensure integrity of data transfer between different sample times in deployed code

Deterministic data transfer

Deterministic data transfer behavior for automatically inserted Rate Transition blocks

Allow multiple tasks to access inputs and outputs

Option to treat root-level input and output ports as part of each connected task in rate-based model

Higher priority value indicates higher task priority

Priority ordering for real-time system targets

These configuration parameters are in the Advanced parameters section.

ParameterDescription

Enable decoupled continuous integration

Option to speed up simulation by decoupling continuous state integration from discrete sample times

Enable minimal zero-crossing impact integration

Option to reduce the effect of zero crossings on continuous state integration

See Also

Topics