# Solved to optimlity but status is infeasible

**URL:** <https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054>\
**Category:** Optimization (Mathematical)\
**Created:** [May 9, 2024, 1:10pm UTC](https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054 "2024-05-09T13:10:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShGE](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shge/32/207639_2.png) [@ShGE](https://discourse.julialang.org/u/ShGE)\
**Post date:** [May 9, 2024, 1:10pm UTC](https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054/1 "2024-05-09T13:10:13Z")

</div>

Hello there

```
    println("=================================================")
    println(" Optimal Solution Status: ", termination_status(sub))
    println(" Optimal Value: ", objective_value(sub))
    println("=================================================\n")

```

: Optimal Solution Status: INFEASIBLE  
: Optimal Value: 270.0

How comes that the problem is infeasible but it has an objective value?  
Thanks

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 9, 2024, 2:43pm UTC](https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054/2 "2024-05-09T14:43:34Z")

</div>

You can usually still evaluate the objective of an NLP even if the constraints are violated.

---

<div class="post-metadata">

**Author:** ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Post date:** [May 9, 2024, 7:57pm UTC](https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054/3 "2024-05-09T19:57:49Z")

</div>

In convex optimization, I’ve encountered situations where an optimal solution is found with high accuracy, while rounding errors lead to a false report that the problem is infeasible.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [May 9, 2024, 7:59pm UTC](https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054/4 "2024-05-09T19:59:27Z")

</div>

This situation is not rare. If an inequality constraint is active, this can happen.

---

<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:** [May 9, 2024, 7:59pm UTC](https://discourse.julialang.org/t/solved-to-optimlity-but-status-is-infeasible/114054/5 "2024-05-09T19:59:53Z")

</div>

Hi @ShGE, welcome to the forum.

You can find the JuMP documentation on how to query and interpret solutions at [Solutions · JuMP](https://jump.dev/JuMP.jl/stable/manual/solutions/).

A useful command is `solution_summary(sub)` which will provide more information about what happened.

It will likely tell you that the primal solution is an `INFEASIBLE_POINT`.
