Opened 12 years ago

Closed 3 years ago

Last modified 3 years ago

#1725 closed defect (fixed)

parameter passing for replaceable models does not work

Reported by: zav1984 Owned by: perost
Priority: high Milestone: 1.16.0
Component: New Instantiation Version: trunk
Keywords: Cc: zav1984, perost

Description (last modified by sjoelund.se)

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 Changed 12 years ago by sjoelund.se

  • Cc changed from zav1984, to zav1984
  • Description modified (diff)

comment:2 follow-up: Changed 12 years ago by sjoelund.se

  • Cc perost added
  • Milestone set to Future
  • Owner changed from zav1984 to perost
  • Status changed from new to assigned

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

comment:3 in reply to: ↑ 2 ; follow-up: Changed 3 years ago by perost

  • Component changed from Simulation Code Generation to New Instantiation
  • Resolution set to fixed
  • Status changed from assigned to closed

Replying to sjoelund.se:

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

The future is now.

comment:4 in reply to: ↑ 3 Changed 3 years ago by casella

  • Milestone changed from Future to 1.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.