Commit d5202409 authored by Erik Andresen's avatar Erik Andresen

change name of AIRouter to SmokeRouter

parent 761c1339
Pipeline #6250 failed with stages
......@@ -308,35 +308,29 @@ set(source_files
routing/quickest/QuickestPathRouter.cpp
#AI router
routing/ai_router/AIRouter.cpp
routing/ai_router/GraphNetwork.cpp
routing/ai_router/NavigationGraph.cpp
routing/ai_router/BrainStorage.cpp
routing/ai_router/navigation_graph/GraphEdge.cpp
routing/ai_router/navigation_graph/GraphVertex.cpp
routing/ai_router/sensor/RoomToFloorSensor.cpp
routing/ai_router/sensor/SensorManager.cpp
routing/ai_router/sensor/AbstractSensor.cpp
routing/ai_router/sensor/DiscoverDoorsSensor.cpp
routing/ai_router/sensor/JamSensor.cpp
routing/ai_router/sensor/LastDestinationsSensor.cpp
#routing/ai_router/sensor/SmokeSensor.cpp
routing/ai_router/sensor/locater.cpp
#routing/ai_router/fire_mesh/FireMesh.cpp
#routing/ai_router/fire_mesh/Knot.cpp
#routing/ai_router/fire_mesh/FireMeshStorage.cpp
routing/ai_router/cognitiveMap/associations.cpp
routing/ai_router/cognitiveMap/connection.cpp
routing/ai_router/cognitiveMap/cognitivemap.cpp
routing/ai_router/cognitiveMap/landmark.cpp
routing/ai_router/cognitiveMap/region.cpp
routing/ai_router/cognitiveMap/youareherepointer.cpp
routing/ai_router/cognitiveMap/cogmapoutputhandler.cpp
routing/ai_router/cognitiveMap/landmarknetwork.cpp
routing/ai_router/perception/perception.cpp
routing/ai_router/perception/visibleenvironment.cpp
routing/ai_router/Brain.cpp
routing/ai_router/cognitiveMap/internnavigationnetwork.cpp
routing/smoke_router/SmokeRouter.cpp
routing/smoke_router/GraphNetwork.cpp
routing/smoke_router/NavigationGraph.cpp
routing/smoke_router/BrainStorage.cpp
routing/smoke_router/navigation_graph/GraphEdge.cpp
routing/smoke_router/navigation_graph/GraphVertex.cpp
routing/smoke_router/sensor/RoomToFloorSensor.cpp
routing/smoke_router/sensor/SensorManager.cpp
routing/smoke_router/sensor/AbstractSensor.cpp
routing/smoke_router/sensor/DiscoverDoorsSensor.cpp
routing/smoke_router/sensor/JamSensor.cpp
routing/smoke_router/sensor/LastDestinationsSensor.cpp
routing/smoke_router/sensor/locater.cpp
routing/smoke_router/cognitiveMap/associations.cpp
routing/smoke_router/cognitiveMap/connection.cpp
routing/smoke_router/cognitiveMap/cognitivemap.cpp
routing/smoke_router/cognitiveMap/landmark.cpp
routing/smoke_router/cognitiveMap/region.cpp
routing/smoke_router/cognitiveMap/youareherepointer.cpp
routing/smoke_router/cognitiveMap/cogmapoutputhandler.cpp
routing/smoke_router/cognitiveMap/landmarknetwork.cpp
routing/smoke_router/Brain.cpp
routing/smoke_router/cognitiveMap/internnavigationnetwork.cpp
visiLibity/source_code/visilibity.cpp
poly2tri/common/shapes.cpp
......@@ -386,35 +380,29 @@ set(header_files
routing/quickest/QuickestPathRouter.h
#AI router
routing/ai_router/AIRouter.h
routing/ai_router/GraphNetwork.h
routing/ai_router/NavigationGraph.h
routing/ai_router/BrainStorage.h
routing/ai_router/navigation_graph/GraphEdge.h
routing/ai_router/navigation_graph/GraphVertex.h
routing/ai_router/sensor/AbstractSensor.h
routing/ai_router/sensor/RoomToFloorSensor.h
routing/ai_router/sensor/SensorManager.h
routing/ai_router/sensor/DiscoverDoorsSensor.h
routing/ai_router/sensor/JamSensor.h
routing/ai_router/sensor/LastDestinationsSensor.h
#routing/ai_router/sensor/SmokeSensor.h
routing/ai_router/sensor/locater.h
#routing/ai_router/fire_mesh/FireMesh.h
#routing/ai_router/fire_mesh/Knot.h
#routing/ai_router/fire_mesh/FireMeshStorage.h
routing/ai_router/cognitiveMap/associations.h
routing/ai_router/cognitiveMap/connection.cpp
routing/ai_router/cognitiveMap/cognitivemap.h
routing/ai_router/cognitiveMap/landmark.h
routing/ai_router/cognitiveMap/region.h
routing/ai_router/cognitiveMap/youareherepointer.h
routing/ai_router/cognitiveMap/cogmapoutputhandler.h
routing/ai_router/cognitiveMap/landmarknetwork.h
routing/ai_router/perception/perception.h
routing/ai_router/perception/visibleenvironment.h
routing/ai_router/Brain.h
routing/ai_router/cognitiveMap/internnavigationnetwork.h
routing/smoke_router/SmokeRouter.h
routing/smoke_router/GraphNetwork.h
routing/smoke_router/NavigationGraph.h
routing/smoke_router/BrainStorage.h
routing/smoke_router/navigation_graph/GraphEdge.h
routing/smoke_router/navigation_graph/GraphVertex.h
routing/smoke_router/sensor/AbstractSensor.h
routing/smoke_router/sensor/RoomToFloorSensor.h
routing/smoke_router/sensor/SensorManager.h
routing/smoke_router/sensor/DiscoverDoorsSensor.h
routing/smoke_router/sensor/JamSensor.h
routing/smoke_router/sensor/LastDestinationsSensor.h
routing/smoke_router/sensor/locater.h
routing/smoke_router/cognitiveMap/associations.h
routing/smoke_router/cognitiveMap/connection.cpp
routing/smoke_router/cognitiveMap/cognitivemap.h
routing/smoke_router/cognitiveMap/landmark.h
routing/smoke_router/cognitiveMap/region.h
routing/smoke_router/cognitiveMap/youareherepointer.h
routing/smoke_router/cognitiveMap/cogmapoutputhandler.h
routing/smoke_router/cognitiveMap/landmarknetwork.h
routing/smoke_router/Brain.h
routing/smoke_router/cognitiveMap/internnavigationnetwork.h
visiLibity/source_code/visilibity.hpp
pedestrian/Pedestrian.h
......
......@@ -40,7 +40,7 @@
#include "../math/VelocityModel.h"
#include "../routing/global_shortest/GlobalRouter.h"
#include "../routing/quickest/QuickestPathRouter.h"
#include "../routing/ai_router/AIRouter.h"
#include "../routing/smoke_router/SmokeRouter.h"
#include "../routing/ff_router/ffRouter.h"
IniFileParser::IniFileParser(Configuration* config)
......@@ -1090,13 +1090,12 @@ bool IniFileParser::ParseRoutingStrategies(TiXmlNode* routingNode, TiXmlNode* ag
Router *r = new QuickestPathRouter(id, ROUTING_QUICKEST);
_config->GetRoutingEngine()->AddRouter(r);
}
else if ((strategy == "AI") &&
else if ((strategy == "smoke") &&
(std::find(usedRouter.begin(), usedRouter.end(), id) != usedRouter.end()) ) {
//pRoutingStrategies.push_back(make_pair(id, ROUTING_COGNITIVEMAP));
Router *r = new AIRouter(id, ROUTING_AI);
Router *r = new SmokeRouter(id, ROUTING_SMOKE);
_config->GetRoutingEngine()->AddRouter(r);
Log->Write("\nINFO: \tUsing AIRouter");
Log->Write("\nINFO: \tUsing SmokeRouter");
///Parsing additional options
if (!ParseCogMapOpts(e))
return false;
......@@ -1203,8 +1202,8 @@ bool IniFileParser::ParseCogMapOpts(TiXmlNode* routingNode)
return false;
}
/// static_cast to get access to the method 'addOption' of the AIRouter
AIRouter* r = static_cast<AIRouter*>(_config->GetRoutingEngine()->GetAvailableRouters().back());
/// static_cast to get access to the method 'addOption' of the SmokeRouter
SmokeRouter* r = static_cast<SmokeRouter*>(_config->GetRoutingEngine()->GetAvailableRouters().back());
std::vector<std::string> sensorVec;
for (TiXmlElement* e = sensorNode->FirstChildElement("sensor"); e;
......
......@@ -27,9 +27,9 @@
**/
#include "SmokeSensor.h"
#include "../../routing/ai_router/NavigationGraph.h"
#include "../../routing/smoke_router/NavigationGraph.h"
#include "../../geometry/Building.h"
#include "../../routing/ai_router/cognitiveMap/cognitivemap.h"
#include "../../routing/smoke_router/cognitiveMap/cognitivemap.h"
#include "../../pedestrian/Pedestrian.h"
#include "../../geometry/SubRoom.h"
#include "../generic/FDSMesh.h"
......
......@@ -29,7 +29,7 @@
#ifndef SMOKESENSOR_H
#define SMOKESENSOR_H 1
#include "../../routing/ai_router/sensor/AbstractSensor.h"
#include "../../routing/smoke_router/sensor/AbstractSensor.h"
#include <memory>
class Point;
......
......@@ -45,7 +45,7 @@
#include "routing/DirectionStrategy.h"
#include "routing/RoutingEngine.h"
#include "pedestrian/PedDistributor.h"
#include "routing/ai_router/AIRouter.h"
#include "routing/smoke_router/SmokeRouter.h"
#include "events/EventManager.h"
#include "pedestrian/AgentsSourcesManager.h"
#include "general/Configuration.h"
......
......@@ -48,7 +48,7 @@
#include "../routing/RoutingEngine.h"
#include "../routing/global_shortest/GlobalRouter.h"
#include "../routing/quickest/QuickestPathRouter.h"
#include "../routing/ai_router/AIRouter.h"
#include "../routing/smoke_router/SmokeRouter.h"
#include "../routing/ff_router/ffRouter.h"
#include "EventManager.h"
#include "Event.h"
......@@ -679,8 +679,8 @@ Router * EventManager::CreateRouter(const RoutingStrategy& strategy)
rout = new QuickestPathRouter(ROUTING_QUICKEST, ROUTING_QUICKEST);
break;
case ROUTING_AI:
rout = new AIRouter(ROUTING_AI, ROUTING_AI);
case ROUTING_SMOKE:
rout = new SmokeRouter(ROUTING_SMOKE, ROUTING_SMOKE);
break;
case ROUTING_FF_GLOBAL_SHORTEST:
......
......@@ -47,7 +47,7 @@
#include "../pedestrian/AgentsParameters.h"
#include "../routing/global_shortest/GlobalRouter.h"
#include "../routing/quickest/QuickestPathRouter.h"
#include "../routing/ai_router/AIRouter.h"
#include "../routing/smoke_router/SmokeRouter.h"
#include "../IO/IniFileParser.h"
#include <sys/stat.h>
......
......@@ -120,7 +120,7 @@ enum RoutingStrategy {
ROUTING_GLOBAL_SHORTEST,
ROUTING_QUICKEST,
ROUTING_FROM_FILE,
ROUTING_AI,
ROUTING_SMOKE,
ROUTING_FLOORFIELD,
ROUTING_FF_GLOBAL_SHORTEST,
ROUTING_FF_LOCAL_SHORTEST,
......
......@@ -156,6 +156,7 @@ bool PedDistributor::Distribute(Building *building) const {
}//if we have a directoy
//------------------------------------- pack in function ------------
else{
auto possibleSubroomPositions = PedDistributor::PossiblePositions(*sr);
shuffle(possibleSubroomPositions.begin(), possibleSubroomPositions.end(), dist->GetGenerator());
allFreePosRoom[subroomID] = possibleSubroomPositions;
......@@ -414,6 +415,7 @@ vector<Point>PedDistributor::PositionsOnFixY(double min_x, double max_x, double
}
// format: id fr x y
const vector<Point> PedDistributor::GetPositionsFromFile(std::string filename, int n, std::string unit) const{
float m2cm = 1.0;
if(unit == "cm")
......@@ -478,6 +480,7 @@ const vector<Point> PedDistributor::GetPositionsFromFile(std::string filename,
return positions;
}
vector<Point> PedDistributor::PossiblePositions(const SubRoom &r) {
double uni = 0.7; // wenn ein Raum in x oder y -Richtung schmaler ist als 0.7 wird in der Mitte verteilt
double bufx = 0.12;
......
#include "perception.h"
Perception::Perception(ptrBuilding b, ptrPed ped, ptrEnv env)
{
_building=b;
_ped=ped;
_env=env;
}
#ifndef PERCEPTION_H
#define PERCEPTION_H
#include <memory>
class Pedestrian;
class Building;
class VisibleEnvironment;
using ptrBuilding = std::shared_ptr<const Building>;
using ptrPed = std::shared_ptr<const Pedestrian>;
using ptrEnv = std::shared_ptr<const VisibleEnvironment>;
class Perception
{
public:
Perception(ptrBuilding b, ptrPed ped, ptrEnv env);
private:
ptrBuilding _building;
ptrPed _ped;
ptrEnv _env;
};
#endif // PERCEPTION_H
#include "visibleenvironment.h"
#include "../../../visiLibity/source_code/visilibity.hpp"
#include "../../../geometry/Building.h"
#include "../../../pedestrian/Pedestrian.h"
#include "../../../geometry/SubRoom.h"
#include <boost/geometry/geometry.hpp>
//#include <boost/foreach.hpp>
#define UNUSED(x) [&x]{}() // c++11 silence warnings
VisibleEnvironment::VisibleEnvironment()
{
}
VisibleEnvironment::VisibleEnvironment(const Building *b, const Pedestrian *ped)
{
_ped=ped;
typedef boost::geometry::model::polygon<Point> BoostPolygon;
std::vector<BoostPolygon> boostHoles;
//Creating complete spatial structure
_b=b;
std::vector<Wall> walls;
//get all walls
for (auto it=_b->GetAllRooms().begin(); it!=_b->GetAllRooms().end(); ++it)
{
for (auto it2=it->second->GetAllSubRooms().begin(); it2!=it->second->GetAllSubRooms().end(); ++it2)
{
for (Wall wall:it2->second->GetAllWalls())
walls.push_back(wall);
}
}
for (Wall wall:walls)
{
Point dirVector=wall.GetPoint2()-wall.GetPoint1();
dirVector=dirVector/dirVector.Norm();
Point normalVector = Point(-dirVector._y,dirVector._x);
//0.12 equals the half of a wall's width
BoostPolygon boostHole;
if (wall.GetPoint1()._x <= wall.GetPoint2()._x)
{
boost::geometry::append(boostHole,wall.GetPoint1()-normalVector*0.00012);
boost::geometry::append(boostHole,wall.GetPoint1()+normalVector*0.00012);
boost::geometry::append(boostHole,wall.GetPoint2()+normalVector*0.00012);
boost::geometry::append(boostHole,wall.GetPoint2()-normalVector*0.00012);
boost::geometry::correct(boostHole);
}
else
{
boost::geometry::append(boostHole,wall.GetPoint2()+normalVector*0.00012);
boost::geometry::append(boostHole,wall.GetPoint2()-normalVector*0.00012);
boost::geometry::append(boostHole,wall.GetPoint1()-normalVector*0.00012);
boost::geometry::append(boostHole,wall.GetPoint1()+normalVector*0.00012);
boost::geometry::correct(boostHole);
}
boostHoles.push_back(boostHole);
}
// std::vector<Point> const& points = boostHoles[0].outer();
// for (std::vector<Point>::size_type i = 0; i < points.size(); ++i)
// {
// Log->Write(std::to_string(points[i]._x));
// Log->Write(std::to_string(points[i]._y));
// }
// std::vector<Point> const& points2 = boostHoles[1].outer();
// for (std::vector<Point>::size_type i = 0; i < points2.size(); ++i)
// {
// Log->Write(std::to_string(points2[i]._x));
// Log->Write(std::to_string(points2[i]._y));
// }
std::vector<BoostPolygon> boostHolesCorrected;
std::list<BoostPolygon> output;
bool statusIdentical;
Log->Write("INFO: PERCEPTION: Preparing visible environment ...");
for (BoostPolygon hole:boostHoles)
{
statusIdentical=false;
for (BoostPolygon correctedhole:boostHolesCorrected)
{
if (boost::geometry::equals(hole,correctedhole))
{
// if two walls are identical
statusIdentical=true;
break;
}
// boost::geometry::difference(hole,correctedhole,output); //what if output.size is greater than one?
// if (output.empty())
// {
// // if walls one lies in wall two
// statusIdentical=true;
// break;
// }
//hole=output.front();
//output.clear();
}
if (!statusIdentical)
boostHolesCorrected.push_back(hole);
}
//Boundary and holes
std::vector<VisiLibity::Polygon> polygons;
VisiLibity::Polygon boundary;
//Boundary of environment
boundary.push_back(VisiLibity::Point(b->GetBoundaryVertices()[0]._x-5,b->GetBoundaryVertices()[0]._y-5));
boundary.push_back(VisiLibity::Point(b->GetBoundaryVertices()[3]._x+5,b->GetBoundaryVertices()[3]._y-5));
boundary.push_back(VisiLibity::Point(b->GetBoundaryVertices()[2]._x+5,b->GetBoundaryVertices()[2]._y+5));
boundary.push_back(VisiLibity::Point(b->GetBoundaryVertices()[1]._x-5,b->GetBoundaryVertices()[1]._y+5));
polygons.push_back(boundary);
//Holes
for (BoostPolygon correctedhole:boostHolesCorrected)
{
VisiLibity::Polygon VisiPolygon;
std::vector<Point> const& points = correctedhole.outer();
Point dirVector2= (points[3]+points[2])/2-(points[1]+points[0])/2;
dirVector2=dirVector2/dirVector2.Norm();
for (std::vector<Point>::size_type i = 0; i < points.size()-1; ++i)
{
//VisiPolygon.push_back(VisiLibity::Point(points[i]._x,points[i]._y));
if (i<2)
VisiPolygon.push_back(VisiLibity::Point(points[i]._x+dirVector2._x*0.0012,points[i]._y+dirVector2._y*0.0012));
else
VisiPolygon.push_back(VisiLibity::Point(points[i]._x-dirVector2._x*0.0012,points[i]._y-dirVector2._y*0.0012));
}
polygons.push_back(VisiPolygon);
}
// for (Wall wall:walls)
// {
// //0.12 equals the half of a wall's width
// polygons.push_back(VisiLibity::Polygon(std::vector<VisiLibity::Point>{
// VisiLibity::Point(wall.GetPoint1()._x-0.12,wall.GetPoint1()._y-0.12),
// VisiLibity::Point(wall.GetPoint1()._x-0.12,wall.GetPoint1()._y+0.12),
// VisiLibity::Point(wall.GetPoint2()._x+0.12,wall.GetPoint2()._y+0.12),
// VisiLibity::Point(wall.GetPoint2()._x+0.12,wall.GetPoint2()._y-0.12)}));
// }
//set up the environment
VisiLibity::Environment environment(polygons);
//environment.reverse_holes();
if (!environment.is_valid())
{
Log->Write("ERROR:\tEnvironment for Visibilitypolygon not valid. \n");
exit(EXIT_FAILURE);
}
//VisiLibity::Guards my_guards(std::vector(Point(2095.53,14423.4)));
VisiLibity::Visibility_Polygon
my_visibility_polygon(VisiLibity::Point(4.0,3.5), environment,0.01);
std::cout << "The visibility polygon is \n" << my_visibility_polygon << std::endl;
//my_visibility_polygon.
Log->Write("INFO: PERCEPTION: Visible environment prepared.");
}
#ifndef VISIBLEENVIRONMENT_H
#define VISIBLEENVIRONMENT_H
class Building;
class Pedestrian;
class VisibleEnvironment
{
public:
VisibleEnvironment();
VisibleEnvironment(const Building* b, const Pedestrian* ped=nullptr);
private:
const Building* _b;
const Pedestrian* _ped;
};
#endif // VISIBLEENVIRONMENT_H
......@@ -6,11 +6,10 @@ Brain::Brain()
}
Brain::Brain(const Building *b, const Pedestrian *ped, const VisibleEnvironment *env, std::unordered_map<const SubRoom *, ptrIntNetwork> *roominternalNetworks)
Brain::Brain(const Building *b, const Pedestrian *ped, std::unordered_map<const SubRoom *, ptrIntNetwork> *roominternalNetworks)
{
_b=b;
_ped=ped;
_wholeEnvironment=env;
_intNetworks=roominternalNetworks;
_cMap=CognitiveMap(_b,_ped);
}
......
......@@ -2,7 +2,6 @@
#define BRAIN_H
#include "cognitiveMap/cognitivemap.h"
#include "./perception/visibleenvironment.h"
#include "./cognitiveMap/internnavigationnetwork.h"
......@@ -15,7 +14,7 @@ class Brain
public:
Brain();
Brain(const Building* b,const Pedestrian* ped, const VisibleEnvironment* env, std::unordered_map<const SubRoom*, ptrIntNetwork>* roominternalNetworks);
Brain(const Building* b, const Pedestrian* ped, std::unordered_map<const SubRoom*, ptrIntNetwork>* roominternalNetworks);
CognitiveMap& GetCognitiveMap();
......@@ -27,7 +26,6 @@ private:
const Pedestrian* _ped;
CognitiveMap _cMap;
//whole environment
const VisibleEnvironment* _wholeEnvironment;
// reference of roominternalNetwork
std::unordered_map<const SubRoom*, ptrIntNetwork>* _intNetworks;
InternNavigationNetwork _currentIntNetwork;
......
......@@ -44,8 +44,6 @@ BrainStorage::BrainStorage(const Building * const b, std::string cogMapStatus, s
_cogMapStatus=cogMapStatus;
_cogMapFiles=cogMapFiles;
//Complete Environment
//_visibleEnv=VisibleEnvironment(b);
//internal graph networks in every subroom
for (auto it=_building->GetAllRooms().begin(); it!=_building->GetAllRooms().end(); ++it)
......@@ -282,7 +280,6 @@ void BrainStorage::CreateBrain(BStorageKeyType ped)
_brains.insert(std::make_pair(ped, std::make_shared<Brain>(_building,
ped,
nullptr,
&_roominternalNetworks)));// creator->CreateCognitiveMap(ped)));
......
......@@ -33,7 +33,6 @@
#include <unordered_map>
#include <vector>
#include "./cognitiveMap/cognitivemap.h"
#include "./perception/visibleenvironment.h"
#include "Brain.h"
class Building;
......@@ -67,10 +66,6 @@ private:
BStorageType _brains;
//perception
//Complete environment
//VisibleEnvironment _visibleEnv;
//cognitive map
std::vector<ptrRegion> _regions;
std::string _cogMapStatus;
......
......@@ -26,7 +26,7 @@
**/
#include "AIRouter.h"
#include "SmokeRouter.h"
#include "../Router.h"
#include "BrainStorage.h"
......@@ -41,7 +41,7 @@
#include "../../pedestrian/Pedestrian.h"
#include "../../tinyxml/tinyxml.h"
AIRouter::AIRouter()
SmokeRouter::SmokeRouter()
{
building=nullptr;
// cm_storage=nullptr;
......@@ -49,21 +49,21 @@ AIRouter::AIRouter()
}
AIRouter::AIRouter(int id, RoutingStrategy s) : Router(id, s)
SmokeRouter::SmokeRouter(int id, RoutingStrategy s) : Router(id, s)
{
building=nullptr;
// cm_storage=nullptr;
// sensor_manager=nullptr;
}
AIRouter::~AIRouter()
SmokeRouter::~SmokeRouter()
{
//delete brain_storage;
delete sensor_manager;
}
int AIRouter::FindExit(Pedestrian * p)
int SmokeRouter::FindExit(Pedestrian * p)
{
//check for former goal.
if((*brain_storage)[p]->GetCognitiveMap().GetGraphNetwork()->HadNoDestination()) {
......@@ -108,7 +108,7 @@ int AIRouter::FindExit(Pedestrian * p)
return 1;
}
int AIRouter::FindDestination(Pedestrian * p)
int SmokeRouter::FindDestination(Pedestrian * p)
{
// Discover doors
sensor_manager->execute(p, SensorManager::NO_WAY);
......@@ -178,7 +178,7 @@ int AIRouter::FindDestination(Pedestrian * p)
bool AIRouter::Init(Building * b)
bool SmokeRouter::Init(Building * b)
{
Log->Write("INFO:\tInit the Cognitive Map Router Engine");
building = b;
......@@ -201,17 +201,17 @@ bool AIRouter::Init(Building * b)
}
const optStorage &AIRouter::getOptions() const
const optStorage &SmokeRouter::getOptions() const
{
return options;
}
void AIRouter::addOption(const std::string &key, const std::vector<std::string> &value)
void SmokeRouter::addOption(const std::string &key, const std::vector<std::string> &value)
{
options.insert(std::make_pair(key, value));
}
bool AIRouter::LoadRoutingInfos(const std::string &filename)
bool SmokeRouter::LoadRoutingInfos(const std::string &filename)
{
if(filename=="") return true;
......@@ -286,7 +286,7 @@ bool AIRouter::LoadRoutingInfos(const std::string &filename)
return true;
}
std::string AIRouter::GetRoutingInfoFile()
std::string SmokeRouter::GetRoutingInfoFile()
{
TiXmlDocument doc(building->GetProjectFilename());
......
/**
* \file CognitiveMapRouter.h
* \file SmokeRouter.h
* \date Feb 1, 2014
* \version v0.7
* \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
......@@ -27,8 +27,8 @@
**/
#ifndef AIROUTER_H_
#define AIROUTER_H_
#ifndef SMOKEROUTER_H_
#define SMOKEROUTER_H_
#include "../Router.h"
#include <string>
......@@ -52,11 +52,11 @@ class NavLine;
//c++11 alias: Container to store options for the router (i. a. sensors)
using optStorage = std::unordered_map<std::string,std::vector<std::string> >;
class AIRouter: public Router {
class SmokeRouter: public Router {
public:
AIRouter();
AIRouter(int id, RoutingStrategy s);
virtual ~AIRouter();
SmokeRouter();
SmokeRouter(int id, RoutingStrategy s);
virtual ~SmokeRouter();
virtual int FindExit(Pedestrian* p);
......@@ -98,4 +98,4 @@ private: