-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_best.sh
37 lines (31 loc) · 910 Bytes
/
run_best.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
#####################################
# @Date : 2019-09-24 16:29:54
# @Author : Kaiyan Zhang ([email protected])
# @Link : https://github.com/iseesaw
# The script is used to run the top3 best algorithms on 10 tsps.
#####################################
# install the lib
python setup.py install
# define the functions
# bash run.sh basic basic basic
selection=tournament
mutation=inversion
crossover=pmx
# parameters
unit_num=50
max_gen=10000
# filenames
filenames=(eil51 eil76 eil101 st70 kroA100 kroC100 kroD100 lin105 pcb442 pr2392)
for ((i=1; i<=2; i ++));
do
for filename in ${filenames[@]};
do
python test/EAlibTest.py \
-filename=tsp/${filename}.tsp \
--selection=$selection \
--mutation=$mutation \
--crossover=$crossover \
--unit_num=$unit_num \
--max_gen=$max_gen
done
done