/openFlights

Graph of OpenFlights

Primary LanguageC++

CS 225 Final Project

liwens3-yihanz8-zhekaig2-sji15

Document files

Directory structures

Video

View our presentation on YouTube

Building the program

  1. Clone the project repository
  2. cd liwens3-yihanz8-zhekaig2-sji15
  3. Run the command module load llvm/6.0.1 on EWS
  4. Enter the command make in the terminal

Running the program

  1. After building the program, run ./openflight in the terminal.

  2. The terminal prompt will ask you to select the dataset in which you hope to find the shortest path. You can also choose to customize input datasets by inputting the relative file paths.

    image

  3. There will appear 3 options 1. BFS, 2. Dijkstra, 3. A*. Choose one of the algorithms by entering the number 1, 2 or 3.

    Image text

  4. Then, the terminal will ask you to enter the ID of starting airport and ending airport (Just type the ID with numbers like 302).

    Image text

  5. Finally, the program will use the chosen algorithm to calculate the shortest path from the starting airport to the ending airport and print out the corresponding airport IDs and names along the path including the start and end point. The result will look like this:

    Image text

  6. In the end, you can enter exit to exit the program, or run another algorithm if you wish.

    Image text

Testing the program

  1. To build the tests on EWS, run the command module load llvm/6.0.1 and then enter make test.
  2. run ./test for comprehensive tests
    • To test parts of the program:
      • run ./test [graph] for OpenFlight graph basic tests
      • run ./test [bfs] for BFS algorithm tests
      • run ./test [dataset=n] (n=1,2,3,4,5) for testing individual datasets
      • run ./test [dijkstra] for Dijkstra's Algorithm tests
      • run ./test [astar] for A* Algorithm tests