-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsorting_strategy_main.py
36 lines (28 loc) · 1.05 KB
/
sorting_strategy_main.py
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
import sys
from evolutionary_algorithm.runnable_main import default_ea_runnable_settings, execute_ea_runs
run_settings_1 = default_ea_runnable_settings
run_settings_1['sort_strategy'] = None
run_settings_2 = default_ea_runnable_settings
run_settings_2['sort_strategy'] = 3
run_settings_3 = default_ea_runnable_settings
run_settings_3['sort_strategy'] = 2
run_settings_4 = default_ea_runnable_settings
run_settings_4['sort_strategy'] = 1
if __name__ == '__main__':
try:
runnable_int = int(sys.argv[1])
except IndexError:
runnable_int = 0
folder = 'sorting'
if runnable_int == 1:
print('Running setting 1')
execute_ea_runs('_no_sort', run_settings_1, folder, num_of_runs=2)
elif runnable_int == 2:
print('Running setting 2')
execute_ea_runs('_sort_3', run_settings_2, folder)
elif runnable_int == 3:
print('Running setting 3')
execute_ea_runs('_sort_2', run_settings_3, folder)
else:
print('Running setting other')
execute_ea_runs('_sort_1', run_settings_4, folder)