CVXPY and GUROBI

403 views
Skip to first unread message

jlcrespo

unread,
Oct 7, 2016, 3:20:40 AM10/7/16
to cvxpy

Hi,

I am trying to model a MILP problem in CVXPY to be solved by Gurobi. I got the error "iterkeys not found" when the solver is called. In order to doublecheck I just tried a small an easy example found in the CVXPY website and it turns out that it can be solved with several solvers but it raises that same error when trying Gurobi.


Does anyone know if there is any problem with CVXPY - Gurobi and Python 3?


Thanks.



Steven Diamond

unread,
Oct 9, 2016, 1:52:56 PM10/9/16
to cvxpy
It appears the cvxpy-gurobi interface doesn't work with Python 3. I pushed a fix. Try installing cvxpy from source and let me know if that fixes it. I can't test it on my mac because there's no support for Python 3.5 in Gurobi for Mac.

jlcrespo

unread,
Oct 10, 2016, 8:59:24 AM10/10/16
to cvxpy
Hi again and thanks for your attention.

I installed CVXPY again and it looks like some improvement. On one hand, the small example from CVXPY website is solved correctly. As to my case, I got an error "Solver Gurobi failed. Try another solver"

The same instance of my problem in CVX works well with Gurobi.

Regards,

Steven Diamond

unread,
Oct 10, 2016, 1:14:55 PM10/10/16
to cv...@googlegroups.com
If you can post a full, self contained python script for your problem that triggers the error I can look at it. Otherwise I have no idea what the issue might be.

Though you should try increasing the Gurobi solve time limit. It's something like "prob.solve(solver=GUROBI, TimeLimit=XXX)``. Check the Gurobi documentation for the exact keyword though.
Reply all
Reply to author
Forward
0 new messages