Giter VIP home page Giter VIP logo

mvrp's Introduction

Open in GitHub Codespaces

Multi Vehicle Routing Problem

Run the Multi Vehicle Routing Problem (MVRP) problem for several different scenarios. Select between delivery drones (flight path) and trucks (roads), the number of vehicles and client locations.

D-Wave Logo

Installation

You can run this example without installation in cloud-based IDEs that support the Development Containers specification (aka "devcontainers").

For development environments that do not support devcontainers, install requirements:

pip install -r requirements.txt

If you are cloning the repo to your local system, working in a virtual environment is recommended.

Usage

Your development environment should be configured to access Leap’s Solvers. You can see information about supported IDEs and authorizing access to your Leap account here.

To run the demo:

python app.py

Access the user interface with your browser at http://127.0.0.1:8050/.

The demo program opens an interface where you can configure problems and submit these problems to a solver.

Configuration options can be found in the app_configs.py file.

Problem Description

The multi-vehicle routing problem is to deliver a set of resources to a set of predetermined locations using a limited number of vehicles, all of which start and finish at a single depot location.

This problem can be seen as a generalized traveling salespersons problem (TSP) where each vehicle must traverse a local network of locations in the most effective way, while also optimizing the distribution of sets of locations among the vehicles.

In this demo a single central depot location is determined by choosing an address (can be set in app_configs.py), after which a number of locations are placed randomly within a specified radius of the depot. The vehicles can either be trucks, following the road network, or drones, traversing the map as the crow flies. The problem can then be solved using either a classical or a quantum hybrid solver for a chosen number of vehicles and locations.

License

Released under the Apache License 2.0. See LICENSE file.

mvrp's People

Contributors

k8culver avatar randomir avatar thisac avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fermiq

mvrp's Issues

Consider Delivery and Pickup Options

Currently the demo only supports either pickup or delivery. It could be interesting to support both pickup and delivery simultaneously.

There is no plan (so far) to support this in the generators so this option would most likely not be able to make use of the generators.

Investigate Solution Mini Cycles

Currently some scenarios generate solutions that contain mini cycles (see screenshots). We need to investigate what causes this and see if there is a fix that results in only one path being coloured. One theory is that the package we are using to create these paths blindly colours any edge between two adjacent nodes, but this has not been investigated.

Screenshot 2024-05-03 at 4 06 09 PM Screenshot 2024-05-09 at 3 02 02 PM

Update wall clock time

The wall clock time being calculated and displayed over the result tables can be a bit misleading since it can be significant longer than the allowed Solver time limit. This is due to the time calculated is for the whole run (not just the solver) and includes code overhead as well as time overhead for network, queue, etc.

We should either (or both):

  • Clarify exactly what the wall clock time is measuring.
  • Change the time printed to reflect the actual time spent solving the problem (more interesting).

Consider Adding Time Windows Option

Each location must be serviced within a specified time window. The vehicle can arrive early and wait but cannot arrive late.

Eventually generators for CVRP with Time Windows will be in dimod and dwave-optimization.

Add tests

Tests are missing and should be added.

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.