-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_logic.py
More file actions
34 lines (31 loc) · 1.01 KB
/
main_logic.py
File metadata and controls
34 lines (31 loc) · 1.01 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
import csv
import decision_making
# FILE DATA
csv_title = ['Cimax']
title_counter = 1
while title_counter <= 10:
csv_title.append('Test'+'%d'%title_counter + '_Total Cost')
csv_title.append('Test'+'%d'%title_counter + '_Time Steps')
title_counter += 1
csv_file = file('experiment_data_1.csv', 'wb')
writer = csv.writer(csv_file)
writer.writerow(csv_title)
csv_row = []
# EXPERIMENTS
upper_limit_of_initial_cost_rank = 9
initial_connection = 1
rank_expected = 0.01
test_times = 1
while (upper_limit_of_initial_cost_rank <=9):
csv_row.append(upper_limit_of_initial_cost_rank)
test_times = 1
print 'rank',upper_limit_of_initial_cost_rank
while test_times <= 1:
print upper_limit_of_initial_cost_rank
l = decision_making.joint_run('BA',100,'l','cls',upper_limit_of_initial_cost_rank,initial_connection,rank_expected)
csv_row.append(l[0])
csv_row.append(l[1])
test_times += 1
writer.writerow(csv_row)
csv_row = []
upper_limit_of_initial_cost_rank += 10