Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the extreme rays of a model, please #3902

Open
zhx-11 opened this issue Dec 13, 2024 · 1 comment
Open

How to get the extreme rays of a model, please #3902

zhx-11 opened this issue Dec 13, 2024 · 1 comment

Comments

@zhx-11
Copy link

zhx-11 commented Dec 13, 2024

If a model has already been established, and during the solution process it is found that the model is solvable but the objective function is unbounded, what methods can be used to obtain its extreme rays? And how to calculate the values of the decision variables corresponding to the extreme rays?

My code is as follows:

using JuMP
using Gurobi

model = Model(Gurobi.Optimizer)
set_optimizer_attribute(model, "OutputFlag", 0)
@variable(model, x[1:4]>=0)
@variable(model, y[1:5]>=0)
@constraint(model, [i in 1:4,j in 1:5], i*x[i]+j*y[j]>=i*j)
@objective(model, Max, sum(x[i] for i in 1:4)+sum(y[j] for j in 1:5 ) )

optimize!(model)

Of course, you can also give a simple example of how to get it。
If there is no direct method to obtain the extreme rays, please also give me some feedback, thank you

@blegat
Copy link
Member

blegat commented Dec 15, 2024

Hi @zhx-11. In the future, I recommend posting in https://discourse.julialang.org/c/domain/opt/13, you'll get a faster answer.
The details are here: https://jump.dev/JuMP.jl/stable/moi/background/infeasibility_certificates/#Unbounded-problems
If primal_status(model) returns INFEASIBILITY_CERTIFICATE then value.(x) and value.(y) give you the value of x and y in the extreme ray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants