-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPTActivity.java
103 lines (80 loc) · 2.47 KB
/
PTActivity.java
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
package transit;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.UUID;
public class PTActivity {
public String id = UUID.randomUUID().toString();
public String description = "";
public String type = "";
public double lb = 0;
public double ub = 0;
public boolean isTransit = false;
public boolean isBike = false;
public boolean isWalk = false;
public boolean isWait = false;
public String route = "";
public String routeID = "";
public String routeDirection = "";
public String routeType = "";
public String initLoc = "";
public String destLoc = "";
public String headsign = "";
public StringBuilder details = new StringBuilder();
public String fromStopID = "";
public String toStopID = "";
public double startLat = 0;
public double startLon = 0;
public double endLat = 0;
public double endLon = 0;
public double cost = 0;
public LinkedList<Double> polyline = new LinkedList<Double>();
public StringBuilder instructions = new StringBuilder();
// each arrival time has an uncertainty
// 0: nominal/scheduled time; 1: earliest time; 2: latest time
public ArrayList<double[]> busArrivalTimes = new ArrayList<double[]>();
public PTActivity(String actDescription, double actLB, double actUB, String actType){
description = actDescription;
lb = actLB;
ub = actUB;
type = actType;
}
public PTActivity(String actDescription, double actLB, double actUB, String actType, String start, String end,
double sLat, double sLon, double eLat, double eLon){
description = actDescription;
lb = actLB;
ub = actUB;
type = actType;
initLoc = start;
destLoc = end;
startLat = sLat;
startLon = sLon;
endLat = eLat;
endLon = eLon;
}
public PTActivity(String actDescription, double actLB, double actUB, String actType, String busRoute, String stop1, String stop2){
description = actDescription;
lb = actLB;
ub = actUB;
type = actType;
route = busRoute;
initLoc = stop1;
destLoc = stop2;
}
public PTActivity(String actDescription, double actLB, double actUB, String actType, String _route, String _id, String _routeType,
String stop1, String stop2, double sLat, double sLon, double eLat, double eLon, String _direction){
description = actDescription;
lb = actLB;
ub = actUB;
type = actType;
route = _route;
routeID = _id;
routeType = _routeType;
routeDirection = _direction;
initLoc = stop1;
destLoc = stop2;
startLat = sLat;
startLon = sLon;
endLat = eLat;
endLon = eLon;
}
}