attention-learn-to-route
attention-learn-to-route copied to clipboard
questions about how to model CVRP constraints
Hello,
Fisrt of all , I really admire your work and repository. I am very curious about how to model the condition that a vehicle meets the needs of all customers by repeatedly shipping goods into a MIP constraint? I'm having some difficulty with this. If it is convenient, can you provide the Gurobi code. Maybe I can find the answer from it.
Hi! Thanks for your compliments. I'm not sure what you mean exactly, if you refer to split delivery VRP, I don't have a solution for modelling that as a MIP which is the reason why in the paper we don't have Gurobi as a baseline for SDVRP.
Thanks for the quick reply, I was referring to Capacitated VRP.
Because in Capacitated VRP, a vehicle with capacity D is set to serve all the customer nodes. So what if we ensure that all customer nodes can be served? What I understand is that when serving each route, the vehicle is in a full state (that is, the capacity is D).
That is what I mentioned above by repeatedly filling the vehicle to meet the needs of all customers.
My confusion is how to convert this setting into MIP constraints and implement it with Gurobi?
Hi,
I do not have an implementation for Gurobi as the number is reported from https://arxiv.org/pdf/1802.04240.pdf, see 'Optimal' in table 2 in appendix C.2. However, you can find some implementations here: https://github.com/ruthmair/vrp/blob/main/cvrp.ipynb. I didn't test them but they are made by Gurobi staff so I think they are good.
Thanks very much!