Opened 9 years ago

Last modified 7 years ago

#3934 new defect

Support the vendor annotations in translateModel and simulation runtime

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: Future
Component: Interactive Environment Version:
Keywords: Cc:

Description (last modified by Martin Sjölund)

We should add support for vendor annotations in translateModel:

Flag fX has the form -name or -name=value.

Annotation in the model:

__OpenModelica_simulationFlags=(f1 f2 f3 f4)

Flags in translateModel

// override f2 from __OpenModelica_simulationFlags
translateModel(M, simflags="f2 f5 f6");

Flags on command line:

# override f3 from __OpenModelica_simulationFlags
# override f6 from translateModel
./M -f3 f6 f7

The flags from translateModel should override __OpenModelica_simulationFlags and should be put in the M_init.xml file each flag in its own element under <DefaultExperiment>.

Example M_init.xml file:

<DefaultExperiment stopTime="0" endTime="1">
  <SimFlag>f1</SimFlag>
  <SimFlag>f2</SimFlag>
  <SimFlag>f3</SimFlag>
  <SimFlag>f4</SimFlag>
  <SimFlag>f5</SimFlag>
  <SimFlag>f6</SimFlag>
</DefaultExperiment>

The simulation runtime (M.exe) will read the simulation flags from M_init.xml and apply them before applying the flags given on the command line.

See also ticket: #3488

Change History (8)

comment:1 by Adrian Pop, 9 years ago

Description: modified (diff)
Summary: Support the vendor annotations in translateModel and simualtion runtimeSupport the vendor annotations in translateModel and simulation runtime

comment:2 by Adrian Pop, 9 years ago

Description: modified (diff)

comment:3 by Adrian Pop, 9 years ago

Description: modified (diff)

comment:4 by Martin Sjölund, 9 years ago

Description: modified (diff)

Isn't it more like:

__OpenModelica_simulationFlags=(f1="f1", f2="f2", f3="f3", f4="f4")
translateModel(M, method="xxx", simflags="f2 f5 f6");

comment:5 by Martin Sjölund, 9 years ago

Description: modified (diff)

comment:6 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

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

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:8 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

Note: See TracTickets for help on using tickets.