Fixed #128
This commit is contained in:
parent
ec700c2ed7
commit
92a39591b5
@ -150,6 +150,9 @@ async function checkGroundnet(data) {
|
|||||||
});
|
});
|
||||||
this.postMessage(['progress', 1]);
|
this.postMessage(['progress', 1]);
|
||||||
var isLegitEnd = function (v) {
|
var isLegitEnd = function (v) {
|
||||||
|
if (bidirectionalGraph[v] === undefined) {
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
if (Object.keys(bidirectionalGraph[v]).length <= 1) {
|
if (Object.keys(bidirectionalGraph[v]).length <= 1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -234,21 +237,25 @@ async function checkGroundnet(data) {
|
|||||||
id => {
|
id => {
|
||||||
var normalRoutes = bidirectionalGraph[id];
|
var normalRoutes = bidirectionalGraph[id];
|
||||||
var pushbackRoutes = noPushbackGraph[id];
|
var pushbackRoutes = noPushbackGraph[id];
|
||||||
|
if (normalRoutes !== undefined) {
|
||||||
var nonPushbackRoutes = Object.keys(normalRoutes).filter(r => pushbackRoutes[r] === undefined);
|
var nonPushbackRoutes = Object.keys(normalRoutes).filter(r => pushbackRoutes[r] === undefined);
|
||||||
if (nonPushbackRoutes.length > 1)
|
if (nonPushbackRoutes.length > 1)
|
||||||
return { id: id, message: check_msg.TO_MANY_PUSHBACK_TAXI_ROUTES }
|
return { id: id, message: check_msg.TO_MANY_PUSHBACK_TAXI_ROUTES }
|
||||||
|
}
|
||||||
}).filter(n => n !== undefined);
|
}).filter(n => n !== undefined);
|
||||||
this.postMessage(['progress', 1]);
|
this.postMessage(['progress', 1]);
|
||||||
var pushbackExitNotBidirectional = pushbackNodes.map(
|
var pushbackExitNotBidirectional = pushbackNodes.map(
|
||||||
id => {
|
id => {
|
||||||
var normalRoutes = bidirectionalGraph[id];
|
var normalRoutes = bidirectionalGraph[id];
|
||||||
var pushbackRoutes = noPushbackGraph[id];
|
var pushbackRoutes = noPushbackGraph[id];
|
||||||
|
if (normalRoutes !== undefined) {
|
||||||
var nonPushbackRoutes = Object.keys(normalRoutes).filter(r => pushbackRoutes[r] === undefined);
|
var nonPushbackRoutes = Object.keys(normalRoutes).filter(r => pushbackRoutes[r] === undefined);
|
||||||
if(nonPushbackRoutes.length > 0) {
|
if(nonPushbackRoutes.length > 0) {
|
||||||
var returnRoute = Object.keys(bidirectionalGraph[nonPushbackRoutes[0]]).map(id => Number(id)).filter(retId =>id === retId);
|
var returnRoute = Object.keys(bidirectionalGraph[nonPushbackRoutes[0]]).map(id => Number(id)).filter(retId =>id === retId);
|
||||||
if (returnRoute.length === 0)
|
if (returnRoute.length === 0)
|
||||||
return { id: id, message: check_msg.PUSHBACK_EXIT_NOT_BIDRECTIONAL }
|
return { id: id, message: check_msg.PUSHBACK_EXIT_NOT_BIDRECTIONAL }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).filter(n => n !== undefined);
|
}).filter(n => n !== undefined);
|
||||||
this.postMessage(['progress', 1]);
|
this.postMessage(['progress', 1]);
|
||||||
var rogueHoldPoints = pushbackNodes.map(
|
var rogueHoldPoints = pushbackNodes.map(
|
||||||
|
Loading…
Reference in New Issue
Block a user