Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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

Edited by: baharev - Oct-24-14 11:29:09
Attachments:

Re: Input and output causality of connectors in the flattened model?

Hello there, I am facing the same issue exactly as you described (very well written by the way!),
Have you found an answer for this problem?
Thanks.

Re: Input and output causality of connectors in the flattened model?

No, unfortunately.  current/sad You are the first one to react to my post.

There are 0 guests and 0 other users also viewing this topic
You are here: