All Projects
AI Optimization & Operations Research Academic Research & Benchmarking

VRP Solver — Genetic Algorithm & Differential Evolution

Side-by-Side Benchmarking of Genetic Algorithms & Differential Evolution with Interactive GUI

Discipline AI Optimization & Operations Research
Role Algorithm & Optimization Developer
Timeline / Year 2025
Organization / Context Operations Research & AI Project

Executive Overview

A scientific desktop computational optimization application built in Python to evaluate evolutionary heuristics on NP-hard Capacity-Constrained Vehicle Routing Problems (CVRP). The software features an interactive Tkinter graphical canvas that visualizes fleet vehicle paths in real time and plots algorithmic convergence metrics comparing Genetic Algorithms (GA) against Differential Evolution (DE).

The Challenge & Solution

The Core Problem: Logistics and supply-chain fleets require optimal route planning to minimize total distance traveled while strictly satisfying vehicle payload capacity limits and customer delivery deadlines. Exact mathematical solvers scale exponentially, making evolutionary heuristics indispensable.

The Engineering Solution: Implemented specialized chromosome encoding, partially matched crossover (PMX), swap mutations, and adaptive differential mutation vectors to prevent premature stagnation in local minima. Built a custom Tkinter canvas that visually animates delivery routes and depot clusters.

System Architecture & Data Flow

01
Problem Formulation
Defines depot coordinates, customer demand matrices, and fleet vehicle capacity constraints.
02
Genetic Algorithm Engine
Roulette wheel and tournament selection, PMX crossover, and inversion mutation operations.
03
Differential Evolution Engine
Continuous vector perturbation adapted to permutation-based discrete routing representations.
04
Tkinter Canvas Visualizer
Renders nodes, paths, vehicle color codes, and real-time generational distance convergence curves.

Key Engineering Highlights

Empirical Heuristic Benchmarking

Direct comparative analysis of GA vs DE convergence rates across 20 to 100 customer nodes.

Real-Time Interactive Route Canvas

Live visual playback of fleet routes optimizing across successive generations.

Dynamic Parameter Tuning

Interactive GUI sliders for mutation probability, crossover rate, population size, and vehicle capacity.

Capacity Constraint Enforcement

Strict penalty fitness functions guaranteeing that vehicle capacities are never exceeded.

Technical Challenges & Resolutions

Engineering Challenge
Premature Convergence in GA: Standard genetic algorithms frequently got trapped in suboptimal local minima.
Architectural Solution
Implemented adaptive mutation rates that increase exploration when population diversity drops below threshold limits.
Engineering Challenge
Adapting DE to Discrete Permutations: Differential evolution naturally operates in continuous Euclidean space.
Architectural Solution
Developed a random-key mapping scheme that translates continuous vectors into valid discrete tour sequences.

Have a Project in Mind?

Whether you're building production AI pipelines, full-stack applications, or enterprise business software, let's connect and discuss your vision.

Get in Touch with Martin