commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yannick TANGUY (JIRA)" <>
Subject [jira] [Commented] (MATH-811) Improve event detection by selecting g function slope
Date Thu, 27 Sep 2012 13:48:08 GMT


Yannick TANGUY commented on MATH-811:

Hello Luc,

Ok, but could you explain a little bit please ? 

As I understand the code, this value is true when g0 > 0, and is updated in stepAccepted
method. There's no getter for this value, and it's only used once in the test "if (g0Positive
^ (gb >= 0))", so I guess it could be replaced by a test on ga.
One thing I don't understand (and it may be the point you notice in the comment "Simulated
sign of g0 (we cheat when crossing events)." is the following code in stepAccepted : 
        if (pendingEvent && (FastMath.abs(pendingEventTime - t) <= convergence))
            // force the sign to its value "just after the event"
            previousEventTime = t;
            g0Positive        = increasing;
            nextAction        = handler.eventOccurred(t, y, !(increasing ^ forward));
        } else {
            g0Positive = g0 >= 0;
            nextAction = EventHandler.Action.CONTINUE;
-> the value "increasing" relates to g function, and not to g0 value. 

If removing g0positive field is a problem, we could put it again, but I don't understand the
reasons yet.
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>                 Key: MATH-811
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_V2.patch,
> We would like to select g function slope in CommonsMath event detection feature.
> This would improve event detection for the final user (the possibility to ignore some
events, and less computation time) and also correct a bug found while using OREKIT (see
in our applications. 
> The modification consists in adding a method (getSlopeSelection() : int) in EventHandler,
and modifying one conditionnal in the method evaluateStep (class EventState). 
> We can provide modified code and unitary tests for this feature.

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:

View raw message