Strange discrete behavior in algorithms
The following two models produces different simulation results:
model foo3
Real x(fixed=true, start=0.0);
Boolean b1, b2;
algorithm
b1 := time > 0.5;
b2 := time > 0.5;
when b1 then
x := pre(x) + 1;
elsewhen b2 then
x := pre(x) + 0.1;
end when;
end foo3;
model foo3b
Real x(fixed=true, start=0.0);
Boolean b1, b2;
algorithm
b2 := time > 0.5;
b1 := time > 0.5;
when b1 then
x := pre(x) + 1;
elsewhen b2 then
x := pre(x) + 0.1;
end when;
end foo3b;
The only difference is that the first two statements of the algorithm sections are swapped.
Change History
(6)
Description: |
modified (diff)
|
Owner: |
changed from somebody to Lennart Ochel
|
Status: |
new → accepted
|
Resolution: |
→ fixed
|
Status: |
accepted → closed
|
Milestone: |
Future → pre1.9.4
|
Milestone: |
pre1.9.4 → 1.9.4
|
Fixed in 4d21eda/OMCompiler.