How to make workspace variables referenced in simevents blocks tunable parameters?
2 ビュー (過去 30 日間)
古いコメントを表示
guido veldhuis
2022 年 3 月 25 日
回答済み: Abdolkarim Mohammadi
2022 年 3 月 29 日
I am working with a Simulink model which uses the Simevents toolbox for discrete-event simulation. The model is quite large, and takes a very long time to compile (~500 seconds). The execution of the model is relatively fast (~10 seconds). Since I need to do a lot of simulations with this model, I would like to implement fast restart, which would save huge amounts of time. However, some of the parameters that need to be changed between runs are non-tunable parameters. These are workspace variables that are referenced by the matlab code in many simevents blocks (like the event actions specified in an entity server block for example). Is there a way to make the event action matlab code in these Simevents blocks run with tunable parameters (so they can be updated in between runs without needing to recompile)?
I know it is possible to define a tunable parameter under a mask, which works for matlab fucntion blocks (which allow for explicit specification of their inputs). However, this does not seem to be possible for the matlab code in simevents blocks.
0 件のコメント
採用された回答
Abdolkarim Mohammadi
2022 年 3 月 29 日
Event actions cannot take tunable parameters. Instead, you can get the desired value from a Simulink function. The Simulink function can represent the variations in the parameter using different blocks like Ramp, Sine wave, etc.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Discrete-Event Simulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!