Skip to content
Snippets Groups Projects
Commit b13c6d4f authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

Change Strategy 3 for large exits

this is only a quick and dirty fix.
parent 0a05650f
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ void OutputHandler::ProgressBar(double TotalPeds, double NowPeds, double simTime
// create the "meter"
int ii=0;
printf("Time: %6.2f s | Evacuation: %3.0f%% [", simTime, fraction*100);
printf(" Time: %6.2f s | Evacuation: %5d (%3.0f%%) [", simTime, (int)NowPeds, fraction*100);
// part that's full already
for ( ; ii < dotz; ii++) {
printf("=");
......
......@@ -88,8 +88,8 @@ xsi:noNamespaceSchemaLocation="http:xsd.jupedsim.org/jps_ini_core.xsd">
<group group_id="7" agent_parameter_id="1" room_id="0" subroom_id="7" number="0" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="8" agent_parameter_id="1" room_id="0" subroom_id="8" number="0" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="9" agent_parameter_id="1" room_id="0" subroom_id="9" number="0" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="10" agent_parameter_id="1" room_id="0" subroom_id="10" number="200" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="11" agent_parameter_id="1" room_id="0" subroom_id="11" number="200" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="10" agent_parameter_id="1" room_id="0" subroom_id="10" number="10" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="11" agent_parameter_id="1" room_id="0" subroom_id="11" number="10" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<!-- U8 -> U9 -->
<group group_id="12" agent_parameter_id="1" room_id="1" subroom_id="0" number="0" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="13" agent_parameter_id="1" room_id="1" subroom_id="1" number="0" goal_id="-1" router_id="1" pre_movement_mean="60" pre_movement_sigma="60"/>
......@@ -230,10 +230,12 @@ xsi:noNamespaceSchemaLocation="http:xsd.jupedsim.org/jps_ini_core.xsd">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>4</exit_crossing_strategy>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped nu="3" b="0.25" c="3.0"/>
<force_wall nu="10" b="0.70" c="3.0"/>
<!-- <force_ped nu="3" b="0.25" c="3.0"/> -->
<!-- <force_wall nu="10" b="0.70" c="3.0"/> -->
<force_ped nu="0.4" b="0.034229" c="2.450932"/>
<force_wall nu="3" b="0.034229" c="2.450932"/>
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.0" sigma="0.2" />
......@@ -243,11 +245,11 @@ xsi:noNamespaceSchemaLocation="http:xsd.jupedsim.org/jps_ini_core.xsd">
<escalator_downstairs mu="0.5" sigma="0.0" /> -->
<v0_idle_escalator_upstairs mu="0.5" sigma="0.0" />
<v0_idle_escalator_downstairs 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" />
<bmax mu="0.2" 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" />
<atau mu="0.2" sigma="0.001" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="0" sigma="0.0" />
......
......@@ -94,12 +94,19 @@ Point DirectionInRangeBottleneck::GetTarget(Room* room, Pedestrian* ped) const
Point ExitMiddle = (p1+p2)*0.5;
double d = 0.2;
// fix when using triangulation to avoid steering too near to the walls
if (ExitLine.LengthSquare() >= 16)
double lenSq = ExitLine.LengthSquare();
if (lenSq >= 16 && lenSq < 50)
d = 1;
else if(lenSq >= 50 &&lenSq < 100)
d = 2;
else if(lenSq >= 100)
d = 3;
Point diff = (p1 - p2).Normalized() * d;
Line e_neu = Line(p1 - diff, p2 + diff);
// if(ped->GetID() == -10)
// if(ped->GetID() == )
// {
// printf("=======\nX=[%.2f], Y=[%.2f]\n", ped->GetPos().GetX(), ped->GetPos().GetY());
// printf("p1=[%.2f, %.2f], p2=[%.2f, %.2f]\n", p1.GetX(), p1.GetY(), p2.GetX(), p2.GetY());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment