-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess.R
381 lines (365 loc) · 21.5 KB
/
process.R
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
library("ggplot2")
library("scales")
print("Importing data...")
roundData <- read.csv("benchmark-data/round-data.csv", header=T)
print("DONE")
print("Imported lines:")
print("Generating plots...")
print("Hint: All plots are commented out by default. Uncomment the plots you want to create.")
# ========================================================================
# Activity 0.01, 0.1, 0.5 and 1.0 for script `scripts/benchmarks/activity`
# ========================================================================
compare <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$ActivityCat <- cut(roundData$Activity, c(0, 0.01, 0.1, 0.5, 1), labels = c("1%", "10%", "50%", "100%"))
ggplot(roundData,
aes(ClientsCat, log(Data)/log(2))) +
geom_boxplot(aes(colour = Algorithm)) +
facet_wrap(~ ActivityCat) +
labs(x="# Participants", y="Data (log)") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_colour_brewer(palette="Dark2") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/compare.pdf", width = 7, height = 5)
}
# ======================================================================
# required rounds for script `scripts/benchmarks/footprint_convergence
# ======================================================================
req_rounds <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000), labels=c(1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000))
roundData$SlotsCat <- cut(roundData$Slots, c(0,1, 2, 4, 6, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
reference <- function(x) log(x)/log(2)
roundData$RefValues <- reference(roundData$Clients)
ggplot(subset(roundData,EmptySlots < Slots),
aes(x=Clients), group = SlotsCat) +
geom_line(aes(y=RefValues), color="blue", linetype="dashed", size = 2, alpha = 0.5) +
geom_smooth(aes(y=ReqRounds, color=SlotsCat)) +
labs(x="# Participants", y="Required rounds") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_colour_brewer(palette="OrRd", name="# Slots") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/req_rounds.pdf", width = 5, height = 3)
}
collisions <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$SlotsCat <- cut(roundData$Slots, c(0,1, 2, 4, 6, 8, 16, 24, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 24, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
ggplot(roundData,
aes(SlotsCat, Collisions/Clients)) +
geom_boxplot(aes(fill=ClientsCat)) +
labs(x="# Slots", y="Collisions") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_fill_brewer(palette="OrRd", name="# Participants") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/collisions.pdf", width = 9, height = 5)
}
empty_slots <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$SlotsCat <- cut(roundData$Slots, c(0,1, 2, 4, 6, 8, 16, 24, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 24, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
roundData$ActivityCat <- cut(roundData$Activity, c(0, 0.01, 0.1, 0.5, 1), labels = c("1%", "10%", "50%", "100%"))
ggplot(roundData,
aes(Clients, EmptySlots/Slots, group = ActivityCat)) +
geom_smooth(aes(colour = ActivityCat), alpha = 0.3, method = "loess") +
labs(x="# Participants", y="% Empty slots") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_colour_brewer(palette="OrRd", name="Activity rate") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/empty_slots.pdf", width = 9, height = 5)
}
# ======================================================================
# trade-off between # bits and # required rounds
# for script `footprint_bit_round_tradeoff`
# ======================================================================
bit_round_tradeoff <- function() {
roundData$BitsCat <- cut(roundData$Bits, c(1, 2, 4, 6, 8), labels=c(2, 4, 6, 8))
roundData$SlotsCat <- cut(roundData$Slots, c(0,1, 2, 4, 6, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
ggplot(roundData,
aes(BitsCat, ReqRounds)) +
geom_boxplot(aes(fill=SlotsCat)) +
labs(x="# Bits per slot", y="Required rounds") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_fill_brewer(palette="OrRd", name="# Slots") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/bit_round_tradeoff.pdf", width = 5, height = 3)
}
# ======================================================================
# empty slots for different # bits and # slots
# ======================================================================
empty_slots_bits <- function() {
roundData$BitsCat <- cut(roundData$Bits, c(1, 2, 4, 6, 8), labels=c(2, 4, 6, 8))
roundData$SlotsCat <- cut(roundData$Slots, c(0,1, 2, 4, 6, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
ggplot(roundData,
aes(BitsCat, EmptySlots/Slots)) +
geom_boxplot(aes(fill=SlotsCat)) +
labs(x="# Bits per slot", y="% Empty slots") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_fill_brewer(palette="OrRd", name="# Slots") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/empty_slots_bits.pdf", width = 9, height = 5)
}
# ==============================================================
# bits per slot for script `scripts/benchmarks/footprint_size`
# ==============================================================
bits <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$BitsCat <- cut(roundData$Bits, c(0, 4, 5, 6, 7, 8), labels=c(4, 5, 6, 7, 8))
scale_y_log2 <- function (...)
{
scale_y_continuous(..., trans = log2_trans())
}
ggplot(roundData,
aes(BitsCat,
weight = Collisions,
fill = ClientsCat)) +
geom_bar(position="dodge", color = "black") +
scale_y_log2() +
labs(x="# bits per slot", y="Undetected collisions") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_fill_brewer(palette="OrRd", name = "# Participants") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/bits.pdf", width = 7, height = 5)
}
# ==================================================================
# Plot for Pfitzmann for script `scripts/benchmarks/pfitzmann_ratio`
# ==================================================================
pfitzmann <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$BitsCat <- cut(roundData$Bits, c(0,1, 2, 4, 6, 8, 16, 20, 24, 28, 32, 40, 48, 56, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 20, 24, 28, 32, 40, 48, 56, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
ggplot(roundData,
aes(Clients, Data, group = BitsCat)) +
geom_smooth(aes(colour=BitsCat), method = "loess", size = 1.2) +
labs(x="# Participants", y="Data") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_colour_brewer(palette="OrRd", name="# Slots per client") +
scale_fill_brewer(palette="OrRd", name="# Slots per client") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/pfitzmann.pdf", width = 5, height = 3)
}
# ==================================================================
# Plot for Chaum for script `scripts/benchmarks/chaum_ratio`
# ==================================================================
chaum <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$BitsCat <- cut(roundData$Bits, c(0,1, 2, 4, 6, 8, 16, 20, 24, 28, 32, 40, 48, 56, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 20, 24, 28, 32, 40, 48, 56, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
ggplot(roundData,
aes(Clients, Data, group = BitsCat)) +
geom_smooth(aes(colour=BitsCat), method = "loess", size = 1.2) +
labs(x="# Participants", y="Data") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_colour_brewer(palette="OrRd", name="# Slots per client") +
scale_fill_brewer(palette="OrRd", name="# Slots per client") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/chaum.pdf", width = 5, height = 3)
}
# ==================================================================
# Plot for Chaum for script `scripts/benchmarks/chaum_ratio`
# ==================================================================
chaum_collision <- function() {
roundData$ClientsCat <- cut(roundData$Clients, c(0, 100, 200, 500, 1000, 2000, 5000, 10000), labels=c(100, 200, 500, 1000, 2000, 5000, 10000))
roundData$BitsCat <- cut(roundData$Bits, c(0,1, 2, 4, 6, 8, 16, 20, 24, 28, 32, 40, 48, 56, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384), labels=c(1, 2, 4, 6, 8, 16, 20, 24, 28, 32, 40, 48, 56, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384))
ggplot(roundData,
aes(Bits, Collisions/(Clients * Activity), group = ClientsCat)) +
geom_smooth(aes(colour=ClientsCat), method = "loess", size = 1.2, alpha = 0.3) +
scale_x_continuous(trans = "log2", breaks = c(2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096)) +
labs(x="# Slots per participant", y="Collisions") +
theme(axis.title.y = element_text(family="serif",
size=12, angle=90, vjust=0.25)) +
theme(axis.title.x = element_text(family="serif",
size=12, angle=00, hjust=0.54, vjust=0)) +
theme(axis.text.x = element_text(family="serif")) +
theme(axis.text.y = element_text(family="serif")) +
theme(legend.text = element_text(family="serif")) +
theme(legend.title = element_text(family="serif")) +
scale_colour_brewer(palette="OrRd", name="# Participants") +
scale_fill_brewer(palette="OrRd", name="# Participants") +
theme(panel.background = element_blank()) +
theme(axis.line = element_line(colour = "black")) +
theme(panel.grid.major = element_line(colour = "grey")) +
theme(panel.grid.minor = element_line(colour = "grey"))
ggsave("plots/chaum_collision.pdf", width = 5, height = 3)
}
# ======================
# Average data for table
# ======================
average_data <- function() {
print("0.01")
print("Footprint")
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Footprint" & Clients==10000)$Bytes)
print("Chaum")
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Chaum" & Clients==10000)$Bytes)
print("Pfitzmann")
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==0.01 & Algorithm=="Pfitzmann" & Clients==10000)$Bytes)
print("0.1")
print("Footprint")
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Footprint" & Clients==10000)$Bytes)
print("Chaum")
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Chaum" & Clients==10000)$Bytes)
print("Pfitzmann")
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==0.1 & Algorithm=="Pfitzmann" & Clients==10000)$Bytes)
print("1")
print("Footprint")
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Footprint" & Clients==10000)$Bytes)
print("Chaum")
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Chaum" & Clients==10000)$Bytes)
print("Pfitzmann")
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==100)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==200)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==500)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==1000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==2000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==5000)$Bytes)
mean(subset(reservationData,Activity==1 & Algorithm=="Pfitzmann" & Clients==10000)$Bytes)
}
make_plots <- function() {
compare()
# req_rounds()
# collisions()
# empty_slots()
# bit_round_tradeoff()
# empty_slots_bits()
# bits()
# pfitzmann()
# chaum()
# chaum_collision()
# average_data()
}
make_plots()
print("DONE")
q()