Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-950

event state not updated if an unrelated event triggers a RESET_STATE during ODE integration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.1.1
    • 3.2
    • None
    • None

    Description

      When an ODE solver manages several different event types, there are some unwanted side effects.

      If one event handler asks for a RESET_STATE (for integration state) when its eventOccurred method is called, the other event handlers that did not trigger an event in the same step are not updated correctly, due to an early return.

      As a result, when the next step is processed with a reset integration state, the forgotten event still refer to the start date of the previous state. This implies that when these event handlers will be checked for In some cases, the function defining an event g(double t, double[] y) is called with state parameters y that are completely wrong. In one case when the y array should have contained values between -1 and +1, one function call got values up to 1.0e20.

      The attached file reproduces the problem.

      Attachments

        1. wrong-event-scheduling.patch
          3 kB
          Luc Maisonobe

        Activity

          People

            luc Luc Maisonobe
            luc Luc Maisonobe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: