Giter Site home page Giter Site logo

routenplanner's Introduction

Route planning for the garbage disposal.

I. Motivation

Waste is generated in every city and has to be removed. Each trip by the waste collection service incurs costs, most of which depend on the travel time. To minimize cost, one has to find the fastest possible route. But how can this be calculated?

II. Approach

Finding an optimal route for garbage collection:

  1. Convert the road network into an undirected coherent graph, where intersections are the nodes and roads are the edges, and dead ends are ignored for now.
  2. If the graph has nodes with odd degrees, then consider these nodes and find a connection with the smallest sum of edge weights (using Dijkstra's algorithm) to keep our route optimal.
  3. Add the connection in the form of edge additions to the graph.
  4. For dead ends, we must drive in and out. So for dead ends, double edges are drawn in.
  5. We now have an Euler graph and each Euler tour is optimal. We can apply our algorithms of Hierholzer and Fleury to find an Euler tour. Now we have found an optimal route and we are done!

Run this script for an example.

routenplanner's People

Contributors

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