You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yannick TANGUY (JIRA)" <ji...@apache.org> on 2012/07/04 09:58:34 UTC

[jira] [Created] (MATH-811) Improve event detection by selecting g function slope

Yannick TANGUY created MATH-811:
-----------------------------------

             Summary: Improve event detection by selecting g function slope
                 Key: MATH-811
                 URL: https://issues.apache.org/jira/browse/MATH-811
             Project: Commons Math
          Issue Type: Improvement
    Affects Versions: 3.1
            Reporter: Yannick TANGUY


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 https://www.orekit.org/forge/issues/104) 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468379#comment-13468379 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Your idea seems interesting, but I think it depends on how users already handle event detection. If most of them won't use the slope selection, maybe an extended interface is better, or an abstract class (like in OREKIT events package), so that these users don't have to implement this method.
But if there are "enough" users who can be interested in the new features, I think it must be implemented in EventHandler interface, and users will have to adapt their code.
In the second hypothesis, I understand it will have to wait for 4.0.

Anyway, what's really important for us is to have this feature now (and it's ok, "our" version of Commons Math implement it), to identify precisely the differences between our version and the official version (snapshot or a released version) and then, to know approximatively when this feature could be integrated (Commons Math roadmap).

By now, this discussion has enabled to improve the implementation, clarify the use of event detection : that's a good point ! And when you'll have time to look further into it, we can discuss again to find a more elegant solution (if any) and integrate it.

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_V3_with_spaces.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464834#comment-13464834 ] 

Luc Maisonobe commented on MATH-811:
------------------------------------

When the bug was fixed, yes there was a test dedicated to it. However, this test does not trigger the bug anymore due to other changes (both changes in the solvers convergence and changes in the events framework).
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461819#comment-13461819 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Ok, here is a patch and a simple unitary test (in EventStateTest.java).
EventHandler interface contains static values to distinguish wether we want to trigger incresing/decreasing g function or both.
The method EventState.evaluateStep uses that value (getSlopeSelection).

Some unitary tests have been modified, so the implementation of EventState implement the new getSlopeSelection (and returns EventHandler.INCREASING_DECREASING).

All comments are welcome !
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Updated] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yannick TANGUY updated MATH-811:
--------------------------------

    Attachment: JIRA-811_slope_selection_V3_with_spaces.patch
    
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_V3_with_spaces.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Dennis Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465614#comment-13465614 ] 

Dennis Hendriks commented on MATH-811:
--------------------------------------

bq. Here's the new patch (V3) !

This one has a whole bunch of tabs again...
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Updated] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yannick TANGUY updated MATH-811:
--------------------------------

    Attachment: JIRA-811_slope_selection_V3.patch
    
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464686#comment-13464686 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Here is a new version of the patch (JIRA-811_slope_selection_V2.patch).
I implemented an enum in EventHandler, modified the conditionnal tests in EventState.evaluateStep, in order to avoid XOR operators. I also added some comments.
In the EventState class, the g0positive field was only used once in evaluateStep to know if an event has occured. I modified the test in order to use ga sign (ga is g(ta), at the beginning of the step) because when a step is larger that maxCheckInterval value, "g0positive" was not updated.

The test class (EventStateTest) contains two new unitary tests, that cover the 8 different combinations of the criteria.
 

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464765#comment-13464765 ] 

Luc Maisonobe commented on MATH-811:
------------------------------------

This is exactly the point.

The code snippet you show solves a difficult bug that did occur before we introduced g0Positive.

The problem is that you cannot trust the sign of a value which was explicitely been found as being a zero. First, we cannot yet force users to use a bracketing solver. So users may experience convergence on the "wrong side" of a zero, i.e. when they have a decreasing function, they may converge before the zero and have g(ta) still positive (very small but positive). Then if g(tb) is negative because it is slightly after the zero, the algorithm will detect a sign change, trigger the solver, and finally converge again to the one that has already been handled earlier! And of course, the second convergence will not always be on the same point as the first one, only close enough to let you wonder if it is really a new event or not.

In fact, even if we were able to force users to use bracketing solvers, this would not be safe enough, and we would still need the g0Positive field. There is still the rare case when the solver finds exactly a root. What sign should be used if g(ta) = 0?

Once initialized at integration start (or when we know we are away from roots, just like in the "else" part above), the g0Positive is really a stable flip-flop.

bq. -> the value "increasing" relates to g function, and not to g0 value.

Yes, of course! A function becomes positive after its root when it is increasing around this root.

bq. If removing g0positive field is a problem, we could put it again, but I don't understand the reasons yet.

Yes, it is an important problem. It would reactivate a very nasty bug that took a long time to analyze, understand and fix. Please put this field back.
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434988#comment-13434988 ] 

Luc Maisonobe commented on MATH-811:
------------------------------------

Patch welcome ...
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>
> 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 https://www.orekit.org/forge/issues/104) 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462778#comment-13462778 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Ok Gilles, I agree with you about the truth table.. The code is not so easy to read.
I will propose a new patch with an enum instead of an int value. But I think an enum with three choices (increasing, decreasing, both slope directions) is less confusing.
And I will modify the criteria, in order not to use the ^ operator.


                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463732#comment-13463732 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

I like the idea of "SlopeDirectionSelector" with three values (INCREASING, DECREASING, INCREASING_OR_DECREASING).
But I'll try to implement it with a set of one or two values. 

Except in OREKIT, I don't know how people are using the EventHandler interface : maybe it would be useful to propose an AbstractEventHandler class which always triggers decreasing and increasing events.

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462565#comment-13462565 ] 

Yannick TANGUY edited comment on MATH-811 at 9/25/12 7:40 PM:
--------------------------------------------------------------

Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING,EventHandler.DECREASING, EventHandler.INCREASING_DECREASING{noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                
      was (Author: ytanguy):
    Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING,{noformat}EventHandler.DECREASING, EventHandler.INCREASING_DECREASING{noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                  
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Dennis Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462488#comment-13462488 ] 

Dennis Hendriks commented on MATH-811:
--------------------------------------

bq. Ok, here is a patch [...]

It seems you use tabs instead of spaces. Could you please resubmit the patch with spaces instead of tabs. Thanks!
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462698#comment-13462698 ] 

Gilles commented on MATH-811:
-----------------------------

IMHO, that code is no correct (even if it behaves correctly): booleans should be manipulated with logical operators.

bq. [...] it was simple to use an int [...]

But it makes the code obscure. I think that there is hardly any use for bit-wise operators in Commons Math.
Someone examining the code should not be obliged to write down truth tables to figure out when the alternative will be executed.

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465672#comment-13465672 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

-> Ok, the EventState class is ok now and I've checked the others. 
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_V3_with_spaces.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462667#comment-13462667 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

First I wanted to use enum, but it was simple to use an int, and the existing code already uses the XOR operator on boolean values (see in EventState.evaluateStep).
{noformat} // check events occurrence
           if (g0Positive ^ (gb >= 0)) {
[..]
{noformat}
Do you think it's better to re-write the criteria, with boolean values ?

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Dennis Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462529#comment-13462529 ] 

Dennis Hendriks commented on MATH-811:
--------------------------------------

bq. Ok, sorry for the tabs. Here is a new patch with spaces, but some files have been affected by the autoformatting tool in Eclipse. 

The patch is already much shorter (and thus easier to process), but indeed there is still some reformatting that obscures the actual changes. Ideally, the reformatting and the actual changes would be done separately.

Anyway, I'm no expert on this issue, so I won't be reviewing it. Your proposed changes sound interesting though!
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464732#comment-13464732 ] 

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 : 
{noformat}
        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;
        }
{noformat}
-> 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: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Updated] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yannick TANGUY updated MATH-811:
--------------------------------

    Attachment: JIRA-811_slope_selection_with_spaces.patch
    
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462662#comment-13462662 ] 

Gilles commented on MATH-811:
-----------------------------

bq. We added a "int getSlopeSelection()"

Instead of an "int", an ad-hoc "enum" should be defined:

{noformat}
  public enum SlopeDirection {
    INCREASING,
    DECREASING
  }
{noformat}

Then the method would be defined as
{noformat}
  Set<SlopeDirection> getSlopeSelection();
{noformat}

Where needed,
{noformat}
  EventHandler.INCREASING_DECREASING
{noformat}
should be replaced with
{noformat}
  final Set<SlopeDirection> bothDirections = EnumSet.of(SlopeDirection.INCREASING,
                                                        SlopeDirection.DECREASING);
{noformat}

Bitwise operators must not be used as logical operators as in
{noformat}
(forward ^ !increasing) ^ slope == EventHandler.DECREASING
{noformat}



                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462511#comment-13462511 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Ok, sorry for the tabs. Here is a new patch with spaces, but some files have been affected by the autoformatting tool in Eclipse. 

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Updated] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yannick TANGUY updated MATH-811:
--------------------------------

    Attachment: JIRA-811_slope_selection.patch
    
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463644#comment-13463644 ] 

Gilles commented on MATH-811:
-----------------------------

bq. I think an enum with three choices (increasing, decreasing, both slope directions) is less confusing.

I think that it is more confusing; especially if we speak of "slope direction" (a slope cannot have _both_ directions).
If we really want to reduce the concept embodied in the enum to just "slope direction selection", it should be made clear in the name, e.g.:
{code}
public enum SlopeDirectionSelector {
    INCREASING,
    DECREASING,
    INCREASING_OR_DECREASING
}
{code}

Then the method "getSlopeSelection" should be renamed as
{code}
  SlopeDirectionSelector getSlopeDirectionSelector();
{code}

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467880#comment-13467880 ] 

Luc Maisonobe commented on MATH-811:
------------------------------------

I'll have a more thorough look into it when I have some time.

I have thought about that for a while, trying to find a solution as I think this change is important to you.
There is one way we could introduce it into 3.1, but it is ugly so I am reluctant to do it. It would imply creating an extended interface (say FilteredSlopeEventHandler extends EventHandler) that would include the new method and to have a runtime check in EventState using instanceof to use the feature only if it is available. What would you think about this ugly hack?
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_V3_with_spaces.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Thomas Neidhart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462530#comment-13462530 ] 

Thomas Neidhart commented on MATH-811:
--------------------------------------

Hi Yannick,

I had the same problem when creating my first patches, you should better not do any automatic formatting in eclipse.
I looked at the patch, but it is quite difficult to see the actual change (from my understanding this should be quite minimal).
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463689#comment-13463689 ] 

Gilles commented on MATH-811:
-----------------------------

bq. as the enumeration itself does not select anything (it is not a selector)

It depends on how you see it.
It was precisely my point that either we represent "slope direction" (which can have only two values) or we restrict usage as a selector and _indeed_, in my view, the enum with more than two elements contains the notion of selection. Note the name "getSlopeDirectionSelector" (and not something like "selectAllowedSlopeDirections"): the "allowed slope directions" will be selected _later_, i.e. in the code that uses the value returned by "getSlopeDirectionSelector".

But I agree that it could be confusing, hence my preference to represent the two "slope directions", and return a set with both values to mean that both are allowed!

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Updated] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yannick TANGUY updated MATH-811:
--------------------------------

    Attachment: JIRA-811_slope_selection_V2.patch
    
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Dennis Hendriks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463668#comment-13463668 ] 

Dennis Hendriks commented on MATH-811:
--------------------------------------

bq. public enum SlopeDirectionSelector {

Maybe it could be called AllowedSlopeDirection, DesiredSlopeDirection, or SelectableSlopeDirection, or something else, as the enumeration itself does not select anything (it is not a selector), it is what you want to allow to be selected.

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461819#comment-13461819 ] 

Yannick TANGUY edited comment on MATH-811 at 9/25/12 1:16 AM:
--------------------------------------------------------------

Ok, here is a patch and a simple unitary test (in EventStateTest.java).
EventHandler interface contains static values to distinguish wether we want to trigger incresing/decreasing g function or both.
The method EventState.evaluateStep uses that value (getSlopeSelection).

Some unitary tests have been modified, so the implementation of EventState implement the new getSlopeSelection (and returns EventHandler.INCREASING_DECREASING).

All comments are welcome ! If this patch is accepted, I will also prepare the "same" patch for the OREKIT library.
                
      was (Author: ytanguy):
    Ok, here is a patch and a simple unitary test (in EventStateTest.java).
EventHandler interface contains static values to distinguish wether we want to trigger incresing/decreasing g function or both.
The method EventState.evaluateStep uses that value (getSlopeSelection).

Some unitary tests have been modified, so the implementation of EventState implement the new getSlopeSelection (and returns EventHandler.INCREASING_DECREASING).

All comments are welcome !
                  
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462565#comment-13462565 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){/noformat} method, which returns {noformat}EventHandler.INCREASING{/noformat},{noformat}EventHandler.DECREASING{/noformat}, {noformat}EventHandler.INCREASING_DECREASING{/noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){/noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{/noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462565#comment-13462565 ] 

Yannick TANGUY edited comment on MATH-811 at 9/25/12 7:40 PM:
--------------------------------------------------------------

Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING,{noformat}EventHandler.DECREASING, EventHandler.INCREASING_DECREASING{noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                
      was (Author: ytanguy):
    Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING{noformat},{noformat}EventHandler.DECREASING{/noformat}, {noformat}EventHandler.INCREASING_DECREASING{/noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){/noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{/noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                  
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462565#comment-13462565 ] 

Yannick TANGUY edited comment on MATH-811 at 9/25/12 7:41 PM:
--------------------------------------------------------------

Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
- In the interface EventHandler :
We added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING,EventHandler.DECREASING, EventHandler.INCREASING_DECREASING{noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- In the EventState class :
The {noformat}boolean evaluateState(StepInterpolator){noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                
      was (Author: ytanguy):
    Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING,EventHandler.DECREASING, EventHandler.INCREASING_DECREASING{noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                  
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464817#comment-13464817 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Ok, thanks for the explanation. I put back that field and also add some comments. I make some more tests with our tools before submitting the patch again.
Is there a unitary test that can show the bug you mention ?  

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467797#comment-13467797 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Ok, I notice that it won't be commited in 3.1. 
About the changes in evaluateStep, there are not so many differences. Maybe the new if/then/else could be merged with the previous one, but the criteria would become complex and mix two differents aspects.

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_V3_with_spaces.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462565#comment-13462565 ] 

Yannick TANGUY edited comment on MATH-811 at 9/25/12 7:39 PM:
--------------------------------------------------------------

Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){noformat} method, which returns {noformat}EventHandler.INCREASING{noformat},{noformat}EventHandler.DECREASING{/noformat}, {noformat}EventHandler.INCREASING_DECREASING{/noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){/noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{/noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                
      was (Author: ytanguy):
    Hi Thomas and Dennis,

Ok, I'll redo the patch. Before, I can explain the main changes : 
In the interface EventHandler :
- we added a {noformat}int getSlopeSelection(){/noformat} method, which returns {noformat}EventHandler.INCREASING{/noformat},{noformat}EventHandler.DECREASING{/noformat}, {noformat}EventHandler.INCREASING_DECREASING{/noformat} wether we want to trigger events related to increasing "zero" events (resp. decreasing, or both).
- the {noformat}boolean EventState.evaluateState(StepInterpolator){/noformat} method has been modified (in the main conditinnal, when we expect an event) to add the following code (a new conditionnal structure) : 
{noformat}
                   // slope selection
                   int slope = handler.getSlopeSelection();
                   if (slope == EventHandler.INCREASING_DECREASING
                            || ((forward ^ !increasing) ^ slope == EventHandler.DECREASING)) {
// ... an event is expected -> this calls the solver
}
{/noformat}

This modification needs to adapt implementations of EventHandler (mainly in ode.events & ode.stiff test packages)
                  
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Yannick TANGUY
>         Attachments: JIRA-811_slope_selection.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464711#comment-13464711 ] 

Luc Maisonobe commented on MATH-811:
------------------------------------

The fact we use g0positive and not g(ta) is intentional and should NOT be changed without knowing the reasons why it is there!
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466482#comment-13466482 ] 

Luc Maisonobe commented on MATH-811:
------------------------------------

I looked at the patch.

It seems to work, but I am still not sure. The provided patch still contains both formatting changes (lines wrapping, removed spaces...) and the feature changes themselves. As it also introduces structural changes with an upper level if/then/else clause, it is almmost impossible to read.

Nevertheless, the most important thing is that this patch has to wait for 4.0, it cannot be committed in 3.1. It introduces an incompatible source and binary change in a core user interface: EventHandler. This insterface is a very important pure user interface in the ODE package. Many users implement it and would be affected by this change. Note also that as this is a pure user interface with no implementations provided by Apache Commons Math, it cannot be changed to an abstract class for future versions either, as some interfaces have been changed for 3.0.
                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_V3_with_spaces.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira

[jira] [Commented] (MATH-811) Improve event detection by selecting g function slope

Posted by "Yannick TANGUY (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465448#comment-13465448 ] 

Yannick TANGUY commented on MATH-811:
-------------------------------------

Here's the new patch (V3) !

                
> Improve event detection by selecting g function slope
> -----------------------------------------------------
>
>                 Key: MATH-811
>                 URL: https://issues.apache.org/jira/browse/MATH-811
>             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, JIRA-811_slope_selection_V3.patch, JIRA-811_slope_selection_with_spaces.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 https://www.orekit.org/forge/issues/104) 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: http://www.atlassian.com/software/jira