Opened 10 years ago
Closed 10 years ago
#3323 closed defect (fixed)
Weird results for the solution of a simple equation
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.3 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Lennart Ochel, Willi Braun |
Description (last modified by )
OM ver.: 539229e
for the simple following model:
model a Real x1; Real x2; equation x1 + x2 = 0; x1 - x2 = 1; end a;
i get the following wrong answer:
x1=0.5;
x2=0;
Change History (6)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Cc: | added |
---|---|
Component: | Unknown → Backend |
Description: | modified (diff) |
Summary: | weird results for the solution of a simple equation !!!! → Weird results for the solution of a simple equation |
comment:3 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:4 by , 10 years ago
Thanks for the bug report.
Just to explain what happens:
x2 is detected as alias of –x1. Therefore, x2 is removed from the system and thus not handled properly during initialization. I have already a patch for the issue and I will contribute as soon as I tested it a bit more.
comment:5 by , 10 years ago
Well, actually this is not an initialization issue, since the system is already corrupted that is used to set up the initialization system.
The module that's not working correctly is removeSimpleEquations. I created now another patch to solve this problem at its root. Next, I will do again some testing.
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed with cc6a016/OMCompiler.
when i modify the code to the following:
i get the correct answer, x1=0.5, x2=-0.5;