Skip to content

This repository contains code related to solving and visualizing the Bi-Directional Electric Vehicle Routing Problem (B-EVRP) as well as some exemplary data and results.

License

PhilippBrendel/bevrp

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

BEVRP

The Bidirectional Vehicle Routing Problem
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

Product Name Screen Shot

This project includes code to solve the Bi-directional electric vehicle routing problem (B-EVRP).

Included

  • smart_krit.py: direct solver of BEVRP
  • greedy.py: implementation of Greedy-2 heuristic
  • visualizers.py: visualization tools
  • gui.py: Simple GUI for visualization functionalities
  • utils.py: various helper functions
  • pypeline.py: automatization script for sequential solving of multiple instances via many config-files
  • config.yaml: examplary config-file
  • data: examplary data containing energy consumers, producers and vehicles from Kaiserslautern
  • showroom: A selection of solution instances that can be viewed right away

Getting Started

To Use the code you require a license for the Gurobi optimization software as well as a Python distribution such as Anaconda.

Prerequisites

Setup

  1. Clone the repo
git clone https://github.com/PhilippBrendel/bevrp.git
  1. Create Conda environmemt via provided YAML-file
conda env create -f conda_env.yaml
  1. Activate Conda environmemt
conda activate bevrp
  1. Install Gurobi licence
grbgetkey xxxxxxxx-xxxx...

Usage

Configuration

Configure YAML-file for your problem. Default file used is bevrp/config.yaml if not specified otherwise via cmd-line option (see below).

Optimization

Direct solver:

python smart_krit.py -c my_sk_config.yaml

Greedy-2 heuristic:

python greedy2.py -c my_greedy_config.yaml

For more examples, please refer to the TODO

Visualization

The included visualization tools are executed by specifying the path to the desired solution files - both the .txt and .p need to exist at the same location:

python visualizers.py -n /path/to/my/results/name_of_the_instance

There is also a simple GUI provided that is called via:

python gui.py
  1. Choose the directory that contains your result files (e.g. my_results.p and my_results.txt)
  2. Select the respective solution files from the file-list
  3. The Solutions will be visualized automatically

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

MIT License

Contact

Philipp Brendel - philipp.brendel@iisb.fraunhofer.de

Project Link: https://github.com/PhilippBrendel/bevrp

Acknowledgements

About

This repository contains code related to solving and visualizing the Bi-Directional Electric Vehicle Routing Problem (B-EVRP) as well as some exemplary data and results.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages