﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5031	Conditional equations should also be allowed when depending from conditions on iterators	Francesco Casella	Per Östlund	"Please check [https://libraries.openmodelica.org/branches/newInst/Modelica_trunk/files/Modelica_trunk_Modelica.Electrical.QuasiStationary.Machines.Examples.TransformerTestbench.err Modelica.Electrical.QuasiStationary.Machines.Examples.TransformerTestbench]. The NF fails with
{{{
[Modelica trunk/Electrical/QuasiStationary/MultiPhase.mo:672:11-672:68:writable]
Error: connect may not be used inside if-equations with non-parametric conditions
(found connect(deltaS.plugToPins_n.pin_n[j], deltaS.plugToPins_p.pin_p[j + 1])).
}}}
The offending code reads
{{{
      for j in 1:m loop
        if j < m then
          connect(plugToPins_n.pin_n[j], plugToPins_p.pin_p[j + 1]);
        else
          connect(plugToPins_n.pin_n[j], plugToPins_p.pin_p[1]);
        end if;
      end for;
}}}
I'm not sure if the specification covers this case explicitly, but obviously there is no reason to reject these equations, as the conditions are parametric once the loops are unrolled."	defect	closed	high	2.0.0	New Instantiation		fixed		
