Opened 9 years ago

Last modified 4 years ago

#3516 closed defect

flattening fail with parameter fixed=false and redeclare — at Initial Version

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

checkModel fail for the following Example:

package pSetPara
  model base
    parameter Real p1;
  end base;

  model repM
    parameter Real pM1 = 1;
    replaceable model model1 = pSetPara.base;
  protected
    model1 model1Instance;
  end repM;

  model updatePara
    parameter Real unknow(fixed = false);
    repM M(pM1 = unknow, redeclare model model1 = pSetPara.base(p = 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 (0)

Note: See TracTickets for help on using tickets.