Main Content

Solver data inconsistency

Diagnostic action to take when S-function with continuous sample time produces inconsistent results

Model Configuration Pane: Diagnostics

Description

The Solver data inconsistency configuration parameter specifies the diagnostic action the software takes when an S-function that has continuous sample time produces inconsistent results. This diagnostic validates assumptions of ODE solvers.

Use this diagnostic only for debugging to verify that:

  • Custom S-functions adhere to the same rules that built in blocks do.

  • Blocks produce consistent output values for the same value of time.

Warning

Setting this parameter to a value other than none can significantly degrade simulation performance.

Solvers save output, zero-crossing, derivative, and state values calculated in each time step for use in the calculations for the next time step. When you enable consistency checking by setting this parameter value to warning or error, the solver recomputes the output, zero-crossing, derivative, and state values to compare them to the values saved from the previous time step. If the recalculated values do not match the values from the previous time step, the software issues a diagnostic.

Settings

none (default) | warning | error
none

The software does not issue a diagnostic.

warning

The software issues a warning.

error

The software issues an error and terminates the simulation.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

ApplicationSetting
Debuggingwarning
TraceabilityNo impact
Efficiencynone
Safety precautionNo impact

Programmatic Use

Parameter:ConsistencyChecking
Type: string | character vector
Values: "none" | "warning" | "error"
Default: "none"

Version History

Introduced in R2006a