Skip to content

How to detect failed simulation? #108

@bilderbuchi

Description

@bilderbuchi

I have a Modelica model (can't share that sadly). Using OMEdit, using certain parameter values the simulation (rightly so) fails to finish, and the OMEdit output console gives an error Simulation process failed. Exited with code -11.

Now, I am using OMPython to automate simulations of that model, and certain parameter combinations lead to simulations (correctly) failing. However, I could not find a way to detect, using OMPython, that the simulation fails!
Using the same parameters that correctly and visibly fail with OMEdit above, when doing model.simulate() followed by model.sendExpression('getErrorString()'), I only get an empty string back. In fact, in the (powershell) console I only see warnings and info-level messages, but no errors. However, a last info message says model terminate | Integrator failed. | Simulations terminated at time 167.512, which indicates a failed simulation to me.
Why is this info-level, though, and not error-level?
How can I detect that a simulation did not finish succesfully?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions