forum.alglib.net http://forum.alglib.net/ |
|
Cash-Karp ODE solver needs a maxiter and/or min step size http://forum.alglib.net/viewtopic.php?f=2&t=3853 |
Page 1 of 1 |
Author: | lamont [ Sat May 19, 2018 2:41 am ] |
Post subject: | Cash-Karp ODE solver needs a maxiter and/or min step size |
I've been trying to integrate rocket equation problems, and one thing that comes up is that for any rocket there is a very finite maximum theoretical burntime beyond which you've burned the last proton in the rocket, and accelerated it to infinite speed, infinitely far away. The value is also not much more than typical burntimes of a real rocket stage (usually about ~20% more). The behavior of the alglib ck integrator is that when you try to integrate beyond that timescale (which can happen when a wrapping optimizer is optimizing the time of the burn and takes too long of a step) is to just spin and never return (i suspect it is working very hard on a Xeno's Paradox kind of problem). I can solve this reasonably easily in my own code by doing the calculation for when the rocket will burn completely and clipping the maximum x value passed to odesolverrkck(), but for other problems I'd imagine that could be computationally expensive or error prone to compute and it would better to have bounds in the routine itself. It also just feels unsafe to have an infinite loop as a possible failure mode. |
Author: | lamont [ Sun Jul 15, 2018 4:10 am ] |
Post subject: | Re: Cash-Karp ODE solver needs a maxiter and/or min step siz |
Another thing about the ODE solver is that it disallows integrating backwards in time and throws a rep.terminationtype of -2 "X is not ordered by ascending/descending". The problem domain I'm interested in (spacecraft trajectory optimization) is fine with negative time integration of initial and terminal coast periods. They just correspond to either starting the maneuver earlier than estimated, or arriving at the target orbit later than estimated. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |