Gurobi: extreme rays of the dual of an infeasible lp

Is there a possiblity to retrieve extreme rays of the dual of an infeasible lp in gurobi?

Since the primal of the problem is infeasible, the dual of the problem should be unbounded.

There is the Var.UnbdRay attribute which I can use for a lp if its primal is unbounded. Is there also an option to do the same thing for its dual, without having to dualize the problem manualy?

I'd also be thankful for negative answers, if what I'm looking for isn't possible

I'm using Gurobi 7.5.2 with python 3.6

Upvotes: 2

Views: 1669

Answers (1)

Ioannis
Ioannis

Reputation: 5388

I think what you are looking for is the FarkasDual attribute.

You can then check if the primal is infeasible, and if so, recover an extreme ray of the dual. Paul Rubin has a post that implements this for CPLEX (there is a newer version of this post, but the scope is slightly different, for your needs the linked post is probably more helpful).

Personally, I prefer to formulate the dual and retrieve the rays directly when it is unbounded.

Make sure you set the InfUnbdInfo parameter equal to one, in order to recover the FarkasDual rays.

I hope this helps.

Upvotes: 1

Related Questions