This repository contains a Jupyter Notebook implementing a genetic algorithm in Python using the DEAP library to solve the Vehicle Routing Problem (VRP). The project optimizes routes for multiple vehicles, aiming to minimize total travel distance and improve delivery efficiency. π£οΈπ
- 𧬠Genetic Algorithm: Engineered a solution for VRP using evolutionary computation techniques.
- π Fitness Evaluation: Developed a custom fitness function tailored to VRP requirements, enhancing route optimization.
- πΊοΈ Visualization: Utilized Matplotlib for visualizing optimized routing solutions and decision-making insights.
Figure 1: Visualization of optimized routes using Matplotlib.
Figure 2: Fitness evolution during the genetic algorithm optimization process.
To view and interact with the Jupyter Notebook:
-
Clone the repository:
git clone https://github.com/PacemakerX/Genetic-Algorithm-for-VRP.git cd your_repository
-
Install Dependencies: It's recommended to use a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
-
Launch Jupyter Notebook: Start the Jupyter Notebook server:
jupyter notebook
This will open a new tab in your web browser with the Jupyter Notebook interface.
-
Open and Run the Notebook:
Navigate to the notebook file (vehicleRoutingProblem-Solution.ipynb) in the Jupyter interface and open it. Follow the instructions within the notebook to execute the genetic algorithm and visualize the results.
vehicleRoutingProblem
βββ README.md
βββ images
β βββ fitness_evolution.png
β βββ optimized_routes.jpg
βββ requirements.txt
βββ vehicleRoutingProblem-Solution.ipynb
Sparsh Soni - @Sparsh Soni - [email protected]
Project Link: https://github.com/PacemakerX/Genetic-Algorithm-for-VRP.git