﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5590	Bad dynamic state selection leads to singular initialization	Francesco Casella	Karim Adbdelhak	"Consider {{{ModelicaTest.MultiBody.Joints.RevolutePlanarLoopConstraint}}}. It currently fails at initialization because of a [https://libraries.openmodelica.org/branches/master/ModelicaTest_trunk/files/ModelicaTest_trunk_ModelicaTest.MultiBody.Joints.RevolutePlanarLoopConstraint.sim singularity].

The test model has four joints connected in a closed kinematic loop. Dymola chooses two dynamic state selection sets, one with two out of four joint angles, the other with two out of four joint angular velocities. It starts by selecting as states the angle and speed of joints 2 and 4, then later toggles the second speed state between joint 4 and joint 3.

OMC statically selects the joint angles 2 and 3 as states, which is probably wrong. It then selects two dynamic states, but I can't see which they are, because {{{-d=bltdump}}} and {{{-d=optdaedump}}} will crash OMEdit. The initialization problem is then singular, most likely due to a bad choice of states. 

{{{ModelicaTest.MultiBody.InitializationConversion.Joints}}} [https://libraries.openmodelica.org/branches/master/ModelicaTest_trunk_cpp/files/ModelicaTest_trunk_cpp_ModelicaTest.MultiBody.InitializationConversion.Joints.sim fails at initialization] with the C++ runtime, probably for similar reasons, though I did not investigate further.
"	defect	new	blocker	1.19.0	Backend				
