Giter Club home page Giter Club logo

metro-problem-'s Introduction

Metro-Problem-

Implementation of Dijkstra's algorithm to compute the shortest path on Paris subway network ๐Ÿš‰ --> ๐Ÿš‹ --> ๐Ÿš‰

Related Work

You can find a python-based implementation for the same database here : https://github.com/IemProg/ParisPathFinder.

Getting Started & Prerequisites

Step #1: Install C/C++ compiler and related tools

If you are using Fedora, Red Hat, CentOS, or Scientific Linux, use the following yum command to install GNU c/c++ compiler:

       yum groupinstall 'Development Tools'

If you are using Debian or Ubuntu Linux, type the following apt-get command to install GNU c/c++ compiler:

       $ sudo apt-get update
       $ sudo apt-get install build-essential manpages-dev

Step #2: Verify installation

Type the following command to display the version number and location of the compiler on Linux:

       $ whereis gcc
       $ which gcc
       $ gcc --version

Running

  • Using of compilerflags ๐Ÿ :

    -Wall -Wextra -Werror -pedantic -pedantic -errors -O3
    

of g++ to garanteeC++ norms in the code implementation, optimizing compiling.

  • Using C++ 11 by adding the compilerflag ๐Ÿ :

    std=c++11 
    
  • Dynamic memory using STL containers

Execution & tests

Use of the csv files as database :

In order to execute the code , two csv files ๐Ÿ“„ are provided as database :

s.csv : contains all the stations of paris subway :

alt text

c.csv : contains all the connections between the subway stations ( transfer time in seconds )

alt text

Use the makefile to compile the cpp files :

Example :

alt text

You can check the makefile โ˜‘๏ธ

Execute the program :

There are two ways to excute the Network program :

1/ Using Stations Ids :

You can find the ๐Ÿ†” of the stations in : s.csv file

    ./Network s.csv c.csv Start_id End_id        

Example :

     ./Network s.csv c.csv 1722 2062

Output :

alt text

2/ Using Stations Names :

You can find the names ๐Ÿ”ก of stations in : s.csv file

Note : the code is resistant to spelling errors โš ๏ธ ( Using the levenshtein Distance - Check the code -)

    ./Network s.csv c.csv Start_name End_name

Example :

    ./Network s.csv c.csv Bastille Jussieu        

Output :

alt text

Authors

Acknowledgments

  • Part of this job was supported by : Vincent Fraillon-maison ๐Ÿ‘

metro-problem-'s People

Contributors

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