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

Information of simulation progress

Information of simulation progress

Hello,

is it possible to get infromation of the current time step being calculated during the simulation? Or estimate of the simulation time?

It would be very helpful, but I haven't found that functionality so far.

Thanks,
pekka

Re: Information of simulation progress

Did you ever get an answer to this?  I am running simulations through a .Net application using Corba (omc.exe +interactiveCorba) and calling the simulate command.  I would like to get the progress value back.

Re: Information of simulation progress

./ModelName -? gives a list of flags you can give the simulation executable. One of them is:

Code:

|                 | |       | | <-port=value> or <-port value>

|                 | |       | |   value specifies interactive simulation port

Just open a TCP port and listen. Try for example:

Code:

$ nc -l -p 12345

$ ./ModelName -p 12345

Return the progress as 1/10000 progress from startTime to stopTime (0.01% per unit)

Re: Information of simulation progress

Great sjoelund.se!

It works even in Windows. Just put -port instead of -p in

Code:

$ ./ModelName -port 12345

Best regards
Koldo

Re: Information of simulation progress

I had seen that suggestion in another post, and it hadn't worked.  I think there was another client using the port I originally picked because it is working now.
My original question asked about using Corba instead of calling the exe directly.  After playing around with it some more, the answer is to add that port specifier as a simflag option (simflags=" -port 12345")

Code:

 simulate(MyModel, startTime=0, stopTime=20,numberOfIntervals=500, tolerance=0.0001, method="dassl", outputFormat="csv", measureTime=false, cflags="", simflags=" -port 12345")

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