Filter löschen
Filter löschen

What is the recommended way to varying values for tunable parameters in Rapid Accelerator Mode simulations in Simulink?

16 Ansichten (letzte 30 Tage)
I have seen mentions of various ways in which tunable parameters can be varied when running simulations in Rapid Accelerator Mode, either in serial or parallel. One approach uses "Simulink.SimulationInput" and its "setVariable" method, another reference talks about using "Simulink.BlockDiagram.modifyTunableParameters" and the 'RapidAcceleratorParameterSets' parameter of sim() or parsim(). So which option should I use in which situation?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 9 Dez. 2023
In Simulink R2017a the SimulationInput object was introduced. The SimulationInput object serves as a container for run specific data overrides and makes it easier to move between workflows such as serial simulation, parallel simulation, and deployment with Simulink Compiler. The recommended way for running simulations in Rapid Accelerator Mode with varying values for tunable parameters is to use the "Simulink.SimulationInput" with its "setVariable" method approach. If "setVariable" is used for a tunable variable, then changing this variable will not trigger a rebuild of the model. Additionally if you set "RapidAcceleratorUpToDateCheck" to "off", then Simulink will additionally skip the "UpToDateCheck" to see if a rebuild is needed. This can provide additional speedup to initialization time but changes to non-tunable parameters will not be honored. 
Find an example of this approach here:
Prior to R2017a, using the "Simulink.BlockDiagram.modifyTunableParameters" was only way to change parameters on a Rapid Accelerator model when "RapidAcceleratorUpToDateCheck" is off. This method continues to work in later releases for backwards compatibility, but we recommend using the SimulationInput object instead. 
 

Weitere Antworten (0)

Kategorien

Mehr zu Run Individual Simulations finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by