Why can't I use Simscape in Fast Restart Mode?
3 views (last 30 days)
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 on 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.