Operations Research Tools

Enhance route planning efficiency by mastering Google OR-Tools for optimization.

Google OR-Tools is a suite of tools and services designed to help businesses optimize their operations. It includes tools for optimization, simulation, forecasting, and machine learning. We’ll use this package to solve TSP!

The create_data_model function

As usual, we start by importing the required libraries and data. The create_data_model function creates a dictionary containing the distance matrix and the number of vehicles, num_vehicles, which is set to 1 for TSP. To give it a new touch, we add the possibility of entering the starting location, depot, for which the index is set to 0, i.e., StoreA.

Get hands-on with 1200+ tech skills courses.