-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
66 lines (62 loc) · 2.47 KB
/
makefile
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
greedy: greedy.c
gcc greedy.c -o greedy -lm
stocastic: stocastic.c
gcc stocastic.c -o stocastic -lm -lsodium
local: local.c
gcc local.c -o local -lm
grasp: grasp.c
gcc grasp.c -o grasp -lm -lsodium
run_greedy: greedy
echo "running route search for all instances...\n"; \
[ ! -f tsp_output.html ] || mv tsp_output.html tsp_output.old.html ; \
for OUTPUT in $$(ls instances/*.tsp); \
do echo -n $$OUTPUT ".."; \
printf "<details><summary>%s</summary><p><blockquote>\n" $$OUTPUT >> tsp_output.html; \
./greedy<$$OUTPUT>>tsp_output.html; \
printf "</blockquote></details><p>\n" >> tsp_output.html; \
echo "OK\n"; \
done; \
echo "all instances have been runned!\ncheck tsp_output.html for results"; \
microsoft-edge-stable tsp_output.html;
run_grasp: grasp
echo "running route search for all instances...\n"; \
[ ! -f tsp_output.html ] || mv tsp_output.html tsp_output.old.html ; \
for OUTPUT in $$(ls instances/*.tsp); \
do echo -n $$OUTPUT ".."; \
printf "<details><summary>%s</summary><p><blockquote>\n" $$OUTPUT >> tsp_output.html; \
./grasp<$$OUTPUT>>tsp_output.html; \
printf "</blockquote></details><p>\n" >> tsp_output.html; \
echo "OK\n"; \
done; \
echo "all instances have been runned!\ncheck tsp_output.html for results"; \
microsoft-edge-stable tsp_output.html;
run_stocastic: stocastic
echo "running route search for all instances...\n"; \
[ ! -f tsp_output.html ] || mv tsp_output.html tsp_output.old.html ; \
for OUTPUT in $$(ls instances/*.tsp); \
do echo -n $$OUTPUT ".."; \
printf "<details><summary>%s</summary><p><blockquote>\n" $$OUTPUT >> tsp_output.html; \
./stocastic<$$OUTPUT>>tsp_output.html; \
printf "</blockquote></details><p>\n" >> tsp_output.html; \
echo "OK\n"; \
done; \
echo "all instances have been runned!\ncheck tsp_output.html for results"; \
microsoft-edge-stable tsp_output.html;
run_local: local
echo "running route search for all instances...\n"; \
[ ! -f tsp_output.html ] || mv tsp_output.html tsp_output.old.html ; \
for OUTPUT in $$(ls instances/*.tsp); \
do echo -n $$OUTPUT ".."; \
printf "<details><summary>%s</summary><p><blockquote>\n" $$OUTPUT >> tsp_output.html; \
./local<$$OUTPUT>>tsp_output.html; \
printf "</blockquote></details><p>\n" >> tsp_output.html; \
echo "OK\n"; \
done; \
echo "all instances have been runned!\ncheck tsp_output.html for results"; \
microsoft-edge-stable tsp_output.html;
# one: greedy
# ./greedy<instances/rat99.tsp
clear:
rm -f greedy stocastic local grasp
# all: greedy.c
# make clear greedy run