Makefile
3.51 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
DISTS = {1000..8000..1000}
CHOCO_HOME = $(HOME)/IdeaProjects/git/bioecosys/BIOECOSYS-Prototype
CHOCO_HOME = .
CHOCO = $(CHOCO_HOME)/$(wildcard choco-solver-4.*-jar-with-dependencies.jar)
CLASSES = $(shell find -name \*.class | sed -e 's;[^/]*$$;;' | sort -u | tr '\n' :)
JFLAGS = -cp $(CHOCO):$(CLASSES)
all: make
make:
(time java $(JFLAGS) Main 50 res 0 0 Paredes ) &>> Times/results;
python3 create_map_file.py;
python3 Exports/mapsToFolder.py 1;
(time java $(JFLAGS) Main 96 res 0 0 Penafiel ) &>> Times/results;
python3 create_map_file.py;
python3 Exports/mapsToFolder.py 4;
(time java $(JFLAGS) Main 50 res 0 0 PaivaNorte ) &>> Times/results;
python3 create_map_file.py;
python3 Exports/mapsToFolder.py 3;
(time java $(JFLAGS) Main 81 res 0 0 PaivaSul ) &>> Times/results;
python3 create_map_file.py;
python3 Exports/mapsToFolder.py 2;
paredes:
(time java $(JFLAGS) Main 50 res 0 0 Paredes ) &>> Times/results;\
cat Times/results | tr '\n' ',' | sed ':a;N;$!ba;s/\n//g' | sed -e 's/\t//g' -e 's/real//g' -e 's/user//g' -e 's/sys//g'| sed -e 's/.$$//' -e '0,/,/{s/,//}' > Times/result;\
cat Times/result | sed -z -e 's/,/\./2' -e 's/,/\./3' -e 's/,/\./4' > Times/ii.txt;\
cat Times/result | sed -z -e 's/,/\./2' -e 's/,/\./3' -e 's/,/\./4' > Times/ii.txt;\
echo Paredes,50,$$I, > Times/i.txt;\
paste --delimiter='' Times/i.txt Times/ii.txt > Times/iii.txt;\
cat Times/iii.txt &>> Times/regions.csv;
python3 create_map_file.py;
python3 Exports/mapsToFolder.py 1;
penafiel:
java $(JFLAGS) Main 96 res 0 0 Penafiel
python3 create_map_file.py
python3 Exports/mapsToFolder.py 4
paivasul:
java $(JFLAGS) Main 80 res 0 0 PaivaSul &>> Times/results
python3 create_map_file.py
python3 Exports/mapsToFolder.py 2
paivanorte:
(time java $(JFLAGS) Main 50 res 0 0 PaivaNorte ) &>> Times/results;\
cat Times/results | tr '\n' ',' | sed ':a;N;$!ba;s/\n//g' | sed -e 's/\t//g' -e 's/real//g' -e 's/user//g' -e 's/sys//g'| sed -e 's/.$$//' -e '0,/,/{s/,//}' > Times/result;\
cat Times/result | sed -z -e 's/,/\./2' -e 's/,/\./3' -e 's/,/\./4' > Times/ii.txt;\
cat Times/result | sed -z -e 's/,/\./2' -e 's/,/\./3' -e 's/,/\./4' > Times/ii.txt;\
echo PaivaNorte,50,$$I, > Times/i.txt;\
paste --delimiter='' Times/i.txt Times/ii.txt > Times/iii.txt;\
cat Times/iii.txt &>> Times/regions.csv;
python3 create_map_file.py;
python3 Exports/mapsToFolder.py 3;
yields:
java $(JFLAGS) Main 50 res 0 0 Paredes &>> Yields/yields;
java $(JFLAGS) Main 96 res 0 0 Penafiel &>> Yields/yields;
java $(JFLAGS) Main 50 res 0 0 PaivaNorte &>> Yields/yields;
java $(JFLAGS) Main 81 res 0 0 PaivaSul &>> Yields/yields;
newyields:
for I in $(DISTS); do \
java $(JFLAGS) Main 50 res 0 $$I &>> Yields/yields2;\
done
yield:
java $(JFLAGS) Main 50 res 0 5000 &>> Yields/yields2;
test:
for I in $(DISTS); do \
(time java $(JFLAGS) Main 50 res 0 $$I) &>> Times/results;\
cat Times/results | tr '\n' ',' | sed ':a;N;$!ba;s/\n//g' | sed -e 's/\t//g' -e 's/real//g' -e 's/user//g' -e 's/sys//g'| sed -e 's/.$$//' -e '0,/,/{s/,//}' > Times/result;\
cat Times/result | sed -z -e 's/,/\./2' -e 's/,/\./3' -e 's/,/\./4' > Times/ii.txt;\
echo Default,50,$$I, > Times/i.txt;\
paste --delimiter='' Times/i.txt Times/ii.txt > Times/iii.txt;\
cat Times/iii.txt &>> Times/times.csv;\
rm -rf Times/results;\
rm -rf Times/result;\
rm -rf Times/i.txt;\
rm -rf Times/ii.txt;\
rm -rf Times/iii.txt;\
done
cat Times/times.csv | cut -d ',' -f1,2,4,5 | sed -e 's/Limit//g' -e 's/\.//g' -e 's/s//g' -e 's/,/;/g' -e 's/m/,/g' > Times/timesGraph.csv