-
Notifications
You must be signed in to change notification settings - Fork 0
/
CodeMain.cpp
603 lines (489 loc) · 19.4 KB
/
CodeMain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
#include "StopClass.h"
#include "Route.h"
#include "Trip.h"
#include <iomanip>
#include <iostream>
#include <fstream>
#include <array>
#include <sstream>
#include <string>
#include <stdio.h>
#include <vector>
#include <unordered_map>
#include "Functions.h"
#include "ShortestPath.h"
#include <time.h>
#include <thread>
#include "multi_threading.h"
using namespace std;
//Unordered map for stop
unordered_map<string, int> findID_fromStopID;
//unordered map for routes
unordered_map<string, int> findRoute_fromID;
//Unordered map for trip
unordered_map<string, int> findTrip_fromTripID;
//Unordered map of trip and route
unordered_map<string, string> findRouteID_fromTripID;
// stop holder vector
vector<Stop*> stop_holder;
// route holder vector
vector<Route*> route_holder;
// trip holder vector
vector<Trip*> trip_holder;
// parameter of StopTime-file: StopTime_tripID, StopTime_arrivalTime, StopTime_departureTime, StopTime_stopID, StopTime_sequence
int main()
{
// Reads Stops file into: vector<Stop> stop_holder
unsigned int nthreads = thread::hardware_concurrency();
cout << "number of available threads: " << nthreads << endl;
string lineStation;
string nameStation;
ifstream fileStation;
cout << "Please provide the path to GTFS-Stops File: t" << endl;
cin >> nameStation;
// C:\Users\Kia\Desktop\GTFS\stgeorge
string filename_Stops = "C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\stops.tx" + nameStation;
fileStation.open(filename_Stops);
if (fileStation.fail())
{
cerr << "Opening Station file has failed";
exit(1);
}
cout << "\n" << endl;
while (fileStation.good())
{
int IDgenerator = -1;
while (getline(fileStation, lineStation))
{
istringstream streamA(lineStation);
IDgenerator = IDgenerator + 1;
string stpID;
string stpCode;
string stpDesc;
string stplat;
string stplon;
string stpname;
getline(streamA, stpID, ',');
getline(streamA, stpCode, ',');
getline(streamA, stpname, ',');
getline(streamA, stpDesc, ',');
getline(streamA, stplat, ',');
getline(streamA, stplon, ',');
Stop *new_stp = new Stop(IDgenerator, stpID, atof(stplat.c_str()), atof(stplon.c_str()));
stop_holder.push_back(new_stp);
//stop_holder[1]->
//to find the related Stop use the "vector::at", so the Stop will be stop_holder.at(findID_fromStopID[stpID])
findID_fromStopID[stpID] = IDgenerator;
}
}
/* cout << "# Stops: " << stop_holder.size() << endl;
for (unsigned int i = 0; i < stop_holder.size(); i++)
{
cout << "Stps file title line: ID: " << stop_holder[i]->getID() << " next is stopID: " << stop_holder[i]->getstopID() << " next is lat: " << stop_holder[i]->getlat() << stop_holder[i]->getlon() << endl;
}
string stop_id_for_check = "1";
cout << "the stop_id = 1 have ID: " << stop_holder[findID_fromStopID[stop_id_for_check]]->getID() << endl; */
getchar();
string kia;
cout << "enter kia: ..." << endl;
cin >> kia;
// Reads Route file into: vector<Route> route_holder
string lineRoute;
string nameRoute;
ifstream fileRoute;
cout << "Please provide the path to GTFS-Route File: t" << endl;
cin >> nameRoute;
// C:\Users\Kia\Desktop\GTFS\stgeorge
string filename_Route = "C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\routes.tx" + nameRoute;
fileRoute.open(filename_Route);
if (fileRoute.fail())
{
cerr << "Opening Station file has failed";
exit(1);
}
cout << "\n" << endl;
while (fileRoute.good())
{
int IDgenerator = -1;
while (getline(fileRoute, lineRoute))
{
istringstream streamA(lineRoute);
IDgenerator = IDgenerator + 1;
string rtID;
string agcID;
string rtname;
getline(streamA, rtID, ',');
getline(streamA, agcID, ',');
getline(streamA, rtname, ',');
Route *new_rt = new Route(rtID);
route_holder.push_back(new_rt);
//to find the related route use the "vector::at", so the route will be route_holder.at(findRoute_fromID[rtID])
findRoute_fromID[rtID] = IDgenerator;
}
}
//cout << "# Routes: " << route_holder.size() << endl;
//cout << "Route file title line: ID: " << route_holder[0]->getrouteID() << endl;
//cout << "Route file first line: ID: " << route_holder[1]->getrouteID() << endl;
//cout << "the Route_id = 1 have ID: " << route_holder[findRoute_fromID[stop_id_for_check]]->getrouteID() << endl;
getchar();
cout << "enter kia: ..." << endl;
cin >> kia;
// Reads Trips file into:
// parameter of Trips-file: Trips_routeID, Trips_serviceID, Trips_tripID, Trips_directionID
string lineTrips;
string nameTrips;
ifstream fileTrips;
cout << "Please provide the path to GTFS-Trips File: v(CSV)" << endl;
cin >> nameTrips;
string filename_Trips = "C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\tripsWeekdays.cs" + nameTrips;
fileTrips.open(filename_Trips);
if (fileTrips.fail())
{
cerr << "Opening Trips file has failed";
exit(1);
}
cout << "\n" << endl;
while (fileTrips.good())
{
int IDgenerator = -1;
while (getline(fileTrips, lineTrips))
{
istringstream streamA(lineTrips);
IDgenerator = IDgenerator + 1;
string trphs;
string rtID;
string serviceID;
string trpID;
string dirID;
getline(streamA, rtID, ',');
getline(streamA, serviceID, ',');
getline(streamA, trpID, ',');
getline(streamA, trphs, ',');
getline(streamA, dirID, ',');
Trip *new_trp = new Trip(trpID, dirID);
trip_holder.push_back(new_trp);
route_holder[findRoute_fromID[rtID]]->settrip_ofroute(new_trp);
if (atoi(dirID.c_str()) == 1) route_holder[findRoute_fromID[rtID]]->directional = 1;
//to find the related route use the "vector::at", so the route will be route_holder.at(findRoute_fromID[rtID])
findTrip_fromTripID[trpID] = IDgenerator;
findRouteID_fromTripID[trpID] = rtID;
}
}
/*cout << "# Trips: " << route_holder.size() << endl;
cout << "Trips file title line: trip_ID: " << trip_holder[0]->gettripID() << " Direction is: " << trip_holder[0]->getdirection() << endl;
cout << "Route 1's trips: " << endl;
for (unsigned int i = 0; i < 100; i++)
{
cout << trip_holder[i]->gettripID() << "has direction: " << trip_holder[i]->getdirection() << endl;
if (trip_holder[i]->getdirection() == "0")
{
cout << "TRUE" << endl;
}
else
{
cout << "false" << endl;
}
}
*/
getchar();
cout << "enter kia: ..." << endl;
cin >> kia;
// Reads StopTimes file into:
// parameter: StopTime_tripID, StopTime_arrivalTime, StopTime_departureTime, StopTime_stopID, StopTime_sequence
string lineStopTimes;
string nameStopTimes;
ifstream fileStopTimes;
int weekday_count = 0;
cout << "Please provide the path to GTFS-Stop-Times File: t" << endl;
cin >> nameStopTimes;
string filename_StopTimes = "C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\stop_times.tx" + nameStopTimes;
fileStopTimes.open(filename_StopTimes);
if (fileStopTimes.fail())
{
cerr << "Opening Station file has failed";
exit(1);
}
cout << "\n" << endl;
while (fileStopTimes.good())
{
while (getline(fileStopTimes, lineStopTimes))
{
istringstream streamA(lineStopTimes);
string trpID;
string arrtime;
string deptime;
string stopID;
string stopseq;
string stophs;
getline(streamA, trpID, ',');
getline(streamA, arrtime, ',');
getline(streamA, deptime, ',');
getline(streamA, stopID, ',');
getline(streamA, stopseq, ',');
getline(streamA, stophs, ',');
int timearr = TimeToInt(arrtime);
int timedep = TimeToInt(deptime);
if (findTrip_fromTripID.count(trpID) > 0)
{
weekday_count = weekday_count + 1;
//set stop and time in trip file
trip_holder[findTrip_fromTripID[trpID]]->setstop_time_ontrip(stop_holder[findID_fromStopID[stopID]], timedep, atoi(stopseq.c_str()));
//set stop on routes
route_holder[findRoute_fromID[findRouteID_fromTripID[trpID]]]->setstop_onroute(stop_holder[findID_fromStopID[stopID]]);
//set connected routes to stop
stop_holder[findID_fromStopID[stopID]]->setConnectedRoutes(route_holder[findRoute_fromID[findRouteID_fromTripID[trpID]]]);
//set passing trips to stop
/*stop_holder[findID_fromStopID[stopID]]->passing_trips[timedep]
= make_pair(route_holder[findRoute_fromID[findRouteID_fromTripID[trpID]]],
trip_holder[findTrip_fromTripID[trpID]]);*/
stop_holder[findID_fromStopID[stopID]]->passing_trips.push_back(make_pair(timedep, make_pair(route_holder[findRoute_fromID[findRouteID_fromTripID[trpID]]],
trip_holder[findTrip_fromTripID[trpID]])));
}
}
}
/* cout << "Route 1's stops: " << endl;
for (unsigned int i = 0; i < route_holder[findRoute_fromID[stop_id_for_check]]->getstops().size(); i++)
{
cout << route_holder[findRoute_fromID[stop_id_for_check]]->getstops()[i]->getstopID() << endl;
}
string tripID_test = "REDCLIFFS1";
cout << " REDCLIFFS1's stopID, time and sequences are: " << endl;
for (unsigned int i = 0; i < trip_holder[findTrip_fromTripID[tripID_test]]->getstop_time_ontrip().size(); i++)
{
cout << "stopID: " << trip_holder[findTrip_fromTripID[tripID_test]]->getstop_time_ontrip()[i].first->getstopID() << " stop time: " <<
trip_holder[findTrip_fromTripID[tripID_test]]->getstop_time_ontrip()[i].second.first << " stop sequence: " <<
trip_holder[findTrip_fromTripID[tripID_test]]->getstop_time_ontrip()[i].second.second << endl;
}
*/
//getchar();
cout << "number of weekday trips counted: " << weekday_count << endl;
cout << "enter kia: ..." << endl;
cin >> kia;
string linePOP;
ifstream filePopulation;
string filename_Population = "C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\population.csv";
filePopulation.open(filename_Population);
if (filePopulation.fail())
{
cerr << "Opening Station file has failed";
exit(1);
}
cout << "\n" << endl;
while (filePopulation.good())
{
while (getline(filePopulation, linePOP))
{
istringstream streamA(linePOP);
string stop_id;
string populationID;
getline(streamA, stop_id, ',');
getline(streamA, populationID, ',');
//cout << " pop read is: " << populationID << endl;
//set stop and time in trip file
stop_holder[findID_fromStopID[stop_id]]->population = atoi(populationID.c_str());
}
}
cout << stop_holder[20]->getID() << " the pop is: " << stop_holder[20]->population << endl;
getchar();
cout << "enter kia: ..." << endl;
cin >> kia;
// find the Connected stops for each stop
// find the walking between all stops
for (unsigned int i = 0; i < stop_holder.size(); i++)
{
for (unsigned int j = 0; j < stop_holder.size(); j++)
{
Distance_SetCS_SetSD(stop_holder[i], stop_holder[j]);
}
}
double maxtt = 0;
for (unsigned int i = 0; i < stop_holder[1]->stop_distance.size(); i++)
{
//cout << "distance between stop 1 and stop " << i << " is: " << stop_holder[1]->stop_distance[i] << endl;
if (stop_holder[1]->stop_distance[i] >= maxtt) maxtt = stop_holder[1]->stop_distance[i];
}
//cout << "max tt for stop 1 is : " << maxtt << endl;
getchar();
cout << "enter kia: ..." << endl;
cin >> kia;
// set the connected stops, connected routes
for (unsigned int i = 0; i < stop_holder.size(); i++)
{
for (unsigned int j = 0; j < stop_holder[i]->getConnectedStop().size(); j++)
{
for (unsigned int k = 0; k < stop_holder[i]->getConnectedStop().at(j).first->getConnectedroute().size(); k++)
{
stop_holder[i]->setconnectedroutesstops(stop_holder[i]->getConnectedStop().at(j).first,
stop_holder[i]->getConnectedStop().at(j).first->getConnectedroute().at(k));
}
}
}
clock_t t1, t2;
float diff;
t1 = clock();
ofstream closeness;
closeness.open("C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\closeness.csv");
for (unsigned int i = 1; i < stop_holder.size(); i++)
{
double poptt = 0.0;
for (unsigned int tt_stops = 1; tt_stops < stop_holder[i]->stop_distance.size(); tt_stops++)
{
poptt = poptt + (stop_holder[tt_stops]->population * stop_holder[i]->stop_distance[tt_stops]);
}
double closeNN = poptt / 661197.4;
stop_holder[i]->settransfer();
closeness << stop_holder[i]->getID() << "," << closeNN << "," << stop_holder[i]->degree_centrality << endl;
}
closeness.close();
t2 = clock();
diff = ((float)t2 - (float)t1) / CLOCKS_PER_SEC;
cout << "closeness calculation time is: " << diff << endl;
t1 = clock();
/*ofstream betweenness;
betweenness.open("C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\betweenness.csv");
for (unsigned int i = 1; i < stop_holder.size(); i++)
{
int btwn_centrality = 0;
for (unsigned int j = 0; j < stop_holder[i]->getConnectedroute().size(); j++)
{
for (unsigned int k = 0; k < stop_holder[i]->getConnectedroute().at(j)->getstops().size(); k++)
{
btwn_centrality = btwn_centrality + stop_holder[i]->getConnectedroute().at(j)->getstops().at(k)->getTransfer();
}
}
for (unsigned int j = 0; j < stop_holder[i]->getconnected_routes_stops().size(); j++)
{
for (unsigned int k = 0; k < stop_holder[i]->getconnected_routes_stops().at(j).second->getstops().size(); k++)
{
btwn_centrality = btwn_centrality + stop_holder[i]->getconnected_routes_stops().at(j).second->getstops().at(k)->getTransfer();
}
}
betweenness << stop_holder[i]->getID() << "," << btwn_centrality << endl;
}
betweenness.close();
*/
t2 = clock();
diff = ((float)t2 - (float)t1) / CLOCKS_PER_SEC;
cout << "betweenness calculation time is: " << diff << endl;
ofstream results_WATT;
results_WATT.open("C:\\Users\\Kia\\Desktop\\GTFS\\UTA\\WATTresults.csv");
string myline = "StationTime";
for (unsigned int timeIT = 18000; timeIT < 18301; timeIT = timeIT + 300)
{
myline = myline + "," + to_string(timeIT);
}
results_WATT << myline << endl;
vector<double> TTvector_for1;
t1 = clock();
for (unsigned int i = 1; i < stop_holder.size(); i++)
{
myline = stop_holder[i]->getstopID();
for (unsigned int timeIT = 18000; timeIT < 18301; timeIT = timeIT + 300)
{
double poptt = 0.0;
vector<double> TTvector = stop_holder[i]->stop_distance;
vector<pair<Stop*, int>> r1;
vector<pair<Stop*, int>> s1;
vector<pair<Stop*, int>> s2;
vector<pair<Stop*, int>> s3;
//starting from the route passing the stop
r1 = pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute(stop_holder[i], TTvector, timeIT)));
cout << "routing1" << endl;
s1 = pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute(stop_holder[i], TTvector, timeIT)), timeIT));
cout << "routing2" << endl;
s2 = pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute(stop_holder[i], TTvector, timeIT), timeIT)));
cout << "routing3" << endl;
s3 = pathfinder_CS_byRoute_second(TTvector, timeIT,
pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute_second(TTvector, timeIT,
pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute(stop_holder[i], TTvector, timeIT), timeIT)), timeIT));
cout << "routing4" << endl;
r1.insert(r1.end(),s1.begin(),s1.end());
r1.insert(r1.end(), s2.begin(), s2.end());
r1.insert(r1.end(), s3.begin(), s3.end());
pathfinder_CS_byRoute_second(TTvector, timeIT, r1);
cout << "routing5" << endl;
pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS_second(TTvector, r1, timeIT));
cout << "routing6" << endl;
//starting from the connected stops of the stop
r1 = pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS(stop_holder[i], timeIT))));
cout << "stop routing1" << endl;
s1 = pathfinder_CS_byRoute_second(TTvector, timeIT,
pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS(stop_holder[i], timeIT))), timeIT));
cout << "stop routing2" << endl;
s2 = pathfinder_CS_byRoute_second(TTvector, timeIT,
pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS(stop_holder[i], timeIT)), timeIT)));
cout << "stop routing3" << endl;
s3 = pathfinder_CS_byRoute_second(TTvector, timeIT,
pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute_second(TTvector, timeIT,
pathfinder_CS_byCS_second(TTvector, pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS(stop_holder[i], timeIT)), timeIT)), timeIT));
cout << "stop routing4" << endl;
r1.insert(r1.end(), s1.begin(), s1.end());
r1.insert(r1.end(), s2.begin(), s2.end());
r1.insert(r1.end(), s3.begin(), s3.end());
pathfinder_CS_byRoute_second(TTvector, timeIT, r1);
cout << "stop routing5" << endl;
pathfinder_CS_byRoute_second(TTvector, timeIT, pathfinder_CS_byCS_second(TTvector, r1, timeIT));
cout << "stop routing6" << endl;
TTvector_for1 = TTvector;
for (unsigned int tt_stops = 1; tt_stops < TTvector.size(); tt_stops++)
{
poptt = poptt + (stop_holder[tt_stops]->population * TTvector[tt_stops]);
}
double watt_time = poptt / 73239;
myline = myline + "," + to_string(watt_time);
}
cout << "WATT for station number " << i << " is calculated" << endl;
results_WATT << myline << endl;
}
results_WATT.close();
t1 = clock();
/*unsigned int start_processing = 14400;
unsigned int processiong_interval_number = 1;
unsigned int processing_interval = processiong_interval_number * 600;
thread first(haste, "1", "first", stop_holder, start_processing, start_processing + processing_interval);
thread second(haste, "2", "second", stop_holder, start_processing + processing_interval, start_processing + (processing_interval*2));
thread third(haste, "3", "third", stop_holder, start_processing + (processing_interval * 2), start_processing + (processing_interval * 3));
thread fourth(haste, "4", "fourth", stop_holder, start_processing + (processing_interval * 3), start_processing + (processing_interval * 4));
thread fifth(haste, "5", "fifth", stop_holder, start_processing + (processing_interval * 4), start_processing + (processing_interval * 5));
thread sixth(haste, "6", "sixth", stop_holder, start_processing + (processing_interval * 5), start_processing + (processing_interval * 6));
//thread seventh(haste, "7", "seventh", stop_holder, start_processing + (processing_interval * 6), start_processing + (processing_interval * 7));
//thread eighth(haste, "8", "eighth", stop_holder, 10, 20);
*/
/*unsigned int start_processing = 14400;
unsigned int processiong_interval_number = 1;
unsigned int processing_interval = processiong_interval_number * 600;
thread first(haste, "1", "first", stop_holder, 14400, 79201);
first.join();
//second.join();
//third.join();
//fourth.join();
//fifth.join();
//sixth.join();
//seventh.join();
//eighth.join();
t2 = clock();
diff = ((float)t2 - (float)t1) / CLOCKS_PER_SEC;
cout << "WATT calculation time is: " << diff << endl;
cout << "type kia to finish: " << endl;
cin >> kia;
/*ofstream WATT_Notransit;
WATT_Notransit.open("C:\\Users\\Kia\\Desktop\\GTFS\\stgeorge\\WATT_Notransit.csv");
for (unsigned int i = 0; i < TTvector_for1.size(); i++)
{
WATT_Notransit << i << "," << TTvector_for1[i] << "," << stop_holder[1]->stop_distance[i] << endl;
}
for (unsigned int i = 1; i < stop_holder.size(); i++)
{
double poptt = 0.0;
myline = stop_holder[i]->getstopID();
for (unsigned int tt_stops = 1; tt_stops < stop_holder[i]->stop_distance.size(); tt_stops++)
{
poptt = poptt + (stop_holder[tt_stops]->population * stop_holder[i]->stop_distance[tt_stops]);
}
double watt_time = poptt / 661197.4;
myline = myline + "," + to_string(watt_time);
WATT_Notransit << myline << endl;
}
WATT_Notransit.close();*/
return 0;
}