-
Notifications
You must be signed in to change notification settings - Fork 43
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
Pulp Exception: problem Not Solved & heuristic_only returns different solution than shown in preview #119
Comments
Hi there ! Could you share your data so that we can try tro replicate the error ? |
Sure! attached the values of distance matrix D. I declared it as following
|
Could you please provide a minimal reproducing example ? (just like the one in your first post, but with the bit of code that reads the distance matrix). Thanks ! |
Sure!
|
Thanks. The code is still incomplete for replication:
|
Ahh true sorry! Please see below the complete code. Thank you for your time!
|
I think the error comes from the fact that the name of the solve should be in lower case. Try with "gurobi" or "cplex" or "cbc", it should work. Will add a check to raise an error is the solver's name is incorrect. This should also be more clear in the docs. |
Also, you are right, using To get this solution, set a |
Now it works! Perfect, thank you so much! |
Hi, I am trying to use VRPy for a CVRP with one depot and 421 client locations. I created a 423x423 numpy array and a graph from this based on the OR-tools example from the documentation. I want to minimize the routes' total length, as well as include restrictions on the maximum length of every route which I tried to implement via the "time" attribute via the following code. I am using Gurobi as a solver which I has worked previously for another optimisation.
When I run the optimisation it shows initial solutions for the Clarke & Wright and Greedy algorithm but then stops with the error message shown below.
I do realize that the graph size is quite large but I thought with Gurobi solver I should be able to compute it. However, to get at least one feasible solution I tried to set the heuristic_only attribute as True but this returns a number of 62 routes which is significantly higher than what is shown in the preview if I try to run the full optimisation.
Any idea what the error could result from and how I could solve it? I also checked the entries of my matrix so I am sure that every location is close enough to the source/sink for the model not being entirely infeasible. Please let me know if it would help to see the matrix.
Going forward I would also be happy to use the results from Greedy algorithm as interim solution if I could extract this result somehow. I also tried setting the num_iter attribute to 0 but this also only results in the error message shown above.
The text was updated successfully, but these errors were encountered: