Opened 11 years ago

Closed 10 years ago

#2468 closed defect (fixed)

Initialization fails of MSL model

Reported by: Willi Braun Owned by: Lennart Ochel
Priority: high Milestone: 1.9.2
Component: Backend Version: trunk
Keywords: initialization Cc:

Description

Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses2
fails with

stdout            | warning | Failed to solve linear system of equations (no. 220) at time 0.000000, system is singular for U[7, 7].
stdout            | warning | Error in initialization. Storing results and exiting.
|                 | |       | Use -lv=LOG_INIT -w for more information.

Attachments (2)

SV1D.mo (2.2 KB ) - added by othman_icho@… 11 years ago.
spatial discretization
SV1D.2.mo (2.2 KB ) - added by othman_icho@… 11 years ago.
spatial discretization

Download all attachments as: .zip

Change History (8)

comment:1 by thomas.meschede@…, 11 years ago

I have the same error on the bootstrapped and "normal" compiler

/tmp/OpenModelica/OMEdit/Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses2 -port=35254 -logFormat=xml -w -lv=LOG_STATS
stdout        | warning     | Failed to solve linear system of equations (no. 216) at time 0.000000, system is singular for U[7, 7].
LOG_LS        | warning     | linear system fails: Linear function (index 102, size 4) at t=0
|        | |     | | [1] der(referenceSystem.pointMass1.Q[1])
|        | |     | | [2] der(referenceSystem.pointMass1.Q[3])
|        | |     | | [3] der(referenceSystem.pointMass1.Q[2])
|        | |     | | [4] der(referenceSystem.pointMass1.Q[4])
stdout        | warning     | Error in initialization. Storing results and exiting.
Use -lv=LOG_INIT -w for more information.
Simulation process exited with code 255

and this in the message browser:

[:0:0-0:0] Error: Failed to open simulation result /tmp/OpenModelica/OMEdit/Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses2_res.mat: Too few rows in data_2 matrix

comment:2 by thomas.meschede@…, 11 years ago

ok.. ... I did a little bit more research and found this in the openmodelica model:

 PointMass pointMass1(r_0(start = {3,0,0}, each fixed = true), v_0(start = {0,0,-1}, each fixed = true));
  PointMass pointMass2;
  PointMass pointMass3(r_0(start = {2,1,0}, each fixed = true), v_0(start = {0,0,-1}, each fixed = true)) ;

with r_0(start = {3,0,0}, each fixed = true) defined int Pointmass1 AND Pointmass3 and each set fixed to true, that means we have an overdetermined system ....
if I just remove one of the "fixed=true" inits from the the openmodelica example, it works ... :

So the big question is: is this a bug from modelica or from openmodelica?

by othman_icho@…, 11 years ago

Attachment: SV1D.mo added

spatial discretization

by othman_icho@…, 11 years ago

Attachment: SV1D.2.mo added

spatial discretization

comment:3 by Lennart Ochel, 10 years ago

What is the issue here? Is the generated linear system wrong? Or is just the linear solver unable to solve the system?

in reply to:  3 comment:4 by thomas meschede, 10 years ago

Replying to lochel:

What is the issue here? Is the generated linear system wrong? Or is just the linear solver unable to solve the system?

It depends, mathematically, the linear system is overdetermined if you give pointMass1 and 3 each fixed starting positions. So either there is a bug in the modelica example (removing one of the fixed = true elements) or the linear solver should be able to tolerate multiple fixed start values as long as they are part of a correct solution of the linear system.

But I am only 95% sure that this is really the problem here and not something unrelated.

comment:5 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:6 by Lennart Ochel, 10 years ago

Resolution: fixed
Status: newclosed

This was fixed in the meantime.

Note: See TracTickets for help on using tickets.