Commit 0d294c88 authored by Erik Andresen's avatar Erik Andresen

Delete needless files and lines

parent 396a2dc9
......@@ -239,7 +239,6 @@ set ( source_files
routing/cognitive_map/cognitiveMap/landmark.cpp
routing/cognitive_map/cognitiveMap/youareherepointer.cpp
routing/cognitive_map/cognitiveMap/cogmapoutputhandler.cpp
routing/cognitive_map/Tools/triangle.cpp
visiLibity/source_code/visilibity.cpp
......@@ -293,7 +292,6 @@ set ( header_files
routing/cognitive_map/cognitiveMap/landmark.h
routing/cognitive_map/cognitiveMap/youareherepointer.h
routing/cognitive_map/cognitiveMap/cogmapoutputhandler.cpp
routing/cognitive_map/Tools/triangle.h
visiLibity/source_code/visilibity.hpp
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
<seed>12542</seed>
<max_sim_time>900</max_sim_time>
<!-- geometry file -->
<geometry>tgftestcognitivemap.xml</geometry>
<geometry>landmarktest4.xml</geometry>
<!-- trajectories file and format -->
<trajectories format="xml-plain" fps="8">
<!--file location="trajectories.xml" /-->
......@@ -59,57 +59,48 @@
</routing>
<!--persons information and distribution -->
<agents operational_model_id="3">
<agents operational_model_id="1">
<agents_distribution>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" router_id="1" />
<group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="1" number="20" router_id="1" />
<!--group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" router_id="1" /-->
<!--group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="1" number="20" router_id="7" /-->
<group group_id="3" agent_parameter_id="1" room_id="0" subroom_id="3" number="1" router_id="7" />
<!--group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="16" number="20" router_id="1" /-->
</agents_distribution>
</agents>
<!-- These parameters may be overwritten -->
<operational_models>
<model operational_model_id="3" description="Tordeux2015">
<operational_models>
<model operational_model_id="1" description="gcfm">
<model_parameters>
<solver>euler</solver>
<periodic>1</periodic>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="30"/>
<force_ped a="5" D="0.1"/>
<force_wall a="5" D="0.02"/>
<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="1.34" sigma="0.0" />
<bmax mu="0.15" sigma="0.0" /> <!-- this is l/2, assuming peds are circles with constant radius-->
<bmin mu="0.15" sigma="0.0" />
<amin mu="0.15" sigma="0.0" />
<tau mu="0.5" sigma="0.0" />
<atau mu="0." sigma="0.0" />
<T mu="1" sigma="0.0" />
</agent_parameters>
<agent_parameters agent_parameter_id="2">
<v0 mu="0.01" sigma="0.0" />
<bmax mu="0.15" sigma="0.0" /> <!-- this is l/2, assuming peds are circles with constant radius-->
<bmin mu="0.15" sigma="0.0" />
<amin mu="0.15" sigma="0.0" />
<tau mu="0.5" sigma="0.0" />
<atau mu="0." sigma="0.0" />
<T mu="1" sigma="0.0" />
<v0 mu="1.24" sigma="0.001" />
<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>
</operational_models>
</operational_models>
<route_choice_models>
<router router_id="1" description="quickest">
<parameters>
<navigation_lines file="routing.xml" />
<!--navigation_lines file="routing.xml" /-->
</parameters>
</router>
<router router_id="7" description="cognitive_map">
<sensors>
<!--sensor sensor_id="1" description="Room2Corridor"/-->
<!--sensor sensor_id="1" description="JamSensor"/-->
<!--sensor sensor_id="1" description="Smoke" p_field_path="D:\JuPedSim\jpscore\inputfiles\cognitive_map\pFields\" update_time="30" final_time="90"/-->
</sensors>
<cognitive_map status="empty"/>
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<geometry version="0.6" caption="offenbach" unit="m">
<geometry version="0.7" caption="offenbach" unit="m">
<rooms>
......
......@@ -4,7 +4,7 @@
<!-- header: seed, geometry, output format -->
<seed>3011</seed>
<seed>3012</seed>
<max_sim_time>600</max_sim_time>
<!--maxCPU>1</maxCPU-->
......@@ -54,7 +54,7 @@
<agents operational_model_id="2">
<agents_distribution>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="200" router_id="7" pre_movement_mean="60" pre_movement_sigma="60"/>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="20" router_id="7" pre_movement_mean="60" pre_movement_sigma="60"/>
<!--group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="1" number="10" router_id="7" pre_movement_mean="30" pre_movement_sigma="30"/>/
<group group_id="3" agent_parameter_id="1" room_id="0" subroom_id="2" number="10" router_id="7" pre_movement_mean="30" pre_movement_sigma="30"/-->
</agents_distribution>
......@@ -67,7 +67,7 @@
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>3</exit_crossing_strategy>
<exit_crossing_strategy>4</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.7" c="3.0" />
......
This diff is collapsed.
......@@ -39,8 +39,6 @@
using namespace std;
/**
* Constructors & Destructors
*/
......@@ -86,23 +84,6 @@ const GraphEdge * GraphNetwork::GetDestination() const
{
SubRoom * sub_room = building->GetRoom(pedestrian->GetRoomID())->GetSubRoom(pedestrian->GetSubRoomID());
// ///Route Knowlegde
// if (!_RKnowlegde.GetRememberedRooms().empty())
// {
// ///Room seems to be familiar?
// if (!_RKnowlegde.RoomIsFamiliar((*navigation_graph)[sub_room]))
// {
// /// not familiar (go back or use other tactics)
// return nullptr;
// }
// else
// {
// return _RKnowlegde.NextDoorOnRoute((*navigation_graph)[sub_room]);
// }
// }
// return nullptr;
return (*navigation_graph)[sub_room]->GetCheapestDestinationByEdges(pedestrian->GetPos());
}
......@@ -129,14 +110,6 @@ std::vector<const GraphEdge *>& GraphNetwork::GetDestinations()
return destinations;
}
//void GraphNetwork::CreateRouteKnowlegde(const Pedestrian *pedestrian)
//{
// SubRoom * sub_room = building->GetRoom(pedestrian->GetRoomID())->GetSubRoom(pedestrian->GetSubRoomID());
// NextDoorKnowlegde ndknowlegde = (*navigation_graph)[sub_room]->GetShortestPathFromHere(pedestrian->GetPos());
// _RKnowlegde = RouteKnowlegde(ndknowlegde);
//}
bool GraphNetwork::ChangedSubRoom() const
{
......
......@@ -74,8 +74,6 @@ public:
bool HadNoDestination() const;
void AddDestination(const GraphEdge *);
std::vector<const GraphEdge *> & GetDestinations();
// Route knowlegde will be created using memory (depending on probabilites) of shortest path
//void CreateRouteKnowlegde(const Pedestrian * pedestrian);
bool ChangedSubRoom() const;
void UpdateSubRoom();
......@@ -86,7 +84,6 @@ private:
const Pedestrian * const pedestrian;
const SubRoom * current_subroom = NULL;
std::vector<const GraphEdge *> destinations;
//RouteKnowlegde _RKnowlegde;
};
......
......@@ -226,7 +226,7 @@ const GraphEdge * GraphVertex::GetCheapestDestinationByEdges(const Point & posit
const GraphEdge * GraphVertex::GetLocalCheapestDestination(const Point & position) const
{
int maximum_factor_distance = 1;
//int maximum_factor_distance = 1;
std::priority_queue<
std::pair<double, const GraphEdge *>,
......@@ -237,112 +237,33 @@ const GraphEdge * GraphVertex::GetLocalCheapestDestination(const Point & positio
edges.push(std::make_pair((*it)->GetFactor(), (*it)));
}
if(edges.size() == 1) return edges.top().second;
if(edges.size() > 1) {
double best_factor = edges.top().first;
const GraphEdge * act_edge = NULL;
//take the best edges and choose the nearest
while(!edges.empty()) {
if(edges.size() >= 1) return edges.top().second;
else return nullptr;
// if(edges.size() > 1) {
// double best_factor = edges.top().first;
// const GraphEdge * act_edge = nullptr;
// //take the best edges and choose the nearest
// while(!edges.empty()) {
//Log->Write("Best factor: %f ; act edge factor: %f", best_factor, edges.top().first);
// //Log->Write("Best factor: %f ; act edge factor: %f", best_factor, edges.top().first);
//if the factor is worse than maximum_factor_distance times the best_factor the edges are rejected
if(edges.top().first > maximum_factor_distance * best_factor) break;
// //if the factor is worse than maximum_factor_distance times the best_factor the edges are rejected
// if(edges.top().first > maximum_factor_distance * best_factor) break;
if(act_edge == NULL || act_edge->GetWeight(position) > edges.top().second->GetWeight(position)) {
act_edge = edges.top().second;
}
else if(act_edge->GetWeight(position) == edges.top().second->GetWeight(position))
{
if(act_edge->GetApproximateDistance(position) > edges.top().second->GetApproximateDistance(position))
act_edge = edges.top().second;
}
edges.pop();
}
return act_edge;
}
}
//NextDoorKnowlegde GraphVertex::GetShortestPathFromHere(const Point &position) const
//{
// std::set<const GraphEdge *> visited;
// // map with GrapEdges and their predecessors and distances
// std::map<const GraphEdge *, std::pair<const GraphEdge *, double> > destinations;
// // priority queue with discovered Edges and their distance.
// std::priority_queue<
// std::pair<double, const GraphEdge *>,
// vector<std::pair<double, const GraphEdge *> >,
// std::greater<std::pair<double, const GraphEdge *> >
// > queue;
// const GraphEdge * exit_edge = nullptr;
// // add all out edges from this vertex to priority queue and destinations.
// for(EdgesContainer::const_iterator it = this->GetAllOutEdges()->begin(); it != this->GetAllOutEdges()->end(); ++it) {
// double new_distance = (*it)->GetWeight(position);
// destinations[(*it)] = std::make_pair((const GraphEdge*) nullptr, new_distance);
// queue.push(std::make_pair(new_distance, (*it)));
// }
// while(!queue.empty()) {
// const GraphEdge * act_edge = queue.top().second;
// double act_distance = queue.top().first;
// queue.pop();
// //if we discovered an exit edge we are finished (queue is distance ordered)
// if(act_edge->IsExit()) {
// exit_edge = act_edge;
// break;
// }
// //discover new edges or shorter paths to old edges
// const EdgesContainer * new_edges = act_edge->GetDest()->GetAllOutEdges();
// for(EdgesContainer::const_iterator it = new_edges->begin(); it != new_edges->end(); ++it) {
// // if the destination edges was visited we already have the shortest path to this destination.
// if(visited.find((*it)) != visited.end() || (*it)->GetDest() == act_edge->GetSrc()) continue;
// double new_distance = act_distance + (*it)->GetWeight(act_edge->GetCrossing()->GetCentre());
// //check if the destination edge was discovered before.
// if(destinations.find((*it)) == destinations.end()) {
// //initialize the new discovered vertex with distance inifity and push it to the queue
// destinations[(*it)] = std::make_pair<const GraphEdge*, double>(nullptr, INFINITY);
// queue.push(std::make_pair(new_distance, (*it)));
// if(act_edge == nullptr || act_edge->GetWeight(position) > edges.top().second->GetWeight(position)) {
// act_edge = edges.top().second;
// }
// //check if we found a shorter path to the dest vertex
// if(destinations[(*it)].second > new_distance) {
// destinations[(*it)].second = new_distance;
// destinations[(*it)].first = act_edge;
// else if(act_edge->GetWeight(position) == edges.top().second->GetWeight(position))
// {
// if(act_edge->GetApproximateDistance(position) > edges.top().second->GetApproximateDistance(position))
// act_edge = edges.top().second;
// }
// edges.pop();
// }
// visited.insert(act_edge);
// }
// //did we found an exits?
// NextDoorKnowlegde rknowlegde;
// if(exit_edge != nullptr) {
// rknowlegde.insert(std::make_pair(exit_edge->GetSrc(), exit_edge));
// const GraphEdge * act_edge = destinations[exit_edge].first;
// if(act_edge == nullptr) {
// return rknowlegde;
// } else {
// while(this != act_edge->GetSrc()) {
// rknowlegde.insert(std::make_pair(act_edge->GetSrc(), act_edge));
// act_edge = destinations[act_edge].first;
// }
// return rknowlegde;
// }
// } else {
// return rknowlegde;
// return act_edge;
// }
//}
}
}
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