Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expandable connector circular definition leads to unclear causality #1305

Closed
modelica-trac-importer opened this issue Nov 4, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@modelica-trac-importer
Copy link
Collaborator

Reported by hansolsson on 3 Oct 2013 16:12 UTC
The following model from the compliance test-suite, see #1304

model M
    expandable connector EC
      Real x;
    end EC;

    connector RealOutput = output Real;
    RealOutput ro;
    EC ec;
  equation 
    connect(ro, ec.y);
    ro=1.0;
  end M;

highlights an issue in the spec.

9.1.3 states that "ec.y" will be either input or output to satisfy the requirements in 9.3.

Intuitively it should be input - since "output" would have two outside outputs connected together (i.e. the component is the "source" of two signals but internally there is no local source of the signal in the connection set).

However, the relevant bullet in 9.3 has:
"
At least one of the following must hold for a connection set containing causal variables generated for a non-partial model or block:
(1) the connection set includes variables from an outside public expandable connector,
(2) the set contains variables from protected outside connectors, (3) it contains variables from one inside output connector, or
(4) from one public outside input connector, or
(5) the set is comprised solely of one variable from one inside input connector that is not part of an expandable connector."
--
And the first item in the list applies (the last item can never apply in this case).

Proposed change:
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 for a non-expandable connector.
(It might be that a more complete rewrite would be good, but it requires more thought.)


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

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 23 Oct 2013 12:46 UTC
Corrected in r7100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment