Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
1.92k stars 499 forks source link

Enable Extreme Ray Retrieval e.g. from Gurobi #2900

Open maximilian-hoffmann opened 1 year ago

maximilian-hoffmann commented 1 year ago

For Benders decomposition, extreme rays need to be retrieved from unbounded sub-problems to add feasibility cuts to the master problem. However, the example on Benders decomposition from Pyomo https://github.com/Pyomo/pyomo/blob/main/examples/pyomo/benders/runbenders seems to consider dual variables for optimality cuts only. Is there a generic way (just like for dual variables) to also access extreme rays in case of unboundedness? If not, an implementation would be very beneficial. E.g. Gurobi can return extreme rays and Farkas Duals https://support.gurobi.com/hc/en-us/community/posts/360078072572-FarkasDual-and-FarkasProof and it would be great if these options could also be handled by Pyomo.

Best, Max

michaelbynum commented 1 year ago

See these methods on the persistent interface to Gurobi:

https://github.com/Pyomo/pyomo/blob/be93e575f9b3075f9427411f00c574025d560cc2/pyomo/contrib/appsi/solvers/gurobi.py#L1152

https://github.com/Pyomo/pyomo/blob/be93e575f9b3075f9427411f00c574025d560cc2/pyomo/contrib/appsi/solvers/gurobi.py#L1240

https://github.com/Pyomo/pyomo/blob/be93e575f9b3075f9427411f00c574025d560cc2/pyomo/contrib/appsi/solvers/gurobi.py#L1256