Why can't I use Simscape in Fast Restart Mode?

3 次查看(过去 30 天)
I know that Simscape cannot be used in Fast Restart mode, but when I tried to do it anyway I noticed something.
The attached network can be started in Fast Restart mode and I can enter 85 instead of 80 and it simulates the model with the newly entered value without compiling. Now I wanted to try to replace the manual insertion with a Matlab routine, but then I get nowhere, because instead of an 80 I would have to use something like a parameter ABC and then update it in the MATLAB script. My question is, why I am not allowed to simulate my model in Fast Restart mode? By hand the whole thing works without problems? Why would it work in Simulink but not in Simscape?
The actual idea was to build a Simscape network and then simulate it again and again with parameters that can be changed via sliders and then update the results in plots continuously.

采纳的回答

David John
David John 2021-8-3
Fast Restart and Simscape do work together, but only for parameters that are run-time tunable. You need to first check if the parameters you want to modify are able to be run-time tunable or not. If they are, then you can select that option, and define the parameter as a workspace variable. Note that the parameter you want to change should be a workspace variable rather than a number though. You can then update the value of this workspace variable for each simulation run.
  1 个评论
Jaron Schole
Jaron Schole 2021-8-3
Thank you very much!
I have seen that option before but couldn't figure out what to use it for. Now it makes sense!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Run-Time Parameters 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by