# Check Feasibility of Solution Returned by JuMP After Timeout

**URL:** <https://discourse.julialang.org/t/check-feasibility-of-solution-returned-by-jump-after-timeout/1477>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [January 14, 2017, 1:47am UTC](https://discourse.julialang.org/t/check-feasibility-of-solution-returned-by-jump-after-timeout/1477 "2017-01-14T01:47:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdowdy3](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@gdowdy3](https://discourse.julialang.org/u/gdowdy3)\
**Post date:** [January 14, 2017, 1:47am UTC](https://discourse.julialang.org/t/check-feasibility-of-solution-returned-by-jump-after-timeout/1477/1 "2017-01-14T01:47:25Z")

</div>

I’ve got an integer programming problem which I’m solving with JuMP, using Cbc as the underlying solver. The full solution of the problem (i.e., finding a provably optimal solution) takes longer than I care to wait, so I’ve implemented a time limit on the solve time like so:

```
using JuMP
using Cbc
m = Model(solver=CbcSolver(Sec=5*60))

```

When I solve the problem using

```
status = solve(m)

```

The status is

```
UserLimit
WARNING: Not solved to optimality, status: UserLimit

```

and I don’t know whether or not the solver managed to find a feasible solution in the allotted time. **How can I quickly check whether or not the solution returned by the solver is feasible?**

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [January 14, 2017, 11:08am UTC](https://discourse.julialang.org/t/check-feasibility-of-solution-returned-by-jump-after-timeout/1477/2 "2017-01-14T11:08:59Z")

</div>

Checking whether a solution is feasible is discussed in [this JuMP issue](https://github.com/JuliaOpt/JuMP.jl/issues/693).

---

<div class="post-metadata">

**Author:** ![gdowdy3](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@gdowdy3](https://discourse.julialang.org/u/gdowdy3)\
**Post date:** [January 14, 2017, 5:38pm UTC](https://discourse.julialang.org/t/check-feasibility-of-solution-returned-by-jump-after-timeout/1477/3 "2017-01-14T17:38:44Z")

</div>

I posted a proposed solution to this problem in the aforementioned JuMP issue.

---

<div class="post-metadata">

**Author:** ![adowling2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adowling2/32/539_2.png) [@adowling2](https://discourse.julialang.org/u/adowling2)\
**Post date:** [February 1, 2017, 11:16pm UTC](https://discourse.julialang.org/t/check-feasibility-of-solution-returned-by-jump-after-timeout/1477/4 "2017-02-01T23:16:13Z")

</div>

I put together a simple Julia package to help with this type of model diagnostics. Suggestions, comments and bug reports are welcome.  
[https://github.com/adowling2/DegeneracyHunter.jl](https://github.com/adowling2/DegeneracyHunter.jl)
