# Deadline-Aware Scheduling for Transmitted RSU Packets in Cooperative Vehicle-Infrastructure Systems
## 3 System Model
### Average Delay Model  
Emergencies such as extreme weather, fires, traffic accidents, etc., are timely and may have a negative impact when not handled properly or within an effective time. Although less serious than the emergency itself, non-emergency events such as animals and daily traffic still reduce the work efficiency of the relevant departments when not treated quickly. Therefore, data packet deadlines must be considered.  
In this paper, different data deadlines are divided into emergency \(t_{n}^{H}\) and non-emergency data packet deadlines \(t_{n}^{L}\) based on the severity of the event. The data packet is discarded when the transmission time is exceeded.  
The average end-to-end delays of emergency data packet transmission in the time slot mainly comprise the following two parts:  
The average propagation delay \(\overline{T}_{n,\mathcal{C}}^{H}(t)\) is the average time \(RSU_{n}\) requires sending a packet to the vehicle and carry it to \(RSU^{\prime}\) in the t-slot. Its expression is as follows:\[\overline{T}_{n,c}^{H}(t)=\frac{L_{n}+L^{\prime}}{v_{n}(t)} \tag{21}\]  
\(v_{n}(t)\) represents the average speed at which the vehicle reaches \(RSU_{n}\) at time slot, t. The expression is \(v_{n}(t)=(V_{x+1}+V_{x})/2\).  
\(L_{n}\) represents the distance between \(RSU_{n}\) and \(RSU_{N}\), and its expression is \(L_{n}=(N-n)L\).  
The average queue delay is \(\overline{T}_{n,q}^{H}(t)\). According to the emergency data deadline \(t_{n}^{H}\), the relationship can be deduced as \(0\leq T_{n,q}^{H}(t)\leq t_{n}^{H}-\overline{T}_{n,c}^{H}(t)\).  
Its expression is as follows:  
\[\overline{T}_{n,q}^{H}(t)=\frac{t_{n}^{H}-\overline{T}_{n,c}^{H}(t)}{2} \tag{22}\]  
Therefore, the average end-to-end delay expression for \(RSU_{n}\) to complete emergency data packet transmission in the t-slot is as follows:  
\[\tau_{n}^{H}(t)=\overline{T}_{n,c}^{H}(t)+\overline{T}_{n,q}^{H}(t) \tag{23}\]  
It can be obtained in the same way that the average end-to-end delay expression for \(RSU_{n}\) to complete non-emergency data packet transmission in the t-slot:  
\[\tau_{n}^{L}(t)=\overline{T}_{n,c}^{L}(t)+\overline{T}_{n,q}^{L}(t) \tag{24}\]  
Furthermore, the expression of the weighted end-to-end average delay of each data packet from all RSUs in the time slot is as follows:  
\[\Gamma(t)=\frac{\sum\limits_{n=1}^{N}d_{n}(t)\cdot\left(b_{n}(t)\cdot\tau_{n} ^{H}(t)/t_{n}^{H}+(1-b_{n}(t))\cdot\tau_{n}^{L}(t)/t_{n}^{L}\right)}{\sum \limits_{n=1}^{N}d_{n}(t)} \tag{25}\]  
The system's long-term average weighted delay expression is as follows:  
\[\Gamma=\lim\limits_{T\rightarrow\infty}\frac{1}{T}\sum\limits_{t=0}^{T-1}E\{ \Gamma(t)\} \tag{26}\]  
The optimization problem is as follows:  
\[\begin{split}\min\limits_{b_{n}(t),d_{n}(t)}\Gamma=\lim\limits_{T \rightarrow\infty}\frac{1}{T}\sum\limits_{t=0}^{T-1}E\{\Gamma(t)\}\\ s.t.\begin{cases}b_{n}(t)\in\{0,1\},1\leq n\leq N&a\\ d_{n}(t)\in\{0,1,\ldots,S\},1\leq n\leq N&b\\ \sum\limits_{n=1}^{N}d_{n}(t)\leq S\cdot\kappa(t),\forall n,t&c\\ \lim\limits_{T\rightarrow\infty}\frac{1}{T}\sum\limits_{t=0}^{T-1}E\{Q_{n}^{L}( t)\}<\varpi&d\\ \lim\limits_{T\rightarrow\infty}\frac{1}{T}\sum\limits_{t=0}^{T-1}E\{Q_{n}^{L}( t)\}<\xi&e\\ \end{cases}\end{split} \tag{27}\]