﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5342	Issue with Complex array parameter binding in the NF	Francesco Casella	Per Östlund	"Please check [https://libraries.openmodelica.org/branches/newInst/HanserModelica/files/HanserModelica_HanserModelica.Machines.TestDoubleLayer7over9.err HanserModelica.Machines.TestDoubleLayer7over9]. The code generation fails with
{{{
[/var/lib/hudson/slave/workspace/OpenModelica_TEST_LIBS/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:5648:7-5648:48:writable] Error: Internal error solving array equation: 1 : N = HanserModelica.Machines.Functions.complexTurns(winding)
for variable: N[1].im.
[OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:1398:5-1398:77:writable] Error: 
Internal error createEquationsForSystems failed
[OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:666:5-666:146:writable] Error:
Internal error function createSimCode failed
[Transformation from optimised DAE to simulation code structure failed]
}}}
The reason of the failure is that the binding equation
{{{
parameter Real effectiveTurns[winding.m] = Modelica.ComplexMath.'abs'(N);
}}}
is moved into the initial equation section, where the BE cannot handle it properly.

@perost, do you think that we could try to somehow expand this binding equation in the frontend without moving it to the initial equations, or should we rather try to fix the backend?"	defect	closed	blocker	1.16.0	New Instantiation		fixed		dr.christian.kral@…
