gurobi_direct and FarkasDual

55 views
Skip to first unread message

Braulio Brunaud

unread,
Apr 6, 2016, 7:23:38 PM4/6/16
to Pyomo Forum
Hello

I'm implementing a simple Benders decomposition problem and I would like to access the Farkas infeasibility proof. According to the Gurobi API, there is an attribute of the constraint called FarkasDual. I was looking at the plugins folder of pyomo and I noticed the gurobi_direct.py

I was thinking I could add something like
  if (soln.status == SolutionStatus.infeasible):
           
if extract_duals:
               
for con in cons:
                   
# FarkasDual attributes in Gurobi is the Farkas infeasibility proof
                    soln_constraints
[ con.ConstrName ]["Dual"] = con.FarkasDual
to get the unbounded ray in the dual suffix.

Now I have two questions:
1. How do I use the gurobi_direct plugin?
opt = SolverFactory('gurobi_direct') ?

thanks!

Braulio





Gabriel Hackebeil

unread,
Apr 6, 2016, 9:53:24 PM4/6/16
to pyomo...@googlegroups.com
1.) SolverFactory(“gurobi”, solver_io=“python”)

2.) Note that if you use gurobi_ampl (SolverFactory(“gurobi_ampl”) or SolverFactory(“gurobi”, solver_io=“nl”)), you can obtain the unbounded ray using the Suffix “dunbdd”.

3.) This looks likes it would be a good addition to the gurobi_direct plugin. Would you mind opening a ticket on the trac website and uploading a working patch?

Gabe

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages