|
43 | 43 |
|
44 | 44 | # Simulation parameters |
45 | 45 | SIMULATION_SCENARIOS = [ |
46 | | - |
47 | | - # Scenario 8: Heavy device delay test (device slow, edge fast) |
48 | | - { |
49 | | - "name": "heavy_delay", |
50 | | - "device_computation_delay": { |
51 | | - "enabled": True, |
52 | | - "type": "gaussian", |
53 | | - "mean": 0.1, # 50ms per layer = 2950ms total for 59 layers |
54 | | - "std_dev": 0.1 |
55 | | - }, |
56 | | - "edge_computation_delay": { |
57 | | - "enabled": True, |
58 | | - "type": "gaussian", |
59 | | - "mean": 0.1, # 50ms per layer = 2950ms total for 59 layers |
60 | | - "std_dev": 0.1 |
61 | | - }, |
62 | | - "network_delay": { |
63 | | - "enabled": True, |
64 | | - "type": "static", |
65 | | - "value": 0.02 # 20ms network delay |
66 | | - }, |
67 | | - "duration_seconds": 300, |
68 | | - "num_clients": 1 |
69 | | - }, |
70 | | - |
71 | | - # Scenario 1: No delays (baseline) |
| 46 | + |
| 47 | + # Scenario 1: Baseline - no delays |
72 | 48 | { |
73 | 49 | "name": "baseline", |
74 | 50 | "device_computation_delay": {"enabled": False}, |
75 | 51 | "edge_computation_delay": {"enabled": False}, |
76 | 52 | "network_delay": {"enabled": False}, |
77 | | - "duration_seconds": 30, |
78 | | - "num_clients": 1 |
79 | | - }, |
80 | | - |
81 | | - # Scenario 2: Network delay only (gaussian 20ms ± 5ms) |
82 | | - { |
83 | | - "name": "network_delay_20ms", |
84 | | - "device_computation_delay": {"enabled": False}, |
85 | | - "edge_computation_delay": {"enabled": False}, |
86 | | - "network_delay": { |
87 | | - "enabled": True, |
88 | | - "type": "gaussian", |
89 | | - "mean": 0.020, |
90 | | - "std_dev": 0.005 |
91 | | - }, |
92 | | - "duration_seconds": 30, |
| 53 | + "duration_seconds": 600, |
93 | 54 | "num_clients": 1 |
94 | 55 | }, |
95 | 56 |
|
96 | | - # Scenario 3: Network delay high (gaussian 50ms ± 10ms) |
| 57 | + # Scenario 2: High edge computation delay |
97 | 58 | { |
98 | | - "name": "network_delay_50ms", |
| 59 | + "name": "high_edge_delay", |
99 | 60 | "device_computation_delay": {"enabled": False}, |
100 | | - "edge_computation_delay": {"enabled": False}, |
101 | | - "network_delay": { |
| 61 | + "edge_computation_delay": { |
102 | 62 | "enabled": True, |
103 | 63 | "type": "gaussian", |
104 | | - "mean": 0.050, |
105 | | - "std_dev": 0.010 |
| 64 | + "mean": 0.010, # 10ms per layer |
| 65 | + "std_dev": 0.002 # Low variance for stable high delay |
106 | 66 | }, |
107 | | - "duration_seconds": 30, |
| 67 | + "network_delay": {"enabled": False}, |
| 68 | + "duration_seconds": 600, |
108 | 69 | "num_clients": 1 |
109 | 70 | }, |
110 | 71 |
|
111 | | - # Scenario 4: Edge computation delay only (gaussian 2ms ± 0.5ms) |
| 72 | + # Scenario 3: High device computation delay |
112 | 73 | { |
113 | | - "name": "edge_computation_delay_2ms", |
114 | | - "device_computation_delay": {"enabled": False}, |
115 | | - "edge_computation_delay": { |
| 74 | + "name": "high_device_delay", |
| 75 | + "device_computation_delay": { |
116 | 76 | "enabled": True, |
117 | 77 | "type": "gaussian", |
118 | | - "mean": 0.002, |
119 | | - "std_dev": 0.0005 |
| 78 | + "mean": 0.015, # 15ms per layer |
| 79 | + "std_dev": 0.003 # Low variance for stable high delay |
120 | 80 | }, |
| 81 | + "edge_computation_delay": {"enabled": False}, |
121 | 82 | "network_delay": {"enabled": False}, |
122 | | - "duration_seconds": 30, |
| 83 | + "duration_seconds": 600, |
123 | 84 | "num_clients": 1 |
124 | 85 | }, |
125 | 86 |
|
126 | | - # Scenario 5: Edge computation delay high (gaussian 5ms ± 1ms) |
| 87 | + # Scenario 4: Variable network delay |
127 | 88 | { |
128 | | - "name": "edge_computation_delay_5ms", |
| 89 | + "name": "variable_network", |
129 | 90 | "device_computation_delay": {"enabled": False}, |
130 | | - "edge_computation_delay": { |
| 91 | + "edge_computation_delay": {"enabled": False}, |
| 92 | + "network_delay": { |
131 | 93 | "enabled": True, |
132 | 94 | "type": "gaussian", |
133 | | - "mean": 0.005, |
134 | | - "std_dev": 0.001 |
| 95 | + "mean": 0.050, # 50ms average |
| 96 | + "std_dev": 0.025 # High variance for variable conditions |
135 | 97 | }, |
136 | | - "network_delay": {"enabled": False}, |
137 | | - "duration_seconds": 30, |
| 98 | + "duration_seconds": 600, |
138 | 99 | "num_clients": 1 |
139 | 100 | }, |
140 | 101 |
|
141 | | - # Scenario 6: Both delays (realistic mobile) |
| 102 | + # Scenario 5: Variable delay at all levels |
142 | 103 | { |
143 | | - "name": "mobile_realistic", |
| 104 | + "name": "variable_all_levels", |
144 | 105 | "device_computation_delay": { |
145 | 106 | "enabled": True, |
146 | 107 | "type": "gaussian", |
147 | | - "mean": 0.003, |
148 | | - "std_dev": 0.001 |
| 108 | + "mean": 0.008, # 8ms per layer |
| 109 | + "std_dev": 0.004 # High variance |
149 | 110 | }, |
150 | 111 | "edge_computation_delay": { |
151 | 112 | "enabled": True, |
152 | 113 | "type": "gaussian", |
153 | | - "mean": 0.002, |
154 | | - "std_dev": 0.0005 |
155 | | - }, |
156 | | - "network_delay": { |
157 | | - "enabled": True, |
158 | | - "type": "gaussian", |
159 | | - "mean": 0.030, |
160 | | - "std_dev": 0.010 |
| 114 | + "mean": 0.006, # 6ms per layer |
| 115 | + "std_dev": 0.003 # High variance |
161 | 116 | }, |
162 | | - "duration_seconds": 30, |
163 | | - "num_clients": 1 |
164 | | - }, |
165 | | - |
166 | | - # Scenario 7: High variance (unstable network) |
167 | | - { |
168 | | - "name": "unstable_network", |
169 | | - "device_computation_delay": {"enabled": False}, |
170 | | - "edge_computation_delay": {"enabled": False}, |
171 | 117 | "network_delay": { |
172 | 118 | "enabled": True, |
173 | 119 | "type": "gaussian", |
174 | | - "mean": 0.040, |
| 120 | + "mean": 0.040, # 40ms average |
175 | 121 | "std_dev": 0.020 # High variance |
176 | 122 | }, |
177 | | - "duration_seconds": 30, |
| 123 | + "duration_seconds": 600, |
178 | 124 | "num_clients": 1 |
179 | 125 | }, |
180 | | - |
181 | | - # Scenario 8: Multiple clients (no delay) |
182 | | - { |
183 | | - "name": "multi_client_baseline", |
184 | | - "device_computation_delay": {"enabled": False}, |
185 | | - "edge_computation_delay": {"enabled": False}, |
186 | | - "network_delay": {"enabled": False}, |
187 | | - "duration_seconds": 30, |
188 | | - "num_clients": 3 |
189 | | - }, |
190 | | - |
191 | | - # Scenario 9: Multiple clients with network delay |
192 | | - { |
193 | | - "name": "multi_client_network", |
194 | | - "device_computation_delay": {"enabled": False}, |
195 | | - "edge_computation_delay": {"enabled": False}, |
196 | | - "network_delay": { |
197 | | - "enabled": True, |
198 | | - "type": "gaussian", |
199 | | - "mean": 0.025, |
200 | | - "std_dev": 0.008 |
201 | | - }, |
202 | | - "duration_seconds": 30, |
203 | | - "num_clients": 3 |
204 | | - }, |
205 | 126 | ] |
206 | 127 |
|
207 | 128 |
|
|
0 commit comments