Main Content

Check safety-related diagnostic settings for solvers

mathworks.hism.hisl_0043

Dependencies: Simulink® Check™

Usage: High-Integrity System Modeling

Guideline: hisl_0043: Configuration Parameters > Diagnostics > Solver

Description

This check verifies that the model configuration uses optimal parameter settings pertaining to solver diagnostics for generating code for a safety-related application.

Recommended Actions and Results

Review the violations that are flagged by the check and the recommended action for fixing the issue. After applying the changes, save the model and rerun the check analysis.

If you consider the flagged violation to either not be relevant or not feasible for your design, use the Justify button to provide rationale as to why the violation is either not relevant or not feasible for your design.

You can use the Fix button to allow the Model Advisor to fix all flagged violations. For this check, the Model Advisor configures model code generation settings that can impact safety.

Modeling ConditionRecommended Action
Simulink does not issue an error when it breaks algebraic loops automatically in the model. The breaking of algebraic loops can affect the predictability of the order of block execution. For safety-related applications, a model developer needs to know when such breaks occur.Set Algebraic loop on the Diagnostics > Solver pane in the Configuration Parameters dialog box to error or set the parameter AlgebraicLoopMsg to 'error'. Consider breaking such loops explicitly with Unit Delay blocks so that the execution order is predictable. At a minimum, verify that the results of loops breaking automatically are acceptable.
Simulink does not issue an error when it breaks algebraic loops automatically in the Model blocks, atomic subsystem, or enabled subsystems. The breaking of algebraic loops can affect the predictability of the order of block execution. For safety-related applications, a model developer needs to know when such breaks occur.Set Minimize algebraic loop on the Diagnostics > Solver pane in the Configuration Parameters dialog box to error or set the parameter ArtificialAlgebraicLoopMsg to 'error'. Consider breaking such loops explicitly with Unit Delay blocks so that the execution order is predictable. At a minimum, verify that the results of loops breaking automatically are acceptable.
Simulink does not issue an error when it detects a potential conflict in block execution order. For safety-related applications, block execution order must be predictable. A model developer needs to know when conflicting block priorities exist. Set Block priority violation on the Diagnostics > Solver pane in the Configuration Parameters dialog box to error or set the parameter BlockPriorityViolationMsg to 'error'.
Simulink does not issue an error when it automatically modifies the solver, step size, or simulation stop time. Such changes can affect the operation of the generated code. For safety-related applications, it is better to detect such changes so a model developer can explicitly set the parameters to known values. Set Automatic solver parameter selection on the Diagnostics > Solver pane in the Configuration Parameters dialog box to error or set the parameter SolverPrmCheckMsg to 'error'.
Simulink does not issue a warning when a name is used for more than one state in the model. For safety-related applications, it is better to detect name clashes so a model developer can fix them. Set State name clash on the Diagnostics > Solver pane in the Configuration Parameters dialog box to warning or set the parameter StateNameClashWarn to 'warning'.

Capabilities and Limitations

  • Does not require model compilation

  • Does not run on library models

  • Does not allow exclusions of blocks or charts

Version History

Introduced in R2020a