Skip to content

Harness the power of Genetic Algorithms to optimize vehicle routes for the Vehicle Routing Problem (VRP) with this Python-based solution. Achieve up to 15% reduced travel distance and 20% improved delivery efficiency using the DEAP library for evolutionary computation. Visualize your results with Matplotlib for clear, data-driven decisions. πŸ“ˆπŸ§¬

Notifications You must be signed in to change notification settings

PacemakerX/Genetic-Algorithm-for-VRP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Genetic Algorithm for Vehicle Routing Problem (VRP) πŸš—πŸ“¦βœ¨

Python DEAP Matplotlib Jupyter Notebook

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. πŸ›£οΈπŸšš

Key Features

  • 🧬 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.

Screenshots

Optimized Routes

Optimized Routes

Figure 1: Visualization of optimized routes using Matplotlib.

Fitness Evolution

Fitness Evolution

Figure 2: Fitness evolution during the genetic algorithm optimization process.

Getting Started

To view and interact with the Jupyter Notebook:

  1. Clone the repository:

    git clone https://github.com/PacemakerX/Genetic-Algorithm-for-VRP.git
    cd your_repository
  2. 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
  3. 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.

  4. 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.

πŸ“‚ Project Structure

vehicleRoutingProblem
β”œβ”€β”€ README.md
β”œβ”€β”€ images
β”‚   β”œβ”€β”€ fitness_evolution.png
β”‚   └── optimized_routes.jpg
β”œβ”€β”€ requirements.txt
└── vehicleRoutingProblem-Solution.ipynb

πŸ“ž Contact

Sparsh Soni - @Sparsh Soni - [email protected]

Project Link: https://github.com/PacemakerX/Genetic-Algorithm-for-VRP.git

⭐️ Don't forget to give the project a star if you found it useful!

About

Harness the power of Genetic Algorithms to optimize vehicle routes for the Vehicle Routing Problem (VRP) with this Python-based solution. Achieve up to 15% reduced travel distance and 20% improved delivery efficiency using the DEAP library for evolutionary computation. Visualize your results with Matplotlib for clear, data-driven decisions. πŸ“ˆπŸ§¬

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published