Commit b0ec8fab authored by Mohcine Chraibi's avatar Mohcine Chraibi

Add documentation of rimea tests

parent 78e83223
#!/usr/bin/env python
"""
Test description
================
One pedestrian is moving along a corridor.
Test if pedestrian can maintain its speed constant
Remarks
=======
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdfs
"""
import os
import sys
utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0])))
......@@ -35,3 +49,4 @@ if __name__ == "__main__":
#!/usr/bin/env python
"""
Test description
================
- Pedestrians are distributed in 12 different rooms.
- The building has two exits.
- The Pedestrians have exactly assigned exit numbers and should evacuate through these.
Remarks
=======
- We assign pedestrian to two different groups
- We check if pedestrians in the two groups pass the exits.
- In the simulation pedestrians disapear once they are outside
therefore we check if peds go through line <exit> - <displacement>
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0])))
......@@ -7,8 +25,7 @@ sys.path.append(utestdir)
from JPSRunTest import JPSRunTestDriver
from utils import *
displacement = 1 # in the simulation pedestrians disapear once they are outside
# therefore we check if peds go through line <exit> - <displacement>
displacement = 1
def run_rimea_test10(inifile, trajfile):
......@@ -57,3 +74,4 @@ if __name__ == "__main__":
#!/usr/bin/env python
"""
Test description
================
300 pedestrians are distributed in a room with two exits.
The pedestrians should prefer the nearest exit,
but some should (spontaneously) choose the second exit
Remarks
=======
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0])))
......@@ -42,3 +57,4 @@ if __name__ == "__main__":
#!/usr/bin/env python
"""
Test description
================
Two bottlenecks are connected with a long corridor.
At the last exit there should be no jam.
Remarks
=======
condition of this test is not clear enough...
In the last exit there should be no jam. Means:
J_botl >= J_last
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0])))
......@@ -11,11 +28,6 @@ tolerance = 0.05
displacement = 1 # in the simulation pedestrians disapear once they are outside
# therefore we measure the last flow at a <last_exit> - <displacement>
def run_rimea_test12(inifile, trajfile):
"""
condition of this test is not clear enough...
In the last exit there should be no jam. Means:
J_botl >= J_last
"""
fps, N, traj = parse_file(trajfile)
exit_botl = [19.13, -0.55, 0.45]
last_exit = [29.13 - displacement, -0.55, 0.45]
......@@ -46,3 +58,4 @@ if __name__ == "__main__":
Utest/rimea_tests/test_13/flow.png

50.5 KB | W: | H:

Utest/rimea_tests/test_13/flow.png

41.7 KB | W: | H:

Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -43,7 +43,7 @@
<!--persons information and distribution -->
<agents operational_model_id="1">
<agents_distribution>
<group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" goal_id="-1" number="150" router_id="1" x_max="-2" x_min="-5" />
<group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" goal_id="-1" number="150" router_id="1" x_max="-1" x_min="-4" y_max="4" y_min="-3.5" />
</agents_distribution>
</agents>
......@@ -57,15 +57,16 @@
<exit_crossing_strategy>4</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
<force_wall nu="1.35" dist_max="5" disteff_max="2" interpolation_width="0.1" />
<force_wall nu="0.3" dist_max="4" disteff_max="2" interpolation_width="0.1" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.3" sigma="0.2" />
<v0 mu="1.3" sigma="0.04" />
<!-- For stair speed see tab 1 in (Burghardt2014) -->
<!-- <v0_upstairs mu="0.675" sigma="0.04" /> -->
<v0_upstairs mu="0.675" sigma="0.04" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<bmax mu="0.20" sigma="0.001" />
<bmin mu="0.15" sigma="0.001" />
<amin mu="0.15" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
......@@ -85,8 +86,8 @@
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped nu="1" b="0.034" c="2.451"/>
<force_wall nu="2" b="0.05" c="2.451"/>
<force_ped nu="0.6" b="0.034" c="2.451"/>
<force_wall nu="3" b="0.034" c="2.451"/>
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.3" sigma="0.05" />
......
#!/usr/bin/env python
"""
Flow at the beginnning of the stair should be smaller than the flow in the corridor.
Test description
================
Pedestrian coming out from a bottleneck along a corridor.
At the end of the corridor is a stair.
Since peds have to resduce their speed on the stair,
a jam should be observed at the beginning of the stair
Remarks
=======
In case of jam, flow at the beginnning of the stair
should be smaller than the flow in the corridor.
The reduced speed on stairs (up) is according to Tab 1 Burghardt2014:
|----------+----------------|
| Handbook | Speed Stair Up |
......@@ -14,7 +25,12 @@ The reduced speed on stairs (up) is according to Tab 1 Burghardt2014:
Therefore, we choose for v0_upstairs a Gauss-distribution with
mean = 0.675 and sigma = 0.04
See also Fig. DistributionSpeedStairUp.png
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
import matplotlib.pyplot as plt
......@@ -78,3 +94,4 @@ if __name__ == "__main__":
#!/usr/bin/env python
"""
Test description
================
Pedestrian evacuation to an exit. They have two possible routes:
1. short
2. and long
Remarks
=======
This test has no concrete condition to check for.
It should be documented whether pedestrians take a long detour or not
There are 4 stats that should be documented:
1. "kurz" (short)
2. "lang" (long)
3. "gemischt" (mixed)
4. "konfigurierbar" (configurable)
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0])))
......@@ -9,13 +31,7 @@ from utils import *
"""
This test has no concrete condition to check for.
It should be documented whether pedestrians take a long detour or not
There are 4 stats that should be documented:
1. "kurz" (short)
2. "lang" (long)
3. "gemischt" (mixed)
4. "konfigurierbar" (configurable)
"""
states = ["short", "long", "mixed", "configurable"]
......@@ -57,3 +73,4 @@ if __name__ == "__main__":
#!/usr/bin/env python
"""
Test Description
================
1 ped moving on a 10m long stair.
It should be shown that the ped can maintain its speed constant.
Remarque:
Remarks:
========
In JuPedSim pedestrians adapt their velocity
from a corridor to a stair *smoothly* (no step function).
In this test we set v0 == v0Upstairs. Hence, we can avoid any delay related to the transition
from v0 to v0Upstairs.
Source:
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdfs
"""
import os
......@@ -54,3 +60,4 @@ if __name__ == "__main__":
......@@ -61,7 +61,7 @@
<force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="0.6" sigma="0.0" />
<v0 mu="0.65" sigma="0.0" />
<v0_upstairs mu="0.5" sigma="0.0" />
<v0_downstairs mu="0.65" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
......
#!/usr/bin/env python
"""
Test Description
================
1 ped moving on a 10m long stair *downstairs*
It should be shown that the ped can maintain its speed constant.
Remarks:
========
In JuPedSim pedestrians adapt their velocity
from a corridor to a stair *smoothly* (no step function).
In this test we set v0 == v0Downstairs. Hence, we can avoid any delay related to the transition
from v0 to v0Downstairs.
Source:
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdfs
"""
import os
import sys
utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0])))
......@@ -10,20 +28,24 @@ from utils import *
def run_rimea_test3(inifile, trajfile):
must_min_time = 14
must_max_time = 16
tolerance = 1 # ped accelerates from 0 to v0 after some time (\tau)
v0_downstairs = 0.65 # velocity on stair from master-ini.xml
end_stair = 10.0 # values from geometry.xml
start_stair = 0.0 # values from geometry.xml
must_time = (end_stair - start_stair)/v0_downstairs
# pedestrians in force-based models accelerate from 0 to v0 after some time (\tau)
fps, n, traj = parse_file(trajfile)
# filter trajecetries. Consider only the stair
traj_stair = traj[0 <= traj[:, 2]]
traj_stair = traj_stair[traj_stair[:, 2] <= 10]
in_stair = (traj[:, 2] >= start_stair) & (traj[:, 2] <= end_stair)
traj_stair = traj[in_stair]
evac_time = (max(traj_stair[:, 1]) - min(traj_stair[:, 1])) / float(fps)
if must_min_time <= evac_time <= must_max_time:
logging.info("evac_time: %f <= %f <= %f", must_min_time, evac_time, must_max_time)
if must_time -tolerance <= evac_time <= must_time + tolerance:
logging.info("evac_time: %f <= %f <= %f",
must_time-tolerance, evac_time, must_time+tolerance)
else:
logging.critical("%s exits with FAILURE. evac_time: %f <= %f <= %f ?",
argv[0], must_min_time, evac_time, must_max_time)
argv[0], must_time-tolerance, evac_time, must_time+tolerance)
exit(FAILURE)
......@@ -38,3 +60,4 @@ if __name__ == "__main__":
"""
Test description
================
Fundamental diagram in a corridor with closed boundary conditions
Remarks
=======
No boundary conditions in JuPedSim yet.
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
#!/usr/bin/env python
"""
Test description
================
Distribute 10 pedestrians with 10 different reaction times.
Check whether they start exactly at the specified times.
Remarks
=======
An error of 1/fps is to be considered.
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
import numpy as np
......@@ -62,3 +78,4 @@ if __name__ == "__main__":
logging.info("%s exits with SUCCESS" % (argv[0]))
exit(SUCCESS)
#!/usr/bin/env python
"""
Test description
================
20 pedestrians going around a corner.
Remarks
=======
Source
======
http://www.rimea.de/fileadmin/files/dok/richtlinien/r2.2.1.pdf
"""
import os
import sys
import numpy as np
......@@ -41,3 +54,4 @@ if __name__ == "__main__":
1,1.136459
2,1.152656
3,1.129891
4,1.277551
5,1.179393
6,0.956343
7,0.917873
8,0.693756
9,1.312522
10,0.918284
11,1.140002
12,0.862930
13,1.409680
14,1.012735
15,1.390077
16,0.925150
17,1.088822
18,0.960461
19,1.300774
20,1.141934
21,1.314540
22,0.942120
23,1.015373
24,0.981372
25,1.025716
26,1.329926
27,0.992316
28,1.200002
29,1.251085
30,0.832301
31,1.068418
32,0.890763
33,1.189125
34,0.833450
35,1.163171
36,1.426897
37,0.689973
38,0.915142
39,1.106913
40,1.218018
41,1.236405
42,1.217935
43,1.129433
44,0.952353
45,1.129269
46,1.176048
47,1.333519
48,1.318542
49,0.876856
50,0.981335
51,0.653968
52,1.009123
53,1.184316
54,1.015612
55,1.342877
56,0.977838
57,1.234759
58,1.083080
59,0.643958
60,1.094118
61,1.347685
62,1.110166
63,1.206595
64,0.843401
65,1.093457
66,0.950154
67,0.982331
68,1.318681
69,0.657409
70,1.028187
71,1.325401
72,1.546037
73,1.108806
74,1.495573
75,1.230868
76,0.959238
77,1.203064
78,1.236705
79,0.812643
80,1.186272
81,1.359201
82,1.171491
83,1.253098
84,1.176316
85,1.213758
86,0.861149
87,1.122629
88,1.029896
89,0.811278
90,1.097663
91,1.012291
92,0.824445
93,1.198416
94,1.132724
95,1.011430
96,1.240888
97,1.141398
98,1.260401
99,0.992149
100,1.061113
101,1.309503
102,0.995311
103,0.902937
104,0.615818
105,1.073213
106,1.215591
107,1.204891
108,0.931476
109,0.727704
110,0.699722
111,1.243643
112,1.264227
113,1.221076
114,1.321143
115,0.946000
116,0.846811
117,1.180604
118,1.236842
119,0.812996
120,1.139838
121,0.901844
122,1.413839
123,1.035334
124,1.304105
125,1.286592
126,1.048468
127,0.917134
128,0.914699
129,1.115345
130,1.103161
131,1.088807
132,0.985670
133,1.014584
134,1.181252
135,0.936970
136,1.212207
137,1.074182
138,1.389425
139,0.790326
140,1.261118
141,0.965648
142,1.099883
143,1.457200
144,1.040008
145,1.147430
146,1.304855
147,0.792441
148,1.201265
149,1.142655
150,1.170838
151,1.513613
152,1.518261
153,1.502055
154,1.530935
155,1.522634
156,1.499178
157,1.493818
158,1.473250
159,1.528519
160,1.494751
161,1.511927
162,1.488935
163,1.546551
164,1.504615
165,1.552703
166,1.490909
167,1.506730
168,1.497143
169,1.528364
170,1.520000
171,1.540902
172,1.491507
173,1.505819
174,1.501389
175,1.500089
176,1.536000
177,1.489496
178,1.523150
179,1.527732
180,1.482776
181,1.509614
182,1.480006
183,1.519263
184,1.486443
185,1.508445
186,1.544453
187,1.463498
188,1.494345
189,1.516832
190,1.525424
191,1.525672
192,1.529790
193,1.513870
194,1.499048
195,1.495346
196,1.520830
197,1.534815
198,1.533913
199,1.487937
200,1.498626
201,1.466667
202,1.501660
203,1.509955
204,1.496889
205,1.544895
206,1.497284
207,1.521695
208,1.515097
209,1.465683
210,1.511855
211,1.549517
212,1.509159
213,1.527302
214,1.488307
215,1.511913
216,1.487084
217,1.502756
218,1.542486
219,1.463866
220,1.500351
221,1.532308
222,1.556066
223,1.512632
224,1.544172
225,1.524840
226,1.497600
227,1.521226
228,1.534648
229,1.481805
230,1.520308
231,1.503910
232,1.517841