Skip to content

Commit

Permalink
return invalid-problem instead of just infeasible if inconsistent bou…
Browse files Browse the repository at this point in the history
…nds/sides

- reason is that for infeasible problems, we usually call finalize and
  provide statistics, but this does not happen (and seems difficult to
  add) if TNLPAdapter throws an exception in GetSpaces()
- also we do not apply tolerances to this kind of infeasibility
- we may, however, change the definition of the problem that Ipopt can
  handle to require that bounds/sides are not contradicting
  • Loading branch information
svigerske committed Mar 23, 2021
1 parent 49a0d3a commit 5cdb262
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions doc/main.dox
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ form \anchor NLP
\f}
where \f$x \in \mathbb{R}^n\f$ are the optimization variables (possibly with
lower and upper bounds, \f$x^L\in(\mathbb{R}\cup\{-\infty\})^n\f$ and
\f$x^U\in(\mathbb{R}\cup\{+\infty\})^n\f$),
\f$x^U\in(\mathbb{R}\cup\{+\infty\})^n\f$) with \f$x^L \leq x^U\f$,
\f$f:\mathbb{R}^n \to \mathbb{R}\f$ is the objective function, and
\f$g:\mathbb{R}^n \to \mathbb{R}^m\f$ are the general nonlinear
constraints. The functions \f$f(x)\f$ and \f$g(x)\f$ can be linear or nonlinear
and convex or non-convex (but should be twice continuously
differentiable). The constraints, \f$g(x)\f$, have lower and upper bounds,
differentiable). The constraint functions, \f$g(x)\f$, have lower and upper bounds,
\f$g^L\in(\mathbb{R}\cup\{-\infty\})^m\f$ and
\f$g^U\in(\mathbb{R}\cup\{+\infty\})^m\f$. Note that equality constraints of
\f$g^U\in(\mathbb{R}\cup\{+\infty\})^m\f$ with \f$g^L \leq g^U\f$.
Note that equality constraints of
the form \f$g_i(x)=\bar g_i\f$ can be specified by setting
\f$g^L_{i}=g^U_{i}=\bar g_i\f$.

Expand Down
10 changes: 6 additions & 4 deletions doc/output.dox
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@ output message to the console, and a brief description.

- `Invalid_Problem_Definition`:

Console Message: (no console message, this is a return code for the C and Fortran interfaces only.)

This indicates that there was an exception of some sort when
building the \ref IpoptProblem structure in the C or Fortran interface.
Console Message: `EXIT: Problem has inconsistent variable bounds or constraint sides.`

This indicates that either there was an exception of some sort when
building the \ref IpoptProblem structure in the C or Fortran interface
or bounds specified for variables or constraints were inconsistent
(lower bound larger than upper bound, left-hand-side larger than right-hand-side).
Likely there is an error in your model or the main routine.

- `Unrecoverable_Exception`:
Expand Down
3 changes: 1 addition & 2 deletions src/Interfaces/IpIpoptApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,9 +1135,8 @@ ApplicationReturnStatus IpoptApplication::call_optimize()
{
exc.ReportException(*jnlst_, J_MOREDETAILED);
jnlst_->Printf(J_SUMMARY, J_MAIN, "\nEXIT: Problem has inconsistent variable bounds or constraint sides.\n");
retValue = Infeasible_Problem_Detected;
retValue = Invalid_Problem_Definition;
status = LOCAL_INFEASIBILITY;
skip_finalize_solution_call = true; /* has already been called by TNLPAdapter (and we don't know the correct primal solution) */
}
catch( IpoptException& exc )
{
Expand Down

0 comments on commit 5cdb262

Please sign in to comment.