inria-UFF / VRPSolverEasy

A simple Python interface for VRPSolver, a state-of-the-art Branch-Cut-and-Price exact solver for vehicle routing problems
https://vrpsolvereasy.readthedocs.io/en/latest/
MIT License
111 stars 10 forks source link

Got MDVRP to run - but it is not printing out the routes or depot assignments #6

Closed mventura00 closed 1 year ago

mventura00 commented 1 year ago

Hello, I ran the provided demo for 'MDVRP' (multi-depot VRP) and used the sample data file 'P01'. It did run successfully! However, no routes or depot assignments were printed :( I also didnt quite understand all the output it was given. Regardless, I asked ChatGPT to help me add code to the routes to print and it suggested me this: I wrote: "Here is my input file (pasted it) Here is my python code (pasted it) Here is my output file (pasted it) TO DO: (here is where I ask the question): Given the above code and input file, give me the complete code to add the routes?

And ChatGPT wrote me this: To add the routes and assignments for each different depot in the given Python code, we need to modify the solve_demo function to extract and store the routes and depot assignments from the solver's solution object. Below is the modified code with comments explaining the changes: image

With these changes, the solve_demo function now extracts and prints the routes taken by each vehicle and their respective depot assignments. Note that this code assumes that the solver's solution object contains information about the routes and depot assignments. If the solver does not provide this information directly, you may need to use alternative methods to extract this data or modify the solver code to store the routes and assignments explicitly.

-- I also asked chatGPT to then provide me the 'Full Complete code' (I attach it here). I also attach the input file 'p01' (same one from GitHub, under: demos/data/MDVRP/p01)

MDVRP_modified (with ROUTE codes).zip

So even after I ran this, it didnnt print out the 'route information' and 'depot assignments' What should I do? Anyone know what is happening?

mventura00 commented 1 year ago

For the 'MDVRP' python program (when you run the original one that is provided on GitHub), why is the output different than the CVRP or HFVRP in that it doesnt print out the routes? What is the code supposed to do? Is it supposed to print out the routes? If not, then what is the purpose of the output? If it is supposed to print out the routes, then it is not doing it for me. :(