Opened 13 years ago
Closed 13 years ago
#1987 closed defect (fixed)
Unbalanced model
| Reported by: | Christian Schubert | Owned by: | Adrian Pop |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.9.0 |
| Component: | Frontend | Version: | trunk |
| Keywords: | unbalanced inner outer | Cc: | Per Östlund |
Description
I've found another source of unbalanced models.
Consider the following combination:
partial block Interface
input Real x;
output Real y;
end Interface;
block Impl
extends Interface;
equation
y = 2*x;
end Impl;
model A
outer block R = Interface;
R r(x = 1);
Real y = r.y;
end A;
model B
inner block R = Impl;
A a;
Real xa(start = 1);
equation
der(xa) = a.y;
end B;
When simulating B, omc says the model only got 3 equations but 4 variables.
As far as I can tell, the model should be fine.
Attachments (2)
Change History (6)
by , 13 years ago
by , 13 years ago
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Yep. We don't support inner/outer classes yet.
I'll see if I can add support for this somehow.
comment:4 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

for comparison dymolas output
model B Real a.r.x = 1; Real a.r.y; Real a.y = a.r.y; Real xa(start = 1); // Equations and algorithms // Component a.r // class B.R // extends Impl equation a.r.y = 2*a.r.x; // end of extends // Component // class B equation der(xa) = a.y; end B;