Giter Site home page Giter Site logo

fuvidani / e-vrptw Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 10.0 8.48 MB

Solver for the Electric Vehicle Routing Problem with Time Windows

License: MIT License

Kotlin 67.45% Java 32.55%
vehicle-routing-problem optimization-algorithms electric-vehicle-routing-problem heuristic-algorithm routing-algorithm kotlin tu-wien

e-vrptw's Introduction

Electric-Vehicle Routing Problem with Time Windows (EVRPTW)
Build Status Gradle Status License: MIT ktlint

Solver for the Electric Vehicle Routing Problem with Time Windows.


Image Source

Problem description

In the E-VRPTW, a set of customers must be served by a fleet of battery electric vehicles (BEV). The E-VRPTW extends the well-know VRPTW, where customers must be served within a given time window, by the restriction of reduced operating range of the vehicles and the possibility to recharge at certain station to increase this range. The assumption of flat terrain and constant travel speed holds in the E-VRPTW. The objective function is to minimize the total travel distance.

More formal, the EVRPTW is defined on a complete directed graph G = (V,A) consisting of a set of depot, customer, and recharging station nodes and a set of edges. Each edge (i, j) has a distance dij and a travel time tij associated and each traveled edge consumes the amount of r x dij of the remaining battery charge of the vehicle, where r denotes the constant charge consumption rate. Furthermore, a set of homogeneous vehicles is given, where each vehicle has a maximal capacity of C and is located, full loaded at the depot. Each node has a positive demand qi, a service time si and a time window [ ei, li ] assigned. The service must start within the given time window (thus, finishing the service could be later than li). At recharging stations, the difference between the present charge level and the battery capacity Q is recharged (always loaded until battery is full) with a constant recharging rate of g. Note, that it is allowed to visit recharging stations more than once.

The aim is to construct routes, such that all customers are visited exactly once and served within their given time window. All routes must begin and end in the depot and the vehicle capacity and battery capacity must be respected. The objective function is to minimize the total traveled distance.

Implementation Details

Our E-VRPTW Solver consists of two parts:

  1. Construction heuristic: Time-Oriented, Nearest-Neighbor Heuristic (Solomon 1987)
  2. Metaheuristic: For this part, we tried to implement a Hybrid VNS/TS metaheuristic proposed in the paper The Electric Vehicle-Routing Problem with Time Windows and Recharging Stations, however our solution is not the most efficient one and requires further optimizations (especially in route representation)

Model objects like EVRPTWInstance, Customer, Node have been copied from the E-VRPTW Solution Verifier (Java) implemented by @ghiermann.

See our presentation slides for more details.

Usage

See Main.kt for instance/plotting/performance-recording customizations.

Contributions

Special thanks to my dear friend and colleague David Molnar for participating in this project:


David Molnar

๐Ÿค” ๐Ÿ’ป โš ๏ธ

License

This project is licensed under the MIT License. Feel free to use, extend or fit it to your needs.

e-vrptw's People

Contributors

dmolnar99 avatar fuvidani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.