From 83ed2214fd405520db91b899c97726c4f566e43b Mon Sep 17 00:00:00 2001 From: Mansehej Date: Mon, 5 Aug 2019 21:15:11 +0530 Subject: [PATCH] Added Orange Line Added Airport Express Line. Added Interchange between Dhaula Kuan and Durgabai Deshmukh South Campus with a time of 18 minutes. --- Route.js | 33 +++++++++++++++++++++---- lines/orange.json | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 lines/orange.json diff --git a/Route.js b/Route.js index b9259bf..6e38a33 100644 --- a/Route.js +++ b/Route.js @@ -71,7 +71,10 @@ class Graph { { if(this.getline(currentNode,neighbor.node)!=this.getline(currentNode,backtrace[currentNode])) { - time = time + 13; + if(this.getline(currentNode,neighbor.node) == "1.2km Skywalk" ||this.getline(currentNode,backtrace[currentNode]) == "1.2km Skywalk") + time=time+0; + else + time = time + 13; } } @@ -109,8 +112,7 @@ class Graph { console.log(result.interchange); path.unshift(backtrace[lastStep]) lastStep = backtrace[lastStep] - } - + } result.path=path; result.time=times[endNode]; @@ -345,12 +347,33 @@ for (var i = 0; i < pinkbranchline.length; i++) { g.addNode(pinkbranchline[i]); } for(var i=0; i<(pinkbranchline.length-1); i++){ - g.addEdge(pinkbranchline[i], pinkbranchline[i+1],2.27, "pinkbranch"); + g.addEdge(pinkbranchline[i], pinkbranchline[i+1],2.43, "pinkbranch"); } +//Orange +orange=require("./lines/orange.json"); +var orangeline = []; +for(var i=0; i