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 — at Version 9

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 (9)

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
Note: See TracTickets for help on using tickets.