OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
210 stars 67 forks source link

Maximum number of segments in grid refinement #1130

Open jnance34 opened 5 days ago

jnance34 commented 5 days ago

Proposed feature.

I would love an early stopping capability that allows the user to set a maximum number of grid refinement segments and terminates grid refinement early if that number of segments is exceeded. Something like:

phase.set_refine_options(tol = 1e-5, max_num_segments = 100)

For context, many optimal control problems I attempt to solve converge with <50 or so segments. If the problem gets much larger than that I waste a lot of computation time just to learn that the problem is infeasible. Thanks!

Example

No response

robfalck commented 16 hours ago

Thanks for the suggestion. Grid refinement is due for a good refactoring and we can incorporate this.