フィルターのクリア

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

16 ビュー (過去 30 日間)
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?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 12 月 9 日
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. 
 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRun Individual Simulations についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by