## 3 Problem Formulation
Given these assumptions, for each step, the average speed \(\overline{v}\) and time \(\Delta t\) can be written as:  
\[\overline{v}=\frac{v_{i}+v_{k}}{2} \tag{9}\]  
\[E=\frac{1}{3600}\bigg{(}\int_{s\in\mathit{acc}/\mathit{cru}}\frac{1}{\eta_{ \mathit{acc}/\mathit{cru}}}Fds+\int_{s\in\mathit{dc}}\eta_{\mathit{dec}}Fds \bigg{)} \tag{2}\]0  
Figure 2 illustrates a representation of possible vehicle speeds along the traveled route. The route is split into \(N\) equal steps, and at each step, excluding the first and last step, there are \(M\) feasible states associated with the vehicle's speed. Therefore, (1) there are \(M\) different speed trajectories to select from when traveling from step 1 to step 2 and from step \(N-1\) to step \(N\), and (2) there are \(M^{2}\) feasible speed trajectories traveling from current step \(j\) to next step \(j+1\) for \(\forall j\in\{2,\ 3,\ \ldots,\ N-2\}\). With this classification, the speed trajectory can be defined as transitioning from speed \(i\) in step \(j\) to speed \(k\) in step \(j+1\). The objective function for the eco-driving control of an AEV is to minimize the total energy consumed over a given distance that starts from step \(j=1\) and ends at the last step, i.e., \(j=N\). This objective function is mathematically formulated as:  
\[E=\frac{1}{3600}\bigg{(}\int_{s\in\mathit{acc}/\mathit{cru}}\frac{1}{\eta_{ \mathit{acc}/\mathit{cru}}}Fds+\int_{s\in\mathit{dc}}\eta_{\mathit{dec}}Fds \bigg{)} \tag{2}\]1  
where \(e_{1,i}\) is the energy consumed to travel from the initial speed at step 1 to the \(i^{th}\) speed at step 2, and \(e_{N-1,i}\) represents the energy consumed to travel from the \(i^{th}\) speed at step \(N-1\) to reach a full stop at step \(N\). The variables \(b_{1,i}\) and \(b_{N-1,i}\) denote the corresponding binary variables for step \(1\) and \(N-1\), respectively. Similarly, \(e_{j,i,k}\) is the energy consumed to travel from the \(i^{th}\) speed at step \(j\) to the \(k^{th}\) speed at step \(j+1\), and \(b_{j,i,k}\) is the corresponding binary variable. The energy values \(e_{1,i}\), \(e_{j,i,k}\), and \(e_{N-1,i}\) are from (2)-(4). These energy values are positive during acceleration and negative during deceleration or braking as long as the RBlimitations are not violated, otherwise, they are set to zero. The RB limitations included in the objective function are the ones discussed in Section 2. The speed trajectories are determined by binary variables, specifically \(b_{1,i}\), \(b_{j,i,k}\) and \(b_{N-1,i}\). These variables allow us to select the optimal speed trajectory between each step \(j\) and step \(j+1\), with the goal of minimizing the energy consumption during each transition. To select the optimal trajectory for each step, we use the corresponding binary variable to indicate that the specific trajectory has been chosen, while all other binary variables representing alternative feasible states are set to zero. As a result, for each step, this constraint is implemented using (12) and (13):  
\[E=\frac{1}{3600}\bigg{(}\int_{s\in\mathit{acc}/\mathit{cru}}\frac{1}{\eta_{ \mathit{acc}/\mathit{cru}}}Fds+\int_{s\in\mathit{dc}}\eta_{\mathit{dec}}Fds \bigg{)} \tag{2}\]2  
Similarly, in other steps, i.e., \(\forall j\in\{2,\;3,\;\ldots,\;N-2\}\), out of \(M^{2}\) possible speed trajectories, only one of them is chosen; as a result, the associated binary value is one, and the rest are zero. In other words:  
\[E=\frac{1}{3600}\bigg{(}\int_{s\in\mathit{acc}/\mathit{cru}}\frac{1}{\eta_{ \mathit{acc}/\mathit{cru}}}Fds+\int_{s\in\mathit{dc}}\eta_{\mathit{dec}}Fds \bigg{)} \tag{2}\]3  
To ensure that the trajectory begins from its current state at each step, the following constraints should be imposed:  
\[ \begin{array}{c}[b_{j+1,i,1}\;b_{j+1,i,2}\;\cdots\;b_{j+1,i,M}]\leq b_{j,i}\\ j=1,\;\forall i\in\{1,\;2,\;\ldots,\;M\}\end{array}  \tag{14}\]  
\[ \begin{array}{c}[b_{j,i,1}\;b_{j,i2}\;\cdots\;b_{j,i,M}]\leq b_{(j-1),i}+b_{( j-1),2,i}+\cdots+b_{(j-1),M,i}\\ \forall j\in\{3,\;4,\;\ldots,\;N-2\},\;\forall i\in\{1,\;2,\;\ldots,\;M\} \end{array}