Conditional input branch execution
Description
Improve model execution when the model contains Switch and Multiport Switch blocks.
Category: Simulation Target
Settings
Default: On
On
Executes only the blocks required to compute the control input and the data input selected by the control input. This optimization speeds execution of code generated from the model. Limits to Switch and Multiport Switch block optimization:
Only blocks with
-1
(inherited) orinf
(Constant) sample time can participate.Blocks with outputs flagged as test points cannot participate.
No multirate block can participate.
Blocks with states cannot participate.
Model blocks cannot participate.
Only S-functions with option
SS_OPTION_CAN_BE_CALLED_CONDITIONALLY
set can participate.
Off
Executes all blocks driving the Switch block input ports at each time step.
Command-Line Information
Parameter:
ConditionallyExecuteInputs |
Value:
'on' | 'off' |
Default:
'on' |
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | On |
Efficiency | On (execution), No impact (ROM, RAM) |
Safety precaution | No impact |
Related Topics
- Use Conditional Input Branch Execution (Simulink Coder)
- Conditionally Executed Subsystems Overview
- Code Efficiency (Simulink Coder)
- Model Configuration Parameters: Simulation Target
- Simulink Optimizations and Model Coverage (Simulink Coverage)