modelica / Modelica-Compliance

A semantics compliance suite for the Modelica language
Other
17 stars 16 forks source link

ModelicaCompliance.Connections.Expandable.{AugmentNonEmpty,PresentInExp} remaining issue #52

Closed modelica-trac-importer closed 5 years ago

modelica-trac-importer commented 5 years ago

Reported by hansolsson on 3 Oct 2013 15:54 UTC This was previously reported, and after analyzing it further I can only conclude the the model is not correct:

(PresentInExp also has the slight issue that there is no instance of M, i.e. we are simulating an empty model.)

The model and has an output connector (ro) connected to the bus. The expandable connector should thus be the source of the signal (i.e. variable in connector should declared with input-prefix).

According to: 9.1.3: "If the variable on the other side of the connect-equation is input or output the new component will be either input or output to satisfy the restrictions in Section 9.3."

The idea is that this should uniquely define whether it is input or output; and it is clear that having it as "input" in the expandable connector is ok. Unfortunately it is a bit messy for "output" - will open a ticket.

But the source is missing (instead ro has an equation): 9.1.3: "If a variable appears as an input in one expandable connector, it should appear as a non-input in at least one other expandable connector instance in the same augmentation set." -- Proposed change:

Base them on ModelicaCompliance.Connections.Expandable.AugmentScalar and just add an unused variable in the expandable connector for AugmentNonEmpty, and add 'x' in expandable connector and add another variable Real y=ec.x; for PresentInExp.


Migrated-From: https://trac.modelica.org/Modelica/ticket/1304

modelica-trac-importer commented 5 years ago

Comment by perost on 7 Oct 2013 11:51 UTC Fixed in om:r17581 as suggested.

modelica-trac-importer commented 5 years ago

Modified by dietmarw on 15 Nov 2013 13:32 UTC