# Extreme ray values unbounded LP JuMP

**URL:** <https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump, dual\
**Created:** [August 10, 2023, 5:02pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686 "2023-08-10T17:02:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcoulier](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bcoulier](https://discourse.julialang.org/u/bcoulier)\
**Post date:** [August 10, 2023, 5:02pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686/1 "2023-08-10T17:02:56Z")

</div>

I’m currently dealing with an LP problem where the solution to the primal turns out to be infeasible, leading to an unbounded dual. In order to create a feasibility cut, I’m aiming to acquire the **extreme ray values** from the unbounded dual. I’ve explored options like `JuMP.dual()` and `JuMP.shadow_price()`, but these functions don’t seem to provide dual extreme ray values.

Could someone enlighten me if there’s a function in JuMP that can facilitate this process? My intention is to solve the primal and extract the extreme ray values directly, without having to manually implement the dual formulation.

---

<div class="post-metadata">

**Author:** ![hdavid16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hdavid16/32/11531_2.png) [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Post date:** [August 10, 2023, 6:12pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686/2 "2023-08-10T18:12:00Z")

</div>

I’m not sure about the extreme rays, but you can create the dual with [GitHub - jump-dev/Dualization.jl: Automatic dualization feature for MathOptInterface.jl](https://github.com/jump-dev/Dualization.jl)

---

<div class="post-metadata">

**Author:** ![bcoulier](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bcoulier](https://discourse.julialang.org/u/bcoulier)\
**Post date:** [August 10, 2023, 6:50pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686/3 "2023-08-10T18:50:42Z")

</div>

Yes thank you, I also came across that package but was wondering if JuMP had build in functionality for that because you can get extreme rays directly from Gurobi [https://www.gurobi.com/documentation/9.1/refman/unbdray.html](https://www.gurobi.com/documentation/9.1/refman/unbdray.html)

---

<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:** [August 10, 2023, 8:37pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686/4 "2023-08-10T20:37:27Z")

</div>

Do you have a reproducible example?

If `dual_status(model)` is `INFEASIBILITY_CERTIFICATE`, then the `dual(constraint)` is the associated dual ray.

In some cases, even if the problem is unbounded, the solver might not return a dual ray. In this case, the dual status is `NO_SOLUTION`. You might need to set some solver options, like disabling presolve, in order to force the solver to compute a certificate.

See also [Stuck with infeasibility certificates in JuMP.jl](https://discourse.julialang.org/t/stuck-with-infeasibility-certificates-in-jump-jl/102210)

---

<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:** [August 10, 2023, 8:58pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686/5 "2023-08-10T20:58:25Z")

</div>

Ah. I’m guessing this is the same question as [Benders Subproblem Infeasibility - #2 by odow](https://discourse.julialang.org/t/benders-subproblem-infeasibility/102622/2)? If so, let’s just keep to the other thread. No need to duplicate things 🙂 (I was sick yesterday, so sorry for the delayed reply. I do see and reply to all the JuMP questions here.)

---

<div class="post-metadata">

**Author:** ![bcoulier](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bcoulier](https://discourse.julialang.org/u/bcoulier)\
**Post date:** [August 11, 2023, 12:56pm UTC](https://discourse.julialang.org/t/extreme-ray-values-unbounded-lp-jump/102686/6 "2023-08-11T12:56:39Z")

</div>

Indeed, I tried simplifying the question here. Thanks for the help, I responded in the other Thread.
