Opened 7 years ago

Closed 7 years ago

#4495 closed defect (worksforme)

getSimulationOptions() reports default simulation settings before model is built

Reported by: robert.mueller@… Owned by: somebody
Priority: normal Milestone:
Component: Interactive Environment Version: v1.12.0
Keywords: getSimulationOptions simulation options scripting Cc:

Description

Dear developer team,

in the OMShell, the command getSimulationOptions() returns the standard simulation settings of OpenModelica instead of the simulation settings of the specified model.
See the following example:

>> getSimulationOptions(Modelica.Blocks.Examples.PID_Controller)
(0.0,1.0,1e-006,500,0.002)
>> buildModel(Modelica.Blocks.Examples.PID_Controller)
{"C:/Users/...
>> getSimulationOptions(Modelica.Blocks.Examples.PID_Controller)
(0.0,4.0,1e-006,500,0.008)

Only after the model has been built, the correct simulation options are returned.

My OM version is:
v1.12.0-dev-422-ge116454 (64-bit)

I hope you can help me with this.

Kind regards,
Robert Müller

Change History (3)

comment:1 by Martin Sjölund, 7 years ago

Did you call loadModel(Modelica) before calling getSimulationOptions?

in reply to:  1 comment:2 by robert.mueller@…, 7 years ago

Replying to sjoelund.se:

Did you call loadModel(Modelica) before calling getSimulationOptions?

That did the trick, thank you!

comment:3 by Martin Sjölund, 7 years ago

Component: *unknown*Interactive Environment
Milestone: Future
Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.