H-ACO for MDVRP

Hybrid Ant Colony Optimization for Dynamic Multi Depot Vehicle Routing Problem
159 Downloads
Updated 24 Aug 2023

View License

Title: Hybrid Ant Colony Optimization with 2-opt for Multi Depot Vehicle Routing Problem
Description:
This script implements a hybrid algorithm that combines the strengths of Ant Colony Optimization (ACO) and the 2-opt local search technique to solve the Multi Depot Vehicle Routing Problem (MDVRP). MDVRP involves optimizing the routes for a fleet of vehicles starting and ending at multiple depots, with the goal of minimizing the total travel distance.
Algorithm Overview:
1. Initialization: Randomly place ants at different depots and initialize pheromone levels on routes.
2. Ant Solution Construction: Each ant constructs a feasible solution by probabilistically selecting the next customer to visit based on pheromone levels and distance heuristics.
3. Local Search (2-opt): After constructing initial solutions, the 2-opt local search is applied to improve the quality of the routes by iteratively swapping pairs of edges to reduce total distance.
4. Pheromone Update: Pheromone levels are updated based on the quality of solutions found by ants.
5. Global Update: Stronger pheromone evaporation to prevent stagnation.
6. Termination: The algorithm stops when a certain number of iterations is reached or a convergence criterion is met.
Integration of ACO and 2-opt:
The hybrid approach synergizes ACO's exploration ability with the optimization power of 2-opt local search. The ACO phase constructs diverse solutions and maintains a balance between exploration and exploitation. The 2-opt local search phase then enhances the solutions by refining their routes, eliminating inefficient subpaths.
Advantages:
- ACO helps in global exploration and finding diverse solutions.
- 2-opt improves solution quality by optimizing local routes.
- Hybridization capitalizes on the complementary nature of both techniques.
Usage:
1. Define problem-specific parameters (number of ants, pheromone factors, etc.).
2. Implement ant solution construction using pheromone and distance information.
3. Integrate 2-opt local search to refine solutions.
4. Update pheromone levels based on solution quality and evaporation.
5. Repeat ACO and 2-opt phases iteratively.
6. Analyze convergence and solution quality over iterations.
Note:
Tweaking parameters and balancing exploration-exploitation trade-off is crucial for algorithm performance. Careful selection of pheromone update rules and termination conditions is recommended.
This hybrid algorithm can serve as a powerful tool to efficiently solve the Multi Depot Vehicle Routing Problem, producing high-quality solutions within a reasonable time frame.

Cite As

Abderrahim Boutalbi (2026). H-ACO for MDVRP (https://www.mathworks.com/matlabcentral/fileexchange/134277-h-aco-for-mdvrp), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0