Commit b9744dd8 authored by Martin Marinov's avatar Martin Marinov

Use PRGORESS_RESUME_ABORT in the IPOPT error handler instead of throwing PROGRESS_ABORTED directly.

parent 5de94f73
......@@ -171,15 +171,16 @@ static void throw_ipopt_solve_failure(Ipopt::ApplicationReturnStatus const statu
// Internal_Error=-199
// };
//------------------------------------------------------
switch(status) {
switch (status)
{
case Ipopt::Maximum_Iterations_Exceeded:
COMISO_THROW(IPOPT_MAXIMUM_ITERATIONS_EXCEEDED);
case Ipopt::NonIpopt_Exception_Thrown:
if (Progress::actv_node != nullptr && Progress::actv_node->aborting())
COMISO_THROW(PROGRESS_ABORTED);
case Ipopt::NonIpopt_Exception_Thrown:
// this could be due to a thrown PROGRESS_ABORTED exception, ...
PROGRESS_RESUME_ABORT; // ... so check if we need to resume it
default:
COMISO_THROW(IPOPT_OPTIMIZATION_FAILED);
} // endswicth
}
}
static void check_ipopt_status(Ipopt::ApplicationReturnStatus const _stat)
......@@ -188,7 +189,6 @@ static void check_ipopt_status(Ipopt::ApplicationReturnStatus const _stat)
throw_ipopt_solve_failure(_stat);
}
void IPOPTSolverLean::solve(NProblemInterface* _problem,
const std::vector<NConstraintInterface*>& _constraints)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment