# Estimating Destination of Bus Trips Considering Trip Type Characteristics
## 4 Methodology
### Method  
This study estimates the missing alighting stop by applying an appropriate method for each type of travel with missing alighting stop information, which was classified above. First, regarding \"continuous travel,\" the trip-chain-based alighting stop estimation method is applied, which estimates the missing alighting stop based on the boarding stop information of the next trip. Second, for the \"recurrent travel\" among \"non-continuous travels,\" we analyze the past travel history information to study the travel pattern for each card ID, and then analyze the potential residence/workplace, based on which the missing alighting stop is estimated. Third, for the \"non-recurrent travel,\" we extract the history of boarding around the boarding stop of the estimation-target trip from the past travel history information and estimate the alighting stop based on the destination information in the past travel history. Finally, if there is no continuous travel or past travel history, the alighting stop is assigned probabilistically based on the route pattern. Table 3 presents the utilized data for each stage. Travel types 1 to 3 use historical data by the individual, and travel type 4 uses historical data by route. The alighting-stop estimation method proposed in this study performs the estimation according to stages, as illustrated in Figure 1, and if the estimation is impossible in each stage, it proceeds to the next stage. Furthermore, the results estimated by Stages 1 and 2 (continuous travel, non-continuous and non-recurrent travel) are utilized as input data to construct pattern data in Stages 3 and 4. The alighting stop estimation method in each stage is as follows: \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Travel Type** & **1. Continuous Travel** & \
\begin{tabular}{c} **2. Non-Continuous** \\ **Recurrent Travel** \\ \end{tabular} &
\begin{tabular}{c} **3. Non-Continuous** \\ **Non-Recurrent Travel** \\ \end{tabular} & **4. Route Pattern** \\ \hline \multirow{2}{*}{Input data} & The day and & Individual potential \\  & tomorrow (per day) & residence/workplace data (per month) & Individual OD travel \\  & tomorrow (per month) & pattern data (per year) \\ \hline Data for validation & April 2020 (one month)/Verification by day of the week \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Utilization data for estimating destination of bus trip by travel type. Figure 1: Method of gradually estimating destination of bus trip considering trip type characteristics: (a) Judgment of continuous travel, (b) Judgment of recurrent travel, (c) Configuring a set of potential residences/workplaces, (d) Judgment of non-continuous recurrent travel, (e) Judgment of non-continuous non-recurrent travel, (f) Route pattern. where \(TT\) is defined as the sum of the travel time (\(tt_{i}\)) from the boarding stop to the \(i\)-th stop and the walking time (\(wt_{i,j}\)) from the \(i\)-th stop to the \(j\)-th stop. Walking time is described as follows:  
\[wt_{i,\ j}=\frac{\sqrt{\left(P_{j,\ x}-P_{i,\ x}\right)^{2}+\left(P_{j,\ y}-P_{i,\ y} \right)^{2}}}{ws},\forall i \tag{2}\]  
where \(wt_{i,j}\) is walking time, calculated by dividing the distance between the stops by the average walking speed (\(ws\)= 4 km/h). For the calculation of the distance (\(d\)) between the stops, we utilize the Euclidean distance, which is calculated based on the latitude coordinate (\(P_{x}\)) and longitudinal coordinate (\(P_{y}\)) data of the stops. Here, the distance between the stops \(i\) and \(j\) is calculated considering the bus-stop stopping order and direction for each route. Then, the estimation of the alighting stop is described as follows:  
\[S_{i}=\text{min}\ TT_{i},s.t.\ d<d_{l}(assumed\ 500\ m) \tag{3}\]  
where \(S_{i}\), the alighting stop, is finally estimated. Specifically, the stop that minimizes the travel time is selected as the alighting stop, and the stops within the allowed walking distance (\(d_{l}\)) for the distance between the stops are targeted.