Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JPScore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JuPedSim
JPScore
Commits
b0ec8fab
Commit
b0ec8fab
authored
Jul 06, 2015
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation of rimea tests
parent
78e83223
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
882 additions
and
663 deletions
+882
-663
Utest/rimea_tests/test_1/runtest_rimea_1.py
Utest/rimea_tests/test_1/runtest_rimea_1.py
+15
-0
Utest/rimea_tests/test_10/runtest_rimea_10.py
Utest/rimea_tests/test_10/runtest_rimea_10.py
+20
-2
Utest/rimea_tests/test_11/runtest_rimea_11.py
Utest/rimea_tests/test_11/runtest_rimea_11.py
+16
-0
Utest/rimea_tests/test_12/runtest_rimea_12.py
Utest/rimea_tests/test_12/runtest_rimea_12.py
+18
-5
Utest/rimea_tests/test_13/flow.png
Utest/rimea_tests/test_13/flow.png
+0
-0
Utest/rimea_tests/test_13/master_ini.xml
Utest/rimea_tests/test_13/master_ini.xml
+9
-8
Utest/rimea_tests/test_13/runtest_rimea_13.py
Utest/rimea_tests/test_13/runtest_rimea_13.py
+18
-1
Utest/rimea_tests/test_14/runtest_rimea_14.py
Utest/rimea_tests/test_14/runtest_rimea_14.py
+24
-7
Utest/rimea_tests/test_2/runtest_rimea_2.py
Utest/rimea_tests/test_2/runtest_rimea_2.py
+8
-1
Utest/rimea_tests/test_3/master_ini.xml
Utest/rimea_tests/test_3/master_ini.xml
+1
-1
Utest/rimea_tests/test_3/runtest_rimea_3.py
Utest/rimea_tests/test_3/runtest_rimea_3.py
+31
-8
Utest/rimea_tests/test_4/readme.txt
Utest/rimea_tests/test_4/readme.txt
+12
-0
Utest/rimea_tests/test_5/runtest_rimea_5.py
Utest/rimea_tests/test_5/runtest_rimea_5.py
+17
-0
Utest/rimea_tests/test_6/runtest_rimea_6.py
Utest/rimea_tests/test_6/runtest_rimea_6.py
+14
-0
Utest/rimea_tests/test_7/ids_velocities.csv
Utest/rimea_tests/test_7/ids_velocities.csv
+600
-600
Utest/rimea_tests/test_7/runtest_rimea_7.py
Utest/rimea_tests/test_7/runtest_rimea_7.py
+34
-23
Utest/rimea_tests/test_7/velocity_distribution.png
Utest/rimea_tests/test_7/velocity_distribution.png
+0
-0
Utest/rimea_tests/test_8/runtest_rimea_8.py
Utest/rimea_tests/test_8/runtest_rimea_8.py
+17
-0
Utest/rimea_tests/test_9/runtest_rimea_9.py
Utest/rimea_tests/test_9/runtest_rimea_9.py
+21
-5
pedestrian/Pedestrian.cpp
pedestrian/Pedestrian.cpp
+7
-2
No files found.
Utest/rimea_tests/test_1/runtest_rimea_1.py
View file @
b0ec8fab
#!/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__":
Utest/rimea_tests/test_10/runtest_rimea_10.py
View file @
b0ec8fab
#!/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__":
Utest/rimea_tests/test_11/runtest_rimea_11.py
View file @
b0ec8fab
#!/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__":
Utest/rimea_tests/test_12/runtest_rimea_12.py
View file @
b0ec8fab
#!/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
View replaced file @
78e83223
View file @
b0ec8fab
50.5 KB
|
W:
|
H:
41.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Utest/rimea_tests/test_13/master_ini.xml
View file @
b0ec8fab
...
...
@@ -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.2
5
"
sigma=
"0.001"
/>
<bmin
mu=
"0.
20
"
sigma=
"0.001"
/>
<amin
mu=
"0.1
8
"
sigma=
"0.001"
/>
<bmax
mu=
"0.2
0
"
sigma=
"0.001"
/>
<bmin
mu=
"0.
15
"
sigma=
"0.001"
/>
<amin
mu=
"0.1
5
"
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"
/>
...
...
Utest/rimea_tests/test_13/runtest_rimea_13.py
View file @
b0ec8fab
#!/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__":
Utest/rimea_tests/test_14/runtest_rimea_14.py
View file @
b0ec8fab
#!/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__":
Utest/rimea_tests/test_2/runtest_rimea_2.py
View file @
b0ec8fab
#!/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.
Remar
que
:
Remar
ks
:
========
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__":
Utest/rimea_tests/test_3/master_ini.xml
View file @
b0ec8fab
...
...
@@ -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.6
5
"
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"
/>
...
...
Utest/rimea_tests/test_3/runtest_rimea_3.py
View file @
b0ec8fab
#!/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_tim
e
)
argv
[
0
],
must_
time
-
tolerance
,
evac_time
,
must_time
+
toleranc
e
)
exit
(
FAILURE
)
...
...
@@ -38,3 +60,4 @@ if __name__ == "__main__":
Utest/rimea_tests/test_4/readme.txt
View file @
b0ec8fab
"""
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
"""
Utest/rimea_tests/test_5/runtest_rimea_5.py
View file @
b0ec8fab
#!/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
)
Utest/rimea_tests/test_6/runtest_rimea_6.py
View file @
b0ec8fab
#!/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__":
Utest/rimea_tests/test_7/ids_velocities.csv
View file @
b0ec8fab
1,1.136
459
2,1.152
656
3,1.1298
91
4,1.277
551
5,1.179
393
6,0.956
343
7,0.917
873
8,0.6937
56
9,1.3125
22
10,0.9182
84
11,1.140
002
12,0.86
2930
13,1.409
680
14,1.012
735
15,1.390
077
16,0.9251
50
17,1.0888
22
18,0.960
461
19,1.300
77
4
20,1.1419
34
21,1.314
540
22,0.9421
20
23,1.015
373
24,0.981
372
25,1.025
716
26,1.3
2992
6
27,0.992
316
28,1.2000
02
29,1.2510
85
30,0.832
301
31,1.068
418
32,0.890
763
33,1.18
9125
34,0.833
450
35,1.1631
71
36,1.426
897
37,0.6899
7
3
38,0.91
5142
39,1.106
913
40,1.218
018
41,1.236
405
42,1.21
7935
43,1.129
433
44,0.9523
53
45,1.129
269
46,1.17
6048
47,1.333
519
48,1.318
542
49,0.876
856
50,0.981
335
51,0.6539
68
52,1.009
123
53,1.1843
16
54,1.015
612
55,1.3428
77
56,0.977
838
57,1.234
759
58,1.08
3080
59,0.64
3958
60,1.094
118
61,1.347
685
62,1.110
166
63,1.2065
95
64,0.8434
01
65,1.093
457
66,0.950
154
67,0.982
331
68,1.3186
81
69,0.657
409
70,1.0281
87
71,1.3254
01
72,1.54
603
7
73,1.10880
6
74,1.495
573
75,1.230
868
76,0.959
23
8
77,1.20
3064
78,1.2367
0
5
79,0.8126
43
80,1.1862
72
81,1.359
201
82,1.171
491
83,1.2530
98
84,1.176
316
85,1.213
75
8
86,0.8611
49
87,1.1226
29
88,1.0
29896
89,0.811
27
8
90,1.097
663
91,1.0122
91
92,0.824
445
93,1.198
416
94,1.132
724
95,1.011
430
96,1.240
888
97,1.141
398
98,1.260
401
99,0.992
149
100,1.06
1113
101,1.309
503
102,0.995
311
103,0.90
2937
104,0.615
818
105,1.073
213
106,1.215
591
107,1.204
891
108,0.9314
76
109,0.727
704
110,0.699
722
111,1.243
643
112,1.264
227
113,1.221
076
114,1.321
143
115,0.9460
00
116,0.8468
11
117,1.180
604
118,1.236
842
119,0.8129
96
120,1.139
838
121,0.9018
44
122,1.413
83
9
123,1.0353
34
124,1.3041
05
125,1.286
592
126,1.048
468
127,0.917
134
128,0.9146
99
129,1.115
345
130,1.103
161
131,1.088
807
132,0.9856
70
133,1.014
584
134,1.181
252
135,0.936
97
0
136,1.212
207
137,1.074
182
138,1.389
425
139,0.790
326
140,1.26
1118
141,0.965
648
142,1.0998
83
143,1.45
7200
144,1.0
40008
145,1.147
430
146,1.304
855
147,0.792
441
148,1.201
265
149,1.142
655
150,1.170
838
151,1.5
13613
152,1.51
8261
153,1.
502055
154,1.5
30935
155,1.5
22634
156,1.49
9178
157,1.4
93818
158,1.4
73250
159,1.52
8519
160,1.4
94751
161,1.5
11927
162,1.48
8935
163,1.5
46551
164,1.
50461
5
165,1.5
52703
166,1.4
90909
167,1.
506730
168,1.49
7143
169,1.52
8364
170,1.5
20000
171,1.5
40902
172,1.4
91507
173,1.50
5819
174,1.
501389
175,1.
500089
176,1.5
36000
177,1.48
9496
178,1.5
23150
179,1.52
7732
180,1.4
82776
181,1.50
9614
182,1.4
80006
183,1.51
9263
184,1.48
6443
185,1.50
8445
186,1.5
44453
187,1.4
63498
188,1.4
94345
189,1.51
6832
190,1.52
5424
191,1.5
25672
192,1.52
9790
193,1.5
13870
194,1.49
9048
195,1.4
9534
6
196,1.5
20830
197,1.5
34815
198,1.5
33913
199,1.48
7937
200,1.49
8626
201,1.46
6667
202,1.
501660
203,1.50
9955
204,1.49
688
9
205,1.5
44895
206,1.49
7284
207,1.5
21695
208,1.51
5097
209,1.46
5683
210,1.5
11855
211,1.54
9517
212,1.50
915
9
213,1.52
7302
214,1.48
8307
215,1.5
1191
3
216,1.48
7084
217,1.
502756
218,1.5
4248
6
219,1.4
63866
220,1.
500351
221,1.5
32308
222,1.5
56066
223,1.5
12632
224,1.5
44172
225,1.5
248
40
226,1.49
7600
227,1.5
21226
228,1.5
34648
229,1.4
8180
5
230,1.5
20308
231,1.
503910
232,1.51
784
1