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)
Change History (8)
comment:1 by , 11 years ago
comment:2 by , 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?
follow-up: 4 comment:3 by , 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?
comment:4 by , 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 , 10 years ago
Milestone: | 1.9.1 → 1.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 , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was fixed in the meantime.
I have the same error on the bootstrapped and "normal" compiler
and this in the message browser: