attention-learn-to-route icon indicating copy to clipboard operation
attention-learn-to-route copied to clipboard

questions about how to model CVRP constraints

Open moonlioght opened this issue 2 years ago • 4 comments

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.

moonlioght avatar Oct 10 '23 15:10 moonlioght

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.

wouterkool avatar Oct 11 '23 15:10 wouterkool

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. 2 3 My confusion is how to convert this setting into MIP constraints and implement it with Gurobi?

moonlioght avatar Oct 12 '23 02:10 moonlioght

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.

wouterkool avatar Oct 16 '23 19:10 wouterkool

Thanks very much!

moonlioght avatar Oct 17 '23 06:10 moonlioght