1.  Introduction {#sec1}
===============

High-speed railway as a kind of large volume passenger transportation mode has been well developed in Europe and Japan and has been developing in China in an even larger scale and has been planned to develop in American continent.  In these areas, high-speed railway plays the role of backbone of passenger transportation systems.  How to raise operation of the efficiency and how to make the passenger service decision-making more demand-responsive have been the most important focus to the research concerned.  As one of the most important basics for the decision-making on high-speed railway transportation pattern and train operation planning, passenger flow forecast is of essential importance, and short-term passenger flow forecast is the key to the success of daily operation management. 

Recently, many forecast techniques have been used to solve the prediction problems.  Lin and Yang applied the grey forecasting model to forecast the output value of Taiwan\'s optoelectronics industry accurately from 2000 to 2005 \[[@B1]\].  In \[[@B2]\], four models were developed and tested for the freeway traffic flow forecasting problem.  They were the historical average, time-series, neural network, and nonparametric regression models.  The nonparametric regression model significantly outperformed the other models.  Du and Ren \[[@B3]\] proposed a prediction model of train passenger flow volume to help the railway administration\'s analysis of running strategies.  The model was analysed based on industrial economic indexes and Cobb-Douglas theory to make the prediction.  Particularly, ARIMA model has become one of the most common approaches of parametric forecast since the 1970s.  The ARIMA model is a linear combination of time-lagged variables and error terms, which has been widely applied in forecasting short-term traffic data such as traffic flow, travel time, and speed.  In \[[@B4]\], time series of traffic flow data are characterized by definite periodic cycles.  Seasonal autoregressive integrated moving average (ARIMA) and Winters exponential smoothing models were developed.  In \[[@B5]\], it was presented that the theoretical basis for modeling univariate traffic condition data streams as seasonal ARIMA process.  In \[[@B6]\], Hamed et al.  attempted to develop time-series models for forecasting traffic volume in urban arterials, and the Box-Jenkins ARIMA model turned out to be the most adequate model in reproducing all original time series.  As stated by Brooks, ARIMA performed well and robustly in modeling linear and stationary time series \[[@B7]\].  However, the applications of ARIMA models were limited because they assumed linear relationships among time-lagged variables and they could not capture the structure of nonlinear relationships \[[@B8]\]. 

The nonparametric regression models have been applied to forecast transportation demand.  However, among these nonparametric techniques, KNN method has been rarely adopted in forecast transportation demand.  Robinson and Polak proposed the use of the KNN technique to estimate urban link travel time with single loop inductive loop detector data, and the optimized KNN model was found to provide more accurate estimates than other urban link travel time methods \[[@B9]\]. 

Neural network model has been frequently adopted to predict.  In \[[@B10]\], the time-delay recurrent neural network for temporal correlations and prediction and multiple recurrent neural networks were described.  And the best performance is attained by the time-delay recurrent neural network.  In \[[@B11]\], a hybrid EMD-BPN forecast approach which combined empirical mode decomposition (EMD) and backpropagation neural networks (BPN) was developed to predict the short-term passenger flow in metro systems.  In \[[@B12]\], the forecast model of railway short-term passenger flow based on BP neural network was established based on analyzing the principle of BP neural network and time sequence characteristics of railway passenger flow.  In \[[@B13]\], a neural network model was introduced that combines the prediction from single neural network predictors according to an adaptive and heuristic credit assignment algorithm based on the theory of conditional probability and Bayes\' rule.  In \[[@B14]\], Chen and Grant-Muller reported the application and performance of an alternative neural computing algorithm which involves "sequential or dynamic learning" of the traffic flow process.  This indicated the potential suitability of dynamic neural networks with traffic flow data.  In \[[@B15]\], Li and Chong-Xin employed chaos theory into forecasting.  Delay time and embedding dimension are calculated to reconstruct the phase space and determine the structure of artificial neural network, and the load data of Shanxi province power grid of China is used to show that the model is more effective than classical standard BP neural network model. 

Support vector machine technique has also been adopted in forecast.  In \[[@B16]\], a modified version of a pattern recognition technique known as support vector machine for regression to forecast the annual average daily traffic was presented.  Hu et al.  utilized the theory and method of support vector machine regression and established the regressive model based on the least square support vector machine.  Through predicting passenger flow on Hangzhou highway in 2000--2008, the authors showed that the regressive model of the least square support vector machine had much higher accuracy and reliability of prediction \[[@B17]\]. 

Since the problem was introduced, high-speed railway passenger flow forecast is vitally important to the organization of high-speed railway.  However, several studies have focused on forecasting short-term high-speed railway passenger flow on the basis of the regularity and randomness of the passenger flow rate.  A new method is, therefore, very much needed.  Fuzzy temporal logic based passenger flow forecast model (FTLPFFM) is proposed in this paper.  Quasi-periodic variation of high-speed railway passenger flow is sufficiently reflected and nonlinear fluctuation of high-speed railway passenger flow is processed using fuzzy logic relationship recognition techniques in the searching process.  The proposed model has explicit physical meaning, which reflects variation of high-speed railway passenger flow and has sufficient comprehensibility and interpretability.  The characteristics of short-term high-speed railway passenger flow are vitally important to forecast model which is used to improve predictive performance of fuzzy *k*-nearest neighbor by comparing with other predictive methods in short-term high-speed railway passenger flow forecast. 

The remainder of this paper is organized as follows.  In [Section 2](#sec2){ref-type="sec"}, passenger flow characteristics of the high-speed railway and passenger flow variation in adjacent period are summarized.  In [Section 3](#sec3){ref-type="sec"}, the change degree of passenger flow is divided into eight grades according to cognitive habit and passenger flow change rate is fuzzified.  FTLPFFM is proposed in [Section 4](#sec4){ref-type="sec"}.  In [Section 5](#sec5){ref-type="sec"}, the experiment result for the application of FTLPFFM is compared with ARIMA and KNN models when using three statistics: mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE).  And FTLPFFM appears to be more robust and universally fitting.  The last section is the conclusion and future work. 

2.  Passenger Flow Feature Extraction {#sec2}
====================================

In short-term passenger flow forecast, the characteristics of high-speed railway passenger flow are summarized based on time variable because passenger flow has strong correlation to time variable.  The data of high-speed railway passenger flow were collected from Beijingnan Railway Station to Jinanxi Railway Station, which is passenger flow in per hour from 26 March to 4 April 2012 (see [Figure 1](#fig1){ref-type="fig"}) and daily passenger flow from 14 May to 31 July 2012 (see [Figure 2](#fig2){ref-type="fig"}). 

Two characteristics of high-speed railway passenger flow are taken into account in FTLPFFM.  The first significant characteristic is quasi-periodic which imposes a great impact on passenger flow forecast.  The running time of high-speed train is between 6:00 and 24:00 and the passenger flow in morning peak and evening peak is more than other periods, which is revealed in [Figure 1](#fig1){ref-type="fig"}.  Also, the high-speed railway passenger flow is usually stable from Saturday to Wednesday, increases on Thursday, and reaches the peak on Friday, which is revealed in [Figure 2](#fig2){ref-type="fig"}.  Therefore, the fluctuation cycle of high-speed railway passenger flow is one day and one week.  The second one is nonlinear fluctuation which also imposes a great impact on passenger flow forecast.  Specifically, the change rate of passenger flow is instable with nonlinear fluctuation for a short time because of many effect factors, such as passengers\' income, travel cost, and service quality of transportation, which is revealed in Figures [1](#fig1){ref-type="fig"} and [2](#fig2){ref-type="fig"}. 

3.  Regularity of Passenger Flow {#sec3}
===============================

Notation: *p*(*t*): the passenger flow in period *t*, *n*: the total number of points of the historical passenger flow series, *p*(*n*): the current passenger flow state, *v*(*t*): the passenger flow change rate from *p*(*t*) to *p*(*t* + 1), *u* ~*i*~: the interval of passenger flow change rate, *u* ~*i*~′: the intermediate value of *u* ~*i*~,  *i* = 1,2,..., 8.The history passenger flow series is denoted by *p*(1), *p*(2),..., *p*(*t* − 1), *p*(*t*), *p*(*t* + 1),..., *p*(*n* − 1), *p*(*n*).  The passenger flow change rates *v*(1), *v*(2),..., *v*(*t* − 1), *v*(*t*), *v*(*t* + 1),..., *v*(*n* − 2), *v*(*n* − 1) between adjacent periods are taken into account, and then the passenger flow change rates are analyzed and variation of passenger flow in adjacent period is summed up. 

3.1.  Change Rate of Passenger Flow {#sec3.1}
----------------------------------

In order to express passenger flow trend in adjacent period clearly and more accurately, passenger flow change rate is normalized. 

Define standardized passenger flow change rate *v*(*t*) = (*p*(*t* + 1) − *p*(*t*))/*p* ~max⁡~ ∈ \[−1,1\], and *p* ~max⁡~ = max⁡(\|*p*(2) − *p*(1)\|, \|*p*(3) − *p*(2)\|,..., \|*p*(*n*) − *p*(*n* − 1)\|).  For *p*(*t* + 1) − *p*(*t*) \< 0, the passenger flow descends from period *t* to *t* + 1; for *p*(*t* + 1) − *p*(*t*) \> 0, the passenger flow increases from period *t* to *t* + 1; for *p*(*t* + 1) − *p*(*t*) = 0, the passenger flow does not change from period *t* to *t* + 1. 

In [Table 1](#tab1){ref-type="table"}, the data are collected from Beijingnan Railway Station to Jinanxi Railway Station in Beijing-Shanghai high-speed railway.  For example, the maximum value of the passenger flow change in adjacent periods is calculated as *p* ~max⁡~ = max⁡(\|*p*(2) − *p*(1)\|, \|*p*(3) − *p*(2)\|,..., \|*p*(*n*) − *p*(*n* − 1)\|) = 857; the passenger flow change rate from 8:00--8:30 to 8:30--9:00 on October 10th is calculated as *v*(1) = (*p*(2) − *p*(1))/*p* ~max⁡~ = (304 − 70)/857 = 0.273.  Similarly, we can calculate the passenger flow change rates, which are 0.231, 0.5158, −0.8145, and so forth, as shown in [Table 1](#tab1){ref-type="table"}. 

3.2.  Variation of Passenger Flow {#sec3.2}
--------------------------------

In order to reveal the regularity of the passenger flow trend clearly and express varying degrees of passenger flow change, respectively, we divide passenger flow change rate into eight intervals applying Zadeh\'s fuzzy set theory \[[@B18]\]. 

Define the universe of discourse *U* = {*u* ~1~, *u* ~2~, *u* ~3~, *u* ~4~, *u* ~5~, *u* ~6~, *u* ~7~, *u* ~8~} and partition it into equal length intervals *u* ~1~ = \[−1, −0.75\], *u* ~2~ = \[−0.75, −0.5\], *u* ~3~ = \[−0.5, −0.25\], *u* ~4~ = \[−0.25,0\], *u* ~5~ = \[0,0.25\], *u* ~6~ = \[0.25,0.5\], *u* ~7~ = \[0.5,0.75\], and *u* ~8~ = \[0.75,1\].  The midpoints of these intervals are *u* ~1~′ = −0.875, *u* ~2~′ = −0.625, *u* ~3~′ = −0.375, *u* ~4~′ = −0.125, *u* ~5~′ = 0.125, *u* ~6~′ = 0.375, *u* ~7~′ = 0.625, and *u* ~8~′ = 0.875.  Define fuzzy set *A* ~*i*~ based on the redivided intervals; fuzzy set *A* ~*i*~ denotes a linguistic value of the passenger flow represented by a fuzzy set, 1 ≤ *i* ≤ 8. 

The notations *A* ~1~, *A* ~2~, *A* ~3~, and *A* ~4~ denote that passenger flow decrease is too large, larger, microlarge, and less, respectively.  Also, the notations *A* ~5~, *A* ~6~, *A* ~7~, and *A* ~8~ denote that passenger flow increase is less, microlarge, larger, and too large. 

Eight membership functions in this paper sufficiently reflect quasi-periodic variation of high-speed railway passenger flow, and the forecast result of FTLPFFM has better accuracy based on eight membership functions.  Define the fuzzy membership function of subset *A* ~*i*~, namely, $$\begin{matrix}
{f_{A_{1}}\left( x \right) = \begin{cases}
{1,} & {- 1 \leq x \leq - 0.75,} \\
{\frac{- 0.5 - x}{0.25},} & {- 0.75 < x \leq - 0.5,} \\
{0,} & {x > - 0.5,} \\
\end{cases}} \\
{f_{A_{2}}\left( x \right) = \begin{cases}
{\frac{x - \left\{ {- 1} \right.}{0.25},} & {- 1 < x \leq - 0.75,} \\
{1,} & {- 0.75 < x \leq - 0.5,} \\
{\frac{- 0.25 - x}{0.25},} & {- 0.5 < x \leq - 0.25,} \\
{0,} & {x > - 0.25,} \\
\end{cases}} \\
{f_{A_{3}}\left( x \right) = \begin{cases}
{0,} & {x \leq - 0.75,} \\
{\frac{x - \left\{ {- 0.75} \right.}{0.25},} & {- 0.75 < x \leq - 0.5,} \\
{1,} & {- 0.5 < x \leq - 0.25,} \\
{\frac{- x}{0.25},} & {- 0.25 < x \leq 0,} \\
{0,} & {x > 0,} \\
\end{cases}} \\
{f_{A_{4}}\left( x \right) = \begin{cases}
{0,} & {x \leq - 0.5,} \\
{\frac{x - \left\{ {- 0.5} \right.}{0.25},} & {- 0.5 < x \leq - 0.25,} \\
{1,} & {- 0.25 < x \leq 0,} \\
{\frac{0.25 - x}{0.25},} & {0 < x \leq 0.25,} \\
{0,} & {x > 0.25,} \\
\end{cases}} \\
{f_{A_{5}}\left( x \right) = \begin{cases}
{0,} & {x \leq - 0.25,} \\
{\frac{x - \left\{ {- 0.25} \right.}{0.25},} & {- 0.25 < x \leq 0,} \\
{1,} & {0 < x \leq 0.25,} \\
{\frac{0.5 - x}{0.25},} & {0.25 < x \leq 0.5,} \\
{0,} & {x > 0.5,} \\
\end{cases}} \\
{f_{A_{6}}\left( x \right) = \begin{cases}
{0,} & {x \leq 0,} \\
{\frac{x}{0.25},} & {0 < x \leq 0.25,} \\
{1,} & {0.25 < x \leq 0.5,} \\
{\frac{0.75 - x}{0.25},} & {0.5 < x \leq 0.75,} \\
{0,} & {x > 0.75,} \\
\end{cases}} \\
{f_{A_{7}}\left( x \right) = \begin{cases}
{0,} & {x \leq 0.25,} \\
{\frac{x - 0.5}{0.25},} & {0.25 < x \leq 0.5,} \\
{1,} & {0.5 < x \leq 0.75,} \\
{\frac{1 - x}{0.25},} & {0.75 < x \leq 1,} \\
\end{cases}} \\
{f_{A_{8}}\left( x \right) = \begin{cases}
{0,} & {x \leq 0.5,} \\
{\frac{x - 0.5}{0.25},} & {0.5 < x \leq 0.75,} \\
{1,} & {0.75 < x < 1.} \\ 
\end{cases}} \\
\end{matrix}$$

Different passenger flow change rates can be fuzzified into corresponding fuzzy sets.  For example, as seen in [Table 1](#tab1){ref-type="table"}, the passenger flow change rate from 7:00--8:00 to 8:00--9:00 is 0.273, which is fuzzified to *A* ~6~. The passenger flow change rate from 8:00--9:00 to 9:00--10:00 is 0.231, which is fuzzified to *A* ~5~. The passenger flow change rate from 9:00--10:00 to 10:00--11:00 is 0.5158, which is fuzzified to *A* ~7~. And the passenger flow change rate from 10:00--11:00 to 11:00--12:00 is −0.8145, which is fuzzified to *A* ~1~. The fuzzification process is depicted in [Figure 3](#fig3){ref-type="fig"}.  Some fuzzified passenger flow change rates are listed in [Table 1](#tab1){ref-type="table"}. 

Fuzzy logic relationships are established by putting two consecutive fuzzy sets, as follows: $$\begin{matrix}
\left.  A_{j}\longrightarrow A_{p},A_{p}\longrightarrow A_{q},\ldots,A_{s}\longrightarrow A_{t}.  \right. \\ 
\end{matrix}$$ "*A* ~*j*~ → *A* ~*p*~" denotes that "the fuzzified passenger flow change rate is *A* ~*j*~ from period *t* − 1 to *t* and then the fuzzified passenger flow change rate is *A* ~*p*~ from period *t* to *t* + 1". 

As seen in [Figure 4](#fig4){ref-type="fig"}, the fuzzified passenger flow change rate from 7:00--8:00 to 8:00--9:00 is *A* ~6~ and from 8:00--9:00 to 9:00--10:00 is *A* ~5~. Hence, we can establish an fuzzy logic relationship as *A* ~6~ → *A* ~5~. Likewise, from [Table 1](#tab1){ref-type="table"}, we can establish the fuzzy logic relationships as *A* ~6~ → *A* ~5~, *A* ~5~ → *A* ~7~, *A* ~7~ → *A* ~1~, *A* ~1~ → *A* ~3~, and so forth.  Some fuzzy logic relationships are listed in [Table 2](#tab2){ref-type="table"}. 

4.  Fuzzy Temporal Logic Based Passenger Flow Forecast Model {#sec4}
===========================================================

Notation: *k* ~*i*~: the number of the passenger flow change rate belonging to *A* ~*i*~, *k*: the size of neighborhood, *d*: the dimension of the current passenger flow change rate vector. 

4.1.  K-Nearest Neighbor Model {#sec4.1}
-----------------------------

The *K*-nearest neighbor model is one of the most famous pattern recognition statistical models.  The KNN model defines neighborhoods as those *k* cases with the least distance to the input state \[[@B19]\].  The literature indicates that Euclidean distance is usually used to determine the distance between the input state and cases in the database \[[@B20]\].  The predictions can be calculated by averaging the observed output values for cases that fall within the neighborhood when the neighborhood is obtained. 

For example, a passenger flow series *p*(1), *p*(2),..., *p*(*t* − 1), *p*(*t*), *p*(*t* + 1),..., *p*(*n* − 1), *p*(*n*) where *n* is the total number of points of the series.  We search the series to find the nearest neighbors, of the current state *p*(*n*).  Then, we predict *p*(*n* + 1) on the basis of those nearest values; for example, if the neighborhood size was *k* = 1 and the nearest passenger flow was *p*(*t*), then we would predict *p*(*n* + 1) on the basis of *p*(*t* + 1).  The value of *k* in KNN model is more often obtained by empirical analysis.  In general, the steps of the KNN model can be listed as follows. 

Step 1 .Identify the neighborhood size *k* and the original state of variables. 

Step 2 .Input all original state of variables into the development database. 

Step 3 .Calculate Euclidean distance of the current state of variables to each state in development database. 

Step 4 .Choose output of *k*-nearest neighborhood on the basis of *k* shortest Euclidean distance from development database. 

Step 5 .Calculate the predictive value which is the average of the output of *k*-nearest neighborhood. 

4.2.  Fuzzy Temporal Logic Based Passenger Flow Forecast Model {#sec4.2}
-------------------------------------------------------------

Suppose *P*(*t*) = \[*p*(*t*), *p*(*t* + 1),..., *p*(*t* + *d* − 1), *p*(*t* + *d*)\] is the *t*-period historical passenger flow state vector and *V*(*t*) = \[*v*(*t*), *v*(*t* + 1),..., *v*(*t* + *d* − 2), *v*(*t* + *d* − 1)\] is the historical passenger flow change rate vector.  For *t* = *n* − *d*, *P*(*n* − *d*) and *V*(*n* − *d*) are the current passenger flow state vector and the current passenger flow change rate vector. 

### 4.2.1.  Distance Metric {#sec4.2.1}

Give the state matrix of passenger flow and the matrix of the passenger flow change rate so as to compare the relationship among the different periods of passenger flow more clearly.  The state matrix of passenger flow is given by $$\begin{matrix}
\begin{bmatrix}
{P\left\lbrack 1 \right\rbrack} \\
{P\left\lbrack 2 \right\rbrack} \\
 \vdots \\
{P\left\lbrack {t - d} \right\rbrack} \\
 \vdots \\
{P\left\lbrack {n - d} \right\rbrack} \\
\end{bmatrix} \\
{\quad\quad = \begin{bmatrix}
{p\left\lbrack 1 \right\rbrack} & {p\left\lbrack 2 \right\rbrack} & \cdots & {p\left\lbrack {1 + d} \right\rbrack} \\
{p\left\lbrack 2 \right\rbrack} & {p\left\lbrack 3 \right\rbrack} & \cdots & {p\left\lbrack {2 + d} \right\rbrack} \\
 \vdots & \vdots & & \vdots \\
{p\left\lbrack {t - d} \right\rbrack} & {p\left\lbrack {t - d + 1} \right\rbrack} & \cdots & {p\left\lbrack t \right\rbrack} \\
 \vdots & \vdots & & \vdots \\
{p\left\lbrack {n - d} \right\rbrack} & {p\left\lbrack {n - d + 1} \right\rbrack} & \cdots & {p\left\lbrack n \right\rbrack} \\
\end{bmatrix}.} \\ 
\end{matrix}$$

The matrix of the passenger flow change rate is given by $$\begin{matrix}
\begin{bmatrix}
{V\left\lbrack 1 \right\rbrack} \\
{V\left\lbrack 2 \right\rbrack} \\
 \vdots \\
{V\left\lbrack {t - d} \right\rbrack} \\
 \vdots \\
{V\left\lbrack {n - d} \right\rbrack} \\
\end{bmatrix} \\
{\quad\quad = \begin{bmatrix}
{v\left\lbrack 1 \right\rbrack} & {v\left\lbrack 2 \right\rbrack} & \cdots & {v\left\lbrack d \right\rbrack} \\
{v\left\lbrack 2 \right\rbrack} & {v\left\lbrack 3 \right\rbrack} & \cdots & {v\left\lbrack {1 + d} \right\rbrack} \\
 \vdots & \vdots & & \vdots \\
{v\left\lbrack {t - d} \right\rbrack} & {v\left\lbrack {t - d + 1} \right\rbrack} & \cdots & {v\left\lbrack {t - 1} \right\rbrack} \\
 \vdots & \vdots & & \vdots \\
{v\left\lbrack {n - d} \right\rbrack} & {v\left\lbrack {n - d + 1} \right\rbrack} & \cdots & {v\left\lbrack {n - 1} \right\rbrack} \\
\end{bmatrix}.} \\ 
\end{matrix}$$

A common approach to measure the "nearness" in KNN model is to use the Euclidean distance \[[@B18]\].  Therefore, the Euclidean distances of the passenger flow state vectors and the passenger flow change rate vectors are as follows: $$\begin{matrix}
{d_{1} = \left\| {P\left\| {n - d} \right\| - P\left\| {t - d} \right\|} \right\|} \\
{= \sqrt{\sum\limits_{j = 0}^{d}\left\lbrack {p\left\lbrack {n - j} \right\rbrack - p\left\lbrack {t - j} \right\rbrack} \right\rbrack^{2}},} \\
\end{matrix}$$ $$\begin{matrix}
{d_{2} = \left\| {V\left\| {n - d} \right\| - V\left\| {t - d} \right\|} \right\|} \\
{= \sqrt{\sum\limits_{j = 1}^{d}\left\lbrack {v\left\lbrack {n - j} \right\rbrack - v\left\lbrack {t - j} \right\rbrack} \right\rbrack^{2}}.} \\ 
\end{matrix}$$

### 4.2.2.  Forecast Passenger Flow Change Rate {#sec4.2.2}

Suppose the neighborhood search procedure identifies *k* neighbors, the passenger flow state vectors of the *k* neighbors are *P*(*t*′ − *d*, *h*) = \[*p*(*t*′ − *d*, *h*), *p*(*t*′ − *d* + 1, *h*),..., *p*(*t*′ − 1, *h*), *p*(*t*′, *h*)\] (*h* = 1,2,..., *k*) and *p*(*t*′ + 1, *h*) is next to *p*(*t*′, *h*), and *V*(*n* − *d*) = \[*v*(*n* − *d*), *v*(*n* − *d* + 1),..., *v*(*n* − 1)\] is the current passenger flow state vector.  The passenger flow change rates corresponding to *p*(*t*′ + 1, *h*) and *p*(*t*′, *h*) are *v*(*t*′, *h*) = (*p*(*t*′ + 1, *h*) − *p*(*t*′, *h*))/*p* ~max⁡~, *h* = 1,2,..., *k*.  The number of the passenger flow change rate *v*(*t*′, *h*) belonging to *A* ~*i*~ is *k* ~*i*~, and the value of *v*(*t*′, *h*) corresponding to *A* ~*i*~ is *u* ~*i*~′.

An approach to forecasting is to compute an average of *v*(*t*′, *h*)s of the neighbors that have fallen within the neighborhood: $$\begin{matrix}
{v\left( n \right)} \\
{= \frac{k_{1}u_{1}^{\prime} + k_{2}u_{2}^{\prime} + k_{3}u_{3}^{\prime} + k_{4}u_{4}^{\prime} + k_{5}u_{5}^{\prime} + k_{6}u_{6}^{\prime} + k_{7}u_{7}^{\prime} + k_{8}u_{8}^{\prime}}{\sum_{i = 1}^{8}k_{i}}.} \\ 
\end{matrix}$$

### 4.2.3.  Steps of FTLPFFM {#sec4.2.3}

The establishment of FTLPFFM is based on fuzzy *k*-nearest neighbor prediction method. 

Steps of FTLPFFM are as follows. 

Step 1 .Start with a minimal neighborhood size, *k* = 1. 

Step 2 .Start with a minimal dimension of the current passenger flow change rate vector, *d* = 1. 

Step 3 .Start with period *l* = *n* + 1 to predict passenger flow. 

Step 4 (match to find the elementary neighbors).Find the nearest matches for the current passenger flow state vector *P*(*l* − *d* − 1) = \[*p*(*l* − *d* − 1), *p*(*l* − *d*),..., *p*(*l* − 2), *p*(*l* − 1)\] by searching the passenger flow series *p*(1), *p*(2),..., *p*(*n* − 1) using ([5](#EEq1){ref-type="disp-formula"}), and then sort them in ascending order.  Suppose an index *t*′ − *d*, for which the nearest matching passenger flow state vector is *P*(*t*′ − *d*) = \[*p*(*t*′ − *d*), *p*(*t*′ − *d* + 1),..., *p*(*t*′ − 1), *p*(*t*′)\] and the historical passenger flow change rate vector associated is *V*(*t*′ − *d*) = \[*v*(*t*′ − *d*), *v*(*t*′ − *d* + 1),..., *v*(*t*′ − 2), *v*(*t*′ − 1)\].  Here, the current passenger flow change rate vector is *V*(*l* − *d* − 1) = \[*v*(*l* − *d* − 1), *v*(*l* − *d*),..., *v*(*l* − 3), *v*(*l* − 2)\]; search the same fuzzy logical relationships *A* ~*i*~′ → *A* ~*j*~′ → ⋯→*A* ~*p*~′ → *A* ~*q*~′ for *V*(*t*′ − *d*) and *A* ~*i*~ → *A* ~*j*~ → ⋯→*A* ~*p*~ → *A* ~*q*~ for *V*(*l* − *d* − 1), and choose the top 2*k* matches which are the elementary neighbors.  The appropriate passenger flow change rate vectors of 2*k* will be discussed below. 

Step 5 (match to find the nearest neighbors).Find the nearest matches for *V*(*l* − *d* − 1) by searching all the historical passenger flow change rate vectors *V*(*t*′ − *d*) using ([6](#EEq2){ref-type="disp-formula"}), and then sort them in ascending order and choose the top *k* matches.  They are the nearest neighbor passenger flow state vectors *P*(*t*′ − *d*, *h*) = \[*p*(*t*′ − *d*, *h*), *p*(*t*′ − *d* + 1, *h*),..., *p*(*t*′ − 1, *h*), *p*(*t*′, *h*)\], and output *p*(*t*′, *h*) and *p*(*t*′ + 1, *h*), *h* = 1,2,..., *k*. 

Step 6 .Estimate the passenger flow change rate *v*(*l* − 1) using ([7](#EEq3){ref-type="disp-formula"}). 

Step 7 .Calculate predictive value of passenger flow $\overset{-}{p}(l) = p(l - 1) + p_{\max} \cdot v(l - 1)$ and add it to the database; repeat [Step 4](#step40){ref-type="statement"} to [Step 7](#step70){ref-type="statement"} with regard to *l* = *l* + 1 until *l* = *M*, *M* is the last period. 

Step 8 .Calculate RMSE between the actual values and predicted values, which is given by $$\begin{matrix}
{\text{RMSE} = \sqrt{\frac{1}{M - n}{\sum\limits_{i = n + 1}^{M}\left\lbrack {\overset{-}{p}\left\lbrack i \right\rbrack - p\left\lbrack i \right\rbrack} \right\rbrack^{2}}},} \\
\end{matrix}$$ where $\overset{-}{p}(i)$ is the predicted value of actual value *p*(*i*). 

Step 9 .Repeat Steps [3](#step30){ref-type="statement"} [to 8](#step80){ref-type="statement"} for vector dimensions of *d* + 1, *d* + 2,..., *d* ~max⁡~.

Step 10 .Repeat Steps [2](#step20){ref-type="statement"} [to 9](#step90){ref-type="statement"} for neighborhood sizes of *k* + 1, *k* + 2,..., *k* ~max⁡~.

Step 11 .Choose the optimal predictive values of passenger flow which yields minimal RMSE by optimizing the vector dimensions and the neighborhood. 

Choose the maximum dimension of the current passenger flow change rate vector and the maximum neighborhood size according to the characteristics of the passenger flow.  Smith and Demetsky (1994) \[[@B20]\] found that the best predictions were generated using *k* = 10, and Karlsson and Yakowitz (1987) \[[@B21]\] proposed that the best forecast values were generated using *k* = 3.  Wang et al. ( 2011) \[[@B22]\] and Oswald et al. ( 2001) \[[@B23]\] revealed that the best results were obtained when *k* ≤ 30.  We obtain the best predicted values of passenger flow as nearly all fall within the search space, which is 1 ≤ *k* ≤ 30 and 1 ≤ *d* ≤ 20, by numerous experiments using different dataset. 

5.  Case Study {#sec5}
=============

The data were obtained from National Key Technology Research and Development Program, State Key Laboratory of Rail Traffic Control and Safety, Beijing Jiaotong University.  The database was per hour passenger flow between 7:00 and 21:00 from Beijing to Jinan in Beijing-Shanghai high-speed railway, which was split into two parts separately: an estimation data set and a test data set.  The estimation data set was collected from 1 July to 31 December 2011 (2576 observations) and the test data set was collected from 1 to 22 January 2012 (300 observations). 

According to the passenger flow characteristics, we can set *d* ~max⁡~ = 10 and *k* ~max⁡~ = 20.  The developed model for the passenger flow of the high-speed railway was implemented using MATLAB version 7.1.  The best results were obtained when *k* = 10 and *d* = 4, which can be seen from RMSE performance, and RMSE = 2.7046.  The best prediction results and actual values are shown in [Figure 5](#fig5){ref-type="fig"}. 

ARIMA model is a benchmarking method in forecasting field, but it is a gray box model, which cannot reflect the underlying structural properties.  KNN model has dynamic adaptability to the data which is a white box model and has sufficient comprehensibility.  And FTLPFFM is presented based on KNN forecasting model and has sufficient comprehensibility and interpretability.  Therefore, FTLPFFM is compared with ARIMA and KNN models using three statistics: MAE, MAPE, and RMSE, as is shown in [Table 3](#tab3){ref-type="table"}.  And ([9](#EEq5){ref-type="disp-formula"}) shows how MAE and MAPE are computed, respectively.  Consider $$\begin{matrix}
{\text{MAE} = \frac{1}{M - n}{\sum\limits_{i = n + 1}^{M}\left| {\overset{-}{p}\left| i \right| - p\left| i \right|} \right|},} \\
{\text{MAPE} = \frac{1}{M - n}{\sum\limits_{i = n + 1}^{M}\frac{\left| {\overset{-}{p}\left| i \right| - p\left| i \right|} \right|}{p\left( i \right)}}.} \\ 
\end{matrix}$$

The absolute error and the absolute relative deviation of three models are computed as shown in Figures [6](#fig6){ref-type="fig"} and [7](#fig7){ref-type="fig"}. 

The result of the comparison between the prediction results and actual values indicates that the proposed model has been shown to be effective and the error is acceptable. 

6.  Conclusion and Future Work {#sec6}
=============================

Railway transport is an increasingly popular transportation mode for medium-long distance journey in many countries in recent years.  The short-term passenger flow forecast has played a key role in high-speed railway intelligent transportation system.  In this paper, a FTLPFFM is developed to measure uncertainty of high-speed railway passenger flow for railway passenger transport management.  In FTLPFFM, the past sequences of passenger flow are considered to predict the future passenger flow using fuzzy logic relationship recognition techniques in the searching process.  The results reveal that the forecast accuracy (measured with MAE, MAPE, and RMSE) of the FTLPFFM was significantly better than the accuracy levels of the ARIMA and KNN models.  Fuzzy temporal logic based passenger flow forecast model also provides a theoretical foundation in decision-making of resource allocation.  In a more general sense of application, the proposed method could be adapted in multimodal transportation systems especially in railway transport and metro transport.  For future work, one possible extension of this research is to improve forecast accuracy via properly applying data fusion and pattern recognition techniques. 

Project is supported by the National Natural Science Foundation of China (no.  61074151), the National Key Technology Research and Development Program of China (no.  2009BAG12A10), the National High Technology Research and Development Program 863 of China (no.  2012AA112001), and the Research Fund of Beijing Jiaotong University (no.  T14JB00380), China. 

Conflict of Interests
=====================

The authors declare that there is no conflict of interests regarding the publication of this paper. 

![ Daily variation of high-speed railway passenger flow.](CIN2014-950371.001){#fig1}

![ Weekly variation of high-speed railway passenger flow.](CIN2014-950371.002){#fig2}

![ Fuzzified passenger flow change rate.](CIN2014-950371.003){#fig3}

![ Passenger flow change rate relationships.](CIN2014-950371.004){#fig4}

![ Comparisons of predictive values and real values.](CIN2014-950371.005){#fig5}

![ The absolute error of three models.](CIN2014-950371.006){#fig6}

![ The absolute relative deviation of three models.](CIN2014-950371.007){#fig7}

###### 

The value of passenger flow, passenger flow change degree, passenger flow change rate, and fuzzy set. 

  Date           Period       Passenger flow   The value of passenger flow change degree   Passenger flow change rate   Fuzzy set
  -------------- ------------ ---------------- ------------------------------------------- ---------------------------- -----------
  2011.10.10     7:00--8:00   70               234                                         0.273                        *A* ~6~
  8:00--9:00     304          198              0.231                                       *A* ~5~                      
  9:00--10:00    502          442              0.5158                                      *A* ~7~                      
  10:00--11:00   944          −698             −0.8145                                     *A* ~1~                      
  11:00--12:00   246          −222             −0.259                                      *A* ~3~                      
  12:00--13:00   24           14               0.0163                                      *A* ~5~                      
  13:00--14:00   38           158              0.1844                                      *A* ~5~                      
  14:00--15:00   196          −19              −0.0222                                     *A* ~4~                      
  15:00--16:00   177          21               0.0245                                      *A* ~5~                      
  16:00--17:00   198          543              0.6336                                      *A* ~7~                      
  17:00--18:00   741          −563             −0.6569                                     *A* ~2~                      
  18:00--19:00   178          276              0.3221                                      *A* ~6~                      
  19:00--20:00   454          467              0.5449                                      *A* ~7~                      
  20:00--21:00   921          −857             −1                                          *A* ~1~                      
                                                                                                                        
  2011.10.11     7:00--8:00   64               76                                          0.0887                       *A* ~5~
  8:00--9:00     140          321              0.3746                                      *A* ~6~                      
  9:00--10:00    461          559              0.6523                                      *A* ~7~                      
  10:00--11:00   1020         −839             −0.979                                      *A* ~1~                      
  11:00--12:00   181          −147             −0.1715                                     *A* ~4~                      
  12:00--13:00   34           24               0.028                                       *A* ~5~                      
  13:00--14:00   58           59               0.0688                                      *A* ~5~                      
  14:00--15:00   117          63               0.0735                                      *A* ~5~                      
  15:00--16:00   180          −33              −0.0385                                     *A* ~4~                      
  16:00--17:00   147          508              0.5928                                      *A* ~7~                      
  17:00--18:00   655          −502             −0.5858                                     *A* ~2~                      
  18:00--19:00   153          283              0.3302                                      *A* ~6~                      
  19:00--20:00   436          335              0.3909                                      *A* ~6~                      
  20:00--21:00   771          −718             −0.8378                                     *A* ~1~                      
                                                                                                                        
  2011.10.12     7:00--8:00   53               97                                          0.1132                       *A* ~5~
  8:00--9:00     150          282              0.3291                                      *A* ~6~                      
  9:00--10:00    432          ---              ---                                         ---                          

###### 

The fuzzy logic relationship of fuzzified passenger flow change rate. 

  -------------------- -------------------- -------------------- -------------------- --------------------
  *A* ~6~ → *A* ~5~,   *A* ~5~ → *A* ~7~,   *A* ~7~ → *A* ~1~,   *A* ~1~ → *A* ~3~,   *A* ~3~ → *A* ~5~,
  *A* ~5~ → *A* ~5~,   *A* ~5~ → *A* ~4~,   *A* ~4~ → *A* ~5~,   *A* ~5~ → *A* ~7~,   *A* ~7~ → *A* ~2~,
  *A* ~2~ → *A* ~6~,   *A* ~6~ → *A* ~7~,   *A* ~7~ → *A* ~1~,   *A* ~1~ → *A* ~5~,   *A* ~5~ → *A* ~6~,
  *A* ~6~ → *A* ~7~,   *A* ~7~ → *A* ~1~,   *A* ~1~ → *A* ~4~,   *A* ~4~ → *A* ~5~,   *A* ~5~ → *A* ~5~
  *A* ~5~ → *A* ~5~,   *A* ~5~ → *A* ~4~,   *A* ~4~ → *A* ~7~,   *A* ~7~ → *A* ~2~,   *A* ~2~ → *A* ~6~,
  *A* ~6~ → *A* ~6~,   *A* ~6~ → *A* ~1~,   *A* ~1~ → *A* ~5~,   ---                  ---
  -------------------- -------------------- -------------------- -------------------- --------------------

###### 

The comparison between ARIMA, KNN, and FTLPFFM. 

  Prediction model   MAE      MAPE     RMSE
  ------------------ -------- -------- --------
  KNN                5.4623   0.0453   3.5684
  ARIMA              2.9642   0.0401   3.1812
  FTLPFFM            1.9117   0.0328   2.7046

[^1]: Academic Editor: Xiaobei Jiang
