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
Can't obtain dual variable #158
Comments
Duals are not currently available through Gurobi or Cplex. Use SCS, ECOS, or Mosek. |
OK. I will create a function because I have to use one of these solvers. Seems easy using MathProgBase.getconstrduals(p.model.lpqpmodel). I could add this to the Convex.jl but I'm not familiar with the code. |
Convex.jl accesses duals through getdual in the conic interface. Gurobi and CPLEX are not natively conic solvers, so it will take some work to extract the proper duals. The code that does the translation between conic form and Gurobi/CPLEX is here. If you're just solving LPs, you can access duals for Gurobi and CPLEX through JuMP. |
Closing as out-dated. This isn't relevant anymore. |
@odow Could you elaborate? I've been having the same issue and I'm wondering if it's been resolved. |
The issue is from 2016, when Convex.jl used to use MathProgBase. It now uses MathOptInterface to access duals, so the distinction of being unable to get duals for a LP from Gurobi of CPLEX isn't relevant anymore. If you have a reproducible example of your issue, please post it on the community forum https://discourse.julialang.org/c/domain/opt/13 and we can discuss. If it's a bug, we can open a new issue. |
The example code in http://convexjl.readthedocs.io/en/latest/advanced.html to get the dual variable doesn't work( tested with gurobi and cplex):
The text was updated successfully, but these errors were encountered: