# Get infeasibility certificate in CPLEX or Gurobi

**URL:** <https://discourse.julialang.org/t/get-infeasibility-certificate-in-cplex-or-gurobi/50506>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, optimization\
**Created:** [November 20, 2020, 4:49pm UTC](https://discourse.julialang.org/t/get-infeasibility-certificate-in-cplex-or-gurobi/50506 "2020-11-20T16:49:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkienscherf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pkienscherf/32/13903_2.png) [@pkienscherf](https://discourse.julialang.org/u/pkienscherf)\
**Post date:** [November 20, 2020, 4:49pm UTC](https://discourse.julialang.org/t/get-infeasibility-certificate-in-cplex-or-gurobi/50506/1 "2020-11-20T16:49:41Z")

</div>

Hi,

I’m trying to retrieve an extreme/dual infeasibility ray from a JuMP Model. I tried to do so with the GLPK, CPLEX, and Gurobi Solvers. I currently have the following versions installed:

```julia
  [a076750e] CPLEX v0.7.3
  [60bf3e95] GLPK v0.14.2
  [2e9cd046] Gurobi v0.9.3
  [4076af6c] JuMP v0.21.5

```

When I pose the following problem:

```julia
m = Model(GLPK.Optimizer)
@variable(m, x[1:2] >= 0)
@objective(m, Max, sum(x))
optimize!(m)

```

then `primal_status(m)` returns `INFEASIBILITY_CERTIFICATE::ResultStatusCode = 4` for GLPK, but `NO_SOLUTION::ResultStatusCode = 0` for CPLEX and Gurobi. Hence I can only access the ray for the GLPK solved model. However, if I add the constraint `@constraint(m, x[2] >= 3)` to the model above, then julia crashes with

```julia
glp_eval_tab_col: k = 3; variable must be non-basicError detected in file draft/glpapi12.c at line 936

signal (6): Abort trap: 6
in expression starting at REPL[22]:1
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 114915766 (Pool: 114881956; Big: 33810); GC: 106
Abort trap: 6

```

upon optimizing with GLPK (CPLEX and Gurobi work as before). Now, this is obviously a toy problem, but I experience the same core dump/no infeasibility certificate in the actual problem I am trying to solve. So, basically, I have two questions:

- Are CPLEX and Gurobi not supposed to provide infeasibility certificates (I couldn’t find detailed information on that end)?
- Is there an alternative (free academic license) LP/NLP solver that can give me an infeasibility certificate without crashing?

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![mtanneau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtanneau/32/17787_2.png) [@mtanneau](https://discourse.julialang.org/u/mtanneau)\
**Post date:** [November 20, 2020, 6:00pm UTC](https://discourse.julialang.org/t/get-infeasibility-certificate-in-cplex-or-gurobi/50506/2 "2020-11-20T18:00:17Z")

</div>

Can’t say for sure without the exact log, but…  
I would guess that CPLEX/Gurobi solved the problem at presolve. For Gurobi you can try setting the [InfUnbdInfo](https://www.gurobi.com/documentation/9.1/refman/infunbdinfo.html) parameter manually.

As for GLPK, this looks like an internal error.

---

<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:** [November 20, 2020, 6:24pm UTC](https://discourse.julialang.org/t/get-infeasibility-certificate-in-cplex-or-gurobi/50506/3 "2020-11-20T18:24:21Z")

</div>

Correct. You need to set additional parameters for CPLEX/Gurobi. For CPLEX

```nohighlight
set_optimizer_attribute(model, "CPX_PARAM_REDUCE", 0)

```

The GLPK looks like a bug. Open an issue.

---

<div class="post-metadata">

**Author:** ![pkienscherf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pkienscherf/32/13903_2.png) [@pkienscherf](https://discourse.julialang.org/u/pkienscherf)\
**Post date:** [November 20, 2020, 7:18pm UTC](https://discourse.julialang.org/t/get-infeasibility-certificate-in-cplex-or-gurobi/50506/4 "2020-11-20T19:18:09Z")

</div>

Thanks, that was it! I’ll open an issue w.r.t. GLPK
