Use local solver when referencing model
Option to use local solver for referenced model
Since R2022a
Model Configuration Pane: Model Referencing
Description
The Use local solver when referencing model configuration parameter specifies how the software computes state and signal values for a referenced model. When this configuration parameter is enabled, the software uses the solver that the current referenced model specifies for its Solver configuration parameter.
For some systems, using a local solver can improve simulation performance. The local solver can use a different solver that is more appropriate for the system component. Whether the local solver is the same or different from the top solver, the local solver can use a larger step size, which can reduce the number of redundant calculations for system components with slower dynamics. For an example, see Simulate DC Motor Step Response Using Local Solver.
For more information about local solvers, see Use Local Solvers in Referenced Models.
Set Configuration Parameter for Referenced Model
In a model reference hierarchy, how you open the Configuration Parameters dialog box determines whether you edit the configuration parameter for the top model in the current model hierarchy or the current referenced model.
Top model in the current model hierarchy — In the Simulink® Toolstrip, on the Modeling tab, click Model Settings.
Current referenced model — In the Simulink Toolstrip, on the Modeling tab, click the Model Settings button arrow. Then, in the Referenced Model section, select Model Settings.
Alternatively, open the referenced model as a top model. Then, in the Simulink Toolstrip, on the Modeling tab, click Model Settings.
Settings
off
(default) | on
on
The software computes state and signal values for the current referenced model using a local solver. Specify the local solver using the Solver configuration parameter of the referenced model.
off
The software does not compute state and signal values for the current referenced model using a solver that is local to the current referenced model.
Tips
While the top solver can be a variable-step or fixed-step solver, the local solver must be a fixed-step solver.
When the top solver is a fixed-step solver, the step size for the local solver must be an integer multiple of the step size for the top solver.
Specify how the local solver extrapolates inputs and interpolates outputs using the Input signal handling and Output signal handling parameters of the Model block.
Recommended Settings
Application | Setting |
---|---|
Debugging | Off |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No impact |
Programmatic Use
Parameter:
UseModelRefSolver |
Value:
'on' | 'off' |
Default:
'off' |
Version History
Introduced in R2022a