# Infeasibility after finding an optimal solution

**URL:** <https://discuss.ampl.com/t/infeasibility-after-finding-an-optimal-solution/2131>\
**Category:** Support\
**Created:** [May 7, 2025, 6:00am UTC](https://discuss.ampl.com/t/infeasibility-after-finding-an-optimal-solution/2131 "2025-05-07T06:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lothar\_Lower](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/lothar_lower/32/855_2.png) [@Lothar\_Lower](https://discuss.ampl.com/u/Lothar_Lower)\
**Post date:** [May 7, 2025, 6:00am UTC](https://discuss.ampl.com/t/infeasibility-after-finding-an-optimal-solution/2131/1 "2025-05-07T06:00:51Z")

</div>

Hello,  
I detected that after solving a problem (optimal solution with solver knitro) and “restarting” the solving process once again (same problem, no additional AMPL commands), the solving process runs into an infeasibility. How can this happen? Any ideas?  
Best regards,  
Lothar

---

<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:** [May 7, 2025, 4:07pm UTC](https://discuss.ampl.com/t/infeasibility-after-finding-an-optimal-solution/2131/2 "2025-05-07T16:07:12Z")

</div>

Knitro’s first “optimal solution” isn’t exactly optimal; it satisfies optimality conditions to within some small tolerances. Thus, even though the second solve sends Knitro the first solve’s solution as a starting point, Knitro often has to do additional iterations to verify optimality the second time. This is especially the case when Knitro’s interior-point algorithm is used, because that algorithm is not especially well suited to taking advantage of a “warm start”.

It is conceivable that at the second solve, Knitro would go off on a different iteration path entirely, and would get stuck at some local optimum of its infeasibility function — though this does seem unlikely.

To investigate further, set

```auto
option knitro_options 'outlev=3';

```

before the first solve; or, if you are already defining a `knitro_options` string, add `outlev=3` to it. That will produce a detailed log of the two solves, showing many details of what is happening in Knitro. Then to get more help, you can post the logs (or files containing the logs) here.

---

<div class="post-metadata">

**Author:** ![Lothar\_Lower](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/lothar_lower/32/855_2.png) [@Lothar\_Lower](https://discuss.ampl.com/u/Lothar_Lower)\
**Post date:** [May 9, 2025, 6:14am UTC](https://discuss.ampl.com/t/infeasibility-after-finding-an-optimal-solution/2131/3 "2025-05-09T06:14:11Z")

</div>

Thank’s for the fast reply, Robert. I will do this (setting outlev=3) and will investigate the results.  
Best regards,  
Lothar
