# Research on Fleet Size of Demand Response Shuttle Bus Based on Minimum Cost Method
## 2 Cost Model of DRC
### User Cost Modeling  
The time cost of a transit rider consists of three components: walking time, waiting time and time on board [40]. Since DRC is a door-to-door service, the walking time of passengers is zero. Therefore, the user cost expression for this model is:  
\[C_{u}=P_{w}*T_{w}+P_{v}*T_{v} \tag{1}\]  
where \(P_{W}\) is the waiting time cost coefficient; \(P_{V}\) is the in-vehicle time cost coefficient; \(T_{W}\) is the total waiting time of the passenger; \(T_{V}\) is the total in-vehicle time of the passenger. The total waiting time of passengers is calculated by the hourly passenger demand \(Q\) and the average waiting time of each journey, which can be expressed as follows: \begin{table}
\begin{tabular}{c c c} \hline \hline
**Symbol** & **Full Name** & **Unit** \\ \hline \(Q\) & Demand per hour & person/hour \\ \(K\) & Vehicle capacity & seats/vehicle \\ \(P\) & Cost coefficient & RMB (yuan)/hour \\ \(V\) & Average vehicle speed & km/h \\ \(L\) & Length of the service area & km \\ \(W\) & Width of the service area & km \\ \(\alpha\) & Proportion of boarding passengers & - \\ \(T\) & Operation cycle time & hours \\ \(B\) & Number of vehicles in operation & vehicles \\ \(f\) & Frequency of vehicle departures & departures/hour \\ \(\beta\) & Vehicle utilization rate & - \\ \(S\) & Total distance traveled by a vehicle & km \\ \(C_{u}\) & User cost & RMB (yuan) \\ \(C_{o}\) & Operational cost & RMB (yuan) \\ \(C_{t}\) & Total system cost & RMB (yuan) \\ \(\gamma\) & Demand density & person/km\({}^{2}\) \\ \(T_{w}\) & Total waiting time of the passenger & hours \\ \(T_{v}\) & Total in-vehicle time of the passenger & hours \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Definition of Variables. Figure 1: DRC operating mode. \[T_{w}=Q*t_{w} \tag{2}\]  
where \(T_{w}\) refers to the total waiting time of passengers during the operating cycle. It is a dynamic variable that is a function of fleet size, travel demand, and vehicle capacity. When the DRC receives a trip request, it automatically assigns the demand to the next operating cycle, which means that the traveler waits an additional cycle. Therefore, the average waiting time expectation of a passenger is expressed as:  
\[E\left(t_{w}^{p}\right)=\frac{T}{2}+\frac{T}{2}=T \tag{3}\]  
\[E\left(t_{w}^{d}\right)=\frac{T}{2} \tag{4}\]  
\[E(t_{w})=\alpha E\left(t_{w}^{p}\right)+(1-\alpha)\left(t_{w}^{d}\right) \tag{5}\]  
where \(E\left(t_{w}^{p}\right)\) represents the expected waiting time of the boarding passenger; \(E\left(t_{w}^{d}\right)\) represents the expected waiting time of the alighting passenger; \(\alpha\) represents the demand ratio of the boarding passenger in the cycle, and \(\alpha\) takes the value of 0.5 in general. In order to further find the running cycle \(T\) in the above formula, first calculate the running distance of the vehicle. The expected value of the maximum horizontal distance that the vehicle needs to travel in an operation cycle can be expressed as Equation (6):  
\[ \begin{array}{ll}E[\max(x_{i})|i=1,\ldots n]&=\int_{0}^{L}\left\{P[\max(x_{ i})|i=1,\ldots n\right]\geq t\right\}dt\\ &=\int_{0}^{L}\left\{1-P[\max(x_{i})|i=1,\ldots n]\leq t\right\}dt\\ &=\int_{0}^{L}\left\{1-\prod\limits_{i=1}^{n}[P(x_{i})\leq t]\right\}dt\\ &=\frac{Ln}{n+1}\end{array}  \tag{6}\]  
where \(n\) is the in-cycle travel demand of the DRC, and \(X_{i}\) represents the horizontal travel distance of passenger \(i\) within the service area. Since passengers are uniformly distributed in the service area, from Figure 1, the vertical distance between any passenger in the service area in the upper or lower half of the service area can be expressed as \(E(y)=\frac{W}{6}\); The vertical distance between the starting point and the first or the last passenger in the vehicle's run can be expressed as \(E(y_{1})=\frac{W}{4}\); The vertical distance between the last passenger served in the upper half and the first passenger served in the lower half can be expressed as \(E(y_{2})=\frac{W}{2}\).