diff --git a/routing/DirectionStrategy.cpp b/routing/DirectionStrategy.cpp index 2db97090a793e1e28f8c3bfbabc9f93905290a68..6e7ae0c67224b05d82fd323aa03e820573b4993e 100644 --- a/routing/DirectionStrategy.cpp +++ b/routing/DirectionStrategy.cpp @@ -499,6 +499,7 @@ void DirectionSubLocalFloorfield::Init(Building* buildingArg, double stepsize, _initDone = true; + //_locffviafm[0]->writeFF() //write floorfields to file, one file per subroom //ar.graf: [SWITCH writevtk ON/OFF] // for(unsigned int i = 0; i < subUIDs.size(); ++i) { // std::vector<int> targets = {}; diff --git a/routing/ff_router/UnivFFviaFM.cpp b/routing/ff_router/UnivFFviaFM.cpp index 21389fefd2beff54afd9867c6da40482fdec0712..dd9327aaa3a6d2f857e6f1cba00fe924ec31144c 100644 --- a/routing/ff_router/UnivFFviaFM.cpp +++ b/routing/ff_router/UnivFFviaFM.cpp @@ -1424,12 +1424,12 @@ double UnivFFviaFM::getCostToDestination(const int destID, const Point& position // } assert(_grid->includesPoint(position)); long int key = _grid->getKeyAtPoint(position); - if (_gridCode[key] == OUTSIDE) { + if ((_gridCode[key] == OUTSIDE) || (_gridCode[key] == WALL)) { //bresenham line (treppenstruktur) at middle and calculated centre of line are on different gridpoints //find a key that belongs domain (must be one left or right and second one below or above) - if (_gridCode[key+1] != OUTSIDE) { + if ((_gridCode[key+1] != OUTSIDE) && (_gridCode[key+1] != WALL)) { key = key+1; - } else if (_gridCode[key-1] != OUTSIDE){ + } else if ((_gridCode[key-1] != OUTSIDE) && (_gridCode[key-1] != WALL)){ key = key-1; } else { Log->Write("ERROR:\t In getCostToDestination(3 args)"); @@ -1458,12 +1458,12 @@ double UnivFFviaFM::getCostToDestination(const int destID, const Point& position double UnivFFviaFM::getCostToDestination(const int destID, const Point& position) { assert(_grid->includesPoint(position)); long int key = _grid->getKeyAtPoint(position); - if (_gridCode[key] == OUTSIDE) { + if ((_gridCode[key] == OUTSIDE) || (_gridCode[key] == WALL)) { //bresenham line (treppenstruktur) getKeyAtPoint yields gridpoint next to edge, although position is on edge //find a key that belongs domain (must be one left or right and second one below or above) - if (_gridCode[key+1] != OUTSIDE) { + if ((_gridCode[key+1] != OUTSIDE) && (_gridCode[key+1] != WALL)) { key = key+1; - } else if (_gridCode[key-1] != OUTSIDE){ + } else if ((_gridCode[key-1] != OUTSIDE) && (_gridCode[key-1] != WALL)){ key = key-1; } else { Log->Write("ERROR:\t In getCostToDestination(2 args)"); diff --git a/routing/ff_router/ffRouter.cpp b/routing/ff_router/ffRouter.cpp index 2fe640d6f43b993a9f2bcddeef304a48d29a297e..57661402d39a1e317800ea55dfea17c9c8b7e935 100644 --- a/routing/ff_router/ffRouter.cpp +++ b/routing/ff_router/ffRouter.cpp @@ -175,7 +175,7 @@ bool FFRouter::Init(Building* building) auto pairRoomIt = allRooms.begin(); std::advance(pairRoomIt, i); UnivFFviaFM *locffptr = nullptr; - locffptr = new UnivFFviaFM(pairRoomIt->second.get(), building, 0.125, 0.0, false); + locffptr = new UnivFFviaFM(pairRoomIt->second.get(), building, 0.0625, 0.0, false); locffptr->setUser(DISTANCE_MEASUREMENTS_ONLY); locffptr->setMode(CENTERPOINT);