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 follow-up: Changed 7 years ago by sjoelund.se

Did you call loadModel(Modelica) before calling getSimulationOptions?

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

Replying to sjoelund.se:

Did you call loadModel(Modelica) before calling getSimulationOptions?

That did the trick, thank you!

comment:3 Changed 7 years ago by sjoelund.se

  • Component changed from *unknown* to Interactive Environment
  • Milestone Future deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.