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

3 visualizaciones (últimos 30 días)
Jaron Schole
Jaron Schole el 24 de Jun. de 2021
Comentada: Jaron Schole el 3 de Ag. de 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.

Respuesta aceptada

David John
David John el 3 de Ag. de 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.
  1 comentario
Jaron Schole
Jaron Schole el 3 de Ag. de 2021
Thank you very much!
I have seen that option before but couldn't figure out what to use it for. Now it makes sense!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by