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
Parameter | Description |
---|---|
Simulation start time | |
Simulation stop time |
Solver Selection
To see these parameters, click the arrow to expand the Solver Details section.
Variable-Step Solver Details
Parameter | Description |
---|---|
Maximum step size to allow in simulations that use variable-step solvers | |
Minimum step size for variable-step solver | |
Size of first step for variable-step solver | |
Relative tolerance for solver tolerance calculation | |
Absolute tolerance for solver tolerance calculation | |
Option to scale absolute tolerance based on state values | |
Option to preserve shape of states using derivative information at each time step | |
Number of steps less than or equal to minimum step size allowed before minimum step size violation occurs | |
Option to specify whether solver recomputes Jacobian matrix during solver reset | |
Method implicit solvers use to compute Jacobian matrix | |
Integration for nonadaptive | |
Order of numerical differentiation formulas used
for | |
Mode of operation for | |
Method |
Variable-Step Zero-Crossing Detection
Parameter | Description |
---|---|
Option to control how zero-crossing detection is enabled in the model | |
Choice of variable-step zero-crossing detection algorithm | |
Definition of consecutive zero crossings | |
State value at which adaptive zero-crossing algorithm can stop bracketing | |
Threshold for issuing diagnostic due to consecutive zero crossings |
Fixed-Step Solver Details
Parameter | Description |
---|---|
Step size for fixed-step solver | |
Method implicit solvers use to compute Jacobian matrix | |
Number of Newton's method iterations used by
| |
Extrapolation order for |
Fixed-Step Zero-Crossing Detection
Parameter | Description |
---|---|
Option to use zero-crossing detection with fixed-step solver | |
Maximum number of iterations performed when locating zero crossing | |
Maximum number of zero crossings to locate in a single time step |
Tasking and Sample Time Options
Option to specify constraints on model sample times | |
Discrete sample time periods, offsets, and priorities | |
Option to enable multitasking execution | |
Option to enable concurrent tasking behavior for model | |
Option to ensure integrity of data transfer between different sample times in deployed code | |
Deterministic data transfer behavior for automatically inserted Rate Transition blocks | |
Option to treat root-level input and output ports as part of each connected task in rate-based model | |
Priority ordering for real-time system targets |
These configuration parameters are in the Advanced parameters section.
Parameter | Description |
---|---|
Option to speed up simulation by decoupling continuous state integration from discrete sample times | |
Option to reduce the effect of zero crossings on continuous state integration |