If during the penalty iteration loop the status_ is set to NLP_CONVERGED, but verifySQPSolverConvergence() still detects constraint violations, the loop continues, until max_merit_coeff_increases is reached. But because verifySQPSolverConvergence() does not set the status back to RUNNING, it can happen that solve() returns with status_ == NLP_CONVERGED although constraints are still violated.
I suggest to either add status_ = SQPStatus::RUNNING;here, or add a new SQPStatus::PENALTY_ITERATION_LIMIT with a matching check.
If during the penalty iteration loop the
status_
is set toNLP_CONVERGED
, butverifySQPSolverConvergence()
still detects constraint violations, the loop continues, untilmax_merit_coeff_increases
is reached. But becauseverifySQPSolverConvergence()
does not set the status back toRUNNING
, it can happen thatsolve()
returns withstatus_ == NLP_CONVERGED
although constraints are still violated.I suggest to either add
status_ = SQPStatus::RUNNING;
here, or add a newSQPStatus::PENALTY_ITERATION_LIMIT
with a matching check.