BYU-PRISM / GEKKO

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

Endpoint derivatives #59

Open abe-mart opened 5 years ago

abe-mart commented 5 years ago

If I understand correctly, fixing the value of a node also fixes the value of the derivatives at that node. This can make optimal control problems infeasible, especially when setting final constraints to non-zero values. There are ways to work around this such as changing the final constraints to soft constraints, but making this an optional setting would greatly improve Gekko's utility as an optimal control solver.

APMonitor commented 4 years ago

Here is an example of a work-around but also highlighting that this needs to be fixed: https://stackoverflow.com/questions/61109450/trajectory-planner-with-gekko-is-not-able-to-handle-given-goal-velocities/61125694

abe-mart commented 3 years ago

Any update on this issue? This is probably the main thing holding Gekko back from being a nice general-purpose optimal control solver. Is there just a fundamental limitation in the way that APMonitor handles nodes?

APMonitor commented 3 years ago

Thanks for the reminder to take a closer look at this issue. The APM software was initially designed with fixed initial conditions and calculated state profiles. There are some code design issues that make it difficult to decouple states and the associated derivatives. It is possible but it is going to take some work. I assigned this issue to myself and it will be a high priority the next opportunity I have to take a deep dive into the code.