Added option to return the "best" rather than last iterate from an optimizer run when it does not converge. You can use the constraint/kkt infeasibilities or the objective value as the criteria for determining the best iterate. Defaults to "ECons". Enable it as shown below for phases or ocps.
phase.optimizer.ReturnBest = True # default is False
phase.optimizer.BestCriteria = “ECons” ## or “ICons”, “KKT”, “Obj”
Added option to return the "best" rather than last iterate from an optimizer run when it does not converge. You can use the constraint/kkt infeasibilities or the objective value as the criteria for determining the best iterate. Defaults to "ECons". Enable it as shown below for phases or ocps.
phase.optimizer.ReturnBest = True # default is False phase.optimizer.BestCriteria = “ECons” ## or “ICons”, “KKT”, “Obj”