﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5466	The NF does not handle conditional initial equations in sub-components of arrays of components correctly	Francesco Casella	Per Östlund	"Please check [https://libraries.openmodelica.org/branches/newInst/IBPSA_latest/files/IBPSA_latest_IBPSA.Fluid.MixingVolumes.BaseClasses.Validation.MixingVolumeHeatMoisturePort.err IBPSA.Fluid.MixingVolumes.BaseClasses.Validation.MixingVolumeHeatMoisturePort]. The C-code compilation fails. 

The root cause can be traced to the flat model containing equations such as
{{{
  if {true, false, false} then
    vol[1].dynBal.medium.p = vol[1].dynBal.p_start;
  end if;
}}}
which come from flattening an array of components {{{vol[N]}}}, each of which contains a component {{{dynBal}}} with the following initial equations:
{{{
  if massDynamics == Modelica.Fluid.Types.Dynamics.FixedInitial then
    if initialize_p then
      medium.p = p_start;
    end if;
  else
    if massDynamics == Modelica.Fluid.Types.Dynamics.SteadyStateInitial then
      if initialize_p then
        der(medium.p) = 0;
      end if;
    end if;
  end if;
}}}"	defect	closed	blocker	1.16.0	New Instantiation		fixed		
