Coder Social home page Coder Social logo

route-planner's Introduction

🛣️Route-Planner

A data structures course semester project made using Dijkstra Algorithm, DFS algorithm, Graphs and LinkedList.


🔍OverView

ROUTE-PLANNER-- Semester Project for Data Structures Course offered at National University Of Science and Technology(NUST).

In this project we were asked to utilize our knowledge of data structures and algorithm to devise a program that can calculate shortest path between cities and even inside city. The main requirements of Project are as follow:

  • Map the shortest route between two cities to Pakistan(major cities)
  • Map shortest route between two towns inside each city.
  • There should be option to map shortest route with respect to either time or with respect to distance.
  • Make code as efficient as possible.

⚡Code Structure

The code is structured in such a way that each city is a single node of a tree which is itself capable of holding an entire tree for its towns. Each node is linked to another node and an adjacency list is maintained for all nodes. The program takes starting point and ending point and utilizing Dijkstra algorithm calculates the shortest route between two cities.

For mapping the shortest route between two towns of a city, first identify the city and then pass starting and ending town names. If there exist any path between those two towns, the program will show it.

For finding optimal path with respect to either time or distance, a parameter is passed. Optimal route with respect to either is then displayed.


📚 Data Set

The data set taken for this project is approximatation of google map distance and time between two locations. Data is arranged in columns and each row is taken at once by the program.
Large data set is not maintained. Only major cities data is fed to program. For towns, only lahore and rawalpindi data set is maintained.


👉Usage

When the program runs, following menu pops up with multiple instructions.

image

First of all data set should be fed to program to start processing. So the first step should be to press 2 to load cities data. After doing this, major cities are added but still there is no connection between different cities. To connect cities, edges should be added. Therefore next should be press 3 to load cities edges. At this stage you are ready enough to map shortest route between cities of data set as shown below:

image
image

Now in a similar fashion, load the data for towns and then add edges between towns to get program work properly. The following snippet shows shortest route calculation between different towns of lahore.

image

Project Statement

Complete project can be seen here

route-planner's People

Contributors

ali-john avatar

Stargazers

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