-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoda.testdoc
279 lines (256 loc) · 7.22 KB
/
soda.testdoc
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
Command:
./soda d 1
Input:
SodaCost 2 # Manufacturer Suggested Retail Price (MSRP) per bottle
NumStudents 4 # number of students to create
MaxPurchases 8 # maximum number of bottles a student purchases
NumVendingMachines 3 # number of vending machines
MaxStockPerFlavour 5 # maximum number of bottles of each flavour in a vending machine
MaxShippedPerFlavour 3 # maximum number of bottles of each flavour generated by the bottling
# plant per production run
TimeBetweenShipments 3 # length of time between shipment pickup
GroupoffDelay 10 # length of time between initializing gift cards
ParentalDelay 5 # length of time between deposits of funds
NumCouriers 2 # maximum number of couriers in the pool
Output:
Parent Gropoff WATOff Names Truck Plant Stud0 Stud1 Stud2 Stud3 Mach0 Mach1 Mach2 Cour0 Cour1
******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* *******
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3,1 D0,2 r
d1,2 R
D1,3 D1,2 G5 r
d2,2
U2,1 R r
P5 P R
d0,5
D1,2 D0,5 r
d1,5
W D1,5 T1,7
d2,5 G8 B3,8 R r B3,4 t0,5
D1,3 D2,3 R r
R
D2,2 P8 P B3,6 B3,4
d0,8
D0,8 B3,4 r B3,3
d1,8
D0,3 D1,8 G2 R r
d2,8
D2,6 R r
D2,1 P2 P R
d0,2
T1,7 D0,2 B3,2 r B3,4
d1,2
D0,3 D1,2 G5 R r
d2,2
D2,1 R r
D1,2 P5 P R
d0,5
D0,5 r
d1,5
D3,1 D1,5 G4 R r
d2,5
D2,5 R r
D1,2 P4 P R
d0,4
D3,1 D0,4 r
d1,4
D1,4 G3 R r
d2,4
D1,3 D2,4 R r
P3 P R
d0,3
D1,1 D0,3 r
d1,3
D1,3 G3 R r
d2,3
D0,3 D2,3 R r
P3 P R
d0,3
D0,3 D0,3 r
d1,3
D1,3 G5 R r
d2,3
D1,1 D2,3 R r
P5 P R
d0,5
D0,5 r
d1,5
D0,1 D1,5 G2 R r
d2,5
D2,5 R r
D0,1 P2 P R
d0,2
D0,2 r
d1,2
D1,3 D1,2 G3 R r
d2,2
D2,2 R r
D2,2 P3 P R
d0,3
D0,3 r
d1,3
D2,2 D1,3 G5 R r
d2,3
D2,3 R r
D3,2 W R T3,5
B1,5 B1,4 t1,7 T0,5
B3,7 F B3,4 T1,7
D3,2 B2,5 F B2,4
P5 P B2,3 B2,3
d0,5
D0,5 r
d1,5
D0,3 D1,3 G3 R r
d2,3
T0,7 D2,2 R r
W t0,7
D1,3 B2,8 B2,4 R T0,7
D1,1 P3 P
d0,3
D0,3 r
d1,3
D1,1 D1,1 G2 R r
d2,1
D2,1 R r
B2,6 B2,4
D2,3 F F F R
D0,1 F F
D0,3 F F
D2,2 F F
D2,1
F F
***********************
Observation 1:
=================================== Excerpt ===================================
Parent Gropoff WATOff Names Truck Plant Stud0 Stud1 Stud2 Stud3 Mach0 Mach1 Mach2 Cour0 Cour1
******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* *******
. . .
D3,1 D0,1 r R
W R L3
C3,5 L L L0 t1,7
D2,1 C0,5
W P2 P t3,5
d1,2
D1,2 r
d2,2
...
D2,3 R r
D3,2 W R T3,5
B1,5 B1,4 t1,7 T0,5
B3,7 F B3,4 T1,7
D3,2 B2,5 F B2,4
P5 P B2,3 B2,3
d0,5
=================================== Explanation ===================================
In the above excerpt we see that couriers 1 and 0 lose student 3's and 0's watcards respectively. When this occurs via a random
uniform distribution, the future is populated with an exception from the server and caught in the student which then prints "L". In
the exception handler the student also makes a call to WATCardOffice::create on the local cardOffice field which we can see in the
"C3,5" and "C0,5" entries.
Observation 2:
=================================== Excerpt ===================================
Parent Gropoff WATOff Names Truck Plant Stud0 Stud1 Stud2 Stud3 Mach0 Mach1 Mach2 Cour0 Cour1
******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* *******
. . .
round robin vending machines name server
truck unsuccessful unload