Opened 9 years ago

Closed 4 years ago

#3516 closed defect (fixed)

flattening fail with parameter fixed=false and redeclare

Reported by: Vitalij Ruge Owned by: somebody
Priority: high Milestone: 1.16.0
Component: New Instantiation Version:
Keywords: Cc: Per Östlund, Adrian Pop, Martin Sjölund

Description (last modified by Vitalij Ruge)

checkModel fail for the following Example:

package pSetPara
  model base
    parameter Real p1;
  end base;

  model repM
    replaceable model model1 = pSetPara.base;
  protected
    model1 model1Instance;
  end repM;

  model updatePara
    parameter Real unknow(fixed = false);
    repM M(redeclare model model1 = pSetPara.base(p1 = unknow));
  initial equation
    unknow = -1;
  end updatePara;
end pSetPara;

with Error occurred while flattening model pSetPara.updatePara

checkModel for updatePara return "unknow" is unknow.
If we replace parameter Real unknow(fixed = false); with
parameter Real unknow(fixed = true, start = -1); then checkModel is successfully.

probably connect to #3476

Change History (6)

comment:1 by Vitalij Ruge, 9 years ago

Cc: Per Östlund added

comment:2 by Vitalij Ruge, 9 years ago

Description: modified (diff)

comment:3 by Vitalij Ruge, 9 years ago

remove the lines

protected
  model1 model1Instance;

in repM, change the result for checkModel, too.

comment:4 by Vitalij Ruge, 9 years ago

Cc: Adrian Pop Martin Sjölund added

comment:5 by Vitalij Ruge, 9 years ago

Description: modified (diff)

comment:6 by Per Östlund, 4 years ago

Component: FrontendNew Instantiation
Milestone: Future1.16.0
Resolution: fixed
Status: newclosed

Works fine in the new frontend.

Note: See TracTickets for help on using tickets.