@@ -47,41 +47,51 @@ def create_env(task_index):
47
47
best_cwnds_file = path .join (project_root .DIR , 'dagger' , 'best_cwnds.yml' )
48
48
best_cwnd_map = yaml .load (open (best_cwnds_file ))
49
49
50
- if task_index <= 15 :
51
- bandwidth = [10 , 20 , 50 , 100 ]
50
+ if task_index == 0 :
51
+ trace_path = path .join (project_root .DIR , 'env' , '0.57mbps-poisson.trace' )
52
+ mm_cmd = 'mm-delay 28 mm-loss uplink 0.0477 mm-link %s %s --uplink-queue=droptail --uplink-queue-args=packets=14' % (trace_path , trace_path )
53
+ best_cwnd = 5
54
+ elif task_index == 1 :
55
+ trace_path = path .join (project_root .DIR , 'env' , '2.64mbps-poisson.trace' )
56
+ mm_cmd = 'mm-delay 88 mm-link %s %s --uplink-queue=droptail --uplink-queue-args=packets=130' % (trace_path , trace_path )
57
+ best_cwnd = 40
58
+ elif task_index == 2 :
59
+ trace_path = path .join (project_root .DIR , 'env' , '3.04mbps-poisson.trace' )
60
+ mm_cmd = 'mm-delay 130 mm-link %s %s --uplink-queue=droptail --uplink-queue-args=packets=426' % (trace_path , trace_path )
61
+ best_cwnd = 70
62
+ elif task_index <= 22 :
63
+ bandwidth = [5 , 10 , 20 , 50 , 100 ]
52
64
delay = [10 , 20 , 40 , 80 ]
53
65
54
66
cartesian = [(b , d ) for b in bandwidth for d in delay ]
55
- bandwidth , delay = cartesian [task_index ]
67
+ bandwidth , delay = cartesian [task_index - 3 ]
56
68
57
69
uplink_trace , downlink_trace = prepare_traces (bandwidth )
58
70
mm_cmd = 'mm-delay %d mm-link %s %s' % (delay , uplink_trace , downlink_trace )
59
71
best_cwnd = best_cwnd_map [bandwidth ][delay ]
60
-
61
- elif task_index == 16 :
72
+ elif task_index == 23 :
62
73
trace_path = path .join (project_root .DIR , 'env' , '100.42mbps.trace' )
63
74
mm_cmd = 'mm-delay 27 mm-link %s %s --uplink-queue=droptail --uplink-queue-args=packets=173' % (trace_path , trace_path )
64
75
best_cwnd = 500
65
- elif task_index == 17 :
76
+ elif task_index == 24 :
66
77
trace_path = path .join (project_root .DIR , 'env' , '77.72mbps.trace' )
67
78
mm_cmd = 'mm-delay 51 mm-loss uplink 0.0006 mm-link %s %s --uplink-queue=droptail --uplink-queue-args=packets=94' % (trace_path , trace_path )
68
79
best_cwnd = 690
69
- elif task_index == 18 :
80
+ elif task_index == 25 :
70
81
trace_path = path .join (project_root .DIR , 'env' , '114.68mbps.trace' )
71
82
mm_cmd = 'mm-delay 45 mm-link %s %s --uplink-queue=droptail --uplink-queue-args=packets=450' % (trace_path , trace_path )
72
83
best_cwnd = 870
73
- elif task_index <= 22 :
84
+ elif task_index <= 29 :
74
85
bandwidth = [200 ]
75
86
delay = [10 , 20 , 40 , 80 ]
76
87
77
88
cartesian = [(b , d ) for b in bandwidth for d in delay ]
78
- bandwidth , delay = cartesian [task_index - 19 ]
89
+ bandwidth , delay = cartesian [task_index - 26 ]
79
90
80
91
uplink_trace , downlink_trace = prepare_traces (bandwidth )
81
92
mm_cmd = 'mm-delay %d mm-link %s %s' % (delay , uplink_trace , downlink_trace )
82
93
best_cwnd = best_cwnd_map [bandwidth ][delay ]
83
94
84
-
85
95
env = Environment (mm_cmd )
86
96
env .best_cwnd = best_cwnd
87
97
0 commit comments