-
Notifications
You must be signed in to change notification settings - Fork 3
/
01-run-partial-analyses.py
28 lines (26 loc) · 1.09 KB
/
01-run-partial-analyses.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import subprocess
def run_analysis(mode, benchmark, mapname, scenario = None):
executable = "../build/Release/Central64Analysis.exe"
if not os.path.exists(executable):
executable = "../build/Central64Analysis"
mappath = mapname + ".map"
inputpath = os.path.join("..", "benchmarks", benchmark, mappath)
command = executable + " " + mode + " partial " + inputpath
problemname = mapname
if scenario != None:
command += (" " + scenario)
problemname += ("-" + scenario)
outputpath = "analysis-" + mode + "-partial-" + benchmark + "-" + problemname + ".txt"
print(command + " > " + outputpath)
outfile = open(outputpath, "w")
subprocess.call(command, stdout=outfile)
outfile.close()
run_analysis("heuristic", "dao", "arena")
run_analysis("heuristic", "dao", "arena", "111")
run_analysis("heuristic", "dao", "arena2")
run_analysis("heuristic", "dao", "ost000a")
run_analysis("dijkstra", "dao", "arena")
run_analysis("dijkstra", "dao", "arena", "111")
run_analysis("dijkstra", "dao", "arena2")
run_analysis("dijkstra", "dao", "ost000a")