# Strict inequality constraints

**URL:** <https://discuss.ampl.com/t/strict-inequality-constraints/682>\
**Category:** Support\
**Tags:** general, solvers, errors-and-messages, modeling-tips\
**Created:** [August 12, 2023, 10:19am UTC](https://discuss.ampl.com/t/strict-inequality-constraints/682 "2023-08-12T10:19:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Monish\_Kumar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/monish_kumar/32/334_2.png) [@Monish\_Kumar](https://discuss.ampl.com/u/Monish_Kumar)\
**Post date:** [August 12, 2023, 10:19am UTC](https://discuss.ampl.com/t/strict-inequality-constraints/682/1 "2023-08-12T10:19:19Z")

</div>

Why can’t we use strict inequality constraints in IPOPT solver in amplpy @fdabrandao

Caution: Treating strict inequality constraint as a logical constraint.  
context: subject to nod\_SiSf: SInitial + i\_SInitial \> \>\>\> Sfinal; \<\<\<

---

<div class="post-metadata">

**Author:** ![4er](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/4er/32/530_2.png) [@4er](https://discuss.ampl.com/u/4er)\
**Post date:** [August 14, 2023, 7:18pm UTC](https://discuss.ampl.com/t/strict-inequality-constraints/682/2 "2023-08-14T19:18:11Z")

</div>

The algorithms in Ipopt and similar local nonlinear solvers require the feasible region to include all of its boundary points. A constraint like SInitial + i\_SInitial \> Sfinal does not satisfy this requirement, because boundary points where SInitial + i\_SInitial = Sfinal are not part of the feasible region.

This is a limitation imposed by the solver, not by AMPL or by amplpy. It is motivated by a fundamental mathematical limitation: if the feasible region is not closed (including all boundary points) and bounded, then it can happen that no minimum exists.

Sometimes you can get around this problem by writing the constraint as SInitial + i\_SInitial \>= Sfinal + eps, where eps is some small number that is greater than the solver’s feasibility tolerance – typically, 1e-4 or 1e-5. You will have to check whether the resulting solutions make sense for your application, however.

---

<div class="post-metadata">

**Author:** ![Monish\_Kumar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/monish_kumar/32/334_2.png) [@Monish\_Kumar](https://discuss.ampl.com/u/Monish_Kumar)\
**Post date:** [August 15, 2023, 6:40am UTC](https://discuss.ampl.com/t/strict-inequality-constraints/682/3 "2023-08-15T06:40:35Z")

</div>

Got it. Thank you so much. Can I get any source to learn more about IPOPT solver?

---

<div class="post-metadata">

**Author:** ![4er](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/4er/32/530_2.png) [@4er](https://discuss.ampl.com/u/4er)\
**Post date:** [August 15, 2023, 3:56pm UTC](https://discuss.ampl.com/t/strict-inequality-constraints/682/4 "2023-08-15T15:56:19Z")

</div>

Ipopt home on GitHub:

> **[GitHub - coin-or/Ipopt: COIN-OR Interior Point Optimizer IPOPT](https://github.com/coin-or/Ipopt)**
>
> COIN-OR Interior Point Optimizer IPOPT. Contribute to coin-or/Ipopt development by creating an account on GitHub.

Ipopt documentation:  
[https://coin-or.github.io/Ipopt/](https://coin-or.github.io/Ipopt/)
