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.
0 个评论
采纳的回答
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Run-Time Parameters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!