28 lines
1.1 KiB
Python
Executable file
28 lines
1.1 KiB
Python
Executable file
#!/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")
|