updated README, added benchmark and plotting functions
This commit is contained in:
parent
cab977451c
commit
a9fd341b45
3 changed files with 134 additions and 7 deletions
28
utils/run_benchmarks.py
Executable file
28
utils/run_benchmarks.py
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from os import system
|
||||
from sys import argv, exit
|
||||
|
||||
if len(argv) != 4:
|
||||
print(f"usage: {argv[0]} <graph> <landmark_prefix> <targets>")
|
||||
exit(1)
|
||||
|
||||
graph = argv[1]
|
||||
landmarks = argv[2]
|
||||
targets = argv[3]
|
||||
|
||||
print("running A*")
|
||||
system(f"cargo run --release --bin=performance -- --graph={graph} --astar --targets {targets} > results/astar.txt")
|
||||
print("running Dijkstra")
|
||||
system(f"cargo run --release --bin=performance -- --graph={graph} --dijkstra --targets {targets} > results/dijkstra.txt")
|
||||
|
||||
print("running ALT with 44 handpicked landmarks")
|
||||
system(f"cargo run --release --bin=performance -- --graph={graph} --landmarks={landmarks}_handpicked_44.bin --targets {targets} > results/handpicked_44.txt")
|
||||
for i in range(6, 7):
|
||||
num = 2**i
|
||||
|
||||
for best in [12, 24, ]:
|
||||
|
||||
for lm_type in ["greedy", "random"]:
|
||||
print(f"running ALT with {num} {lm_type} landmarks")
|
||||
system(f"cargo run --release --bin=performance -- --graph={graph} --landmarks={landmarks}_{lm_type}_{ num }.bin --targets {targets} --alt-best-size { best} > results/{lm_type}_{num}_{ best }.txt")
|
||||
Loading…
Add table
Add a link
Reference in a new issue