﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5335	Equation order influences the selection of alias variables	Per Östlund	Lennart Ochel	"In the MSL the [https://libraries.openmodelica.org/branches/newInst/Modelica_trunk/files/Modelica_trunk_Modelica.Thermal.FluidHeatFlow.Examples.SimpleCooling.sim Modelica.Thermal.FluidHeatFlow.Examples.SimpleCooling] model simulates correctly with the old frontend, but not with the new. The [https://libraries.openmodelica.org/branches/master/Modelica_trunk/files/Modelica_trunk_Modelica.Thermal.FluidHeatFlow.Examples.IndirectCooling.sim Modelica.Thermal.FluidHeatFlow.Examples.IndirectCooling] model on the other hand simulates correctly with the new frontend, but not with the old.

When trying to simulate the `SimpleCooling` model with the NF it gives an error that a nonlinear system involving `ambient2.flowPort.H_flow` couldn't be solved. Looking at the `-d=optdaedump` output reveals that `pipe.flowPort_b.H_flow` is an alias of `-ambient2.flowPort.H_flow` when using the NF, but when using the OF it's instead `ambient2.flowPort.H_flow` that's chosen as an alias of `-pipe.flowPort_b.H_flow`.

To me it seems like it shouldn't matter which variable is chosen as an alias, but apparently it matters in this case. This might also affect for example [https://libraries.openmodelica.org/branches/newInst/Modelica_trunk/files/Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Elementary.SpringDamperSystem.diff.html Modelica.Mechanics.MultiBody.Examples.Elementary.SpringDamperSystem], which gives the wrong result when simulated using the NF. If the list of equations in the flat model is reversed it suddenly simulates correctly though, but this is obviously not a tenable solution since it will just cause other models to fail instead."	defect	closed	blocker	1.14.0	Backend	v1.14.0-dev-nightly	fixed		Willi Braun Francesco Casella Karim Adbdelhak
