## 4 Methods  
### Passenger Ticket-Purchasing Demand Simulation Method  
According to the characteristics wherein passengers' ticket-purchasing request intensity varies at different times during the pre-sale period, we first need to fit the ticket-purchasing rate function \(g_{ij}(t)\) and divide the pre-sale period. The relationship between ticket-purchasing request intensity function and ticket-purchasing rate function is \(\lambda_{ij}(t)=Q_{ij}\cdot g_{ij}(t)\). Since the ticket-purchasing demand \(X_{ij}(t_{k})\) in different OD sections at different periods of the pre-sale period is a random variable, the model established in this paper is a stochastic nonlinear integer-programming model, which is difficult to solve directly. Therefore, the simulation is used to simulate the ticket-purchasing process in each OD section, so as to transform the model into a deterministic linear integer-programming model that is easy to solve [36]. There are many methods to simulate the non-homogeneous Poisson process: the sparse method requires that the ticket-purchasing intensity function at each period has an upper limit; the scale transformation method requires the calculation of the inverse function of the cumulative intensity function; the interval time generation method and order statistics methods require the calculation of the inverse function of the distribution function. When the function is more complex, it is difficult to calculate the inverse function. The sparse method, by contrast, is simpler and more efficient. Therefore, we use it to simulate ticket-purchasing demand. The principle of the sparse method is to generate the arrival time of the ticket-purchasing requests of the homogeneous Poisson process first, and then segregate them with a certain probability to obtain the arrival time of the non-homogeneous Poisson process. Firstly, assume that \(\lambda_{ij}(t)\leq\lambda_{ij}^{*}\) is met for all \(t\in(0,T)\) and that \(\lambda_{ij}^{*}\) is a constant. As long as the value of the constant \(\lambda_{ij}^{*}\) is higher than the intensity function \(\lambda_{ij}(t)\), it satisfies the conditions of use. Secondly, for section (i,j), generate a homogeneous Poisson process with intensity \(\lambda_{\text{ij}}^{*}\) at the tth period of the pre-sale period. \(S_{\text{ij}}^{0}\), \(S_{\text{ij}}^{1}\), \(S_{\text{ij}}^{2}\), \(S_{\text{ij}}^{3}\ldots S_{\text{ij}}^{n}\) present the arrival times of passengers' ticket-purchasing requests during that period in that OD section. Then, each \(S_{\text{ij}}^{\text{x}}\) is retained with probability \(\lambda_{\text{ij}}(S_{\text{ij}}^{3})/\lambda_{\text{ij}}^{*}\) and discarded with probability \(1-\lambda_{\text{ij}}(S_{\text{ij}}^{*})/\lambda_{\text{ij}}^{*}\). The results \(S_{\text{ij}}^{(0)},S_{\text{ij}}^{(1)},S_{\text{ij}}^{(2)},S_{\text{ij}}^{(3 )}\ldots S_{\text{ij}}^{(n)}\) are the arrival times of the ticket-purchasing requests for a non-homogeneous Poisson process. The specific steps are shown below. **Step 1**: Make \(t=0\), \(x=0\), \((x)=0\) and \(S_{\text{ij}}^{0}=0\). **Step 2**: Generate two independent stochastic numbers, \(U_{1}\) and \(U_{2}\), between (0,1). **Step 3**: Make \(x=x+1\). Generate the arrival time of the passengers' ticket-purchasing request for the homogeneous Poisson process: \(S_{\text{ij}}^{\text{x}}=S_{\text{ij}}^{\text{x}-1}-(1/\lambda_{\text{ij}}^{ *})\cdot\text{ln}U_{1}\). **Step 4**: If \(U_{2}\leq\lambda(S_{\text{ij}}^{\text{x}})/\lambda_{\text{ij}}^{*}\), then \((x)=(x)+1\), \(S_{\text{ij}}^{(x)}=S_{\text{ij}}^{\text{x}}\), \(t=S_{\text{ij}}^{\text{x}}\). Otherwise, \(t=S_{\text{ij}}^{\text{x}}\). **Step 5**: If \(t\geq T\), end the circulation. Otherwise, jump to step 2. **Step 6**: Take a stochastic value of \(Y_{\text{k}}\); otherwise, the default is 1. After M simulation times and taking the average value, we can obtain the average value of ticket-purchasing demand (\(\text{E}\big{[}X_{\text{ij}}(t_{\text{k}})\big{]}\)) in section (i,j) at each period of the pre-sale period. Equation (6) is transformed as follows.