Why can't I use Simscape in Fast Restart Mode?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jaron Schole
am 24 Jun. 2021
Kommentiert: Jaron Schole
am 3 Aug. 2021
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.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/664325/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/664325/image.png)
0 Kommentare
Akzeptierte Antwort
David John
am 3 Aug. 2021
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Run-Time Parameters finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!