﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4863	Issue with linspace() not evaluated in NF	Francesco Casella	Per Östlund	"Please check the [https://libraries.openmodelica.org/branches/newInst/ScalableTestSuite/files/ScalableTestSuite_ScalableTestSuite.Thermal.DistrictHeating.ScaledExperiments.HeatingSystem_N_5.err ScalableTestSuite.Thermal.DistrictHeating.ScaledExperiments.HeatingSystem_N_5] model. It fails with this error:
{{{
ScalableTestSuite_ScalableTestSuite.Thermal.DistrictHeating.ScaledExperiments.HeatingSystem_N_5_08bnd.c:167:60: error: passing 'int' to parameter of incompatible type 'real_array_t' (aka 'struct base_array_s')
  data->simulationInfo->realParameter[5] = (1.0 + real_get(linspace(0.0, 1.348, ((modelica_integer) 5)), 4)) * (10000000.0);
                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}}}
The NF produces this flat declaration
{{{
parameter Real Cu[1](quantity = ""HeatCapacity"", unit = ""J/K"") =
  (1.0 + linspace(0.0, 1.348, 5)[1]) * 10000000.0 ""Heat capacity of heated units"";
}}}
while the old FE gives
{{{
parameter Real Cu[1](quantity = ""HeatCapacity"", unit = ""J/K"") =
   10000000.0 ""Heat capacity of heated units"";
}}}
I'm not sure if the code generation should be extended to handle the raw expression involving {{{linspace()}}}, or if the NF should rather evaluate the constant expression and just pass that to the backend, as the old FE did.

Possibly related to #4861"	defect	closed	high	2.0.0	New Instantiation		fixed		
