Kuifje02/vrpy

Why I use gurobi is slower than not use it?

river7816 opened this issue · 1 comments

System: Windows 11 Pro 21H2
Core: i7 12700H
Python:3.9
Gurobi:9.5.2
When I write prob.solve(cspy=False,solver='gurobi'), it stuck at the iteration 0, however, when I use prob.solve(), it can iterate for several times. I thought it would be faster when I use gurobi. You can see in the picture, when I use gurobi, my cpu is working but not iterating.
image
here is my code and data VRP.zip

With cspy=True, you are solving part of the problem with cspy (dynamic programming), and part of the problem with linear programming. With cspy=False, you are solving everything with linear programming, which is typically slower. What you want is probably cspy=True and solver='gurobi'. This way, you are solving part of the problem with cspy, and part of the problem with linear programming with gurobi.

So in summary, try prob.solve(cspy=True,solver='gurobi').