- Index
- » Developer
- » OpenModelica development
- » Input and output causality of...
Input and output causality of connectors in the flattened model?
Input and output causality of connectors in the flattened model?
I am trying to get the topological information of Modelica models (connections of the blocks, how the blocks are nested hierarchically, etc). It turns out that almost everything can be fairly easily reconstructed from the modelDescription.xml; I already have a Python prototype that works reasonably well for easier models.
All my models are causal. The difficulty is that the input and output information on the connectors seem to be lost.
I have attached a simple model:
inout-omedit.mo
To flatten the model, I simple clicked Export > Export.xml in OMEdit. I expected the causality attributes in the modelDescription.xml to be "input" and "output" accordingly but they are "internal".
What am I doing wrong? Would it be possible to somehow tell the OpenModelica compiler to write this information (input or output on connectors) to the modelDescription.xml?
As a related question: Can I somehow disable all simplification by the compiler except constant folding (constant propagation) when exporting to xml?
A quite hackish workaround to get the input-output information is to manually tag the connectors in the .mo file with "in" and "out" (see the attached file); then I get these strings in the description attribute. This gives me a workaround for the time being but it is obviously not a solution.
Many thanks,
Ali
- Index
- » Developer
- » OpenModelica development
- » Input and output causality of...