Model used for solving Capacitated Vehicle Routing Problem (CVRP). The CVRP is a variant of the vehicle routing problem (VRP) in which vehicles have a limited carrying capacity and must visit a set of customer locations to deliver or collect items. Model is based on GitHub repo HERE, and was used for medium.com article "Vaccine Supply Chain Optimization with AI-Powered Capacitated Vehicle Routing Problem(CVRP)".
Dynamic Attention Model (AM-D) Approach: After vehicle returns to depot, the remaining nodes could be considered as a new (smaller) instance (graph) to be solved. Idea: update embedding of the remaining nodes using encoder after agent arrives back to depot. Implementation:
- Force RL agent to wait for others once it arrives to .
- When every agent is in depot, apply encoder with mask to the whole batch.
If you want to train your own model with AM-D approach:
- Prepare data (depo location Lat/Long, nodes location Lat/Long and capacity of the vehicles)
- Transform data with TensorFlow tranform_to_tensor Here is Gist example with transforming from Pandas Data Frame
- Train the model using