OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

CVODE solver reset only when necessary

Open rruusu opened this issue 2 months ago • 0 comments

Current state

Some simulation tools, such as PLECS, include discrete-time dynamic processes in a Model Exchange FMU. This causes events to be generated at very short, regular intervals.

Consequently, this leads to constant resets of the CVODE solver, which necessitates a new Jacobian evaluation with every event, even when no substantive change occurs. This significantly degrades simulation performance.

Suggested feature

The strongly coupled system solver could check whether any derivatives of state variables have actually changed significantly during an event, and only reset CVODE when necessary.

If only the state variables themselves change during an event but their derivatives are unaffected, the solver would not require a reset, but could simply continue integration from the new set of states.

Advantages

When a ME FMU frequently produces unnecessary events where no change occurs, skipping the solver reset can save a significant amount of simulation time.

rruusu avatar Oct 20 '25 08:10 rruusu