# Service-Oriented Cooperation Policies for Intelligent Ground Vehicles Approaching Intersections
## 4 Design of Cooperation Policies and Algorithms
### Typical Priority-Related Single-Vehicle Policies  
(1) Arrival Time-Based Policy: FAFP  
The main thought of \"First-Arrive-First-Pass\" policy (FAFP) is taking the arrival time of each vehicle as the unique criterion, namely the priority. It means that the vehicle arriving earlier will hold a higher priority. Concretely, one vehicle with the minimum \(t_{(s,1)}\) will be authorized to pass prior to other vehicles in all \(Q_{\ell_{k}}\) (\(k=0,1,\ldots,|\xi_{\ell}^{\Gamma}|\)). The procedure of this fundamental time-based cooperation is presented as Algorithm 1. On this basis, FAFP can be further extended with the thought of platoon cooperation, which allow a group of headmost vehicles on one lane be authorized every time, rather than single one. Although FAFP is the most common policy adopted in current ITS studies for both centralized and distributed cooperation, it has presented obvious weakness in many complicated situations, because of its too simple criterion and design. Figure 4: Vehicular Kinematic Features during Passing through S-CSs in the Temporal-Spatial Domain. ```
Input:\(\gamma_{m}.\tau\) ; \(Q_{\ell_{k}}\). Output: Vehicles to be authorized. Set all \(\gamma_{m}.\tau\) to be 0 ; \(p\_vehi=null\); count = 1; whileTRUEdo if(There exists at least one \(Q_{\ell_{k}}\) that is not empty); then \(p\_vehi\) points to the wait-authorization element \(t_{(s,1)}\) of which is the minimum in all \(Q_{\ell_{k}}\); if(\(p\_vehi\)\(!=null\)); then //authorization logic; count = 1; while(\(p\_vehi->\gamma^{\prime}_{count}.\tau==0\)) and (No deadlock)do  Authorize \(p\_vehi->\gamma^{\prime}_{count}.\tau\) to vehicle \(v\) whose \(id\) is \(p\_vehi->v.id\); \(p\_vehi->\gamma^{\prime}_{count}.\tau++\); \(count++\);  end if if(\(count>1\)); then  Delete \(count\) authorized tuples from \(p\_vehi\);  end if  end while
```  
**ALGORITHM 1**Arrival Time-based Authorization Mechanism with FAFP policy  
(2) Priority-Inheritance Policy: HQEP  
Different from FAFP, \"Higher-QoS-Earlier-Pass\" policy (HQEP) is the policy that regards vehicular service property as the scheduling criteria. After mapping a QoS level to vehicular priority, the goal of HQEP can be described as: Try the best to guarantee vehicles with highest priorities (vehicles (H) or vehicles (M)) in current situation being authorized preferentially as possible. However, this goal is always challenged under real traffic situations because of the Priority-Inversion-Phenomenon (PIP), where vehicles with higher priorities are always blocked by those vehicles with lower priorities but ahead. Such phenomena are harmful for real transportation systems and daily life, but it is indeed very common. To resolve this problem and optimize the traffic flow, we have proposed a Gradual-Priority-Inheritance (GPI) algorithm in [7], as an instance of HQEP. Its main thought is: If find the first vehicle (H) \(v\) has been delayed by vehicles on other lanes, choose the direct precursor vehicle of \(v\) on its lane \(v.\ell_{c}\) and improve its priority to the highest priority; Iteratively deal with the vehicles ahead of \(v\) on \(v.\ell_{c}\) one by one, until \(v\) is no longer delayed or the precursor vehicle is the head on \(v.\ell_{c}\). The HQEP-based cooperation principle can be explained with the Algorithm 2. The advantage of this approach is that when there are few vehicles with the highest priority, the agent will schedule these vehicles with less delay as possible. Meanwhile, such gradual priority inheritance mechanism will allow those ahead vehicles that do not block the vehicles with the highest priority and on other lanes to travel through the intersection normally. Thus, the traffic efficiency at one intersection will be guaranteed as possible. ```
Input:\(\gamma_{m}.\tau\); \(Q_{\ell_{k}}\). Output: Vehicles to be authorized.