Commit 6d8fe37c authored by Ulrich Kemloh's avatar Ulrich Kemloh

Add a Fallback when a route cannot be found. The issue still need to be

solved
parent 4f9d69a1
......@@ -568,19 +568,19 @@ void Simulation::UpdateFlowAtDoors(const Pedestrian& ped) const
{
trans->IncreaseDoorUsage(1, ped.GetGlobalTime());
}
if(ped.GetExitIndex()==0)
{
cout<<"exi 1t: "<<endl;exit(0);
}
if(trans->GetUniqueID()==0)
{
cout<<"exit 2: "<<endl;exit(0);
}
if(trans->GetID()==0)
{
cout<<"exit 3: "<<endl;exit(0);
}
// if(ped.GetExitIndex()==0)
// {
// cout<<"exi 1t: "<<endl;exit(0);
// }
//
// if(trans->GetUniqueID()==0)
// {
// cout<<"exit 2: "<<endl;exit(0);
// }
// if(trans->GetID()==0)
// {
// cout<<"exit 3: "<<endl;exit(0);
// }
}
}
......
......@@ -61,7 +61,7 @@
#endif
// precision error
#define J_EPS 0.001
#define J_EPS 0.001//0.001
#define J_EPS_EVENT 0.00001 //zum pruefen des aktuellen Zeitschrittes auf events
#define J_EPS_DIST 0.05// [m]
......
......@@ -15,7 +15,7 @@
<vertex px="0.0" py="4.0" />
<vertex px="0.0" py="3.0" />
</polygon>
<obstacle id="0">
<obstacle_ id="0">
<polygon>
<vertex px="1" py="3"></vertex>
<vertex px="2" py="3"></vertex>
......@@ -23,7 +23,7 @@
<vertex px="1" py="2"></vertex>
<vertex px="1" py="3"></vertex>
</polygon>
</obstacle>
</obstacle_>
</subroom>
<subroom id="1" class="stair" A_x="-1.2" B_y="0" C="0">
......
......@@ -22,27 +22,27 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
</traffic_constraints>
<routing>
<goals>
<goal id="0" final="true" caption="goal 0">
<polygon>
<vertex px="0.0" py="-5.0" />
<vertex px="2.0" py="-5.0" />
<vertex px="2.0" py="-7.0" />
<vertex px="0.0" py="-7.0" />
<vertex px="0.0" py="-5.0" />
</polygon>
</goal>
</goals>
<!-- <goals> -->
<!-- <goal id="0" final="true" caption="goal 0"> -->
<!-- <polygon> -->
<!-- <vertex px="0.0" py="-5.0" /> -->
<!-- <vertex px="2.0" py="-5.0" /> -->
<!-- <vertex px="2.0" py="-7.0" /> -->
<!-- <vertex px="0.0" py="-7.0" /> -->
<!-- <vertex px="0.0" py="-5.0" /> -->
<!-- </polygon> -->
<!-- </goal> -->
<!-- </goals> -->
</routing>
<!--persons information and distribution -->
<agents operational_model_id="2">
<agents_distribution>
<group group_id="3" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" goal_id="-1" router_id="1" />
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="10" goal_id="-1" router_id="1" />
<group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="0" number="10" goal_id="-1" router_id="1"
pre_movement_mean="15" pre_movement_sigma="0.6" />
<group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" number="10" goal_id="-1" router_id="1" />
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" goal_id="-1" router_id="1" />
<group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" goal_id="-1" router_id="1"
pre_movement_mean="-15" pre_movement_sigma="0.6" />
</agents_distribution>
<!-- frequency in persons/minute -->
......@@ -97,14 +97,16 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<route_choice_models>
<router router_id="1" description="global_shortest">
<parameters>
<navigation_lines file="routing.xml" />
</parameters>
</router>
<router router_id="2" description="quickest">
<parameters>
<navigation_lines file="routing.xml" />
<!-- <navigation_lines file="routing.xml" /> -->
<navigation_mesh use_for_local_planning="false" method="triangulation"/>
</parameters>
</router>
<!-- <router router_id="2" description="quickest"> -->
<!-- <parameters> -->
<!-- <navigation_lines file="routing.xml" /> -->
<!-- <navigation_mesh use_for_local_planning="true" method="triangulation"/> -->
<!-- </parameters> -->
<!-- </router> -->
</route_choice_models>
......
......@@ -3,6 +3,16 @@
<routing version="0.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_routing.xsd" >
<Hlines>
<Hlines>
<!-- <Hline id="1" room_id="1" subroom_id="2"> -->
<!-- <vertex px="25" py="1" /> -->
<!-- <vertex px="27" py="1" /> -->
<!-- </Hline> -->
<!-- <Hline id="2" room_id="1" subroom_id="2"> -->
<!-- <vertex px="-5" py="1" /> -->
<!-- <vertex px="-7" py="1" /> -->
<!-- </Hline> -->
</Hlines>
</routing>
This diff is collapsed.
......@@ -172,22 +172,22 @@ private:
/**
* @return true if the supplied line is a wall.
*/
bool IsWall(const Line& line) const;
bool IsWall(const Line& line, const std::vector<SubRoom*>& subrooms) const;
/**
* @return true if the supplied line is a Crossing.
*/
bool IsCrossing(const Line& line) const;
bool IsCrossing(const Line& line, const std::vector<SubRoom*>& subrooms) const;
/**
* @return true if the supplied line is a Transition.
*/
bool IsTransition(const Line& line) const;
bool IsTransition(const Line& line, const std::vector<SubRoom*>& subrooms) const;
/**
* @return true if the supplied line is a navigation line.
*/
bool IsHline(const Line& line) const;
bool IsHline(const Line& line, const std::vector<SubRoom*>& subrooms) const;
/**
* @return the minimum distance between the point and any line in the subroom.
......
......@@ -843,7 +843,7 @@ int QuickestPathRouter::GetBestDefaultRandomExit(Pedestrian* ped)
//check if visible
if(_building->IsVisible(posA, posC, _subroomsAtElevation[sub->GetMaxElevation()],true)==false)
if(_building->IsVisible(posA, posC, _subroomsAtElevation[sub->GetElevation(sub->GetCentroid())],true)==false)
//if (sub->IsVisible(posA, posC, true) == false)
{
ped->RerouteIn(10);
......
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