[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orekit Developers] Bug #239 Nearly Simultaneous Events



Hi,

When looking into bug #239 about nearly simultaneous events the issues
appears to be subtler than I originally expected. Currently events are
not linearizable, that is there is not always a "happens before"
relationship between event detectors, or in other words some calls to
eventOccured() cannot logically occur in the same time line. For
example, suppose we have two nearly simultaneous event detectors D1 and
D2 that reset the state to S1 and S2 respectively. If S0 is the state
before either event detector is notified then I would expect the
sequence of events to be either

D1.eventOccured(S0)
D2.eventOccured(S1)

or

D2.eventOccured(S0)
D1.eventOccured(S2)

since events can be re-ordered within their tolerance setting. But
instead the current implementation produces

D1.eventOccured(S0)
D2.eventOccured(S0)

which implies neither event occurs before the other. Since any event can
reset the state having linearizable events implies a total order for
events which implies that we need to process events one at a time.

Processing events one at a time can be a little tricky because of the
tolerance setting so we don't know exactly where the root is. I'm going
to try a scheme where the event occurs to the left of the root (so
events won't be skipped) and then the search for more events starts to
the right of the root (so events won't be repeated).

I would also like to hear your comments on these ideas or any ideas you
have for fixing it.

Best Regards,
Evan

https://www.orekit.org/forge/issues/239