optimization results

431 views
Skip to first unread message

Víctor Hugo Hinojosa M

unread,
Apr 12, 2016, 10:53:56 AM4/12/16
to Pyomo Forum
Dear Community,
I'd like to know how it's possible to obtain the slack variables and the lagrange multipliers from an optimal solution?
Addittionaly, I'm solving a Benders problem so that I'd like to obtain the Farkas cut when the dual subrproblem is infeasible. I'm using Gurobi.
Best Regards,
Vh

Cristián Serpell

unread,
Apr 12, 2016, 10:57:22 AM4/12/16
to pyomo-forum
Hi Victor.

Usually, you can get the slack variables using a "dual" Suffix, as described in the Pyomo user's guide. I am not sure how to do it from Pyomo command line, though.

Cristián

Gabriel Hackebeil

unread,
Apr 12, 2016, 2:13:06 PM4/12/16
to pyomo...@googlegroups.com
Lagrange multipliers can be obtained using the “dual” Suffix. Depending on which Pyomo interface you use, some solvers also return a “slack” Suffix. However, you can also compute the slack after loading the solution using the lslack() and uslack() methods available on constraints objects.

If you use the NL file interface to Gurobi (SolverFactory(“gurobi”, solver_io=“nl”) or SolverFactory(“gurobi_ampl”)), you can obtain the unbounded rays using the “dunbdd” Suffix (explained in the output from "gurobi_ampl -=“). We also have a user that has submitted a patch to Pyomo’s Gurobi-Python interface to obtain this information, but that hasn’t been incorporated into trunk yet.

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.

Víctor Hugo Hinojosa M

unread,
Apr 20, 2016, 7:52:51 AM4/20/16
to Pyomo Forum
Thank you so much for the information Cristián and Gabriel.
I'm reviewing the lagrange multipliers.
My idea is to use Pyomo to develop my Benders decomposition, which I've programmed in Matlab - Gurobi. In my program, I've carried out the infeasible cut using the unbounded ray in Matlab-Gurobi. Gabriel, it's possible to know the process that was used to get the unbounded ray in Pyomo?
Regards,
Vh

Gabriel Hackebeil

unread,
Apr 20, 2016, 8:08:35 AM4/20/16
to pyomo...@googlegroups.com
This example shows how to obtain the iis from gurobi_ampl using the Suffix component. You would use nearly the exact same procedure as the linked example, only the Suffix you create should be named ‘dunbdd’.

Gabe
Reply all
Reply to author
Forward
0 new messages