# How to do something in Modelica every solver iteration?

How is it possible to do something once every solver iteration?

The expressions when change(time) or when time > pre(time) are not permitted.

Best regards, Koldo

Edit: The final goal is to do a cosimulation from Modelica with other tool that does not have FMI and where the Modelica side signals the iteration delta time. - Approach 1: Is there any way to fire a 'when' under an algorithm section just before or after an iteration step has been successfully finished? - Approach 2: I wonder if there is something similar to fmiEventUpdate(). It appears in the automatically generated .mo file when doing FMI, and "is called after a time, state or step event occurred ... the function returns once a new consistent state has been found".

• Your question is very software specific. You may have more success if you ask it at a modelica forum or on a mailing list. – Jan Feb 9 '14 at 14:29
• The initial question covers any Modelica environment. The "approach 2" that is platform specific could be just the last and unwanted option. – Koldo Feb 9 '14 at 22:22