BYU-PRISM / GEKKO

GEKKO Python for Machine Learning and Dynamic Optimization
https://machinelearning.byu.edu
Other
573 stars 102 forks source link

feature request: Adaptive step-sizes in IMODE 7 solver #88

Closed ben1post closed 3 years ago

ben1post commented 4 years ago

Thank you very much for the amazing work with Gekko!

I am using Gekko as a backend to solve marine ecosystem models and would like to have a more fail-proof way to sequentially solve models (without model optimization).

As discussed in my stackoverflow question, an adaptive step-size solver like scipy's odeint seems to be the more appropriate to test more complex ecosystem model structures without having to run grid indepenency tests with smaller time-steps.

Unfortunately my technical knowledge in the domain is not enough to judge the feasibility of different approaches to solve this. To me it would be just as useful, if there was a way to pass the Gekko model instance to odeint, or if there was a solver included with Gekko that can solve a Gekko model with adaptive time steps.

Could such a feature be added?

ben1post commented 4 years ago

I am currently working towards a first published version of my package and would be very interested in providing an interface to an adaptive step-size solver through GEKKO. Is there any chance this enhancement might be developed in the next few months?

I would be very happy to help in the development, if I can. Would you already know specific steps or goals to work towards? Thank you!

APMonitor commented 3 years ago

Adaptive step sizes are now part of Gekko with IMODE=7. Please let us know if there are any additional issues.