﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5291	Issue with Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheel in OMEdit	Francesco Casella	Adeel Asghar	"If I open {{{Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheel}}} with the latest OMEdit nightly build and run it, it works fine, even though there are some warnings about state selection, which apparently are not critical.

If I now set {{{-d=initialization,newInst}}} in the setup menu and re-run the model, I get the following run-time error message:
{{{
Failed to solve linear system of equations (no. 21) at time 0.000000, system is singular for U[2, 2].
The default linear solver fails, the fallback solver with total pivoting is started at time 0.000000. That might raise performance issues, for more information use -lv LOG_LS.
Matrix singular!
Failed to solve linear system of equations (no. 22) at time 0.000000, system is singular for U[2, 2].
The default linear solver fails, the fallback solver with total pivoting is started at time 0.000000. That might raise performance issues, for more information use -lv LOG_LS.
Matrix singular!
under-determined linear system not solvable!
Error solving linear system of equations (no. 22) at time 0.000000.
Solving linear system 22 fails at time 0. For more information use -lv LOG_LS.
}}}
The first weird thing is that the very same model run by Hudson fails with a completely different [https://libraries.openmodelica.org/branches/newInst/Modelica_trunk/files/Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheel.sim runtime error]:
{{{
assert            | debug   | division by zero at time 0, (a=4.940656458412465e-324) / (b=0), where divisor b expression is: sqrt(wheel1.rollingWheel.aux[1] ^ 2.0 + wheel1.rollingWheel.aux[2] ^ 2.0)
assert            | info    | simulation terminated by an assertion at initialization
}}}
If I now click on the {{{Debug more}}} link, the Debugger window opens and equation 22, linear, unknown variables:3 is highlighted. 

Here there are other two weird things: one is that the former equation is number 21 and the subsequent one is 23, which is odd, because in other places systems with N equations normally take up N+1 slots in the sequence, one for the system as a whole, and N, each for one equation in the system. 

The other weird thing is that if I click on this equation, the source browser window and the Equation Operations window remain rigorously empty, which is not the case for other linear systems equations found further on, e.g. number 120, for which I can select every individual equation and see the source line and the all the transformations that brought to the run-time solved form. So, basically, I'm told there's a problem on a linear system, but there's no chance of understanding how this system looks like, and where its equations come from.

Last, but not least, if I now close OMEdit (remember I previously set -d=newInst in the simulation options), re-open it, re-select the same model and try to run it, I immediately get this error:
{{{
[1] 01:05:46 Symbolic Error
[Modelica.Mechanics.MultiBody.Interfaces: 732:5-733:65]:
Assertion triggered during translation: 
""Connector frame_a of visualizer object is not connected"".
}}}
@adeas31, can you shed some light on this rather puzzling behaviour?"	defect	new	critical		OMEdit				Adrian Pop Martin Sjölund
