
Introducing the travel salesperson problem and the capacitated vehicle route planning problem, this lecture highlights similarities, differences, and approaches to solving them with various algorithms.
Contrast the traveling salesperson problem with shortest path problems, showing start-to-end routing through select nodes and introducing vehicle route planning variants, time windows, and asymmetric distances.
Explore data sources from Heidelberg University Discrete and Combinatorial Optimization Lab for TSP and KVP problems, and examine TSV and KVP data structures with coordinates and euclidean distance.
Explore starting points for coding with Google Colab or VS Code, use Jupyter notebooks, install VP lib, and import TSP data with VP lib's read_instance to begin solving route problems.
Develop a read_all_instances function to load tsp data from a root folder, filter files by the tsp ending, and return parsed instances with a distance matrix.
Visualize TSP data by loading KVP and VRRP instances from TSV files, then plot node coordinates with labeled scatter plots using matplotlib in Python for vehicle route planning.
Visualize CVRP data and TSP instances by plotting node coordinates and demand parts, comparing challenging and simple instances to test routing algorithms across diverse datasets.
Compare heuristics and metaheuristics in solving TSP and VPI problems, noting heuristics are problem-specific and fast but approximate, while metaheuristics are general, iterative, and balance exploration and exploitation.
Apply the 2-opt theory to improve tours for TSP and related ERP variants by swapping or reversing selected tour segments, then evaluate cost changes.
Explore the three-opt algorithm theory for TSP and KVP, swapping and reversing segments to create improved tours, with three swap options and cost-based selection.
Initialize a random tour for the TSP, explore two-opt and upcoming three-opt algorithms, and establish an initial solution workflow for TSP and VRP with randomization and reproducibility considerations.
Explore building a 2-opt algorithm for the traveling salesman problem in Python, focusing on non-adjacent edge swaps, tour closure, and practical loop construction.
Master a 2-opt edge swap for tsp, calculate delta costs with the distance matrix, track the best improvement, and reverse the affected tour segment.
Explore 2-opt optimization for the traveling salesman problem in python, including calculating tour length from a distance matrix and applying the algorithm to refine an initial tour before visualization.
Visualize the TSP tour with a reusable function that plots the tour edges and nodes from coordinates, showing 2-opt results and the optimized route.
Implement a 3-opt algorithm for the traveling salesman problem by splitting the tour into three segments, reversing connections, and using three nested loops with range tricks.
Explore three-opt strategies for the tsp in python, constructing three reconnect options by reversing segments between i+1 and j, j+1 and k, and selecting the best to minimize tour length.
Explore implementing a three-opt improvement for the traveling salesman problem, including calculating deltas, reversing segments, and selecting the best improvement to optimize a tour.
Explore two-opt and three-opt algorithms for the TSP, note the curse of dimensionality, and preview Cvxpy problem formulations and new solutions.
Explore modeling CVRP in Python with cvxpy, capturing node demands, vehicle capacity, and depot handling; implement a 2-opt roadmap by creating and improving vehicle subtours.
Design and implement functions for cvrp in python to compute route distances and total distances, and generate a greedy initial solution that partitions customers into vehicle subtours under capacity constraints.
Explore the 2-opt algorithm design for CVRP, including subtour reversal, distance matrix updates, and improvement-driven swaps to optimize routes with depots.
Design and implement global functions for CVRP in Python, including a two-opt based route optimizer, route visualization, and constraint checks to obtain and display optimized multi-vehicle routes.
Apply 2-opt to CVRP in Python, test capacity constraints, generate greedy initial routes, optimize distances, and validate all vehicle capacities while comparing total distance.
Explore the 3-opt algorithm for CVRP, compare it with two-opt and TSP methods, and learn how segment reversal and heuristic checks improve routing solutions under capacity constraints.
Apply large neighborhood search to vehicle route planning and TSP by iteratively destroying and repairing large portions of the tour, balancing exploration and exploitation for better solutions.
Explore a nearest neighbor greedy search for TSP to generate a robust initialization for large neighborhood search (LMS), leveraging distance matrices, tour swaps, and insertion costs.
Implement destroy and repair functions in the LNS algorithm: destroy removes a sample of cities from a tour copy, and repair inserts them at best position using distance matrix.
Implement the large neighborhood search algorithm for vehicle route planning, integrating nearest-neighbor initialization, destroy and repair tours, and 1000 iterations with a five-city destruction size to improve routes.
Learn to apply large neighborhood search (LNS) to the traveling salesman problem, experiment with initializations, destruction sizes, and iterations, and visualize and compare best tours and lengths.
Apply a large neighborhood search (LNS) to CVRP in Python, starting from a greedy initialization and using destroy–repair steps to remove and reinsert customers across routes for exploration.
Implement a CVRP repair function that reassigns removed customers across routes while respecting vehicle capacity and demands, using best insertion points based on distance and cost.
Implement large neighborhood search for the CVRP by merging destroy and repair phases, using a distance matrix and demand with greedy initialization and iterative improvement.
Apply large neighborhood search to CVRP in Python, visualize and animate routing results with matplotlib, and compare performance to two-opt and k-opt.
Master tabu search theory as a memory-based metaheuristic that avoids local optima by balancing exploration and exploitation, using a tabu list, short-term memory, and memory-based rules.
Implement the route distance function and a swapped algorithm, a simplified two-opt variant, to serve as backbones for tabu search in vehicle route optimization using a distance matrix.
Design and implement a tabu search function for the traveling salesman problem (TSP) in Python, using two-opt neighborhoods, a FIFO tabu list, and iterative improvement to find the best route.
Explore tabu search for solving TSP instances in Python, tuning tabu size 20 and 200 iterations to balance exploration and exploitation, and compare its results with LMS and K-opt algorithms.
Implement tabu search for capacitated VRP in Python, starting from data loading and greedy initialization, and building is_feasible and generate_neighbors for cross-route swaps in a two-opt-inspired local search.
Implement a tabu search function for CVRP in Python by using a deque-based tabu list with maxlen, generating neighbors, and iteratively updating best routes and distances.
Explore CVRP results using tabu search, tuning parameters like max iterations, tabu size, and random swaps, starting from an initial greedy route to obtain optimized routes and distances.
Simulated annealing is a probabilistic optimization algorithm inspired by physics that balances exploration and exploitation through a temperature-based acceptance rule, using initialization, local search, cooling, and stopping criteria.
Apply simulated annealing to TSP, using swap-based neighborhood moves, a distance matrix, initial temperature, cooling rate, and stopping temperature to balance exploration and exploitation.
Explore how to implement simulated annealing for the TSP, tune parameters like initial temperature and cooling rate, and compare results with tabu search, distance matrix, and other methods.
Apply simulated annealing to CVRP severe cases, using TSP-like code, greedy neighbor generation, and distance sorting to compare final distances with tabu search and LNS.
Unlock the power of optimization by mastering Vehicle Routing Problems (VRP) with Python! In this course, you will learn to solve the Traveling Salesman Problem (TSP) and Capacitated Vehicle Routing Problem (CVRP) using a range of powerful algorithms—k-opt, Large Neighborhood Search, Tabu Search, and Simulated Annealing.
Designed for researchers, data scientists, and professionals in logistics and scheduling, this course provides both the theoretical foundations and hands-on coding exercises. You will implement each algorithm from scratch using basic Python libraries, enabling a deep understanding of the concepts without relying on external packages.
We’ll walk through real-world problem instances, offering step-by-step explanations of both theory and code. You’ll also create dynamic visualizations of algorithmic solutions, helping you visualize how these algorithms work in practice.
Beyond coding and theory, this course emphasizes practical application. You’ll learn how to compare algorithm performance, draw meaningful conclusions, and understand when to apply each method based on the problem’s unique requirements. With guided numerical examples and problem-solving strategies, you’ll gain the confidence to tackle various VRP variants and optimize real-world logistics challenges. Whether you're working in research or industry, this course will provide you with a strong foundation to innovate and improve routing solutions efficiently.
Whether you're looking to enhance your skills in optimization, develop solutions for industry challenges, or expand your knowledge of heuristic and metaheuristic algorithms, this course equips you with all the tools you need to excel.
By the end, you’ll not only understand how to solve VRPs but also how to customize and expand these algorithms for more complex, real-world problems. Join us and take your optimization skills to the next level!