-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault_scenarios.py
More file actions
325 lines (296 loc) · 12.9 KB
/
default_scenarios.py
File metadata and controls
325 lines (296 loc) · 12.9 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
from datetime import datetime
from dateutil.relativedelta import relativedelta
# Devices (venues) have different footfall means/stds.
#attributes = ['timestamp', 'deviceID', 'recordType', 'queueing', 'freeSeats', 'event']
# Target use cases
use_cases = {"1": "queueing", "2": "freeSeats", "3": "event"}
# Time Range
start_ts = (datetime.now() - relativedelta(years=1)).strftime("%Y-%m-%d")
end_ts = "now"
# Default device parameters
# HOSPITAL
# Seasonality
hospital = {"Yearly Seasonality": "Winter peaks, lower summers",
"Weekly Seasonality": "Higher weekdays, lower weekends",
"Daily Seasonality": "Peaks during daylight, much lower nights"}
# General device info
hospital_devices = [{"_id": "1",
"deviceType": "Depth Camera",
"deviceLocation": "Main Reception",
"site": "Sight Hospital",
"isIndoor": True,
"floor": "Ground Floor"},
{"_id": "2",
"deviceType": "RFID Sensors",
"deviceLocation": "Radiology Unit",
"site": "Sight Hospital",
"isIndoor": True,
"floor": "7",
"maxOccupancy": 20},
{"_id": "3",
"deviceType": "Depth Camera",
"deviceLocation": "Main Entrance",
"site": "Sight Hospital",
"isIndoor": True,
"floor": "Ground Floor"},
{"_id": "4",
"deviceType": "Depth Camera",
"deviceLocation": "Emergency Reception",
"site": "Sight Hospital",
"isIndoor": True,
"floor": "3"}]
# Scenario Statistics
scenario_hospital = [{"_id": "1",
"useCase": "1",
"freq_ts": "600S",
"footfall": {"peak_times": [11, 15],
"mean": 11,
"std": 3,
"min": -1000,
"max": 2_000,
"anom_freq": 15,
"higher_weekdays": True,
"high_season": [12, 2]}},
{"_id": "2",
"useCase": "2",
"freq_ts": "600S",
"footfall": {"peak_times": [11, 14],
"mean": 4,
"std": 3,
"min": -1000,
"max": 20,
"anom_freq": 15,
"higher_weekdays": True,
"high_season": [12, 2]}},
{"_id": "3",
"useCase": "3",
"freq_ts": "600S",
"footfall": {"peak_times": [10, 16],
"mean": 40,
"std": 5.5,
"min": 0,
"max": 20_000,
"anom_freq": 15,
"higher_weekdays": True,
"high_season": [12, 2],
"dwell_mean": 1,
"dwell_sd": 0.3}},
{"_id": "4",
"useCase": "1",
"freq_ts": "600S",
"footfall": {"peak_times": [12, 16],
"mean": 8,
"std": 2.7,
"min": -1000,
"max": 2_000,
"anom_freq": 15,
"higher_weekdays": True,
"high_season": [12, 2]}}]
# BANK
# Seasonality
bank = {"Yearly Seasonality": "Peaks before christmas and summer holidays",
"Weekly Seasonality": "Higher weekdays, lower weekends",
"Daily Seasonality": "Peaks during daylight, much lower nights"}
# General Device Info
bank_devices = [{"_id": "1",
"deviceType": "Depth Camera",
"deviceLocation": "Sight ATM",
"site": "Sight National Bank",
"isIndoor": True,
"floor": "1"},
{"_id": "2",
"deviceType": "RFID Sensors",
"deviceLocation": "Banking Service - Waiting Room",
"site": "Sight National Bank",
"isIndoor": True,
"floor": "2",
"maxOccupancy": 14},
{"_id": "3",
"deviceType": "RFID Sensors",
"deviceLocation": "Main Entrance",
"site": "Sight National Bank",
"isIndoor": True,
"floor": "Ground Floor"}]
# Scenario Statistics
scenario_bank = [{"_id": "1",
"useCase": "1",
"freq_ts": "600S",
"footfall": {"peak_times": [10, 14],
"mean": 7,
"std": 2,
"min": -1000,
"max": 2_000,
"anom_freq": 10,
"higher_weekdays": True,
"high_season": [12, 6]}},
{"_id": "2",
"useCase": "2",
"freq_ts": "600S",
"footfall": {"peak_times": [11, 14],
"mean": 2,
"std": 1.2,
"min": -1000,
"max": 14,
"anom_freq": 10,
"higher_weekdays": True,
"high_season": [12, 6]}},
{"_id": "3",
"useCase": "3",
"freq_ts": "600S",
"footfall": {"peak_times": [10, 16],
"mean": 35,
"std": 4.5,
"min": 0,
"max": 20_000,
"anom_freq": 12,
"higher_weekdays": True,
"high_season": [12, 6],
"dwell_mean": 0.6,
"dwell_sd": 0.15}}]
# PARK
# Seasonality
park = {"Yearly Seasonality": "Summer peaks, lower winters",
"Weekly Seasonality": "Higher weekends, lower weekdays",
"Daily Seasonality": "Peaks during daylight, much lower nights"}
# General Device Info
park_devices = [{"_id": "1",
"deviceType": "Depth Camera",
"deviceLocation": "Sight Ice Cream Shop",
"site": "Syde Park",
"isIndoor": False},
{"_id": "2",
"deviceType": "RFID Sensors",
"deviceLocation": "Syde Park Lake",
"site": "Syde Park",
"isIndoor": False,
"maxOccupancy": 30},
{"_id": "3",
"deviceType": "Depth Camera",
"deviceLocation": "Syde Park Main Gate",
"site": "Syde Park",
"isIndoor": False},
{"_id": "4",
"deviceType": "Depth Camera",
"deviceLocation": "Sight Waffle Shop",
"site": "Syde Park",
"isIndoor": False}]
# Scenario Statistics
scenario_park = [{"_id": "1",
"useCase": "1",
"freq_ts": "600S",
"footfall": {"peak_times": [12, 16],
"mean": 5,
"std": 1.2,
"min": -1000,
"max": 2_000,
"anom_freq": 5,
"higher_weekdays": False,
"high_season": [7, 6]}},
{"_id": "2",
"useCase": "2",
"freq_ts": "600S",
"footfall": {"peak_times": [11, 16],
"mean": 6,
"std": 3.5,
"min": -1000,
"max": 30,
"anom_freq": 5,
"higher_weekdays": False,
"high_season": [7, 6]}},
{"_id": "3",
"useCase": "3",
"freq_ts": "600S",
"footfall": {"peak_times": [10, 16],
"mean": 45,
"std": 6,
"min": 0,
"max": 20_000,
"anom_freq": 8,
"higher_weekdays": False,
"high_season": [7, 6],
"dwell_mean": 0.75,
"dwell_sd": 0.22}},
{"_id": "4",
"useCase": "1",
"freq_ts": "600S",
"footfall": {"peak_times": [11, 15],
"mean": 8,
"std": 2.4,
"min": -1000,
"max": 2_000,
"anom_freq": 5,
"higher_weekdays": False,
"high_season": [7, 6]}}]
# MALL
# Seasonality
mall = {"Yearly Seasonality": "Peaks before christmas and summer holidays",
"Weekly Seasonality": "Higher weekends, lower weekdays",
"Daily Seasonality": "Peaks during daylight, much lower nights"}
# General Device Info
mall_devices = [{"_id": "1",
"deviceType": "Depth Camera",
"deviceLocation": "Sight Book Shop",
"site": "Sight City Mall",
"isIndoor": True},
{"_id": "2",
"deviceType": "RFID Sensors",
"deviceLocation": "Sight Food Court",
"site": "Sight City Mall",
"isIndoor": True,
"maxOccupancy": 50},
{"_id": "3",
"deviceType": "Depth Camera",
"deviceLocation": "Main Entrance",
"site": "Sight City Mall",
"isIndoor": True}]
# Scenario Statistics
scenario_mall = [{"_id": "1",
"useCase": "1",
"freq_ts": "600S",
"footfall": {"peak_times": [14, 17],
"mean": 13,
"std": 4.7,
"min": -1000,
"max": 2_000,
"anom_freq": 4,
"higher_weekdays": False,
"high_season": [12, 7]}},
{"_id": "2",
"useCase": "2",
"freq_ts": "600S",
"footfall": {"peak_times": [15, 18],
"mean": 8,
"std": 4.5,
"min": -1000,
"max": 50,
"anom_freq": 5,
"higher_weekdays": False,
"high_season": [12, 7]}},
{"_id": "3",
"useCase": "3",
"freq_ts": "600S",
"footfall": {"peak_times": [12, 15],
"mean": 60,
"std": 8,
"min": 0,
"max": 20_000,
"anom_freq": 6,
"higher_weekdays": False,
"high_season": [12, 7],
"dwell_mean": 1.75,
"dwell_sd": 0.5}}]
# Scenarios all in one dictionary
scenario_seasonality = {"Sight Hospital": hospital,
"Syde Park": park,
"Sight National Bank": bank,
"Sight City Mall": mall}
# Default data set scenario parameters all in one dictionary
scenarios = {"Sight Hospital": scenario_hospital,
"Syde Park": scenario_park,
"Sight National Bank": scenario_bank,
"Sight City Mall": scenario_mall}
# General info about the devices for each scenario all in one dictionary
device_info = {"Sight Hospital": hospital_devices,
"Syde Park": park_devices,
"Sight National Bank": bank_devices,
"Sight City Mall": mall_devices}