Commit df6b51be authored by Arne Graf's avatar Arne Graf

checked toDos and removed some

parent fca69686
Pipeline #4026 failed with stages
in 4 minutes and 25 seconds
......@@ -994,7 +994,7 @@ void IniFileParser::ParseAgentParameters(TiXmlElement* operativModel, TiXmlNode*
_config->SetDistEffMaxWall(_config->GetDistEffMaxPed());
}
if (_model == 4) { // Gompertz @todo: ar.graf
if (_model == 4) { // Gradient
double beta_c = 2; /// @todo quick and dirty
double max_Ea = agentParameters->GetAmin() + agentParameters->GetAtau() * agentParameters->GetV0();
double max_Eb = 0.5 * (agentParameters->GetBmin() +
......@@ -1093,20 +1093,14 @@ bool IniFileParser::ParseRoutingStrategies(TiXmlNode* routingNode, TiXmlNode* ag
Router *r = new FFRouter(id, ROUTING_FF_GLOBAL_SHORTEST, hasSpecificGoals, _config);
_config->GetRoutingEngine()->AddRouter(r);
if ((_exit_strat_number == 8) || (_exit_strat_number == 9)){
Log->Write("\nINFO: \tUsing FF Global Shortest Router");
}
else {
Log->Write("\nWARNING: \tExit Strategy Number is not 8 or 9!!!");
// config object holds default values, so we omit any set operations
}
//check if the exit strat is [8 | 9] //@todo: ar.graf: implement check and check which are valid exitstrats
///Parsing additional options
if (!ParseFfRouterOps(e, ROUTING_FF_GLOBAL_SHORTEST)) {
return false;
......@@ -1165,8 +1159,8 @@ bool IniFileParser::ParseFfRouterOps(TiXmlNode* routingNode, RoutingStrategy s)
//parse ini-file-information
if (routingNode->FirstChild("parameters")) {
TiXmlNode* pParameters = routingNode->FirstChild("parameters");
if (pParameters->FirstChild("recalc interval")) { //@todo: ar.graf: test ini file with recalc value
_config->set_recalc_interval(atof(pParameters->FirstChild("recalc interval")->FirstChild()->Value()));
if (pParameters->FirstChild("recalc_interval")) { //@todo: ar.graf: test ini file with recalc value
_config->set_recalc_interval(atof(pParameters->FirstChild("recalc_interval")->FirstChild()->Value()));
}
}
}
......
......@@ -361,7 +361,7 @@ void Simulation::UpdateRoutesAndLocations()
#ifdef _USE_PROTOCOL_BUFFER
if (_hybridSimManager)
{
AgentsQueueOut::Add(pedsToRemove); //@todo: ar.graf: this should be critical region (and it is)
AgentsQueueOut::Add(pedsToRemove); //this should be critical region (and it is)
}
else
#endif
......
......@@ -73,7 +73,6 @@ bool GCFMModel::Init (Building* building)
{
if(auto dirff = dynamic_cast<DirectionFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -83,7 +82,6 @@ bool GCFMModel::Init (Building* building)
if(auto dirlocff = dynamic_cast<DirectionLocalFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -93,7 +91,6 @@ bool GCFMModel::Init (Building* building)
if(auto dirsublocff = dynamic_cast<DirectionSubLocalFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionSubLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();;
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......
......@@ -73,7 +73,6 @@ bool GompertzModel::Init(Building *building) {
if (auto dirff = dynamic_cast<DirectionFloorfield *>(_direction.get())) {
Log->Write("INFO:\t Init DirectionFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -83,7 +82,6 @@ bool GompertzModel::Init(Building *building) {
if (auto dirlocff = dynamic_cast<DirectionLocalFloorfield *>(_direction.get())) {
Log->Write("INFO:\t Init DirectionLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -93,7 +91,6 @@ bool GompertzModel::Init(Building *building) {
if (auto dirsublocff = dynamic_cast<DirectionSubLocalFloorfield *>(_direction.get())) {
Log->Write("INFO:\t Init DirectionSubLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_use_wall_avoidance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......
......@@ -221,7 +221,7 @@ void GradientModel::ComputeNextTimeStep(double current, double deltaT, Building*
double normVi = ped->GetV().ScalarProduct(ped->GetV()); //squared
double HighVel = (ped->GetV0Norm() + delta) * (ped->GetV0Norm() + delta); //(v0+delta)^2
if (normVi > HighVel && ped->GetV0Norm() > 0) { //@todo: ar.graf disabled check
if (normVi > HighVel && true) {
fprintf(stderr, "GradientModel::calculateForce_LC() WARNING: actual velocity (%f) of iped %d "
"is bigger than desired velocity (%f) at time: %fs (periodic=%d)\n",
sqrt(normVi), ped->GetID(), ped->GetV0Norm(), current, periodic);
......
......@@ -73,7 +73,6 @@ bool KrauszModel::Init (Building* building)
{
if(auto dirff = dynamic_cast<DirectionFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -83,7 +82,6 @@ bool KrauszModel::Init (Building* building)
if(auto dirlocff = dynamic_cast<DirectionLocalFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -93,7 +91,6 @@ bool KrauszModel::Init (Building* building)
if(auto dirsublocff = dynamic_cast<DirectionSubLocalFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionSubLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......
......@@ -74,17 +74,15 @@ bool VelocityModel::Init (Building* building)
if(auto dirff = dynamic_cast<DirectionFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
dirff->Init(building, _deltaH, _wallAvoidDistance, _useWallAvoidance);
Log->Write("INFO:\t Init DirectionFloorfield done");
}
if(auto dirlocff = dynamic_cast<DirectionLocalFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......@@ -94,7 +92,6 @@ bool VelocityModel::Init (Building* building)
if(auto dirsublocff = dynamic_cast<DirectionSubLocalFloorfield*>(_direction.get())){
Log->Write("INFO:\t Init DirectionSubLOCALFloorfield starting ...");
//fix using defaults; @fixme ar.graf (pass params from argument parser to ctor?)
double _deltaH = building->GetConfig()->get_deltaH();
double _wallAvoidDistance = building->GetConfig()->get_wall_avoid_distance();
bool _useWallAvoidance = building->GetConfig()->get_use_wall_avoidance();
......
......@@ -213,7 +213,6 @@ void UnivFFviaFM::create(std::vector<Line>& walls, std::map<int, Line>& doors, s
}
_speedFieldSelector[REDU_WALL_SPEED] = temp_reduWallSpeed;
//init _reducedWallSpeed by using distance field
//@todo: @ar.graf @newFF
createReduWallSpeed(temp_reduWallSpeed);
}
......@@ -813,7 +812,7 @@ void UnivFFviaFM::calcCost(const long int key, double* cost, Point* dir, const d
dir[key]._x = (-(cost[key]-cost[key-1])/_grid->Gethx());
dir[key]._y = (0.);
}
dir[key] = dir[key].Normalized(); //@todo: ar.graf: what yields better performance? scale every point here or scale each read value? more points or more calls to any element of dir2Wall
dir[key] = dir[key].Normalized();
return;
}
......@@ -1005,7 +1004,7 @@ void UnivFFviaFM::calcDist(const long int key, double* cost, Point* dir, const d
dir[key]._x = (-(cost[key]-cost[key-1])/_grid->Gethx());
dir[key]._y = (0.);
}
dir[key] = dir[key].Normalized(); //@todo: ar.graf: what yields better performance? scale every point here or scale each read value? more points or more calls to any element of dir2Wall
dir[key] = dir[key].Normalized();
return;
}
......@@ -1357,7 +1356,7 @@ void UnivFFviaFM::writeFF(const std::string& filename, std::vector<int> targetID
file.close();
}
//@todo: @ar.graf: mode is argument, which should not be needed, the info is stored in members like speedmode, ...
//mode is argument, which should not be needed, the info is stored in members like speedmode, ...
double UnivFFviaFM::getCostToDestination(const int destID, const Point& position, int mode) {
assert(_grid->includesPoint(position));
if (_costFieldWithKey.count(destID)==1 && _costFieldWithKey[destID]) {
......
......@@ -549,7 +549,7 @@ int FFRouter::FindExit(Pedestrian* p)
}
std::pair<int, int> key = std::make_pair(doorUID, finalDoor);
//auto subroomDoors = _building->GetSubRoomByUID(p->GetSubRoomUID())->GetAllGoalIDs();
//only consider, if paths exists //@todo: ar.graf: this assert needs to be checked. why would _pathsMatrix have no entry?
//only consider, if paths exists
if (_pathsMatrix.count(key)==0) {
Log->Write("no key for %d %d", key.first, key.second);
continue;
......
......@@ -173,7 +173,7 @@ class RectGrid
}
}
void createGrid(){ // @todo ar.graf : what if cast chops off float, if any changes: get_x_fromKey still correct?
void createGrid(){ //what if cast chops off float, if any changes: get_x_fromKey still correct?
if (!isInitialized) {
iMax = (long int)((xMax-xMin)/hx) + 2; //check plus 2 (one for ceil, one for starting point)
jMax = (long int)((yMax-yMin)/hy) + 2;
......@@ -199,7 +199,7 @@ class RectGrid
std::cerr
<< " Point is out of Grid-Scope, Tip: check if correct Floorfield is called"
<< std::endl;
return Point(-7, -7); // @todo: ar.graf : find good false indicator
return Point(-7, -7);
}
long int i = (long int)(((currPoint._x-xMin)/hx)+.5);
long int j = (long int)(((currPoint._y-yMin)/hy)+.5);
......
......@@ -118,7 +118,7 @@ int QuickestPathRouter::FindNextExit(Pedestrian* ped)
const Point& pt3 = ped->GetPos();
double distToExit = ap->GetNavLine()->DistTo(pt3);
if (distToExit > J_EPS_DIST) //@todo: ar.graf: if anyone understands this, please write comment
if (distToExit > J_EPS_DIST) //if anyone understands this, please write comment
continue;
nextDestination = GetQuickestRoute(ped);
......
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