Opened 12 years ago

Closed 12 years ago

#1981 closed defect (fixed)

wrong handling of events for the first evaluation

Reported by: Lennart Ochel Owned by: Lennart Ochel
Priority: high Milestone: 1.9.0
Component: Run-time Version: trunk
Keywords: events Cc:

Description

package eventTests
  model whenTest1
    Real x;
  equation
    when time > -1.0 then
      x = 1;
    end when;
  end whenTest1;
end eventTests;

dump LOG_EVENTS

events        | info    | check zero crossing at time: 0
|             | |       | | time > -1.0 == TRUE
stdout        | info    | Status of relations:
|             | |       | | [0] time > -1.0 = T | pre(time > -1.0) = T
events        | info    | updated discrete System.
stdout        | info    | Status of relations:
|             | |       | | [0] time > -1.0 = T | pre(time > -1.0) = T
events        | info    | | events | | Discrete Var x changed:  0 to 1
events        | info    | | discrete Variable changed. Iteration needed.
stdout        | info    | Status of relations:
|             | |       | | [0] time > -1.0 = T | pre(time > -1.0) = T

There is no reason to trigger an event.

Change History (2)

comment:1 by Lennart Ochel, 12 years ago

Owner: changed from Willi Braun to Lennart Ochel
Status: newaccepted

The problem is in the handling of introduced help-vars for event conditions. Theirs pre-values are not set correctly.
These help-vars should maybe removed when the event-system is revised the next time.

comment:2 by Lennart Ochel, 12 years ago

Resolution: fixed
Status: acceptedclosed

fixed in r14417

Note: See TracTickets for help on using tickets.