Opened 8 years ago

Last modified 6 years ago

#4235 closed defect

assigning Medium package in replaceable class fails — at Version 1

Reported by: Michael Wetter Owned by: somebody
Priority: blocker Milestone: 2.0.0
Component: New Instantiation Version: v1.12.0
Keywords: Cc:

Description (last modified by Michael Wetter)

Translating various models fail with the message

Buildings.Fluid.Boilers.Examples.BoilerPolynomial: 28:3-39:70]: component boi1 contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.

or similarly

[5] 21:45:22 Translation Error
[Buildings.Examples.Tutorial.Boiler.System3: 153:3-160:72]: component boi contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.

The problematic code seems to be in Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger:

 replaceable Buildings.Fluid.MixingVolumes.MixingVolume vol
  constrainedby Buildings.Fluid.MixingVolumes.BaseClasses.PartialMixingVolume(
    redeclare final package Medium = Medium,
    ...

This is a blocker if users want to use OpenModelica during the tutorial at the MODPROD workshop.

The error from our other tutorial that we could use also seems related as we use a similar construct in the cooling coil:

[/var/lib/hudson/jobs/OpenModelica_TEST_ALL_LIBRARIES/workspace/OpenModelica/build/lib/omlibrary/Buildings latest/Fluid/Interfaces/PartialFourPort.mo:4:15-6:45:writable] Notification: From here:
[/var/lib/hudson/jobs/OpenModelica_TEST_ALL_LIBRARIES/workspace/OpenModelica/build/lib/omlibrary/Buildings latest/Examples/Tutorial/SpaceCooling/System2.mo:82:3-100:28:writable] Error: component cooCoi contains the definition of a partial class Medium1.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.
Error: Error occurred while flattening model Buildings.Examples.Tutorial.SpaceCooling.System2

Change History (1)

comment:1 by Michael Wetter, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.