Commit 52a69102 authored by f.mack's avatar f.mack

Correct use of underscore in ffRouter and Configuration.h

parent cf320b64
......@@ -223,23 +223,23 @@ public:
double get_deltaH() const { return _deltaH; }
void set_deltaH(double _deltaH) { Configuration::_deltaH = _deltaH; }
void set_deltaH(double deltaH) { _deltaH = deltaH; }
double get_wall_avoid_distance() const { return _wall_avoid_distance; }
void set_wall_avoid_distance(double _wall_avoid_distance) { Configuration::_wall_avoid_distance = _wall_avoid_distance; }
void set_wall_avoid_distance(double wall_avoid_distance) { _wall_avoid_distance = wall_avoid_distance; }
bool get_use_wall_avoidance() const { return _use_wall_avoidance; }
void set_use_wall_avoidance(bool _use_wall_avoidance) { Configuration::_use_wall_avoidance = _use_wall_avoidance; }
void set_use_wall_avoidance(bool use_wall_avoidance) { _use_wall_avoidance = use_wall_avoidance; }
double get_slow_down_distance() const { return _slow_down_distance; }
void set_slow_down_distance(double _slow_down_distance) { Configuration::_slow_down_distance = _slow_down_distance; }
void set_slow_down_distance(double slow_down_distance) { _slow_down_distance = slow_down_distance; }
double get_recalc_interval() const { return _recalc_interval; }
void set_recalc_interval(double _recalc_interval) { Configuration::_recalc_interval = _recalc_interval; }
void set_recalc_interval(double recalc_interval) { _recalc_interval = recalc_interval; }
const std::string& GetHostname() const { return _hostname; };
......
......@@ -54,7 +54,7 @@
#include <chrono>
int FFRouter::cnt = 0;
int FFRouter::_cnt = 0;
FFRouter::FFRouter()
{
......@@ -107,9 +107,9 @@ bool FFRouter::Init(Building* building)
_globalFF->createMapEntryInLineToGoalID(itrGoal.first);
goalIDs.emplace_back(itrGoal.first);
}
goalToLineUIDmap = _globalFF->getGoalToLineUIDmap();
goalToLineUIDmap2 = _globalFF->getGoalToLineUIDmap2();
goalToLineUIDmap3 = _globalFF->getGoalToLineUIDmap3();
_goalToLineUIDmap = _globalFF->getGoalToLineUIDmap();
_goalToLineUIDmap2 = _globalFF->getGoalToLineUIDmap2();
_goalToLineUIDmap3 = _globalFF->getGoalToLineUIDmap3();
//_globalFF->writeGoalFF("goal.vtk", goalIDs);
}
//get all door UIDs
......@@ -430,9 +430,9 @@ bool FFRouter::ReInit()
for (auto &itrGoal : _building->GetAllGoals()) {
_globalFF->createMapEntryInLineToGoalID(itrGoal.first);
}
goalToLineUIDmap = _globalFF->getGoalToLineUIDmap(); //@todo: ar.graf: will this create mem-leak?
goalToLineUIDmap2 = _globalFF->getGoalToLineUIDmap2();
goalToLineUIDmap3 = _globalFF->getGoalToLineUIDmap3();
_goalToLineUIDmap = _globalFF->getGoalToLineUIDmap(); //@todo: ar.graf: will this create mem-leak?
_goalToLineUIDmap2 = _globalFF->getGoalToLineUIDmap2();
_goalToLineUIDmap3 = _globalFF->getGoalToLineUIDmap3();
}
//get all door UIDs
_allDoorUIDs.clear();
......@@ -623,7 +623,7 @@ bool FFRouter::ReInit()
FloydWarshall();
//debug output in file
std::string ffname = "MasterFF" + std::to_string(++cnt) + ".vtk";
std::string ffname = "MasterFF" + std::to_string(++_cnt) + ".vtk";
//_locffviafm[0]->writeFF(ffname, _allDoorUIDs);
//int roomTest = (*(_locffviafm.begin())).first;
......@@ -681,8 +681,8 @@ int FFRouter::FindExit(Pedestrian* p)
// }
if (_mode == quickest) {
//new version: recalc densityspeed every x seconds
if (p->GetGlobalTime() > timeToRecalc) {
timeToRecalc += _recalc_interval; //@todo: ar.graf: change "5" to value of config file/classmember
if (p->GetGlobalTime() > _timeToRecalc) {
_timeToRecalc += _recalc_interval; //@todo: ar.graf: change "5" to value of config file/classmember
// for (auto localfield : _locffviafm) { //@todo: ar.graf: create a list of local ped-ptr instead of giving all peds-ptr
// localfield.second->setSpeedThruPeds(_building->GetAllPedestrians().data(), _building->GetAllPedestrians().size(), _mode, 1.);
// localfield.second->deleteAllFFs();
......@@ -704,10 +704,10 @@ int FFRouter::FindExit(Pedestrian* p)
}
} else { //only one specific goal, goalToLineUIDmap gets
//populated in Init()
if ((goalToLineUIDmap.count(goalID) == 0) || (goalToLineUIDmap[goalID] == -1)) {
if ((_goalToLineUIDmap.count(goalID) == 0) || (_goalToLineUIDmap[goalID] == -1)) {
Log->Write("ERROR: \t ffRouter: unknown/unreachable goalID: %d in FindExit(Ped)",goalID);
} else {
validFinalDoor.emplace_back(goalToLineUIDmap.at(goalID));
validFinalDoor.emplace_back(_goalToLineUIDmap.at(goalID));
}
}
......
......@@ -225,13 +225,13 @@ protected:
std::map<int, Transition*> _ExitsByUID;
std::map<int, Crossing*> _CroTrByUID;
std::map<int, int> goalToLineUIDmap; //key is the goalID and value is the UID of closest transition -> it maps goal to LineUID
std::map<int, int> goalToLineUIDmap2;
std::map<int, int> goalToLineUIDmap3;
std::map<int, int> _goalToLineUIDmap; //key is the goalID and value is the UID of closest transition -> it maps goal to LineUID
std::map<int, int> _goalToLineUIDmap2;
std::map<int, int> _goalToLineUIDmap3;
std::map<int, int> _finalDoors; // _finalDoors[i] the UID of the last door the pedestrian with ID i wants to walk through
int _mode;
double timeToRecalc = 0.;
double _timeToRecalc = 0.;
double _recalc_interval;
bool _hasSpecificGoals;
bool _targetWithinSubroom;
......@@ -239,7 +239,7 @@ protected:
// (AvoidDoorHopping and _subroomMatrix might be unnecessary, and some code in FindExit could go). --f.mack
bool _useCentrePointDistance = true;
//output filename counter: cnt
static int cnt;
static int _cnt;
};
#endif /* FFROUTER_H_ */
\ No newline at end of file
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