Event detection fails with an abstract propagator and a non monotonic function
We noticed some problem with event detection feature of the analytical propagator (AbstractPropagator).
Some times, when the g function is not monotonic during the step
interval, the abstract propagator fails to detect the root. The
numerical propagator detects the 0 even for a non monotonic function.
Setting the max chack parameter to a lower value might solve the problem
practically, but occurrences of such failures should still be expected.
Indeed, the g function can still exhibit non-monotony, however small the
[dtA, dtB] interval might be.
In this specific case, we consider a step [tmin ; tmax], for which the
root is in the middle of the step :
tmin = 0.00, g = 5.23E-16
tmax = 399.99, g = -0.10
In the first iteration (in EventState.evaluateStep()), the algorithm
tries to detect between t1 = tmin and t2 = 1. In this case, g(t2) =
4.6E-4 >g(t1) : the g function has a local maximum value.
So the algorithm tries to decrease t1, but it is limited by tmin, so the
algorithm keeps the value t1 = tmin and fails after a "max iteration"
threshold is reached.
->The attached image file helps to understand how the sub-steps are
evaluated.
So we compared the code of EventState.evaluateStep (in OREKIT) and the
same code in CommonsMath (which uses double values instead of
AbsoluteDate/SpacecraftState) and we found a main difference :
->by default, Commons Math uses a BracketingNthOrderBrentSolver
(with order 5) whereas OREKIT tries with a simple BrentSolver and after
with a PegasusSolver (to force side of the root, on the left or right of
the "real" root)
We tried to adapt OREKIT to use this BracketingNthOrderBrentSolver
instead of the BrentSolver and it seems to solve our problem.
By the way, we still don't understand why two solvers are used one after the other : the first to find the real root (dtBaseRoot) and the other to switch the root on the left or right of the current step. Is it done in order to avoid multiple detections ?
(from redmine: issue id 110, created on 2012-08-24, closed on 2012-08-24)
- Relations:
- relates #136 (closed)
- Uploads:
- None
- BugA417NonCvgDetector.java None
- ModifiedElevationDetector.java None
- ModifiedElevationDetector.java None
- None