# ITERATION\_LIMIT with small changes in constraints

**URL:** <https://discourse.julialang.org/t/iteration-limit-with-small-changes-in-constraints/96403>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [March 21, 2023, 4:53pm UTC](https://discourse.julialang.org/t/iteration-limit-with-small-changes-in-constraints/96403 "2023-03-21T16:53:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [March 21, 2023, 4:53pm UTC](https://discourse.julialang.org/t/iteration-limit-with-small-changes-in-constraints/96403/1 "2023-03-21T16:53:56Z")

</div>

I have a linear problem with linear equality and inequality constraints (and interval constraints). It works perfectly with various lower and upper bounds, but specific values trigger this `ITERATION_LIMIT` and there is nothing special about these values.

For example, the upper bound `34000` works fine but `34060` doesn’t. I understand that this may be related to numerical issues with the underlying solver, would this be a correct interpretation of the issue? Increasing the upper bound would make the problem “more feasible” and yet I get this unexpected return status.

I am using the COSMO.jl solver in this application, it works pretty well and is pure Julia ❤ By default I am setting the relative tolerance to `eps_rel=1e-8`. Whenever I get `ITERATION_LIMIT` I increase the tolerance to `1e-4` and it solves the problem again, but I am not sure if the result is accurate enough.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [March 21, 2023, 9:59pm UTC](https://discourse.julialang.org/t/iteration-limit-with-small-changes-in-constraints/96403/2 "2023-03-21T21:59:37Z")

</div>

It’s hard to say anything without a reproducible example. What do other solvers do? Try HiGHS or Gurobi.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [March 22, 2023, 12:37pm UTC](https://discourse.julialang.org/t/iteration-limit-with-small-changes-in-constraints/96403/3 "2023-03-22T12:37:45Z")

</div>

I tested with HiGHS.jl and it doesn’t display this problem @odow , so the issue must be specific to COSMO.jl.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [March 22, 2023, 7:07pm UTC](https://discourse.julialang.org/t/iteration-limit-with-small-changes-in-constraints/96403/4 "2023-03-22T19:07:40Z")

</div>

If just have a linear program, then just use HiGHS, it should be faster and more robust.

You don’t gain anything by using COSMO, which is more intended for conic problems. And I assume the numerics of your problem are bad, which is why COSMO struggles.
