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
Ifstatements in the Modelica code. The
NoEventoperator tells the simulation to not create events when the value of an
Ifstatement changes. For example, to prevent an event from occurring when A becomes greater than B, change: