Routing outside coverage area crashes the Router
This commit is contained in:
parent
53e9d70d3d
commit
61bc95dc9a
@ -288,7 +288,6 @@ private:
|
||||
#ifndef NDEBUG
|
||||
for ( Key i = 2; i < (Key) heap.size(); ++i ) {
|
||||
assert( heap[i].weight >= heap[i >> 1].weight );
|
||||
std::cout << "checked" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -142,15 +142,19 @@ public:
|
||||
}
|
||||
rawRoute.rawViaNodeCoordinates.push_back(targetCoord);
|
||||
vector<PhantomNode> phantomNodeVector(rawRoute.rawViaNodeCoordinates.size());
|
||||
bool errorOccurredFlag = false;
|
||||
|
||||
#pragma omp parallel for
|
||||
for(unsigned i = 0; i < rawRoute.rawViaNodeCoordinates.size(); i++) {
|
||||
threadData[omp_get_thread_num()]->sEngine->FindPhantomNodeForCoordinate( rawRoute.rawViaNodeCoordinates[i], phantomNodeVector[i]);
|
||||
if(!rawRoute.rawViaNodeCoordinates[i].isSet()) {
|
||||
errorOccurredFlag = true;
|
||||
}
|
||||
}
|
||||
|
||||
rawRoute.Resize();
|
||||
|
||||
unsigned distance = 0;
|
||||
bool errorOccurredFlag = false;
|
||||
|
||||
//#pragma omp parallel for reduction(+:distance)
|
||||
for(unsigned i = 0; i < phantomNodeVector.size()-1 && !errorOccurredFlag; i++) {
|
||||
@ -158,11 +162,11 @@ public:
|
||||
segmentPhantomNodes.startPhantom = phantomNodeVector[i];
|
||||
segmentPhantomNodes.targetPhantom = phantomNodeVector[i+1];
|
||||
std::vector< _PathData > path;
|
||||
int distanceOfSegment = threadData[omp_get_thread_num()]->sEngine->ComputeRoute(segmentPhantomNodes, path);
|
||||
unsigned distanceOfSegment = threadData[omp_get_thread_num()]->sEngine->ComputeRoute(segmentPhantomNodes, path);
|
||||
|
||||
if(UINT_MAX == threadData[omp_get_thread_num()]->distanceOfSegment ) {
|
||||
if(UINT_MAX == distanceOfSegment ) {
|
||||
errorOccurredFlag = true;
|
||||
cout << "Error occurred, path not found" << endl;
|
||||
// cout << "Error occurred, path not found" << endl;
|
||||
distance = UINT_MAX;
|
||||
break;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user