Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
b9744dd8
Commit
b9744dd8
authored
Jun 22, 2017
by
Martin Marinov
Browse files
Use PRGORESS_RESUME_ABORT in the IPOPT error handler instead of throwing PROGRESS_ABORTED directly.
parent
5de94f73
Changes
1
Hide whitespace changes
Inline
Side-by-side
NSolver/IPOPTSolverLean.cc
View file @
b9744dd8
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment