-
Notifications
You must be signed in to change notification settings - Fork 0
/
runner.sh
executable file
·59 lines (47 loc) · 2.66 KB
/
runner.sh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
let repetitions=6
let start_generation=30
let experiments=25
echo "======================================================================="
echo "| START EXPERIMENTS"
echo "======================================================================="
echo "create archive folder"
mkdir -p archive
for p in `seq 3 10`;
do
let population=p*10
echo "- POPULATION_SIZE=$population"
awk 'BEGIN{ FS="=";OFS="=" } {if($1==pname) $2=newval; print $0;}' pname="POPULATION_SIZE" newval="$population" fenrir.properties > tmp.properties && mv tmp.properties fenrir.properties
for i in `seq 0 7`;
do
let generations=start_generation+i*10
echo " |-> NUM_GENERATIONS=$generations"
awk 'BEGIN{ FS="=";OFS="=" } {if($1==pname) $2=newval; print $0;}' pname="NUM_GENERATIONS" newval="$generations" fenrir.properties > tmp.properties && mv tmp.properties fenrir.properties
for run in `seq 1 ${repetitions}`;
do
echo " |-> run $run of $repetitions"
echo " processing archive/log_exp${experiments}_pop${population}_gen${generations}_${run}.txt"
java -jar fenrir-1.0-SNAPSHOT.jar -e experiments/experiments_${experiments}.json -t traffic_profiles/gitlab_7_months.csv > archive/log_exp${experiments}_pop${population}_gen${generations}_${run}.txt 2>&1
# java -jar build/libs/fenrir-1.0-SNAPSHOT.jar -e experiments/experiments_${experiments}.json -t traffic_profiles/gitlab_7_months.csv 2>&1 | tee archive/log_exp${experiments}_gen${i}_${run}.txt
mv stats.csv archive/stats_exp${experiments}_pop${population}_gen${generations}_${run}.csv
mv consumption.csv archive/consumption_exp${experiments}_pop${population}_gen${generations}_${run}.csv
mv visual.txt archive/visual_exp${experiments}_pop${population}_gen${generations}_${run}.txt
done
done
done
echo "======================================================================="
echo "| EXECUTE LOCAL SEARCH"
echo "======================================================================="
for a in `seq 1 20`;
do
let iterations=a*100
echo " iteration: $iterations"
for run in `seq 1 ${repetitions}`;
do
echo " |-> processing archive/log_localSearch_it${iterations}_${run}.txt"
java -jar fenrir-1.0-SNAPSHOT.jar -e experiments/experiments_${experiments}.json -t traffic_profiles/gitlab_7_months.csv -localSearch ${iterations} > archive/log_localSearch_it${iterations}_${run}.txt 2>&1
mv stats.csv archive/stats_localSearch_it${iterations}_${run}.csv
mv consumption.csv archive/consumption_localSearch_it${iterations}_${run}.csv
mv visual.txt archive/visual_localSearch_it${iterations}_${run}.txt
done
done