Documentation

Diagnostics Pane: Solver

Solver Diagnostics Overview

Specify what diagnostic actions Simulink® software should take, if any, when it detects an abnormal condition with the solver.

Configuration

Set the parameters displayed.

Tips

  • To open the Diagnostics: Solver pane, in the Simulink Editor, select Simulation > Model Configuration Parameters > Diagnostics. The Solver pane appears.

  • The options are typically to do nothing or to display a warning or an error message.

  • A warning does not terminate a simulation, but an error does.

See Also

Algebraic loop

Select the diagnostic action to take if Simulink software detects an algebraic loop while compiling the model.

Settings

Default: warning

none

When the Simulink software detects an algebraic loop, the software tries to solve the algebraic loop. If the software cannot solve the algebraic loop, it reports an error and the simulation terminates.

warning

When Simulink software detects an algebraic loop, it displays a warning and tries to solve the algebraic loop. If the software cannot solve the algebraic loop, it reports an error and the simulation terminates.

error

When Simulink software detects an algebraic loop, it terminates the simulation, displays an error message, and highlights the portion of the block diagram that comprises the loop.

Tips

  • An algebraic loop generally occurs when an input port with direct feedthrough is driven by the output of the same block, either directly, or by a feedback path through other blocks with direct feedthrough. An example of an algebraic loop is this simple scalar loop.

  • When a model contains an algebraic loop, Simulink software calls a loop-solving routine at each time step. The loop solver performs iterations to determine the solution to the problem (if it can). As a result, models with algebraic loops run slower than models without them.

  • Use the error option to highlight algebraic loops when you simulate a model. This causes Simulink software to display an error dialog (the Diagnostic Viewer) and recolor portions of the diagram that represent the first algebraic loop that it detects. Simulink software uses red to color the blocks and lines that constitute the loop. Closing the error dialog restores the diagram to its original colors.

  • See Algebraic Loops for more information.

Command-Line Information

Parameter: AlgebraicLoopMsg
Type: string
Value: 'none' | 'warning' | 'error'
Default: 'warning'

Recommended Settings

ApplicationSetting
Debuggingerror
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

See Also

Minimize algebraic loop

Select the diagnostic action to take if artificial algebraic loop minimization cannot be performed for an atomic subsystem or Model block because an input port has direct feedthrough.

When you set the Minimize algebraic loop occurrences parameter for an atomic subsystem or a Model block, if Simulink detects an artificial algebraic loop, it attempts to eliminate the loop by checking for non-direct-feedthrough blocks before simulating the model. If Simulink cannot minimize the artificial algebraic loop, the simulation performs the diagnostic action specified by the Minimize algebraic loop parameter.

Settings

Default: warning

none

Simulink takes no action.

warning

Simulink displays a warning that it cannot minimize the artificial algebraic loop.

error

Simulink terminates the simulation and displays an error that it cannot minimize the artificial algebraic loop.

Tips

  • If the port is involved in an artificial algebraic loop, Simulink software can remove the loop only if at least one other input port in the loop lacks direct feedthrough.

  • Simulink software cannot minimize artificial algebraic loops containing signals designated as test points (see Working with Test Points).

Command-Line Information

Parameter: ArtificialAlgebraicLoopMsg
Type: string
Value: 'none' | 'warning' | 'error'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
EfficiencyNo impact
TraceabilityNo impact
Safety precautionerror

See Also

Block priority violation

Select the diagnostic action to take if Simulink software detects a block priority specification error.

Settings

Default: warning

warning

When Simulink software detects a block priority specification error, it displays a warning.

error

When Simulink software detects a block priority specification error, it terminates the simulation and displays an error message.

Tips

  • Simulink software allows you to assign update priorities to blocks. Simulink software executes the output methods of higher priority blocks before those of lower priority blocks.

  • Simulink software honors the block priorities that you specify only if they are consistent with the Simulink block sorting algorithm. If Simulink software is unable to honor a user specified block priority, it generates a block priority specification error.

Command-Line Information

Parameter: BlockPriorityViolationMsg
Type: string
Value: 'warning' | 'error'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

See Also

Min step size violation

Select the diagnostic action to take if Simulink software detects that the next simulation step is smaller than the minimum step size specified for the model.

Settings

Default: warning

warning

Simulink software displays a warning.

error

Simulink software terminates the simulation and displays an error message.

Tips

  • A minimum step size violation can occur if the specified error tolerance for the model requires a step size smaller than the specified minimum step size. See Min step size and Maximum order for more information.

  • Simulink software allows you to specify the maximum number of consecutive minimum step size violations permitted (see Number of consecutive min steps).

Command-Line Information

Parameter: MinStepSizeMsg
Type: string
Value: 'warning' | 'error'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Consecutive zero-crossings violation

Select the diagnostic action to take when Simulink software detects that the number of consecutive zero crossings exceeds the specified maximum.

Settings

Default: error

none

Simulink software takes no action.

warning

Simulink software displays a warning.

error

Simulink software terminates the simulation and displays an error message.

Tips

  • If you select warning or error, Simulink software reports the current simulation time, the number of consecutive zero crossings counted, and the type and name of the block in which Simulink software detected the zero crossings.

  • For more information, see Preventing Excessive Zero Crossings.

Dependency

This diagnostic applies only when you are using a variable-step solver and the zero-crossing control is set to either Enable all or Use local settings.

Command-Line Information

Parameter: MaxConsecutiveZCsMsg
Type: string
Value: 'none' | 'warning'
Default: 'error'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionwarning or error

See Also

Automatic solver parameter selection

Select the diagnostic action to take if Simulink software changes a solver parameter setting.

Settings

Default: none

none

Simulink takes no action.

warning

Simulink displays a warning.

error

Simulink terminates the simulation and displays an error message.

Tips

When enabled, this option notifies you if:

  • Simulink changes a user-modified parameter to make it consistent with other model settings.

  • Simulink automatically selects solver parameters for the model, such as FixedStepSize.

For example, if you simulate a discrete model that specifies a continuous solver, Simulink software changes the solver type to discrete and displays a warning about this change at the MATLAB® command line.

Command-Line Information

Parameter: SolverPrmCheckMsg
Type: string
Value: 'none' | 'warning' | 'error'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

See Also

Extraneous discrete derivative signals

Select the diagnostic action to take when a discrete signal appears to pass through a Model block to the input of a block with continuous states.

Settings

Default: error

none

Simulink software takes no action.

warning

Simulink software displays a warning.

error

Simulink software terminates the simulation and displays an error message.

Tips

  • This error can occur if a discrete signal passes through a Model block to the input of a block with continuous states, such as an Integrator block. In this case, Simulink software cannot determine with certainty the minimum rate at which it needs to reset the solver to solve this model accurately.

  • If this diagnostic is set to none or warning, Simulink software resets the solver whenever the value of the discrete signal changes. This ensures accurate simulation of the model if the discrete signal is the source of the signal entering the block with continuous states. However, if the discrete signal is not the source of the signal entering the block with continuous states, resetting the solver at the rate the discrete signal changes can lead to the solver being reset more frequently than necessary, slowing down the simulation.

  • If this diagnostic is set to error, Simulink software halts when compiling this model and displays an error.

Dependency

This diagnostic applies only when you are using a variable-step ode solver and the block diagram contains Model blocks.

Command-Line Information

Parameter: ModelReferenceExtraNoncontSigs
Type: string
Value: 'none' | 'warning' | 'error'
Default: 'error'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

State name clash

Select the diagnostic action to take when a name is used for more than one state in the model.

Settings

Default: warning

none

Simulink software takes no action.

warning

Simulink software displays a warning.

Tips

  • This diagnostic applies for continuous and discrete states during simulation.

  • This diagnostic applies only if you save states to the MATLAB workspace using the format Structure or Structure with time. If you do not save states in structure format, the state names are not used, and therefore the diagnostic will not warn you about a naming conflict.

Command-Line Information

Parameter: StateNameClashWarn
Type: string
Value: 'none' | 'warning'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

SimState interface checksum mismatch

Use this check to ensure that the interface checksum is identical to the model checksum before loading the SimState.

Settings

Default: warning

none

Simulink software does not compare the interface checksum to the model checksum.

warning

The interface checksum in the SimState is different than the model checksum.

error

When Simulink detects that a change in the configuration settings occurred after saving the SimState, it does not load the SimState and reports an error.

Command-Line Information

Parameter: SimStateInterfaceChecksumMismatchMsg
Type: string
Value: 'warning' | 'error' | 'none'
Default: 'warning'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Was this topic helpful?