Opened 9 years ago

Last modified 7 years ago

#3358 closed defect

Strange discrete behavior in algorithms — at Initial Version

Reported by: Lennart Ochel Owned by: somebody
Priority: high Milestone: 1.9.4
Component: Backend Version: trunk
Keywords: Cc:

Description

The following two models produces different simulation results:

model foo3
  Real x;
  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;
  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 (0)

Note: See TracTickets for help on using tickets.