-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheold.sh
executable file
·53 lines (44 loc) · 1.27 KB
/
eold.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
#!/bin/bash
s="$(date +"%m%d%y%T")"$1
g++ -O3 -std=c++11 -o generate$s Generators/rgpos.cpp
g++ -O3 -std=c++11 -o gen_dot$s Generators/gen_dot.cpp
# rand=0 for Generators/rgpos.cpp
# rand=1 for Generators/gen_dot.cpp
# rand=2 for Generators/Random.py
rand=$1
for n in {100..100};
do
for e in 240; # ((e=$n-1;e<=2*$n;e+=20));
do
for p in 4;
do
for l in 1000;
do
echo "Generating n=$n e=$e p=$p l=$l , rand=$rand";
if [ $rand -eq 0 ]
then
time ./generate$s $n $e $p $l > ./Inputs/$n-$e-$p-$l-$rand.txt
elif [ $rand -eq 1 ]
then
time ./gen_dot$s $p >./Inputs/$n-$e-$p-$l-$rand.txt
elif [ $rand -eq 2]
then
time python Generators/Random.py $n $p >./Inputs/$n-$e-$p-$l-$rand.txt
else
echo "Invalid parameter given";
fi
echo "Generated";
echo "Genetic1-Prakhar-----------------------";
time python3 Code/ga_msp.py <./Inputs/$n-$e-$p-$l-$rand.txt
echo "Genetic2-Ronak-------------------------";
time python Code/Machine.py <./Inputs/$n-$e-$p-$l-$rand.txt
echo "Random & Topologically sorted----------------------------";
time python3 Code/ListShd_p.py <./Inputs/$n-$e-$p-$l-$rand.txt
echo "Swap search---------------------------";
time python Code/ListShd.py <./Inputs/$n-$e-$p-$l-$rand.txt
rm ./Inputs/$n-$e-$p-$l-$rand.txt
done;
done;
done;
done;
rm generate$s gen_dot$s