## 3 Methodology
### Optimal Driving Model
#### 3.2.2 Dynamic Constraints  
The following constraints must be considered during the optimisation of the objective function for CAEFVs driving upstream and downstream of the CA: vehicle kinematic state declarations; initial state constraints, including logical relationships between acceleration, velocity, and displacement; and the time, velocity, and displacement of the vehicle in the CA. \[X(t)\triangleq[v(t),a(t)]^{T}=f(x(t),u(t)),\ t_{0}<t<t_{f} \tag{19}\]  
\[s(t_{0})=0,v(t_{0})=v_{0} \tag{20}\]  
Here, \(X(t)\) is the state vector of the vehicles at time \(t\), and \(s(t)\) is the distance travelled by the vehicle as a function of time. \(s(t_{0})\) is the displacement, and \(v_{0}\) is the velocity at moment \(t_{0}\). The coordinates of the initial position of the vehicle are set to zero, with moment \(t_{0}\) representing the origin of time and moment when the vehicle reaches the termination position as the end of time. The vehicle distance constraint is a distance criterium that must be satisfied when the vehicle is travelling within the CA. It is expressed by the following formulas:  
\[s(t_{s_{1}})=s_{1},s(t_{s_{2}})=s_{2}, \tag{21}\]  
\[s(t_{s_{2}})=s_{2},s\Big{(}t_{f}\Big{)}=s, \tag{22}\]  
where \(t_{s_{1}}\) is the moment when the vehicle enters the WCA, \(t_{s_{2}}\) is the moment when the vehicle leaves the WCA, and \(t_{s_{3}}\) is the moment when the vehicle reaches the signal intersection stop line. \(s_{1}\) is the dynamic WCA start position, \(s_{2}\) is the dynamic WCA end position, \(s_{3}\) is the signal intersection stop line position, and \(s\) is the CA end position. The safety distance constraint states that the relative distance of the following vehicle cannot exceed the relative distance of the front vehicle at the same moment. \[s_{i}(t)<s_{i-1}(t), \tag{23}\]  
where \(s_{i}(t)\) is the distance of the \(i\)th vehicle at moment \(t\), and \(s_{i-1}(t)\) is the distance of the (\(i-1\))th vehicle at moment \(t\). The vehicle kinematic constraints require maintaining the vehicle motion parameters within its physical limits. Equations (24) and (25) represent the velocity and acceleration boundary constraints of the vehicle, respectively, stating that the vehicle velocity and acceleration cannot exceed specified ranges. \[v_{min}<v(t)<v_{max}, \tag{24}\]  
\[a_{min}<a(t)<a_{max}, \tag{25}\]  
where \(v(t)\) is the vehicle speed at moment \(t\); \(v_{min}\) and \(v_{max}\) are the minimum and maximum vehicle speeds during travel, respectively; and \(a_{min}\) and \(a_{max}\) are the minimum and maximum vehicle accelerations during travel, respectively. The signal constraint ensures that the vehicle crosses the signalised intersection within the green timeframe. When a vehicle enters the CA, the signal may have two green or red windows. If the vehicle crosses the signal before the end of the first green window, its passing time is equal to \(t_{f}=\left[0,t_{green}\right]\). If the vehicle travels from the start of the CA at the maximum acceleration to the maximum speed limit, it still fails to cross the stop line before the end of the first green window, and \(t_{f}=\left[t_{green}+T_{r},t_{green}+T_{r}+T_{g}\right]\). If the vehicle enters the CA in time for the first red window, it will be able to stop at the next green light if it can slow down without stopping. If the vehicle enters the CA in time for the first red-light window, it will cross the signalised intersection at the next green light; in this case, \(t_{f}=\left[t_{red},t_{red}+T_{g}\right]\). The expression used for the signal constraint is as follows:  
\[t_{min}<t_{f}<t_{max}, \tag{26}\]  
where \(t_{min}\) and \(t_{max}\) are the minimum and maximum vehicle passing times, respectively; \(t_{red}\) and \(t_{green}\) are the remaining times between the red and green lights when the vehicle enters the CA, respectively; and \(T_{r}\) and \(T_{g}\) are the red- and green-light cycles, respectively.