Skip to content

Commit

Permalink
Added Orange Line
Browse files Browse the repository at this point in the history
Added Airport Express Line.
Added Interchange between Dhaula Kuan and Durgabai Deshmukh South Campus with a time of 18 minutes.
  • Loading branch information
Mansehej committed Aug 5, 2019
1 parent 3d49d73 commit 83ed221
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 5 deletions.
33 changes: 28 additions & 5 deletions Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -109,8 +112,7 @@ class Graph {
console.log(result.interchange);
path.unshift(backtrace[lastStep])
lastStep = backtrace[lastStep]
}

}
result.path=path;
result.time=times[endNode];

Expand Down Expand Up @@ -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<orange.length; i++)
{
orangeline[i]=orange[i]["Hindi"];
}
for (var i = 0; i < orangeline.length; i++) {
if(orangeline[i]=='New Delhi' || orangeline[i]=='Dwarka Sector 21')
continue;
else
g.addNode(orangeline[i]);
}
for(var i=0; i<(orangeline.length-1); i++){
g.addEdge(orangeline[i], orangeline[i+1], 5.2, "orange");
}

//Dhaula Kuan - South Campus Connection
g.addEdge("Dhaula Kuan", "Durgabai Deshmukh South Campus", 18, "1.2km Skywalk");

}

importlines();

importlines()

var port=( process.env.PORT || 5000 );

Expand Down
62 changes: 62 additions & 0 deletions lines/orange.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[
{
"8": "None",
"English": "1",
"Hindi": "New Delhi",
"Opening": "नई दिल्ली",
"Interchange\nConnection": "23 February 2011",
"Station Layout": "Yellow Line \n Indian Railways   Bus Terminal",
"Depot Connection": "Underground",
"Depot Layout": "None"
},
{
"8": "None",
"English": "2",
"Hindi": "Shivaji Stadium",
"Opening": "शिवाजी स्टेडियम",
"Interchange\nConnection": "23 February 2011",
"Station Layout": "Bus Terminal",
"Depot Connection": "Underground",
"Depot Layout": "None"
},
{
"8": "None",
"English": "3",
"Hindi": "Dhaula Kuan",
"Opening": "धौला कुआँ",
"Interchange\nConnection": "15 August 2011",
"Station Layout": "Pink Line   Feeder Bus",
"Depot Connection": "Elevated",
"Depot Layout": "None"
},
{
"8": "None",
"English": "4",
"Hindi": "Delhi Aerocity",
"Opening": "दिल्ली एरोसिटी",
"Interchange\nConnection": "15 August 2011",
"Station Layout": "IGI Airport   Feeder Bus",
"Depot Connection": "Underground",
"Depot Layout": "None"
},
{
"8": "None",
"English": "5",
"Hindi": "Airport",
"Opening": "विमानपत्तन",
"Interchange\nConnection": "23 February 2011",
"Station Layout": "IGI Airport   Feeder Bus",
"Depot Connection": "Underground",
"Depot Layout": "None"
},
{
"8": "At Grade",
"English": "6",
"Hindi": "Dwarka Sector 21",
"Opening": "द्वारका सेक्टर २१",
"Interchange\nConnection": "23 February 2011",
"Station Layout": "Blue Line  Feeder Bus",
"Depot Connection": "Underground",
"Depot Layout": "Dwarka Sector 21 Depot"
}
]

0 comments on commit 83ed221

Please sign in to comment.