In the linux terminal type: ./build.sh
After this to get the list of commands and their uses type: ./alt-dijkstra help
Note you may have to use 'chmod u+x' on build.sh.
Use the following commands to get the node-, egde- and poi files.
wget https://www.idi.ntnu.no/emner/idatt2101/Astjerne/opg/norden/noder.txt
wget https://www.idi.ntnu.no/emner/idatt2101/Astjerne/opg/norden/kanter.txt
wget https://www.idi.ntnu.no/emner/idatt2101/Astjerne/opg/norden/interessepkt.txt
The ALT algorithm that is used compares the estimated distance from a node to different landmarks. It then chooses the largest estimated distance and uses this in addition to the current travelled distance to decide the priority in the queue. Other than that it is a regular dijkstra algorithm.
The preprocessing is done on 2 threads and produces 2 files for each landmark.
The landmarks are in this case predefined, you can change them if need to work better with your map.
The method to get the points of interest around a node uses dijkstra until 8 nodes have been added to a list of indexes. Node type is checked by using a binary and (&) operation on the current nodes type and checks if it is equal to the node type.
The program reads txt files for nodes and edges seperately. The format for each is shown below.
16826594
0 1 792 44 20
1 0 792 44 20
1 2 1926 107 20
2 1 1926 107 20
7509994
0 55.6345298 12.0729630
1 55.6345880 12.0722614
2 55.6346358 12.0705787
3 55.6390613 12.0686169
264276
853062 2 "Neste"
2354944 1 "Myrland"
2856553 1 "Ulvvik"
6838135 1 "Salberg"