Commit 548a76e5 authored by Andrijana Brkic's avatar Andrijana Brkic

new inputfiles for bidirectional, experiment, latest version of the VoronoiPositionGenerator

parent 2ece96d1
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.5" caption="hybrid test" unit="m" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_geometry.xsd">
<rooms>
<room id="0" caption="hall0">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="0.0" py="2.8" />
<vertex px="0.0" py="0.0" />
<vertex px="3.6" py="0.0" />
</polygon>
<polygon caption="wall">
<vertex px="5.2" py="0.0" />
<vertex px="9.2" py="0.0" />
<vertex px="9.2" py="2.8" />
</polygon>
<polygon caption="wall">
<vertex px="9.2" py="6.4" />
<vertex px="9.2" py="9.2" />
<vertex px="5.6" py="9.2" />
</polygon>
<polygon caption="wall">
<vertex px="3.2" py="9.2" />
<vertex px="0.0" py="9.2" />
<vertex px="0.0" py="6.4" />
</polygon>
</subroom>
</room>
<room id="1" caption="hall1">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="3.6" py="-2.0" />
<vertex px="3.6" py="0.0" />
</polygon>
<polygon caption="wall">
<vertex px="5.2" py="-2.0" />
<vertex px="5.2" py="0.0" />
</polygon>
</subroom>
</room>
<room id="2" caption="hall2">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="9.2" py="2.8" />
<vertex px="13.2" py="2.8" />
</polygon>
<polygon caption="wall">
<vertex px="9.2" py="6.4" />
<vertex px="13.2" py="6.4" />
</polygon>
</subroom>
<subroom id="1" closed="0" class="floor">
<polygon caption="wall">
<vertex px="13.2" py="2.8" />
<vertex px="17.2" py="2.8" />
</polygon>
<polygon caption="wall">
<vertex px="13.2" py="6.4" />
<vertex px="17.2" py="6.4" />
</polygon>
</subroom>
<crossings>
<crossing id="0" subroom1_id="0" subroom2_id="1">
<vertex px="13.2" py="2.8" />
<vertex px="13.2" py="6.4" />
</crossing>
</crossings>
</room>
<room id="3" caption="hall3">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="3.2" py="9.2" />
<vertex px="3.2" py="11.2" />
</polygon>
<polygon caption="wall">
<vertex px="5.6" py="9.2" />
<vertex px="5.6" py="11.2" />
</polygon>
</subroom>
</room>
<room id="4" caption="hall4">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="0.0" py="2.8" />
<vertex px="-2.0" py="2.8" />
</polygon>
<polygon caption="wall">
<vertex px="0.0" py="6.4" />
<vertex px="-2.0" py="6.4" />
</polygon>
</subroom>
</room>
</rooms>
<transitions>
<transition id="0" caption="exit" type="emergency" room1_id="0" subroom1_id="0" room2_id="1" subroom2_id="0">
<vertex px="3.6" py="0.0" />
<vertex px="5.2" py="0.0" />
</transition>
<transition id="1" caption="exit" type="emergency" room1_id="0" subroom1_id="0" room2_id="2" subroom2_id="0">
<vertex px="9.2" py="2.8" />
<vertex px="9.2" py="6.4" />
</transition>
<transition id="2" caption="exit" type="emergency" room1_id="0" subroom1_id="0" room2_id="3" subroom2_id="0">
<vertex px="3.2" py="9.2" />
<vertex px="5.6" py="9.2" />
</transition>
<transition id="3" caption="exit" type="emergency" room1_id="0" subroom1_id="0" room2_id="4" subroom2_id="0">
<vertex px="0.0" py="2.8" />
<vertex px="0.0" py="6.4" />
</transition>
<transition id="4" caption="exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="3.6" py="-2.0" />
<vertex px="5.20" py="-2.0" />
</transition>
<transition id="5" caption="exit" type="emergency" room1_id="2" subroom1_id="1" room2_id="-1" subroom2_id="-1">
<vertex px="17.2" py="2.8" />
<vertex px="17.2" py="6.4" />
</transition>
<transition id="6" caption="exit" type="emergency" room1_id="3" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="3.2" py="11.2" />
<vertex px="5.6" py="11.2" />
</transition>
<transition id="7" caption="exit" type="emergency" room1_id="4" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="-2.0" py="2.8" />
<vertex px="-2.0" py="6.4" />
</transition>
</transitions>
</geometry>
<?xml version="1.0" encoding="UTF-8" ?>
<JuPedSim project="JPS-Project" version="0.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
<!-- geometry file -->
<geometry>bidirectional_traj.xml</geometry>
<max_sim_time>5000</max_sim_time>
<!-- trajectories file and format -->
<trajectories format="xml-plain" fps="16" color_mode="final_goal">
<file location="hybrid_hall_traj_bi.xml" />
<socket_ hostname="127.0.0.1" port="8989" />
</trajectories>
<!-- Parameters for the hybrid (matsim) server mode -->
<hybrid_simulation_ server="zam763" port="9999" />
<!--<hybrid_simulation server="zam597" port="9999" />-->
<!-- where to store the logs -->
<!--<logfile>outputfiles/log.txt</logfile> -->
<!-- traffic information: e.g closed doors or smoked rooms -->
<traffic_constraints>
<!-- doors states are: close or open -->
<doors>
<!-- <door trans_id="5" caption="exit" state="close" /> -->
</doors>
</traffic_constraints>
<routing>
<goals>
<goal id="3" final="true" caption="goal3">
<polygon>
<vertex px="3.2" py="12.0" />
<vertex px="3.2" py="13.0" />
<vertex px="5.6" py="13.0" />
<vertex px="5.6" py="12.0" />
<vertex px="3.2" py="12.0" />
</polygon>
</goal>
<goal id="1" final="true" caption="goal1">
<polygon>
<vertex px="3.6" py="-3.0" />
<vertex px="3.6" py="-4.0" />
<vertex px="5.2" py="-4.0" />
<vertex px="5.2" py="-3.0" />
<vertex px="3.6" py="-3.0" />
</polygon>
</goal>
<goal id="2" final="true" caption="goal2">
<polygon>
<vertex px="18" py="2.8" />
<vertex px="19" py="2.8" />
<vertex px="19" py="6.4" />
<vertex px="18" py="6.4" />
<vertex px="18" py="2.8" />
</polygon>
</goal>
<goal id="4" final="true" caption="goal4">
<polygon>
<vertex px="-3.0" py="2.8" />
<vertex px="-4.0" py="2.8" />
<vertex px="-4.0" py="6.4" />
<vertex px="-3.0" py="6.4" />
<vertex px="-3.0" py="2.8" />
</polygon>
</goal>
</goals>
</routing>
<!--persons information and distribution -->
<agents operational_model_id="3">
<agents_distribution>
<group group_id="0" room_id="0" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" x_min="3" x_max="5" y_min="3" y_max="5" />
<group group_id="1" room_id="1" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" goal_id="2" />
<group group_id="2" room_id="2" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" />
<group group_id="3" room_id="3" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" goal_id="2" />
<group group_id="4" room_id="4" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" goal_id="2" />
<!-- real start group -->
<group group_id="5" room_id="0" subroom_id="0" number="60" router_id="1" agent_parameter_id="1" goal_id="2" y_min="5.2"/>
<group group_id="6" room_id="2" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" goal_id="4" />
<group group_id="7" room_id="1" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" start_x="4.5" start_y="-1.63" goal_id="4" />
</agents_distribution>
<agents_sources><!-- frequency in persons/seconds -->
<source id="1" frequency="2" agents_max="80" group_id="6" caption="source 1" />
<source_ id="2" frequency="5" agents_max="80" group_id="5" caption="source 2" />
<source_ id="3" frequency="10" agents_max="50" group_id="3" caption="source 3" />
<source_ id="4" frequency="10" agents_max="50" group_id="4" caption="source 4" />
</agents_sources>
</agents>
<operational_models>
<model operational_model_id="1" description="gcfm">
<model_parameters>
<solver>euler</solver>
<stepsize>0.001</stepsize>
<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="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="0.5" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="0.5" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
</model>
<model operational_model_id="2" description="gompertz">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="3.4" />
<force_ped nu="3" b="0.25" c="3.0" />
<force_wall nu="10" b="0.70" c="3.0" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.0" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="1.3" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
</model>
<model operational_model_id="3" description="Tordeux2015">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>2</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped a="5" D="0.1" />
<force_wall a="5" D="0.02" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.0" sigma="0.001" />
<bmax mu="0.15" sigma="0.00000" /> <!-- this is l, assuming peds are circles with constant radius -->
<bmin mu="0.15" sigma="0.00000" />
<amin mu="0.15" sigma="0.00000" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.0" sigma="0.00000" />
<T mu="1" sigma="0.001" />
</agent_parameters>
</model>
</operational_models>
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters></parameters>
</router>
<router router_id="2" description="quickest">
<parameters></parameters>
</router>
</route_choice_models>
</JuPedSim>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.5" caption="hybrid test" unit="m" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_geometry.xsd">
<rooms>
<room id="0" caption="hall0">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="2.5" py="1.5" />
<vertex px="2.5" py="0.0" />
<vertex px="-1.0" py="0.0" />
<!-- <vertex px="0.0" py="1.5" />
</polygon>
<polygon caption="wall">
<vertex px="0.0" py="3.5" /> -->
<vertex px="-1.0" py="5.0" />
<vertex px="2.5" py="5.0" />
<vertex px="2.5" py="3.5" />
</polygon>
</subroom>
</room>
<room id="1" caption="hall1">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="2.5" py="3.5" />
<vertex px="3.0" py="3.5" />
<vertex px="3.0" py="4.5" />
<vertex px="7.0" py="4.5" />
<vertex px="7.0" py="3.7" />
</polygon>
<polygon caption="wall">
<vertex px="2.5" py="1.5" />
<vertex px="3.0" py="1.5" />
<vertex px="3.0" py="0.5" />
<vertex px="7.0" py="0.5" />
<vertex px="7.0" py="1.3" />
</polygon>
</subroom>
</room>
<room id="2" caption="hall2">
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="7.0" py="3.7" />
<vertex px="15.0" py="3.7" />
<vertex px="15.0" py="2.9" />
</polygon>
<polygon caption="wall">
<vertex px="7.0" py="1.3" />
<vertex px="15.0" py="1.3" />
<vertex px="15.0" py="2.1" />
</polygon>
</subroom>
</room>
</rooms>
<transitions>
<transition id="0" caption="exit" type="emergency" room1_id="0" subroom1_id="0" room2_id="1" subroom2_id="0">
<vertex px="2.5" py="1.5" />
<vertex px="2.5" py="3.5" />
</transition>
<transition id="1" caption="exit" type="emergency" room1_id="1" subroom1_id="0" room2_id="2" subroom2_id="0">
<vertex px="7.0" py="1.3" />
<vertex px="7.0" py="3.7" />
</transition>
<!-- <transition id="2" caption="exit" type="emergency" room1_id="0" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="0.0" py="1.5" />
<vertex px="0.0" py="3.5" />
</transition> -->
<transition id="3" caption="exit" type="emergency" room1_id="2" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="15.0" py="2.9" />
<vertex px="15.0" py="2.1" />
</transition>
</transitions>
</geometry>
<?xml version="1.0" encoding="UTF-8" ?>
<JuPedSim project="JPS-Project" version="0.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.jupedsim.org/0.6/jps_ini_core.xsd">
<!-- seed used for initialising random generator -->
<seed>12542</seed>
<!-- geometry file -->
<geometry>experiment_traj.xml</geometry>
<max_sim_time>4000</max_sim_time>
<!-- trajectories file and format -->
<trajectories format="xml-plain" fps="16">
<file location="../../../../Documents/Documentation/Experiment/trajectories2/traj_10.xml" />
<socket_ hostname="127.0.0.1" port="8989" />
</trajectories>
<!-- Parameters for the hybrid (matsim) server mode -->
<hybrid_simulation_ server="zam763" port="9999" />
<!--<hybrid_simulation server="zam597" port="9999" />-->
<!-- where to store the logs -->
<!--<logfile>outputfiles/log.txt</logfile> -->
<!-- traffic information: e.g closed doors or smoked rooms -->
<traffic_constraints>
<!-- doors states are: close or open -->
</traffic_constraints>
<routing>
<goals>
<goal id="1" final="true" caption="goal1">
<polygon>
<vertex px="16.0" py="3.7" />
<vertex px="16.0" py="1.3" />
<vertex px="17.0" py="1.3" />
<vertex px="17.0" py="3.7" />
<vertex px="16.0" py="3.7" />
</polygon>
</goal>
</goals>
</routing>
<!--persons information and distribution -->
<agents operational_model_id="3">
<agents_distribution>
<group group_id="0" room_id="0" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" x_min="3" x_max="5" y_min="3" y_max="5" />
<group group_id="1" room_id="1" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" />
<group group_id="2" room_id="2" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" />
<group group_id="3" room_id="0" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" />
<group group_id="4" room_id="0" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" />
<!-- real start group -->
<group group_id="5" room_id="1" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" goal_id="1" />
<group group_id="6" room_id="0" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" goal_id="1" />
<group group_id="7" room_id="1" subroom_id="0" number="0" router_id="1" agent_parameter_id="1" start_x="4.5" start_y="-1.63" goal_id="1" />
</agents_distribution>
<agents_sources><!-- frequency in persons/seconds -->
<source id="1" frequency="5" agents_max="350" group_id="6" caption="source 1" />
<source_ id="2" frequency="10" agents_max="50" group_id="2" caption="source 2" />
<source_ id="3" frequency="10" agents_max="50" group_id="3" caption="source 3" />
<source_ id="4" frequency="10" agents_max="50" group_id="4" caption="source 4" />
</agents_sources>
</agents>
<operational_models>
<model operational_model_id="1" description="gcfm">
<model_parameters>
<solver>euler</solver>
<stepsize>0.001</stepsize>
<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="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="0.5" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="0.5" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
</model>
<model operational_model_id="2" description="gompertz">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="3.4" />
<force_ped nu="3" b="0.25" c="3.0" />
<force_wall nu="10" b="0.70" c="3.0" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.7" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="1.3" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.5" sigma="0.001" />
</agent_parameters>
</model>
<model operational_model_id="3" description="Tordeux2015">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>2</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped a="5" D="0.1" />
<force_wall a="5" D="0.02" />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.7" sigma="0.001" />
<bmax mu="0.15" sigma="0.00000" /> <!-- this is l, assuming peds are circles with constant radius -->
<bmin mu="0.15" sigma="0.00000" />
<amin mu="0.15" sigma="0.00000" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.0" sigma="0.00000" />
<T mu="1" sigma="0.001" />
</agent_parameters>
</model>
</operational_models>
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters></parameters>
</router>
<router router_id="2" description="quickest">
<parameters></parameters>
</router>
</route_choice_models>
</JuPedSim>
......@@ -42,11 +42,11 @@
<subroom id="0" closed="0" class="floor">
<polygon caption="wall">
<vertex px="9.2" py="2.8" />
<vertex px="17.2" py="2.8" />
<vertex px="13.2" py="2.8" />
</polygon>
<polygon caption="wall">
<vertex px="9.2" py="6.4" />
<vertex px="17.2" py="6.4" />
<vertex px="13.2" py="6.4" />
</polygon>
</subroom>
</room>
......@@ -98,8 +98,8 @@
<vertex px="5.20" py="-2.0" />
</transition>
<transition id="5" caption="exit" type="emergency" room1_id="2" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="17.2" py="2.8" />
<vertex px="17.2" py="6.4" />
<vertex px="13.2" py="2.8" />
<vertex px="13.2" py="6.4" />
</transition>
<transition id="6" caption="exit" type="emergency" room1_id="3" subroom1_id="0" room2_id="-1" subroom2_id="-1">
<vertex px="3.2" py="11.2" />
......
......@@ -10,7 +10,7 @@
<!-- trajectories file and format -->
<trajectories format="xml-plain" fps="16">
<file location="hybrid_hall_trajectories.xml" />
<file location="hybrid_hall_traj.xml" />
<socket_ hostname="127.0.0.1" port="8989" />
</trajectories>
......@@ -85,7 +85,7 @@
</agents_distribution>
<agents_sources><!-- frequency in persons/seconds -->
<source id="1" frequency="5" agents_max="100" group_id="6" caption="source 1" />
<source id="1" frequency="7" agents_max="100" group_id="6" caption="source 1" />
<source_ id="2" frequency="10" agents_max="50" group_id="2" caption="source 2" />
<source_ id="3" frequency="10" agents_max="50" group_id="3" caption="source 3" />
<source_ id="4" frequency="10" agents_max="50" group_id="4" caption="source 4" />
......@@ -99,7 +99,7 @@
<solver>euler</solver>
<stepsize>0.001</stepsize>
<exit_crossing_strategy>4</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<linkedcells enabled="true" cell_size="2.3" />
<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
<force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
</model_parameters>
......@@ -153,7 +153,7 @@
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>2</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<linkedcells enabled="true" cell_size="2.3" />
<force_ped a="5" D="0.1" />
<force_wall a="5" D="0.02" />
</model_parameters>
......
This diff is collapsed.
......@@ -189,6 +189,7 @@ bool ComputeBestPositionVoronoiBoost(AgentsSource* src, std::vector<Pedestrian*>
}
//TODO: dividing by 0 when existing_peds is empty
// -------> existing_peds is not empty because of the if statement
// sum up the weighted velocity in the loop
v = v/no; //this is the mean of all velocities
......@@ -206,7 +207,7 @@ bool ComputeBestPositionVoronoiBoost(AgentsSource* src, std::vector<Pedestrian*>
voronoi_diagram<double>::const_vertex_iterator chosen_it = vd.vertices().begin();
double dis = 0;
VoronoiBestVertexRandMax(discrete_positions, vd, subroom, factor, chosen_it, dis, radius);
VoronoiBestVertexMax(discrete_positions, vd, subroom, factor, chosen_it, dis, radius, goal_vector, *iter_ped );
if( dis > 4*radius*factor*radius*factor)// be careful with the factor!! radius*factor, 2,3,4?
{
......@@ -297,10 +298,13 @@ void VoronoiAdjustVelocityNeighbour( const voronoi_diagram<double>& vd, voronoi_
//gives the voronoi vertex with max distance
void VoronoiBestVertexMax (const std::vector<Point>& discrete_positions, const voronoi_diagram<double>& vd, SubRoom* subroom,
double factor, voronoi_diagram<double>::const_vertex_iterator& max_it, double& max_dis, double radius, const std::vector<int>& goal_vector )
double factor, voronoi_diagram<double>::const_vertex_iterator& max_it, double& max_dis, double radius,
const std::vector<int>& goal_vector, Pedestrian* ped )
{
double dis = 0;
double score = -100; //calculated using distance and considerring the goal
double score;
double max_score = -100; //calculated using distance and considerring the goal
for (auto it = vd.vertices().begin(); it != vd.vertices().end(); ++it)
......@@ -316,9 +320,42 @@ void VoronoiBestVertexMax (const std::vector<Point>& discrete_positions, const v
Point p = discrete_positions[index];
dis = ( p.GetX() - it->x() )*( p.GetX() - it->x() ) + ( p.GetY() - it->y() )*( p.GetY() - it->y() ) ;
if(dis > max_dis)
score = dis;
//constructing the checking line
//ped->SetPos(vert_pos);
Point p2 = (ped->GetExitLine()->ShortestPoint(vert_pos)-vert_pos).Normalized(); //problem: ped does not have a position
p2 = p2 + p2; //looking 2m in front
//Point p2 = nav_line->GetPoint1() - nav_line->GetPoint2() ;
//p2 = p2/ p2.Norm();
//p2 = p2+p2;
//p2 = nav_line->GetPoint1() + p2;
Line check_line(vert_pos, vert_pos + p2); //this is the first 2m of exit line
do
{
//do something
if( goal_vector[index]!=-3 && goal_vector[index]!=ped->GetFinalDestination() ) //
if( check_line.IntersectionWithCircle(p,1.0) ) //0.7 because the radius is around 0.3
{
score -= 100;
break;
}
//change edge
edge = edge->rot_next();
index = ( edge->cell() )->source_index();
p = discrete_positions[index]/factor;
} while( edge != vertex.incident_edge() );
if(score > max_score)
{
max_dis = dis;
max_score =score;
max_dis = dis;
max_it = it;
}
}
......@@ -409,7 +446,7 @@ void VoronoiBestVertexRand (const std::vector<Point>& discrete_positions, const
}
//now we have all the possible vertices and their distances and we can choose one randomly
//TODO: get the seed from the simulation/argumentparser
srand (time(NULL));
//srand (time(NULL));
unsigned int i = rand() % possible_vertices.size();
chosen_it = possible_vertices[i];
dis = distances[i];
......
......@@ -53,7 +53,7 @@ class Point;
* @param radius, radius of a person
*/
void VoronoiBestVertexMax (const std::vector<Point>& discrete_positions, const voronoi_diagram<double>& vd, SubRoom* subroom, double factor,