Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)

Forgot password? | Forgot username? | Register

Stop time of a simulation with OMPython

Stop time of a simulation with OMPython

i'm developing a system in openmodelica which design the behaviour of a swarm of drone in various simulation. Now, i want to get the simulation result with OMPython, because i will use matplotlib to make charts of the various KPI. If i want to get values, the openmodelica scripting function requires:

    val(String valueName, Real timePoint, String file);

And i want to take the value at the end of the simulation. The problem is that the simulation stop time is not constant! So, is there a function to retrieve the stop time of the simulation?

I managed to retrieve this information in python using the "simulate" function. But i want to use BuildModel function, because with it i can change variables in the system and simulate again without any problem. any suggestion?

Re: Stop time of a simulation with OMPython

Problem solved, find a solution here: … 0#72140240

There are 0 guests and 0 other users also viewing this topic
You are here: