-
Notifications
You must be signed in to change notification settings - Fork 1
/
benchmark
executable file
·43 lines (34 loc) · 888 Bytes
/
benchmark
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
create_directory() {
local dir=$1
if [ ! -d "$dir" ]; then
echo "Creating directory $dir"
mkdir "$dir"
fi
}
run_problem_set() {
local prob_set=$1
local dir="results/data/$timestamp/$prob_set"
create_directory "$dir"
echo ""
echo "Starting problem set $prob_set..."
echo ""
for filename in grids/$prob_set/*.map.scen; do
echo "Processing scenario $filename"
local results_file="$dir/$(basename "$filename" .map.scen).csv"
java -jar build/libs/pathfinder.jar -b "$filename" > "$results_file"
done
echo ""
echo "Finished problem set $prob_set"
}
sigint() {
exit 1
}
trap sigint INT
./gradlew jar
timestamp="$(date +%y%m%d_%H%M%S)"
create_directory "results/data"
create_directory "results/data/$timestamp"
run_problem_set "dao"
run_problem_set "da2"
run_problem_set "bg512"