Opened 5 years ago

Last modified 3 years ago

#5751 accepted enhancement

Add a flag to dump the Flat Modelica to a file during model translation or checking

Reported by: Oliver Lenord Owned by: Adrian Pop
Priority: high Milestone:
Component: Interactive Environment Version: v.1.15.0-dev
Keywords: compiler flags, debug output Cc:

Description (last modified by Adrian Pop)

At the moment one needs to call instantiateModel to get the flat Modelica output. A flag to dump the flat Modelica during the model checking or model build for simulation is desirable as the instantiation can take some time for large models so is not preferable to be repeated.

Previous ticket text


I used to generate flat modelica outputs and dae dumps directly form OMEdit by the following compiler flags assigned as "Additional Translation Flags" in the Options Dialog:

-m +d=evalOutputOnly --postOptModules+=dumpDAE

Currently there are no additional files created.

Maybe I'm missing something, but at least it used work.

Change History (15)

comment:1 by Adrian Pop, 5 years ago

--postOptModules+=dumpDAE does not generate any files, it outputs in the Messages Browser as a Scripting Notification.

Last edited 5 years ago by Adrian Pop (previous) (diff)

comment:2 by Oliver Lenord, 5 years ago

Right, sorry I forgot about that. The dumpDAE works fine.

How about the -m? - I expected a mof file to be generated?

comment:3 by Adrian Pop, 5 years ago

-m only works on the result of instantiateModel(Model). So you need to right click Instantiate Model on a model and then copy the result. OpenModelica has never generated .mof files.

comment:4 by Oliver Lenord, 5 years ago

Ok, thanks for clarification.
Then we can close this ticket.

comment:5 by Adrian Pop, 5 years ago

From a mos script it should be easy to do:
writeFile("Model.mof", instantiateModel(Model));

If this functionality is of interest, we could also dump an .mof file on some flag when building/simulating/translating the model.

comment:6 by Francesco Casella, 5 years ago

Resolution: worksforme
Status: newclosed

comment:7 by Adrian Pop, 5 years ago

Resolution: worksforme
Status: closedreopened
Summary: OMEdit compiler debug flags show no effectAdd a flag to dump the Flat Modelica to a file during model translation or checking
Type: defectenhancement

comment:8 by Adrian Pop, 5 years ago

Owner: changed from somebody to Adrian Pop
Status: reopenedaccepted

comment:9 by Adrian Pop, 5 years ago

Component: *unknown*Interactive Environment
Description: modified (diff)
Version: v1.14.0v.1.15.0-dev

comment:10 by Francesco Casella, 5 years ago

@adrpo, let's try to get replaceable to work first :)

in reply to:  10 comment:11 by Adrian Pop, 5 years ago

Replying to casella:

@adrpo, let's try to get replaceable to work first :)

absolutely!

comment:12 by Francesco Casella, 5 years ago

Milestone: 1.15.01.16.0

Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0

comment:13 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:14 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:15 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.