Why are my SimBiology simulations freezing in bigger and complex models?

1 visualización (últimos 30 días)
I have a big and complicated model in SimBiology and when am running a simulation, it freezes. I have ran simple examples from the documentation and they run just fine.
Why are my SimBiology simulations freezing in bigger and complex models? Can it be a mathematical instability in my model?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 22 de Oct. de 2021
Editada: MathWorks Support Team el 26 de Oct. de 2021
It is quite possible that you have constructed a complex model that takes an extremely long time to simulate, in which case the expected behaviour is that MATLAB will remain busy until the simulation is complete or you interrupt the simulation.
If simulating from the command line, then you should be able to interrupt by pressing Control-C. If simulating within the SimBiology Desktop app, then you should be able to interrupt by clicking on the stop button.
Running extremely long simulations may use a lot of memory, as more and more simulation results are stored in memory. If the memory usage starts to exceed the available physical RAM, then MATLAB can become unresponsive as memory is swapped between physical RAM and disk. One simple you can do is to monitor the amount of memory that MATLAB is using.
In order to monitor the progress of a simulation is to perform the simulation in SimBiology Desktop app with a "live plot" that shows the results of each simulation time step as it is calculated. This should allow you to see if and how the simulation is making progress. You can find more information about that in the documentation page about "Configuring Live Plots" in:
Also, a general recommendation when simulating complex models is to set the "MaximumWallClock" option to a reasonable time limit. This should cause the simulation to end after the specific real-world time has elapsed. That should prevent excessively long simulations. You can find more information about that option in the documentation page in
If we understand correctly what is meant by "mathematical instability", then SimBiology could get stuck in an extremely long-running simulation without reporting any errors. This is not something that we can easily check for. Once again, we encourage to set "MaximumWallClock" during fitting to avoid such long-running simulations. Otherwise, SimBiology is essentially doing what it is asked to do and is attempting an extremely long-running simulation.

Más respuestas (0)

Comunidades de usuarios

Más respuestas en  SimBiology Community


Más información sobre Scan Parameter Ranges en Help Center y File Exchange.




Community Treasure Hunt

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

Start Hunting!

Translated by