Wolfram Computation Meets Knowledge

How do I fix a simulation that runs slowly or gets stuck after a while?

Models can run slowly when their solutions are difficult to compute. The two most common reasons for this are:

  • The model is stiff, forcing the numerical solver to take very small steps. Try redesigning the model to make it more numerically tractable.
  • The model produces many events. You can simplify the model by removing events triggered by If statements in the Modelica code. The NoEvent operator tells the simulation to not create events when the value of an If statement changes. For example, to prevent an event from occurring when A becomes greater than B, change:
     if A > B then


     if noEvent(A > B) then
Is this article helpful?

Any comments?

Thank you for your feedback.


Contact Support

Whether you have a question about billing, activation or something more technical, we are ready to help you.

1-800-WOLFRAM (+1-217-398-0700 for international callers)

Customer Support

8am–5pm US Central Time

  • Product registration or activation
  • Pre-sales information and ordering
  • Help with installation and first launch

Advanced Technical Support (for eligible customers)

8am–7pm US Central Time

8:30–10am & 11am–5pm US Central Time

  • Priority technical support
  • Product assistance from Wolfram experts
  • Help with Wolfram Language programming
  • Advanced installation support