## 2 Models and Methods
### DP Algorithm with Emission Constraints
The penalty function method is used to transform the optimization problem of Equations (2)-(5) into another optimization problem without constraints:  
\[f_{\text{fuel}}=\min\Bigl{[}\sum_{k=1}^{N}m_{\text{fuel}}(k)+m_{\text{o}}e_{ \text{lim}}\Bigr{]} \tag{6}\]  
where \(m_{0}\) is a sufficiently large positive number with the same dimension as the fuel consumption to act as a penalty; \(e_{\text{lim}}\) is the relative difference between the trip emissions and the emission constraint limit, characterizing the positive relative spatial distance beyond the feasible domain constrained by the pollutant emission limits:  
\[e_{\text{lim}}=\Bigl{[}\left(e_{\text{limCO}}\right)^{2}+\left(e_{\text{limPN} }\right)^{2}+\left(e_{\text{limNOx}}\right)^{2}\Bigr{]}^{\frac{1}{2}} \tag{7}\]  
where \(e_{\text{limCO}}\), \(e_{\text{limPN}}\), and \(e_{\text{limNOx}}\) are the projections of \(e_{\text{lim}}\) on the CO, PN, and NOx emission components, respectively, which are defined as  
\[e_{\text{limCO}}=\left\{ \begin{array}{ccc}\frac{\sum_{k=1}^{N}m_{\text{CO} }(k)-e_{\text{CO}}D_{\text{trip}}}{e_{\text{CO}}D_{\text{trip}}}&if\sum_{k=1}^ {N}m_{\text{CO}}(k)>e_{\text{CO}}D_{\text{trip}}\\ 0&if\sum_{k=1}^{N}m_{\text{CO}}(k)\leq e_{\text{CO}}D_{\text{trip}}\end{array} \right. \tag{8}\]  
\[e_{\text{limPN}}=\left\{ \begin{array}{ccc}\frac{\sum_{k=1}^{N}m_{\text{PN} }(k)-e_{\text{PN}}D_{\text{trip}}}{e_{\text{PN}}D_{\text{trip}}}&if\sum_{k=1}^ {N}m_{\text{PN}}(k)>e_{\text{PN}}D_{\text{trip}}\\ 0&if\sum_{k=1}^{N}m_{\text{PN}}(k)\leq e_{\text{PN}}D_{\text{trip}}\end{array} \right. \tag{9}\]  
\[e_{\text{limNOx}}=\left\{ \begin{array}{ccc}\frac{\sum_{k=1}^{N}m_{\text{NOx }}(k)-e_{\text{NOx}}D_{\text{trip}}}{e_{\text{NOx}}D_{\text{trip}}}&if\sum_{k=1}^ {N}m_{\text{NOx}}(k)>e_{\text{NOx}}D_{\text{trip}}\\ 0&if\sum_{k=1}^{N}m_{\text{NOx}}(k)\leq e_{\text{NOx}}D_{\text{trip}}\end{array} \right. \tag{10}\]  
Equations (6)-(10) embed the original pollutant emission constraints into the objective function and establish a feasible domain enclosure for pollutant emissions using the penalty function method. The penalty function term is zero when the optimization process is far from the emission constraint boundary; otherwise, the penalty function term is significant. In Equation (6), a value of m\({}_{0}\) that is too small will not act as a penalty, while a value of m\({}_{0}\) that is too large may affect the correct selection of state and action variables that minimize fuel consumption. Therefore, in the solution of the above optimization problem, a smaller m0 can be taken for trial calculation; when the result does not satisfy the constraint conditions of the optimization problem, m\({}_{0}\) is enlarged until the result satisfies the constraint conditions of the optimization problem. [PERSON]'s optimality principle indicates that for the optimal strategy of a multi-stage decision problem, by treating any stage and state as the initial stage and the initial state, the remaining strategy from this stage onwards must also be optimal [45]. Accordingly, the DP inverse solution algorithm is as follows: At the \(N\)th time step (\(N=5598\)) in the time control domain, the value function is taken to have an initial value of zero; then, the value loss functions on all SOC grid points are solved inversely from the \((N-1)_{\text{th}}\) moment to the 1 st moment.