-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBiDirPedDoor.maml
399 lines (399 loc) · 24 KB
/
BiDirPedDoor.maml
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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<?xml version="1.0" encoding="UTF-8"?>
<CDPlusPlus_Builder_Version_1.0.0>
<top>
<components> Room
</components>
<components> Hall
</components>
<components> door1@DoorController door2@DoorController
</components>
<comment> Generators for the room
</comment>
<components> pedestrianRoom1@Generator pedestrianRoom2@Generator
</components>
<components> pedestrianRoom3@Generator pedestrianRoom4@Generator
</components>
<components> pedestrianRoom5@Generator pedestrianRoom6@Generator
</components>
<components> pedestrianRoom7@Generator pedestrianRoom8@Generator
</components>
<components> pedestrianRoom9@Generator pedestrianRoom10@Generator
</components>
<comment> Generators for the hall
</comment>
<components> pedestrianHall1@Generator pedestrianHall2@Generator
</components>
<components> pedestrianHall3@Generator pedestrianHall4@Generator
</components>
<components> pedestrianHall5@Generator pedestrianHall6@Generator
</components>
<comment> Link the pedestrians to the entrance of the room
</comment>
<link> out@pedestrianRoom1 entranceRoom1@Room
</link>
<link> out@pedestrianRoom2 entranceRoom2@Room
</link>
<link> out@pedestrianRoom3 entranceRoom3@Room
</link>
<link> out@pedestrianRoom4 entranceRoom4@Room
</link>
<link> out@pedestrianRoom5 entranceRoom5@Room
</link>
<link> out@pedestrianRoom6 entranceRoom6@Room
</link>
<link> out@pedestrianRoom7 entranceRoom7@Room
</link>
<link> out@pedestrianRoom8 entranceRoom8@Room
</link>
<link> out@pedestrianRoom9 entranceRoom9@Room
</link>
<link> out@pedestrianRoom10 entranceRoom10@Room
</link>
<comment> link the pedestrians to the entrance of the hall
</comment>
<link> out@pedestrianHall1 entranceHall1@Hall
</link>
<link> out@pedestrianHall2 entranceHall2@Hall
</link>
<link> out@pedestrianHall3 entranceHall3@Hall
</link>
<link> out@pedestrianHall4 entranceHall4@Hall
</link>
<link> out@pedestrianHall5 entranceHall5@Hall
</link>
<link> out@pedestrianHall6 entranceHall6@Hall
</link>
<comment> Link the hallway to the room
</comment>
<link> exitHallDoor1@Hall inHall@door1
</link>
<link> outHall@door1 entranceRoomDoor1@Room
</link>
<link> exitHallDoor2@Hall inHall@door2
</link>
<link> outHall@door2 entranceRoomDoor2@Room
</link>
<comment> Link the room to the hallway
</comment>
<link> exitRoomDoor1@Room inRoom@door1
</link>
<link> outRoom@door1 entranceHallDoor1@Hall
</link>
<link> exitRoomDoor2@Room inRoom@door2
</link>
<link> outRoom@door2 entranceHallDoor2@Hall
</link>
</top>
<Hall>
<type> cell
</type>
<width> 6
</width>
<height> 10
</height>
<delay> transport
</delay>
<defaultDelayTime> 400
</defaultDelayTime>
<border> nonwrapped
</border>
<neighbors> Hall(2,-1) Hall(2,0) Hall(2,1)
</neighbors>
<neighbors> Hall(1,-1) Hall(1,0) Hall(1,1)
</neighbors>
<neighbors> Hall(0,-2) Hall(0,-1) Hall(0,0) Hall(0,1) Hall(0,2)
</neighbors>
<neighbors> Hall(-1,-1) Hall(-1,0) Hall(-1,1)
</neighbors>
<neighbors> Hall(-2,-1) Hall(-2,0) Hall(-2,1)
</neighbors>
<comment>%%% state values %%%%
</comment>
<comment> 0 - cell unoccupied
</comment>
<comment> 1 - cell occupied with an up walker
</comment>
<comment> 2 - cell occupied with a down walker
</comment>
<comment> 3 - cell occupied with an obstacle
</comment>
<initialvalue> 0
</initialvalue>
<comment>initialrowvalue : 0 010001
</comment>
<comment>initialrowvalue : 1 001000
</comment>
<localtransition> PedestrianBehaviour
</localtransition>
<in> entranceHall1 entranceHall2
</in>
<in> entranceHall3 entranceHall4
</in>
<in> entranceHall5 entranceHall6
</in>
<link> entranceHall1 entranceHall1@Hall(9,0)
</link>
<link> entranceHall2 entranceHall2@Hall(9,1)
</link>
<link> entranceHall3 entranceHall3@Hall(9,2)
</link>
<link> entranceHall4 entranceHall4@Hall(9,3)
</link>
<link> entranceHall5 entranceHall5@Hall(9,4)
</link>
<link> entranceHall6 entranceHall6@Hall(9,5)
</link>
<in> entranceHallDoor1 entranceHallDoor2
</in>
<link> entranceHallDoor1 entranceHallDoor1@Hall(0,2)
</link>
<link> entranceHallDoor2 entranceHallDoor2@Hall(0,3)
</link>
<out> exitHallDoor1 exitHallDoor2
</out>
<link> exitHallDoor1@Hall(0,2) exitHallDoor1 
</link>
<link> exitHallDoor2@Hall(0,3) exitHallDoor2 
</link>
<zone> hall-boundary-rules { (0,0)..(0,5) }
</zone>
<portInTransition> entranceHall1@Hall(9,0) hall-entrance-rule
</portInTransition>
<portInTransition> entranceHall2@Hall(9,1) hall-entrance-rule
</portInTransition>
<portInTransition> entranceHall3@Hall(9,2) hall-entrance-rule
</portInTransition>
<portInTransition> entranceHall4@Hall(9,3) hall-entrance-rule
</portInTransition>
<portInTransition> entranceHall5@Hall(9,4) hall-entrance-rule
</portInTransition>
<portInTransition> entranceHall6@Hall(9,5) hall-entrance-rule
</portInTransition>
<portInTransition> entranceHallDoor1@Hall(0,2) door-entrance-rule
</portInTransition>
<portInTransition> entranceHallDoor2@Hall(0,3) door-entrance-rule
</portInTransition>
</Hall>
<Room>
<type> cell
</type>
<width> 10
</width>
<height> 10
</height>
<delay> transport
</delay>
<defaultDelayTime> 400
</defaultDelayTime>
<border> nonwrapped
</border>
<neighbors> Room(2,-1) Room(2,0) Room(2,1)
</neighbors>
<neighbors> Room(1,-1) Room(1,0) Room(1,1)
</neighbors>
<neighbors> Room(0,-2) Room(0,-1) Room(0,0) Room(0,1) Room(0,2)
</neighbors>
<neighbors> Room(-1,-1) Room(-1,0) Room(-1,1)
</neighbors>
<neighbors> Room(-2,-1) Room(-2,0) Room(-2,1)
</neighbors>
<comment>%%% state values %%%%
</comment>
<comment> 0 - cell unoccupied
</comment>
<comment> 1 - cell occupied with an up walker
</comment>
<comment> 2 - cell occupied with a down walker
</comment>
<comment> 3 - cell occupied with an obstacle
</comment>
<initialvalue> 0
</initialvalue>
<comment> add obstacles to room
</comment>
<initialrowvalue> 5 0030000300
</initialrowvalue>
<comment>initialrowvalue : 8 0000002000
</comment>
<comment>initialrowvalue : 9 0202000200
</comment>
<localtransition> PedestrianBehaviour
</localtransition>
<in> entranceRoom1 entranceRoom2
</in>
<in> entranceRoom3 entranceRoom4
</in>
<in> entranceRoom5 entranceRoom6
</in>
<in> entranceRoom7 entranceRoom8
</in>
<in> entranceRoom9 entranceRoom10
</in>
<link> entranceRoom1 entranceRoom1@Room(0,0)
</link>
<link> entranceRoom2 entranceRoom2@Room(0,1)
</link>
<link> entranceRoom3 entranceRoom3@Room(0,2)
</link>
<link> entranceRoom4 entranceRoom4@Room(0,3)
</link>
<link> entranceRoom5 entranceRoom5@Room(0,4)
</link>
<link> entranceRoom6 entranceRoom6@Room(0,5)
</link>
<link> entranceRoom7 entranceRoom7@Room(0,6)
</link>
<link> entranceRoom8 entranceRoom8@Room(0,7)
</link>
<link> entranceRoom9 entranceRoom9@Room(0,8)
</link>
<link> entranceRoom10 entranceRoom10@Room(0,9)
</link>
<in> entranceRoomDoor1 entranceRoomDoor2
</in>
<link> entranceRoomDoor1 entranceRoomDoor1@Room(9,4)
</link>
<link> entranceRoomDoor2 entranceRoomDoor2@Room(9,5)
</link>
<out> exitRoomDoor1 exitRoomDoor2
</out>
<link> exitRoomDoor1@Room(9,4) exitRoomDoor1 
</link>
<link> exitRoomDoor2@Room(9,5) exitRoomDoor2 
</link>
<zone> room-boundary-rules { (9,0)..(9,9) }
</zone>
<portInTransition> entranceRoom1@Room(0,0) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom2@Room(0,1) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom3@Room(0,2) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom4@Room(0,3) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom5@Room(0,4) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom6@Room(0,5) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom7@Room(0,6) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom8@Room(0,7) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom9@Room(0,8) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoom10@Room(0,9) room-entrance-rule
</portInTransition>
<portInTransition> entranceRoomDoor1@Room(9,4) door-entrance-rule
</portInTransition>
<portInTransition> entranceRoomDoor2@Room(9,5) door-entrance-rule
</portInTransition>
</Room>
<PedestrianBehaviour>
<comment>%%% Exit Rule %%%%
</comment>
<comment> An up walker hits the boundary, remove them from the grid
</comment>
<rule> 0 100 {(0,0)=1 and cellpos(0)=0}
</rule>
<comment> A down hits the boundary of the hall, remove them from the grid
</comment>
<rule> 0 100 {(0,0)=2 and cellpos(0)=9}
</rule>
<comment>%%% Rule 1 %%%%
</comment>
<comment> Move forward - up walkers
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)=0 and (-2,0)!=2} %the cell ahead is available and
</rule>
<rule> 1 100 {(0,0)=0 and (-1,0)!=2 and (1,0)=1} %the next cell is not a down walker
</rule>
<comment> Move forward - down walkers
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)=0 and (2,0)!=1} %the cell ahead is available and
</rule>
<rule> 2 100 {(0,0)=0 and (1,0)!=1 and (-1,0)=2} %the next cell is not an up walker
</rule>
<comment>%%% Rule 2 %%%%
</comment>
<comment> There is a walker/obstacle ahead, move right if another walker isn`t going to walk there
</comment>
<comment> up walker
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)!=0 % walker or obstacle is next cell ahead
</rule>
<comment> walker not at border
</comment>
<comment> and the right side is available
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<comment> ensure up walker is not going for your cell
</comment>
<rule> 1 100 {(0,0)=0 and (0,-1)=1 % move the up walker to the right
</rule>
<comment> there is an obstacle or walker in cell (-1,-1)
</comment>
<comment> walker not at border
</comment>
<comment> ensure down walker is not going for that cell
</comment>
<comment> ensure up walker is not going for that cell
</comment>
<comment> down walker
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)!=0 % walker or obstacle is next cell ahead
</rule>
<comment> walker not at border
</comment>
<comment> and the right side is available
</comment>
<comment> ensure up walker is not going for your cell
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<rule> 2 100 {(0,0)=0 and (0,1)=2 % move the down walker to the right
</rule>
<comment> there is an obstacle or walker in cell (1,1)
</comment>
<comment> walker not at border
</comment>
<comment> ensure up walker is not going for that cell
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<comment>%%% Rule 3 %%%%
</comment>
<comment> Walker/obstacle ahead and to the right, move to the left if another walker isn`t going to walk ther</comment>
<comment> up walker
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)!=0 % walker or obstacle is next cell ahead
</rule>
<comment> walker not at border
</comment>
<comment> walker or obstacle is also to the right
</comment>
<comment> the left side is available
</comment>
<comment> ensure down walker is not going for left cell
</comment>
<comment> ensure up walker is not going for left cell
</comment>
<rule> 1 100 {(0,0)=0 and (0,1)=1 % move the up walker to the left
</rule>
<comment> there is an obstacle or walker in cell (-1,1)
</comment>
<comment> walker not at border
</comment>
<comment> there is an obstacle or walker in cell (0,2) also
</comment>
<comment> ensure down walker is not going for that cell
</comment>
<comment> ensure up walker is not going for that cell
</comment>
<comment> down walker
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)!=0 % walker or obstacle is next cell ahead
</rule>
<comment> walker not at border
</comment>
<comment> and the right side is an obstacle or walker
</comment>
<comment> the left side is available
</comment>
<comment> ensure up walker is not going for left cell
</comment>
<comment> ensure down walker is not going for left cell
</comment>
<rule> 2 100 {(0,0)=0 and (0,-1)=2 % move the down walker to the right
</rule>
<comment> there is an obstacle or walker in cell (1,-1)
</comment>
<comment> walker not at border
</comment>
<comment> there is an obstacle or walker in cell (0,-2) also
</comment>
<comment> ensure up walker is not going for that cell
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<comment>%%% Rule 4 %%%%
</comment>
<comment> Avoid collision, move right if an up and down walker are vying for the same cell and it's possible
</comment>
<comment> up walker
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)=0 % cell ahead is empty
</rule>
<comment> 2 cells ahead is down walker
</comment>
<comment> right cell is available
</comment>
<comment> ensure down walker is not going for right cell
</comment>
<comment> ensure up walker is not going for right cell
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)=0 % cell ahead is empty
</rule>
<comment> 2 cells ahead is down walker
</comment>
<comment> right cell is available
</comment>
<comment> ensure down walker is not going for right cell
</comment>
<comment> walker at entrance of room or hall
</comment>
<rule> 1 100 {(0,0)=0 and (0,-1)=1
</rule>
<comment> cell (-2,-1) is a down walker
</comment>
<comment> cell (-1,-1) is empty
</comment>
<comment> ensure down walker is not going for right cell
</comment>
<comment> ensure up walker is not going for right cell
</comment>
<comment> down walker
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)=0 % cell ahead is empty
</rule>
<comment> 2 cells ahead is up walker
</comment>
<comment> right cell is available
</comment>
<comment> ensure up walker is not going for right cell
</comment>
<comment> ensure down walker is not going for right cell
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)=0 % cell ahead is empty
</rule>
<comment> 2 cells ahead is up walker
</comment>
<comment> right cell is available
</comment>
<comment> ensure up walker is not going for right cell
</comment>
<comment> walker at the entrance of room or hall
</comment>
<rule> 2 100 {(0,0)=0 and (0,1)=2
</rule>
<comment> cell (2,1) is an up walker
</comment>
<comment> cell (1,1) is empty
</comment>
<comment> ensure up walker is not going for right cell
</comment>
<comment> ensure down walker is not going for right cell 
</comment>
<comment>%%% Rule 5 %%%%
</comment>
<comment> Walker/obstacle ahead to the right and to the left, move backward if another walker isn`t going to </comment>
<comment> up walker
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)!=0 % walker or obstacle is next cell ahead
</rule>
<comment> walker not at border
</comment>
<comment> walker or obstacle is also to the right
</comment>
<comment> walker or obstacle is also to the left
</comment>
<comment> cell behind is available
</comment>
<comment> ensure up walker is not going for backward cell 
</comment>
<comment> ensure walker from (1,1) is not going for backward cell
</comment>
<comment> ensure walker from (1,-1) is not going for backward cell
</comment>
<rule> 1 100 {(0,0)=0 and (-1,0)=1 % move the up walker backwards
</rule>
<comment> walker not at border
</comment>
<comment> there is an obstacle or walker in cell (-1,1)
</comment>
<comment> there is an obstacle or walker in cell (-1,-1)
</comment>
<comment> there is an obstacle or walker in cell (-2,0)
</comment>
<comment> ensure up walker is not going for that cell
</comment>
<comment> ensure walker from (0,-1) is not going for that cell
</comment>
<comment> ensure walker from (0,1) is not going for that cell
</comment>
<comment> down walker
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)!=0 % walker or obstacle is next cell ahead
</rule>
<comment> walker not at border
</comment>
<comment> walker or obstacle is also to the right
</comment>
<comment> walker or obstacle is also to the left
</comment>
<comment> cell behind is available
</comment>
<comment> ensure down walker is not going for backward cell 
</comment>
<comment> ensure walker from (-1,1) is not going for backward cell
</comment>
<comment> ensure walker from (-1,-1) is not going for backward cell
</comment>
<rule> 2 100 {(0,0)=0 and (1,0)=2 % move the down walker backwards
</rule>
<comment> walker not at border
</comment>
<comment> there is an obstacle or walker in cell (1,1)
</comment>
<comment> there is an obstacle or walker in cell (1,-1)
</comment>
<comment> there is an obstacle or walker in cell (2,0)
</comment>
<comment> ensure down walker is not going for that cell
</comment>
<comment> ensure walker from (0,-1) is not going for that cell
</comment>
<comment> ensure walker from (0,1) is not going for that cell
</comment>
<comment>%%% Rule 6 %%%%
</comment>
<comment> Default - don't move
</comment>
<rule> {(0,0)} 100 {t}
</rule>
</PedestrianBehaviour>
<hall-entrance-rule>
<comment> Assign a value of 1 to the pedestrians who are entering the hall and walking upwards
</comment>
<rule> 1 100 {portvalue(ThisPort)>0 and (-1,0)!=2 and ( ((0,0)=0 and cellpos(0)=9) or ((0,0)=2 and cellpos</rule>
<comment> default - stay the same
</comment>
<rule> {(0,0)} 100 {t}
</rule>
</hall-entrance-rule>
<room-entrance-rule>
<comment>Assign a value of 2 to the pedestrians who are entering the room and walking downwards
</comment>
<rule> 2 100 {portvalue(ThisPort)>0 and (1,0)!=1 and ( ((0,0)=0 and cellpos(0)=0) or ((0,0)=1 and cellpos(</rule>
<comment> default - stay the same
</comment>
<rule> {(0,0)} 100 {t}
</rule>
</room-entrance-rule>
<hall-boundary-rules>
<comment>%%% Rule 1 %%%%
</comment>
<comment> up walker at the door, exit the hall and send message to devs door model
</comment>
<rule> {0 + send(exitHallDoor1,1)} 100 {(0,0)=1 and cellpos(1)=2}
</rule>
<rule> {0 + send(exitHallDoor2,1)} 100 {(0,0)=1 and cellpos(1)=3}
</rule>
<comment>%%% Rule 2 %%%%
</comment>
<comment> have the up walkers enter the boundary
</comment>
<rule> 1 100 {(0,0)=0 and (1,0)=1}
</rule>
<comment>%%% Rule 3 %%%%
</comment>
<comment> up walker at the boundary on the right side of door, walk left 
</comment>
<rule> 0 100 {(0,0)=1 % walker is at boundary
</rule>
<comment> on the right side of door
</comment>
<comment> and the left side is available
</comment>
<comment> ensure up walker is not going for your cell
</comment>
<rule> 1 100 {(0,0)=0 and (0,1)=1 % move the up walker to the left
</rule>
<comment> at the right side of the door
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<comment>%%% Rule 4 %%%%
</comment>
<comment> up walker at the boundary on the left side of door, walk right 
</comment>
<rule> 0 100 {(0,0)=1 % walker is at boundary
</rule>
<comment> on the left side of door
</comment>
<comment> and the right side is available
</comment>
<comment> ensure up walker is not going for your cell
</comment>
<rule> 1 100 {(0,0)=0 and (0,-1)=1 % move the up walker to the right
</rule>
<comment> at the left side of the door
</comment>
<comment> ensure up walker is not going for your cell
</comment>
<comment>%%% Rule 5 %%%%
</comment>
<comment> the down walker entered the hall, walk down
</comment>
<rule> 0 100 {(0,0)=2 and (1,0)=0}
</rule>
<comment> default
</comment>
<rule> {(0,0)} 100 {t}
</rule>
</hall-boundary-rules>
<room-boundary-rules>
<comment>%%% Rule 1 %%%%
</comment>
<comment> down walker at the door, exit the room and send message to devs door model
</comment>
<rule> {0 + send(exitRoomDoor1,2)} 100 {(0,0)=2 and cellpos(1)=4}
</rule>
<rule> {0 + send(exitRoomDoor2,2)} 100 {(0,0)=2 and cellpos(1)=5}
</rule>
<comment>%%% Rule 2 %%%%
</comment>
<comment> have the down walkers enter the boundary
</comment>
<rule> 2 100 {(0,0)=0 and (-1,0)=2}
</rule>
<comment>%%% Rule 3 %%%%
</comment>
<comment> at the boundary on right side of door, walk left 
</comment>
<rule> 0 100 {(0,0)=2 % walker is at boundary
</rule>
<comment> on the right side of door
</comment>
<comment> and the left side is available
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<rule> 2 100 {(0,0)=0 and (0,-1)=2 % move the down walker to the left
</rule>
<comment> at the right side of door
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<comment>%%% Rule 4 %%%%
</comment>
<comment> at the boundary on left side of door, walk right 
</comment>
<rule> 0 100 {(0,0)=2 % walker is at boundary
</rule>
<comment> on the left side of door
</comment>
<comment> and the right side is available
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<rule> 2 100 {(0,0)=0 and (0,1)=2 % move the down walker to the left
</rule>
<comment> at the left side of door
</comment>
<comment> ensure down walker is not going for your cell
</comment>
<comment>%%% Rule 5 %%%%
</comment>
<comment> the up walker entered the room, walk up
</comment>
<rule> 0 100 {(0,0)=1 and (-1,0)=0} % after they enter the room
</rule>
<comment> default
</comment>
<rule> {(0,0)} 100 {t}
</rule>
</room-boundary-rules>
<door-entrance-rule>
<comment> The pedestrian is ready to enter the room or hall through the door
</comment>
<rule> {portvalue(ThisPort)} 50 {t}
</rule>
<comment>----------Door Controller parameters-----------
</comment>
</door-entrance-rule>
<door1>
<doorProcessingTime> 00:00:00:50
</doorProcessingTime>
</door1>
<door2>
<doorProcessingTime> 00:00:00:50
</doorProcessingTime>
<comment>----------Room Generator parameters-----------
</comment>
</door2>
<pedestrianRoom1>
<distribution> poisson
</distribution>
<mean> 2.1
</mean>
<variance> 1
</variance>
<deviation> 1
</deviation>
</pedestrianRoom1>
<pedestrianRoom2>
<distribution> poisson
</distribution>
<mean> 1.6
</mean>
<variance> 1.2
</variance>
<deviation> 1.2
</deviation>
</pedestrianRoom2>
<pedestrianRoom3>
<distribution> poisson
</distribution>
<mean> 1.8
</mean>
<variance> 1.1
</variance>
<deviation> 1.1
</deviation>
</pedestrianRoom3>
<pedestrianRoom4>
<distribution> poisson
</distribution>
<mean> 2.6
</mean>
<variance> 1
</variance>
<deviation