Opened 9 years ago

Closed 4 years ago

#3476 closed defect (fixed)

Replaceable package in connector causes translation error

Reported by: Markus Dahl Owned by: somebody
Priority: high Milestone: 1.16.0
Component: New Instantiation Version:
Keywords: Cc: Henrik Tidefelt

Description

Validation of connectorTest.testModel will yield the following error:

Translation Error: Variable Medium.nS not found in scope connectorTest.advConnector$something.

Translation Error: Error occurred while flattening model connectorTest.testModel

package connectorTest
  partial package partialMedium
    constant Integer nX;
  end partialMedium;

  connector advConnector
    replaceable package Medium = connectorTest.OtherMedium;
    Modelica.SIunits.Pressure p;
    flow Modelica.SIunits.MassFlowRate m_flow;
    stream Modelica.SIunits.Mass C_flow[Medium.nS];
  end advConnector;

  package PackageExample
    extends connectorTest.partialMedium(nX = 2);
    final constant Integer nS = 3;
  end PackageExample;

  package OtherMedium
    final constant Integer nS = 3;
  end OtherMedium;

  model testModel
    replaceable package Medium = PackageExample;
    connectorTest.advConnector something(redeclare package Medium = Medium);
  end testModel;
end connectorTest;

Attachments (1)

connectorTest.mo (752 bytes ) - added by Markus Dahl 9 years ago.

Download all attachments as: .zip

Change History (3)

by Markus Dahl, 9 years ago

Attachment: connectorTest.mo added

comment:1 by Lennart Ochel, 9 years ago

Component: UnknownFrontend

comment:2 by Per Östlund, 4 years ago

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

This works fine in the new frontend.

Note: See TracTickets for help on using tickets.