# Is it possible to see a solution related to upper bound?

**URL:** https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735
**Category:** Optimization (Mathematical)
**Tags:** question, package, jump
**Created:** [March 8, 2023, 2:50pm UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735 "2023-03-08T14:50:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Optimization](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/optimization/32/32462_2.png) [@Optimization](https://discourse.julialang.org/u/Optimization)
#### Post date: [March 8, 2023, 2:50pm UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735/1 "2023-03-08T14:50:29Z")

</div>

Hi guys,

I use CPLEX as an optimizer and JuMP apackage. I have a big IP that needs at least 2hours to generate a soultion.  
I wonder is there a way to stop it early? when running a model that takes a long time to give you an optimal soultion:  
1- is it possible to ste time limit?  
2- is it possible to see soultions associated with upper and lower bound that CPLEX shows?  
3- is it possiblr to see the cuts?

Thank you for your help

---

<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 8, 2023, 5:25pm UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735/2 "2023-03-08T17:25:37Z")

</div>

1. [Models · JuMP](https://jump.dev/JuMP.jl/stable/manual/models/#Set-a-time-limit)

2. No. If minimizing the lower bound is a statement about the objective. It doesn’t have an associated solution.

3. No. In most cases these are the solvers secret sauce that costs the money!

---

<div class="post-metadata">

### Author: ![CarmenCaraway](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@CarmenCaraway](https://discourse.julialang.org/u/CarmenCaraway)
#### Post date: [March 12, 2023, 7:39pm UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735/3 "2023-03-12T19:39:24Z")

</div>

Thanks for the answer, you made my day 🙂

---

<div class="post-metadata">

### Author: ![cvanaret](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cvanaret/32/11594_2.png) [@cvanaret](https://discourse.julialang.org/u/cvanaret)
#### Post date: [March 12, 2023, 10:40pm UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735/4 "2023-03-12T22:40:40Z")

</div>

The lower bound is obtained by solving continuous relaxations (LPs), so there should be corresponding solutions (whether or not they’re available in a solver is another question).

---

<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 12, 2023, 11:59pm UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735/5 "2023-03-12T23:59:30Z")

</div>

> The lower bound is obtained by solving continuous relaxations

_A_ lower bound _can_ obtained by solving continuous relaxations. But if CPLEX printed a particular bound, there might not be a continuous solution to go along with that. (It might have used some rounding heuristic from an LP solution.)

So perhaps the more nuanced answer to (2) is: if you use a callback then you can see the points in the continuous relaxation visited by CPLEX, as well as the current incumbent (upper bound) at each callback during the solve:

> **[GitHub - jump-dev/CPLEX.jl: Julia interface for the CPLEX optimization software](https://github.com/jump-dev/CPLEX.jl#callbacks)**
>
> Julia interface for the CPLEX optimization software - GitHub - jump-dev/CPLEX.jl: Julia interface for the CPLEX optimization software

---

<div class="post-metadata">

### Author: ![VeronaBrown](https://avatars.discourse-cdn.com/v4/letter/v/8c91f0/32.png) [@VeronaBrown](https://discourse.julialang.org/u/VeronaBrown)
#### Post date: [March 16, 2023, 9:12am UTC](https://discourse.julialang.org/t/is-it-possible-to-see-a-solution-related-to-upper-bound/95735/6 "2023-03-16T09:12:53Z")

</div>

Thanks for the link.
