Commit acc7761c authored by guido basten's avatar guido basten

added test 2 and 3

also added a test explanation
parent e0ecd94d
Pipeline #21727 passed with stages
in 9 minutes and 15 seconds
import matplotlib.pyplot as plt
def get_crossings(id):
name = 'WA_test_01_traj.xml_flow_exit_id_{}.dat'.format(id)
data = open(name)
peds = []
for i in range(3) :
data.readline()
for line in data:
if len(line) > 5:
line = line.split(' ')
peds.append(int(line[-1].strip('\n')))
data.close()
return peds[-1]
WA2a = get_crossings(0) + get_crossings(2)
WA2b = get_crossings(3) + get_crossings(4)
WA2c = get_crossings(6) + get_crossings(1)
WA2d = get_crossings(5) + get_crossings(7)
WA3a = get_crossings(10)
WA3b = get_crossings(11)
WA3c = get_crossings(12)
WA4a = get_crossings(13)
WA4b = get_crossings(14)
WA4c = get_crossings(15)
plt.bar('WA2a',WA2a)
plt.bar('WA2b',WA2b)
plt.bar('WA2c',WA2c)
plt.bar('WA2d',WA2c)
plt.bar('WA3a',WA3a)
plt.bar('WA3b',WA3b)
plt.bar('WA3c',WA3c)
plt.bar('WA4a',WA4a)
plt.bar('WA4b',WA4b)
plt.bar('WA4c',WA4c)
plt.title('Usage of wating areas')
plt.ylabel('pedestrians')
plt.xlabel('Wating Areas')
plt.grid(axis='y')
plt.savefig('Usage_of_WA.png')
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.8" caption="second life" unit="m"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_geoemtry.xsd">
<rooms>
<room id="0" caption="hall">
<subroom id="0" caption="start" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="7" py="5"/>
<vertex px="7" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="7" py="0"/>
<vertex px="14" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="14" py="0"/>
<vertex px="14" py="5"/>
</polygon>
</subroom>
<subroom id="1" caption="hall" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="4" py="5"/>
<vertex px="7" py="5"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="14" py="5"/>
<vertex px="17" py="5"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="5"/>
<vertex px="21" py="6"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="10"/>
<vertex px="21" py="15"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="20"/>
<vertex px="21" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="17" py="20"/>
<vertex px="4" py="20"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="0" py="16"/>
<vertex px="0" py="9"/>
</polygon>
</subroom>
<crossings>
<crossing id="0" subroom1_id="0" subroom2_id="1">
<vertex px="7" py="5"/>
<vertex px="14" py="5"/>
</crossing>
</crossings>
</room>
<room id="1" caption="floor">
<subroom id="0" caption="floor" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="21" py="15"/>
<vertex px="34" py="15"/>
</polygon>/Workspace/new_project/Test_1
<polygon caption="wall" type="internal">
<vertex px="34" py="15"/>
<vertex px="34" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="19"/>
<vertex px="32" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="30" py="19"/>
<vertex px="29" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="27" py="19"/>
<vertex px="26" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="24" py="19"/>
<vertex px="21" py="19"/>
</polygon>
</subroom>
<subroom id="1" caption="floor" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="21" py="10"/>
<vertex px="34" py="10"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="10"/>
<vertex px="34" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="0"/>
<vertex px="32" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="30" py="0"/>
<vertex px="29" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="27" py="0"/>
<vertex px="26" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="24" py="0"/>
<vertex px="21" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="0"/>
<vertex px="21" py="6"/>
</polygon>
</subroom>
</room>
</rooms>
<transitions>
<transition id="0" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="20"/>
<vertex px="4" py="20"/>
</transition>
<transition id="1" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="17" py="20"/>
<vertex px="21" py="20"/>
</transition>
<transition id="2" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="20"/>
<vertex px="0" py="16"/>
</transition>
<transition id="3" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="9"/>
<vertex px="0" py="5"/>
</transition>
<transition id="4" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="5"/>
<vertex px="4" py="5"/>
</transition>
<transition id="5" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="17" py="5"/>
<vertex px="21" py="5"/>
</transition>
<transition id="6" caption="transition" type="emergency" room1_id="0" subroom1_id="1" room2_id="1" subroom2_id="0">
<vertex px="21" py="19"/>
<vertex px="21" py="15"/>
</transition>
<transition id="7" caption="transition" type="emergency" room1_id="0" subroom1_id="1" room2_id="1" subroom2_id="1">
<vertex px="21" py="10"/>
<vertex px="21" py="6"/>
</transition>
<transition id="10" caption="main_exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="24" py="19"/>
<vertex px="26" py="19"/>
</transition>
<transition id="11" caption="main_exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="27" py="19"/>
<vertex px="29" py="19"/>
</transition>
<transition id="12" caption="main_exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="30" py="19"/>
<vertex px="32" py="19"/>
</transition>
<transition id="13" caption="main_exit" type="emergency" room1_id="1" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="24" py="0"/>
<vertex px="26" py="0"/>
</transition>
<transition id="14" caption="main_exit" type="emergency" room1_id="1" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="27" py="0"/>
<vertex px="29" py="0"/>
</transition>
<transition id="15" caption="main_exit" type="emergency" room1_id="1" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="30" py="0"/>
<vertex px="32" py="0"/>
</transition>
</transitions>
</geometry>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.8" caption="second life" unit="m"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_geoemtry.xsd">
<rooms>
<room id="0" caption="hall">
<subroom id="0" caption="start" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="7" py="5"/>
<vertex px="7" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="7" py="0"/>
<vertex px="14" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="14" py="0"/>
<vertex px="14" py="5"/>
</polygon>
</subroom>
<subroom id="1" caption="hall" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="4" py="5"/>
<vertex px="7" py="5"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="14" py="5"/>
<vertex px="17" py="5"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="5"/>
<vertex px="21" py="6"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="10"/>
<vertex px="21" py="15"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="20"/>
<vertex px="21" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="17" py="20"/>
<vertex px="4" py="20"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="0" py="16"/>
<vertex px="0" py="9"/>
</polygon>
</subroom>
<crossings>
<crossing id="0" subroom1_id="0" subroom2_id="1">
<vertex px="7" py="5"/>
<vertex px="14" py="5"/>
</crossing>
</crossings>
</room>
<room id="1" caption="floor">
<subroom id="0" caption="floor" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="21" py="15"/>
<vertex px="34" py="15"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="15"/>
<vertex px="34" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="19"/>
<vertex px="32" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="30" py="19"/>
<vertex px="29" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="27" py="19"/>
<vertex px="26" py="19"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="24" py="19"/>
<vertex px="21" py="19"/>
</polygon>
</subroom>
<subroom id="1" caption="floor" class="subroom" A_x="0" B_y="0" C_z="0">
<polygon caption="wall" type="internal">
<vertex px="21" py="10"/>
<vertex px="34" py="10"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="10"/>
<vertex px="34" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="34" py="0"/>
<vertex px="32" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="30" py="0"/>
<vertex px="29" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="27" py="0"/>
<vertex px="26" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="24" py="0"/>
<vertex px="21" py="0"/>
</polygon>
<polygon caption="wall" type="internal">
<vertex px="21" py="0"/>
<vertex px="21" py="6"/>
</polygon>
</subroom>
</room>
</rooms>
<transitions>
<transition id="0" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="20"/>
<vertex px="4" py="20"/>
</transition>
<transition id="1" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="17" py="20"/>
<vertex px="21" py="20"/>
</transition>
<transition id="2" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="20"/>
<vertex px="0" py="16"/>
</transition>
<transition id="3" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="9"/>
<vertex px="0" py="5"/>
</transition>
<transition id="4" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="0" py="5"/>
<vertex px="4" py="5"/>
</transition>
<transition id="5" caption="main exit" type="emergency" room1_id="0" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="17" py="5"/>
<vertex px="21" py="5"/>
</transition>
<transition id="6" caption="transition" type="emergency" room1_id="0" subroom1_id="1" room2_id="1" subroom2_id="0">
<vertex px="21" py="19"/>
<vertex px="21" py="15"/>
</transition>
<transition id="7" caption="transition" type="emergency" room1_id="0" subroom1_id="1" room2_id="1" subroom2_id="1">
<vertex px="21" py="10"/>
<vertex px="21" py="6"/>
</transition>
<transition id="10" caption="main_exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="24" py="19"/>
<vertex px="26" py="19"/>
</transition>
<transition id="11" caption="main_exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="27" py="19"/>
<vertex px="29" py="19"/>
</transition>
<transition id="12" caption="main_exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="30" py="19"/>
<vertex px="32" py="19"/>
</transition>
<transition id="13" caption="main_exit" type="emergency" room1_id="1" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="24" py="0"/>
<vertex px="26" py="0"/>
</transition>
<transition id="14" caption="main_exit" type="emergency" room1_id="1" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="27" py="0"/>
<vertex px="29" py="0"/>
</transition>
<transition id="15" caption="main_exit" type="emergency" room1_id="1" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="30" py="0"/>
<vertex px="32" py="0"/>
</transition>
</transitions>
</geometry>
This diff is collapsed.
Test 1
Pedestrian distribution = All Pedestrian at once
Wating areas = global_timer = false
WA1 => 20 WA2 => 20 [sec]
Test 2
Pedestrian distribution = All Pedestrian at once
Wating areas = 20 seconds global_timer = true
WA1 => 20 WA2 => 20 [sec]
Test 3
Pedestrian distribution = All Pedestrian at once
Wating areas = global_timer = false
WA1 => 60 WA2 => 40 [sec]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment