[
https://issues.apache.org/jira/browse/MATH-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luc Maisonobe updated MATH-950:
-------------------------------
Attachment: wrong-event-scheduling.patch
Test case reproducing the bug.
> event state not updated if an unrelated event triggers a RESET_STATE during
> ODE integration
> -------------------------------------------------------------------------------------------
>
> Key: MATH-950
> URL: https://issues.apache.org/jira/browse/MATH-950
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.1.1
> Reporter: Luc Maisonobe
> Assignee: Luc Maisonobe
> Priority: Critical
> Fix For: 3.2
>
> Attachments: wrong-event-scheduling.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira