Opened 9 years ago
Closed 4 years ago
#3833 closed defect (fixed)
Redeclaring package Medium = Medium in extends does not work
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: |
Description
The model:
within MyClass; model Mypipe extends Modelica.Fluid.Pipes.DynamicPipe(redeclare package Medium = Medium); replaceable package Medium=Modelica.Media.Water.StandardWater; equation annotation(Icon(coordinateSystem(grid = {2, 8}))); end Mypipe;
goes into an infinite loop during instantiation.
Change History (4)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 5 years ago
comment:3 by , 5 years ago
I'm sorry but I don't understand why you write the Mypipe
model this way.
DynamicPipe
already contains the declaration of a Medium
package. Mypipe
extends from it, so it already has it, and this causes some kind of conflict if you re-add the declaration with the same name. I don't see the point of doing so? Can't you just write
model Mypipe extends Modelica.Fluid.Pipes.DynamicPipe( redeclare replaceable package Medium = Modelica.Media.Water.StandardWater); annotation(Icon(coordinateSystem(grid = {2, 8}))); end Mypipe;
Version 0, edited 5 years ago by (next)
comment:4 by , 4 years ago
Component: | Frontend → New Instantiation |
---|---|
Milestone: | Future → 1.16.0 |
Resolution: | → fixed |
Status: | accepted → closed |
Closing this as fixed since the model is wrong and the new frontend as mentioned gives an error for it.
Note:
See TracTickets
for help on using tickets.
Using 1.14.0-dev.beta1, I get two errors for this model (without the
within MyClass;
)At least there's no infinite loop anymore.