필터 지우기
필터 지우기

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 CenterFile Exchange에서 Run Individual Simulations에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by