## 3 System Model and Problem Formulation
### AoI Model  
When the size of the transmitted message is \(G\), the criterion for successful communication between vehicles \(i\) and \(j\) is as follows:  
\[u_{i\to j}^{t}=\left\lfloor\frac{W_{i}^{t}\text{log}_{2}(1+\eta_{i\to j}^{t}) }{G}\right\rfloor, \tag{8}\]  
where \(\bigsqcup\) indicates rounding down the values in it, \(\text{log}_{2}(1+\eta_{i\to j}^{t})\) represents transmission rate, and \(W_{i}^{t}\) represents the bandwidth utilized by vehicle \(i\) for message transmission. So, \(u_{i\to j}^{t}=0\) indicates that the communication rate between vehicles \(i\) and \(j\) is insufficient to transmit the message within the specified time slot \(t\), resulting in communication failure. Due to the nature of NR-V2X, where each transmission between vehicles requires waiting for a time equivalent to the RRI, each failed transmission between vehicles leads to an increase in the AoI at the receiving end vehicle. Successful transmission, on the other hand,results in an increase in AoI at the receiving vehicle by \(\Gamma\). The change in AoI at the receiving end vehicle \(j\) between communication time slots can be expressed as follows:  
\[\Phi_{i\to j}^{t+\Gamma}=\left\{\begin{array}{cc}\varphi_{in}^{t,1}+\Gamma&u_{ i\to j}^{t}=1\\ \Phi_{i\to j}^{t}+\Gamma&u_{i\to j}^{t}=0\end{array}\right.. \tag{9}\]  
It can be observed that the AoI at the receiving end is influenced by the transmission interval size \(\Gamma\), transmission status \(u\), and the AoI of the message transmitted by vehicle \(i\), where \(\Phi_{i\to i}=0\). Among these factors, when the transmission interval \(\Gamma\) is smaller, the receiving end has more opportunities to update to the AoI of the transmission end. Additionally, a higher transmission success rate increases the likelihood of updating to the AoI at the transmission end. Furthermore, the AoI at the transmission end decreases as the queue processing rate \(\frac{1}{\Gamma}\) increases. Therefore, when \(\Gamma\) is smaller, the AoI at the transmission end is smaller, resulting in a smaller AoI at the receiving end as well.  
The average AoI at the receiving end for all vehicles in the system is defined as follows:  
\[\overline{\Phi}=\frac{1}{T}\frac{1}{N_{v}^{2}}\sum_{i\in N_{v}}\sum_{j\in N_{v }}\Phi_{i\to j}, \tag{10}\]  
In the scenario where four message types are considered, the \(\varphi_{in}^{t+1,b}\) is represented as follows:  
\[\varphi_{i,n}^{t+1,b}=\beta_{i,n}^{t}\left(\varphi_{i,n}^{t,b+1}-\varphi_{i,n} ^{t,b}\right)+\varphi_{i,n}^{t,b}+1, \tag{11}\]  
In Equation (11), \(n\) represents multiple message types, \(b\) denotes the position of the message in the queue, and \(\beta_{i,n}^{t}\in\{0,1\}\) indicates whether a type \(n\) message can be transmitted (with 1 indicating it can be transmitted), where the queue operates on a first-in-first-out basis. And the parameter \(\Gamma\) determines the frequency of \(\beta_{i,n}^{t}=1\), so \(\beta_{i,n}^{t}\) can be expressed as follows:  
\[\beta_{i,n}^{t}=\left\lfloor\frac{t}{z_{new}+m\Gamma}\right\rfloor\left\lceil \frac{q_{i,n}^{t}}{L}\right\rceil. \tag{12}\]  
where \(\lceil\rceil\) represents rounding up the values in it, \(z_{new}\) represents the time slot allocated for vehicle reservation in the SW, \(m\) indicates the number of times a vehicle uses reserved resources, and \(q\) and \(L\) represent the queue length and queue capacity, respectively. Due to the consideration of multiple priority queues in this scenario, when the high-priority message is in queue \(\beta_{i,n}^{t}=1\), the \(\beta_{i,n}^{t}=1\) of other queues applies.