Opened 13 years ago

Closed 7 years ago

#1755 closed defect (fixed)

Redeclare causes additional flow-equations

Reported by: Christoph Höger Owned by: Per Östlund
Priority: normal Milestone: 2.0.0
Component: New Instantiation Version: trunk
Keywords: Cc:

Description

model Test2

  connector A
    flow Real f;
    Real p;
  end A;

  connector B
    flow Real f;
    Real p;
  end B;

  model F
    replaceable A a1;
    replaceable A a2;
    equation
    /* some foobar */
    connect(a1, a2);
  end F;

  model X
    extends F;
    redeclare B a1;
    redeclare B a2;
    B b1;
    B b2;
    equation
    connect(b1, a1);
    connect(b2, a2);
  end X;

   model Y
    extends F;
    B b1;
    B b2;
    equation
    connect(b1, a1);
    connect(b2, a2);
  end Y;

end Test2;

If you instantiate Test2.X and Test2.Y you get two different results.
Test2.X is overconstrained because some bogus flow = 0.0 equations
slipped in.

Change History (3)

comment:1 by Dietmar Winkler, 9 years ago

Milestone: Future

comment:2 by Francesco Casella, 7 years ago

Component: FrontendNew Instantiation
Milestone: Future2.0.0

comment:3 by Per Östlund, 7 years ago

Resolution: fixed
Status: newclosed

This seems to have been fixed, it works correctly with both the old and the new instantiation.

Note: See TracTickets for help on using tickets.