## 4 Pre-Evaluation Based on the Spatio-Temporal Model
### Passenger Path Selection Model
#### 4.4.1 Analysis of Influencing Factors
\begin{array}{ll}0.486&t^{\prime}=1\\ 0.07\times t^{\prime-8}&t^{\prime}>1\\ t^{\prime}=\frac{C}{c_{\min}}&\end{array} \right. \tag{3}\]  
Path Selection Function  
Based on the above analysis, the state vector for path selection can be set as:  
\[P=[ID,G,O,D,T_{o},T_{route},T_{wait},T_{walk},P_{num},H,H_{num},R,A]\]  
Figure 7: Path selection distribution. where:  
_ID_--passenger ID;  
_G_--group type;  
_O_--origin bus stop;  
_D_--destination bus stop;  
_T_\({}_{o}\)--departure period (such as morning peak, evening peak, off-peak, or nighttime);  
_P_\({}_{num}\)--the number of stops passed;  
_H_--whether the route taken is a habitual travel route, represented by 0 or 1;  
_H_\({}_{num}\)--historical travel frequency;  
_R_--optimal path time ratio;  
_A_--number of replaceable paths. _ID_, \(G\), \(O\), \(D\), and \(H\) are mainly used for matching relevant elements in travel history records. In specific passenger travel assignments, if these new travel elements are consistent with historical travel, they are taken as 0, otherwise, they are taken as 1. Based on the construction of the vectors above, according to the requirements of reliable, simple, and traceable engineering applications, a passenger path selection index is set as Formula (4). The smaller the value of the \(\delta\), the higher the probability of that path being selected:  
\[ \begin{array}{l}\delta=\alpha_{1}O+\alpha_{2}D+\alpha_{3}T_{o}+\alpha_{4}T_ {route}+\alpha_{5}T_{wait}\\ +\alpha_{6}T_{walk}+\alpha_{7}P_{num}+\alpha_{8}H+\alpha_{9}H_{num}+\alpha_{10} R+\alpha_{11}A\end{array}  \tag{4}\]  
Weight Determination  
To obtain the optimal weight combination in Formula (4), the genetic algorithm is employed. The process includes individual mathematical coding design (real number coding), initial population generation (hundreds of individuals), fitness function design (mathematical description of optimization objectives), crossover and mutation selection (survival of the fittest), and optimal individual selection. Of these, fitness function design is the most critical step. The fitness function is 'the maximum accuracy of the routes assigned to all bus passengers' and is derived from the actual travel OD and route inferred based on the analysis of 'card (code) + biometric' data. The formula of the fitness function is as follows:  
\[S=\sum_{i}^{n}S_{i},\quad S_{i}=\left\{ \begin{array}{ll}0&\mathrm{L}^{ \prime}_{f}\
eq\mathrm{L}_{a},\quad\mathrm{OD}^{\prime}_{f}\
eq\mathrm{OD}_{a }\\ 0.5&\mathrm{L}^{\prime}_{f}\
eq\mathrm{L}_{a},\quad\mathrm{OD}^{\prime}_{f} \
eq\mathrm{OD}_{a}\\ 1&\mathrm{L}^{\prime}_{f}=\mathrm{L}_{a},\quad\mathrm{OD}^{\prime}_{f}= \mathrm{OD}_{a}\end{array} \right. \tag{5}\]  
where \(S\)--the accuracy of passenger assignment; \(n\)--the number of passengers in the travel group; \(S_{i}\)--the accuracy of one passenger's path: When the path (bus line and OD stop) assigned to passenger \(i\) is exactly the same as the actual route, the value is 1. When the line is the same, but the OD stop is different, the value is 0.5; in all other scenarios, the value is 0. Different passenger groups and travel time periods require different weight combinations, which are optimized through GA. The results are shown in Table 2.  
The weights of different factors reflect the tendency of passengers in the path selection process in a certain program. Table 2 shows that the consistency of the origin and destination stops is the most important factor (\(\alpha_{1}\),\(\alpha_{2}\)). Other notable factors include the travel time period (\(\alpha_{3}\)), walking time (\(\alpha_{6}\)), whether a path is a usual travel path (\(\alpha_{8}\)), historical frequency (\(\alpha_{9}\)), optimal path efficiency ratio (\(\alpha_{10}\)), and the number of replaceable paths (\(\alpha_{11}\)). The coefficients of travel time (\(\alpha_{4}\)), waiting time(\(\alpha_{5}\)), and the number of stops (\(\alpha_{7}\)) passed through are relatively small. This reflects that passengers consider more comparisons when choosing rather than just the route itself.