- Algorithms:
algorithm/*
- data:
data/*
- airports.csv · routes.csv
- simple_airports_n.csv · simple_routes_n.csv (n=1,2,3,4,5 smaller datasets)
- tests:
tests/*
View our presentation on YouTube
- Clone the project repository
cd liwens3-yihanz8-zhekaig2-sji15
- Run the command
module load llvm/6.0.1
on EWS - Enter the command
make
in the terminal
-
After building the program, run
./openflight
in the terminal. -
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.
-
There will appear 3 options
1. BFS
,2. Dijkstra
,3. A*
. Choose one of the algorithms by entering the number1
,2
or3
. -
Then, the terminal will ask you to enter the ID of starting airport and ending airport (Just type the ID with numbers like
302
). -
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:
-
In the end, you can enter
exit
to exit the program, or run another algorithm if you wish.
- To build the tests on EWS, run the command
module load llvm/6.0.1
and then entermake test
. - 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
- run
- To test parts of the program: