﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3944	Check of models with partial Medium packages fails	Francesco Casella	somebody	"Consider this simple model:
{{{
model check
  inner Modelica.Fluid.System system;
  replaceable package gas = Modelica.Media.Interfaces.PartialMedium;
  Modelica.Fluid.Vessels.ClosedVolume free_volume(
    V = 0.01, use_portsData = false, 
    redeclare package Medium = gas);
end check;
}}}

The model is perfectly legitimate for a library. It cannot be simulated directly, because it lacks an actual medium implementation, but is othewise locally balanced and well defined. 

Checking in OMC produces the following error:
{{{
[1] 10:08:59 Translation Warning
[Modelica.Media: 4475:17-4600:23]: Forcing full instantiation of partial class BaseProperties$free_volume$medium during checkModel.

[2] 10:08:59 Translation Error
Internal error - InstUtil.moveBindings: Mismatched number of equations and variables.

[3] 10:08:59 Translation Error
Error occurred while flattening model check
}}}

A better implementation should recognize that partial classes are involved and only perform local balancedness tests, possibly warning that Medium must be redeclared in order to actually use the model."	defect	new	high	2.0.0	Frontend				
