|
|
|
@ -1,25 +1,11 @@
@@ -1,25 +1,11 @@
|
|
|
|
|
#!/usr/local/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
|
# https://docs.python.org/2/library/timeit.html |
|
|
|
|
# |
|
|
|
|
# in python: |
|
|
|
|
# |
|
|
|
|
# import os |
|
|
|
|
# os.system('java TSP') |
|
|
|
|
# |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
|
make build |
|
|
|
|
|
|
|
|
|
export RIGHTNOW="`date +"%Y%m%d_%H%M%S"`" |
|
|
|
|
|
|
|
|
|
#for N in 10 11 12 13 14 15 |
|
|
|
|
#for N in 6 7 8 9 |
|
|
|
|
for N in 4 5 |
|
|
|
|
for N in {4..14..1} |
|
|
|
|
do |
|
|
|
|
|
|
|
|
|
export OUT="avgtimeout_tsp_${RIGHTNOW}_${N}.out" |
|
|
|
@ -28,10 +14,7 @@ do
@@ -28,10 +14,7 @@ do
|
|
|
|
|
echo "**************************************" >> ${OUT} |
|
|
|
|
echo "Running TSP with $N nodes with Java..." >> ${OUT} |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
|
make build |
|
|
|
|
|
|
|
|
|
for repetition in in {0..100..1} |
|
|
|
|
for repetition in {0..10..1} |
|
|
|
|
do |
|
|
|
|
make time SIZE=${N} >> ${OUT} 2>&1 |
|
|
|
|
done |
|
|
|
|