Opened 7 years ago
Closed 7 years ago
#5174 closed defect (fixed)
[Replaceable components] Wrong flattening of models with replaceble components
| Reported by: | Owned by: | Lennart Ochel | |
|---|---|---|---|
| Priority: | high | Milestone: | 2.0.0 |
| Component: | New Instantiation | Version: | |
| Keywords: | Replaceable extends duplicate declarations | Cc: |
Description
The following code doesn't work in OpenModelica, which sufficiently reduces the usage of replaceble components. Both examples give model A3 with two identical (duplicate) declarations of "Real A"
Exmple1:
model A1
replaceable Real A;
end A1;
model A2
replaceable Real A;
end A2;
model A3
extends A1;
extends A2;
end A3;
Example2:
model A1
Real A;
end A1;
model A2
Real A;
end A2;
model A3
extends A1(redeclare Real A);
extends A2;
end A3;
Change History (1)
comment:1 by , 7 years ago
| Component: | Backend → New Instantiation |
|---|---|
| Milestone: | 1.13.0 → 2.0.0 |
| Resolution: | → fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

These two models work correctly with the new front-end. In OMEdit, set Tools|Options|Simulation|OMC Command Line Options to
-d=newInst. If you then flatten bothA3models you getThis will become the standard behaviour from 2.0.0. We are no longer upgrading the old front-end.