﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2298	Incorrect instantiation of overdetermined connector equations	carlj@…	somebody	"The example models

{{{
Modelica.Electrical.QuasiStationary.MultiPhase.Examples.BalancingDelta
Modelica.Electrical.QuasiStationary.MultiPhase.Examples.BalancingStar
}}}

in MSL3.2.1 are erroneously flattened, leading to circular equations. Both models contain overdetermined connectors containing an overdetermined record (called Reference) with one member variable (called gamma). The equalityConstraint function for Reference is practically trivial, basically just breaking the dependency between the two records. If I understand the Modelica specification (section 9.4) correctly, this would mean that after instantiation the regular equality equations on the form 

{{{
A.gamma = B.gamma
}}}

should form a forest (collection of trees) when viewed as a graph where the *.gamma are the vertices and there is a edge between A and B iff the equation A.gamma = B.gamma is present.

However, this is not the case. Attached is a file showing the graph described above for the instantiated BalancingDelta example. A black edge between vertices A and B symbolizes the presence of the equation ""A.gamma = B.gamma"" in the instantiated model. A green edge symbolizes the prescense of the equation ""0 = [...].equalityConstraint(A,B)"" in the instantiated model and a red edge symbolizes the presence of both equations.

This raises a few issues:
* Both kinds of equations should never be generated (there should be no red edges).
* Some equations which have been converted to equalityConstraints seems to have been unnecessarily or even erroneously (such that new components would be formed if the green edges are removed) converted.
* Even if all green edges and red edges are removed, the graph still will not be a forest."	defect	closed	high	1.9.0	Frontend	trunk	duplicate		
