Closed mdhaber closed 6 months ago
Is there a way to gracefully terminate optimization? Ideally, when the callback function raises StopIteration, minimize_ipopt would terminate and return the current solution.
Maybe this new functionality could help with that: https://github.com/mechmotum/cyipopt/pull/215 ?
Maybe this new functionality could help
Hmm, maybe, but depending on when it's called, it sounds like it will cut the step size instead of terminating. Maybe there is another option to control that. I think I'll leave it for a follow-up though.
Adds support for
callback
tominimize_ipopt
.Currently,
minimize
supports two callback interfaces.This adds support only for the first. The second is only retained in SciPy for backward compatibility.
Is there a way to gracefully terminate optimization? Ideally, when the
callback
function raisesStopIteration
,minimize_ipopt
would terminate and return the current solution.