Select the diagnostic action to take if Simulink® software detects S-functions that have continuous sample times, but do not produce consistent results when executed multiple times.
Simulink software takes no action.
Simulink software displays a warning.
Simulink software terminates the simulation and displays an error message.
Consistency checking can cause a significant decrease in performance (up to 40%).
Consistency checking is a debugging tool that validates certain assumptions made by Simulink ODE solvers. Use this option to:
Validate your S-functions and ensure that they adhere to the same rules as Simulink built-in blocks.
Determine the cause of unexpected simulation results.
Ensure that blocks produce constant output when called with a given value of t (time).
Simulink software saves (caches) output, the zero-crossing, the
derivative, and state values from one time step for use in the next time
step. The value at the end of a time step can generally be reused at the
start of the next time step. Solvers, particularly stiff solvers such as
take advantage of this to avoid redundant calculations. While calculating
the Jacobian matrix, a stiff solver can call a block's output functions many
times at the same value of
When consistency checking is enabled, Simulink software recomputes the appropriate values and compares them to the cached values. If the values are not the same, a consistency error occurs. Simulink software compares computed values for these quantities:
|Safety precaution||No impact|