# About JuMP.is\_solved\_and\_feasible

**URL:** <https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [March 12, 2025, 12:36pm UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868 "2025-03-12T12:36:15Z")\
**Posts on this page:** 8\
**Page:** 2

<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 13, 2025, 11:04pm UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/21 "2025-03-13T23:04:58Z")

</div>

We’re open to suggestions for improving the solution summary. How about:

```julia
Solution summary
├ solver_name : Gurobi
├ Overall status
│ ├ termination_status : OPTIMAL
│ ├ result_count : 3
│ ├ objective_bound : -3.00000e+00
│ ├ relative_gap : 0.00000e+00
│ └ raw_status
│ └ "Model was solved to optimality (subject to tolerances), and an optimal solution is available."
├ Candidate solution (; result = 1)
│ ├ primal_status : FEASIBLE_POINT
│ ├ dual_status : NO_SOLUTION
│ ├ objective_value : -3.00000e+00
│ └ dual_objective_value : -3.00000e+00
└ Work counters
  ├ solve_time (sec) : 3.03030e-04
  ├ simplex_iterations : 0
  ├ barrier_iterations : 0
  └ node_count : 0

```

---

<div class="post-metadata">

**Author:** ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Post date:** [March 13, 2025, 11:27pm UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/22 "2025-03-13T23:27:31Z")

</div>

I would suggest that add a dynamic (3-possibilities) lb and ub hint.  
(part of summary are something like):  
For a Min-Program:

```julia

├ ObjSense: MIN_SENSE

├ termination_status: TIME_LIMIT

├ objective_bound (lb): -3.0

├ Candidate solution (; result = 1)

│ ├ objective_value (ub): -2.0

```

For a Max-Program

```julia

├ ObjSense: MAX_SENSE

├ termination_status: TIME_LIMIT

├ objective_bound (ub): -2.0

├ Candidate solution (; result = 1)

│ ├ objective_value (lb): -3.0

```

For a Feasibility-Problem

```julia

ObjSense: FEASIBILITY_SENSE (Did you forget to specify?)

termination_status: TIME_LIMIT

Candidate solution (; result = 1)

```

---

<div class="post-metadata">

**Author:** ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Post date:** [March 20, 2025, 2:34am UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/23 "2025-03-20T02:34:54Z")

</div>

> [@odow](#):
>
> for example, a solver might return `termination_status(model) == OPTIMAL` but `primal_status(model) == INFEASIBLE_POINT`

Which smart solver showcases this behavior? I wonder.

---

<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 20, 2025, 3:02am UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/24 "2025-03-20T03:02:45Z")

</div>

> Which smart solver showcases this behavior? I wonder.

CPLEX: [IBM Documentation](https://www.ibm.com/docs/en/cofz/12.10.0?topic=api-cpx-stat-optimal-infeas)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/d/1de4b2219b3832a1a2794e8892963084586e9ccf.png)

---

<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 20, 2025, 3:05am UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/25 "2025-03-20T03:05:59Z")

</div>

Also following up to say that the next release of JuMP features a revamped solution summary:

```julia
julia> solution_summary(model; verbose = true)
solution_summary(; result = 1, verbose = true)
├ solver_name : Gurobi
├ Termination
│ ├ termination_status : OPTIMAL
│ ├ result_count : 3
│ ├ raw_status : Model was solved to optimality (subject to tolerances), and an optimal solution is available.
│ └ objective_bound : -3.00000e+00
├ Solution (result = 1)
│ ├ primal_status : FEASIBLE_POINT
│ ├ dual_status : NO_SOLUTION
│ ├ objective_value : -3.00000e+00
│ ├ relative_gap : 0.00000e+00
│ └ value
│ ├ x : 1.00000e+00
│ └ y : 4.00000e+00
└ Work counters
  ├ solve_time (sec) : 3.06129e-04
  ├ simplex_iterations : 0
  ├ barrier_iterations : 0
  └ node_count : 0

```

---

<div class="post-metadata">

**Author:** ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Post date:** [March 20, 2025, 3:13am UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/26 "2025-03-20T03:13:35Z")

</div>

Fortunately I have never used Cplex. It’s awkward.  
I think it should report `INFEASIBLE` directly in this case.  
`OPTIMAL` should be a definite answer which by itself implies normality.

---

<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 20, 2025, 3:19am UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/27 "2025-03-20T03:19:08Z")

</div>

We cannot report `termination_status(model) == INFEASIBLE` because CPLEX did not prove that the problem is infeasible.

I looked at the code. We actually report the termination status as `ALMOST_INFEASIBLE` which seems somewhat appropriate:

> <https://github.com/jump-dev/CPLEX.jl/blob/db608afa5236fe836a361e33e1d4a2e5c2c18011/src/MOI/MOI_wrapper.jl#L2853>

My larger point is that you should not rely on `termination_status` alone. You must always check it in combination with `primal_status`.

---

<div class="post-metadata">

**Author:** ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Post date:** [April 6, 2025, 1:48am UTC](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868/29 "2025-04-06T01:48:09Z")

</div>

> [@odow](#):
>
> valid if `primal_status(model) == FEASIBLE_POINT`. If primal status is something else, then “it depends”. There is no universal way to check a status to see if the solver found a valid bound.

Yes, there are circumstances where we have no primal solution but the `JuMP.objective_bound` functions (verb) properly, and it may function properly both in pure-LP and MIP. I can furnish [code instances](https://discourse.julialang.org/t/i-added-1-million-constraints-to-an-lp-unwittingly/127668/16) to reproduce this situation, with Gurobi.

[Previous page](https://discourse.julialang.org/t/about-jump-is-solved-and-feasible/126868.md?page=1)
