Main Content

Unexpected backtracking

Diagnostic action to take when unexpected backtracking is detected

Model Configuration Pane: Diagnostics

Description

The Unexpected backtracking parameter specifies the diagnostic action to take when a chart junction has both of the following conditions. The junction:

  • Does not have an unconditional transition path to a state or a terminal junction

  • Has multiple transition paths leading to it

This chart configuration can lead to unwanted backtracking during simulation.

To avoid unwanted backtracking, consider adding an unconditional transition from the chart junction to a terminal junction.

Settings

error (default) | none | warning
none

No warning or error appears.

warning

A warning appears with a link to examples of unwanted backtracking.

error

An error appears and stops the simulation.

Recommended Settings

ApplicationSetting
Debuggingwarning
TraceabilityNo impact
EfficiencyNo impact (for simulation)
No impact (for production code generation)
Safety precautionerror

Programmatic Use

Parameter: SFUnexpectedBacktrackingDiag
Value: 'none' | 'warning' | 'error'
Default: 'error'

Version History

Introduced in R2010a