Opened 13 years ago

Closed 4 years ago

Last modified 4 years ago

#1725 closed defect (fixed)

parameter passing for replaceable models does not work

Reported by: Fritz Zaversky Owned by: Per Östlund
Priority: high Milestone: 1.16.0
Component: New Instantiation Version: trunk
Keywords: Cc: Fritz Zaversky, Per Östlund

Description (last modified by Martin Sjölund)

Here the test:

In the final test model Test3 the parameter a should be 1 for all three cases.  But it is 10 in the second case.

model ModelA 
 parameter Real a = 10;
end ModelA; 

model ModelB 
 replaceable model Model = ModelA;
 Model m; 
end ModelB; 
  
model Test3 
 model ModelA1 = ModelA(final a =  1 );
 ModelB b(redeclare model Model = ModelA(a = 1)); 
 // m.a == 1

 ModelB b1(redeclare model Model = ModelA1);
 // m.a == 10

 ModelA1 a;                                       
 // a.a == 1 
 end Test3;

Change History (4)

comment:1 by Martin Sjölund, 12 years ago

Cc: zav1984, → zav1984
Description: modified (diff)

comment:2 by Martin Sjölund, 12 years ago

Cc: Per Östlund added
Milestone: Future
Owner: changed from Fritz Zaversky to Per Östlund
Status: newassigned

This is fixed in the new instantiation (to be released way in the future).

in reply to:  2 ; comment:3 by Per Östlund, 4 years ago

Component: Simulation Code GenerationNew Instantiation
Resolution: fixed
Status: assignedclosed

Replying to sjoelund.se:

This is fixed in the new instantiation (to be released way in the future).

The future is now.

in reply to:  3 comment:4 by Francesco Casella, 4 years ago

Milestone: Future1.16.0

Replying to perost:

Replying to sjoelund.se:

This is fixed in the new instantiation (to be released way in the future).

The future is now.

Yayyyy! :)

Note: See TracTickets for help on using tickets.