Coder Social home page Coder Social logo

delivery-tracking's Introduction

Graph for Interconnected Cities

We have city json data with cityname, latitude and longitude and other minor information. Now we make a weighted bidirectional graph between every city .The weight is the traffic between the two place . For simplicity we gave random numbers between 1 to 1000 as traffic weight in our project.

A better approach could have been using Haversine Formula (using radius of earth and angle between two places : Wikipedia - Reference) ,we could find the distance between two places using latitutde and longitude. Then based on Rural, City, Highway segment of the road and traffic factor we could assign values:

  1. Segment 1 (City): 10 miles, average speed 20 mph, traffic factor 2.0
  2. Segment 2 (Highway): 30 miles, average speed 60 mph, traffic factor 1.2
  3. Segment 3 (Rural): 10 miles, average speed 50 mph, traffic factor 1.0

Then finally calulate the time taken (traffic weight)= (Distance / speed) *traffic_factor

image

After Assigning the weights to the graph , we use shortest path finding algorithm ( Dijkstra algorithm ),to find the shortest path and also construct the path .

Say Shortest path from Delhi to Mumbai in our Demo .

image

Live Location Track

Using Rabbit MQ we used 3 topic-exchange : shipping, onroad, delivered .The status will get updated as the parcel moves from one city to another and it is consumed by the consumers. Finally when the parcel reaches the destination , a mail will be sent to pick up the delivery. The Live location is tracked using socket

image

image

delivery-tracking's People

Contributors

sattwikmaiti avatar

Watchers

 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.