﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4864	The NF does not expand the sum() function	Francesco Casella	Per Östlund	"Please check the [https://libraries.openmodelica.org/branches/newInst/ScalableTestSuite/files/ScalableTestSuite_ScalableTestSuite.Thermal.HeatExchanger.ScaledExperiments.CocurrentHeatExchangerEquations_N_10.err ScalableTestSuite.Thermal.HeatExchanger.ScaledExperiments.CocurrentHeatExchangerEquations_N_10] model. It fails at link time due to the lack of definition of the {{{sum_metatype_array}}} type.

The NF flattens this equation
{{{
QtotA = sum(QA);
}}}
while the old FE gives
{{{
  QtotA = QA[1] + QA[2] + QA[3] + QA[4] + QA[5] + QA[6] + QA[7] + QA[8] + QA[9];
}}}
As in #4863 I'm not sure if we should expand the array when the DAE structure is created, or rather extend the code generation to handle the sum function explicitly. 

If expanding the array in the NF is easily accomplished, I would suggest to do that, at least for the time being, so we can get the maximum coverage without waiting for somebody to fix the code generation."	defect	closed	high	2.0.0	New Instantiation		fixed		
