﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4859	NF leads to mixed-determined initialization system	Francesco Casella	Per Östlund	"Please check the [https://libraries.openmodelica.org/branches/newInst/ScalableTestSuite/files/ScalableTestSuite_ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetworkDelayed_3_Array.err ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetworkDelayed_3_Array]. The compilation with the NF fails with this error message:
{{{
Error: The given system is mixed-determined.   [index > 3]
Please checkout the option ""--maxMixedDeterminedIndex"".
Error: No system for the symbolic initialization was generated
}}}

I compared the flattened models with the old FE and with the NF. The equations are all equivalent; the only differences I could spot are the issue already reported in #4858 (but this model breaks earlier than that), and the fact that the when clause
{{{
  when pre(open) then
    G = Gopen;
    Modelica.Utilities.Streams.print(""Breaker "" + name + "" opens at time = ""+String(time));
  end when;
}}}
is flattened as 
{{{
  when pre(B[1].open) then
    B[1].G = B[1].Gopen;
    Modelica.Utilities.Streams.print(""Breaker "" + B[1].name + "" opens at time = "" + String(time, 0, true, 6), """");
  end when;
}}}
by thee old FE and as 
{{{
  when pre(B[1].open) then
    Modelica.Utilities.Streams.print(""Breaker "" + B[1].name + "" opens at time = "" + String(time, 6, 0, true), """");
    B[1].G = B[1].Gopen;
  end when;
}}}
by the NF. Note in particular that {{{String(time)}}} is rendered as {{{String(time, 0, true, 6)}}} by the old FE and as {{{String(time, 6, 0, true)}}} by the NF. I'm not sure why this transformation is performed at all, and wheether this is relevant for the reported error, but I couldn't find any other difference.

I also compared the dumpdaelow output in the two cases, but I couldn't find any additional difference either.

I read in #4451 that "" Mixed-determined means that the initialization problem is under- and over-determined at the same time"". This system has one continuous state, several discrete Real and Boolean states, and three fixed = false parameters, which are all initialized either by setting fixed = true or by simple assignment-like initial equations, which look exactly the same in the two dumpdaelow's, so I can't really understand where the problem could be."	defect	closed	high	2.0.0	New Instantiation		fixed		Willi Braun Lennart Ochel
