# A Hybrid Control Path Planning Architecture Based on Traffic Equilibrium Assignment for Emergency
## 4 The Proposed Hybrid Control Architecture for Path Planning
### Dynamic Traffic Network Load Prediction  
The objective of dynamic traffic load prediction is to capture the spatial and temporal evolutionary features based on historical data \(|O_{q}|q=t-m,...,t-1\) and \(|V_{q}|q=t-m,...,t-1\) to predict the evacuation volume \(o^{t}\) and background load \(v^{t}\). In Section 4.1, we have extracted the spatial features for both data. For the temporal dimension, we have used the classical LSTM for both types of data. It takes \(o_{t}\) or \(v_{t}\) as input, and the output layer is processed by the internal memory cell to generate the \(h_{t}^{o}\) or \(h_{t}^{v}\) as input to the next cell.  
In time series, the background load shows a recent, daily, and weekly periodical pattern [48]. Unlike background load prediction, the OD evacuation volume prediction is not closely related to the recent features. If evacuation features are consecutively extracted, the model captures the interference features which are not helpful for prediction in a compulsory manner [32]. Hence, we construct a coarse-grained prediction method that skips irrelevant sequences based LSTM to predict OD evacuation volume.  
Based on the gate control units of LSTM, we designed a coarse-grained prediction model with multi-level memory that skips irrelevant sequences.The memory unit processes the input vector \(o_{t}\),\(z_{t}\) through the forget gate, input gate, and output gate, respectively. And the output \(\Pi_{t}^{(o)}\), \(\Pi_{t}^{(v)}\) of hidden layers via the activation function of gate is updated as shown in Equation (10):  
\[\begin{split}\Pi_{t}^{(o)}&=\Gamma^{(gate)}(W^{(o)} [o_{t},h_{\tau(t)}]+b^{(o)}),\\ \Pi_{t}^{(v)}&=\Gamma^{(gate)}(W^{(v)}[v_{t},h_{t-1} ]+b^{(v)}).\end{split} \tag{10}\]  
where \(\tau(t)\) is the time period after the coarse granularity process. The \(W^{(o)}\), \(W^{(v)}\) are the weight matrix of the input layer to the gates, and \(b^{(o)}\),\(b^{(v)}\) are the corresponding bias. The  
Figure 2: The process of extracting hierarchy features based on \(G_{\uparrow}\).  
\(\Gamma^{(gate)}\) is the sigmoid activation function. The OD's latent encoding of gate control units is computed using the embedding \(o_{t}\) and the hidden state \(h_{\tau(t)}\). And the background load latent encoding is computed with \(v_{t}\) and \(h_{t-1}\). The input gate and forget gate are used to update the cell state \(C_{t}\), and the \(H^{\prime}_{t}\) is controlled by the output gate and the activation unit, as in Equation (11):  
\[\begin{split} C_{t}=\Pi_{t}^{( forget)}\odot C_{t-1}+\Pi_{t}^{(input)}\odot\textit{Tanh}(W^{(c)}[X^{\prime} _{t},H^{\prime}_{t-1}]),\\ H^{\prime}_{t}=\Pi_{t}^{(output)}\odot\textit{Tanh}(C_{t}).\end{split} \tag{11}\]  
where \(\odot\) is the Hadamard product. The \(X^{\prime}_{t},H^{\prime}_{t-1}\) come from the OD prediction of \(o_{t},h_{\tau(t)}\), or the traffic load prediction of \(v_{t},h_{t-1}\). Furthermore, the temporal encoding is converted in parallel by HCN to increase the depth of LSTM spatio-temporal contextual memory. The final output \(H^{(t)}\) is composed of the contraction encoding \(Z\), temporal encoding \(H^{\prime}_{t}\), and spatial correlation \(\hat{C},\hat{A}_{\uparrow}\), as shown in Equation (12).  
\[H^{(t)}=\Gamma^{(gate)}(HCN(Z,\hat{C},\hat{A}_{\uparrow}),H^{\prime}_{t}). \tag{12}\]