/vrp-simulation

Solving and simulating TSP and vehicle routing problem (VRP) instances with Google OR-Tools and Python Turtle.

Primary LanguagePython

VRP Simulator: Python Turtle and Google OR-Tools
Author: Kyle E. C. Booth (kbooth@mie.utoronto.ca)

This repository contains code base for a lightweight simulator of the multiple traveling salesman problem (mTSP) and vehicle routing problem (VRP). Vehicle movement is simulated using Python Turtle, and vehicle routes are generated using Google OR-Tools routing solver.

Requirements:

Last tested using Python v3.5 and OR-Tools v7.5.

File/directory descriptions:

In progress.

Running the simulator:

Running the simulator is simple. Navigate to the directory and run the following in terminal:

python main.py `<cycles>` `<vehicles>` `<tasks>`
  • cycles: indicates the number of times a new instance should be generated, solved, and simulated
  • vehicles: the number of agents that are routed
  • tasks: the number of customers visited across all vehicles

Note: Recommend using less than 5 vehicles and less than 30 tasks.

A Python Turtle window should pop-up and simulate the solution to the VRP, resembling something like the following: