Opened 19 years ago

Last modified 19 years ago

#36 closed defect (fixed)

Parameter propagation with redeclare.

Reported by: haklu Owned by: haklu
Priority: critical Milestone:
Component: Version:
Keywords: Cc: haklu, Adrian Pop

Description


Change History (2)

comment:1 by haklu, 19 years ago

package A

model B

parameter Real b=1.0;
Real x;

end B;

end A;

package E
model BB

extends A.B;

equation

der(x) = b;

end BB;
end E;

package F
model C

parameter Real b=2.0;
replaceable A.B d(final b=b);

equation
end C;
end F;

model D

F.C c(b=5, redeclare E.BB d);

end D;

This gives the following flat modelica:
fclass D
parameter Real c.b = 5;
parameter Real c.d.b = 1.0;
Real c.d.x;
equation

der(c.d.x) = c.d.b;

end D;

The modification b=5 should have been propageted to c.d.b

comment:2 by haklu, 19 years ago

Even smaller example:

model B

parameter Real b=1.0;
Real x;

end B;

model BB

extends B;

equation

der(x) = b;

end BB;

model C

replaceable B d(b=5);

end C;

model D

C c(redeclare BB d);

end D;

Note: See TracTickets for help on using tickets.