# Coordinated Multi-Platooning Planning for Resolving Sudden Congestion on Multi-Lane Freeways
## 4 Proposed Platoon-Based Coordination Scheme to Minimize Traffic Congestion
### The Overall Platoon Protocol and Algorithm
#### 4.6.3 Coordinated Platooning Control Algorithm  
Algorithm 1 shows the pseudo-code of the proposed algorithm. This decentralized algorithm runs in each vehicle. If the vehicle is a platoon leader, it has the responsibility of sending moving instructions (either moving forward or changing lanes) to platoon members periodically. If the vehicle is a platoon member, it merely follows instructions from its platoon leader. These operations follow the message exchange and motion models as CACC models [1,18,19]. If a vehicle has not yet joined a platoon, it runs ACC models and can consider joining a platoon (to run CACC models). The decision-making process of each vehicle is then handled by motion models (CACC/ACC). In practice, the algorithm is triggered by receiving messages, such as the emergency notification message, the join platoon message, the lane change message, etc. Upon receiving a message, each vehicle can decide based on its location and platoon-joining status. Accordingly, vehicle \(i\) can obey Equation (2), regardless of being a platoon leader or a platoon member. Otherwise, it should also obey Equations (3) to (6). The lane restrictions from Equations (7) and (8) are to ensure safe driving.  
```
1:vehicle \(i\in S\)
2:Loop
3:if\(i\) is a platoon leader (\(PL\)) then
4:ifplatoon_size \(<\) platoon_size_limit then
5:Platoon_Status.AllowJoin \(=\) True
6:else
7:Platoon_Status.AllowJoin \(=\) False
8:endif
9:Periodically broadcast Platoon_Status messages
10:Upon receiving a Join_Request
11:ifplatoon_size \(<\) platoon_size_limit then
12:Reply Join_Response.Permit message
13:
14:else
15:Reply Join_Response.Deny message
16:endif
17:Check Lane_Change safety condition
18:if Lane_Change_Condition is satisfied then
19:Send Lane_Change_Execution message to platoon members
20:Execute Lane_Change
21:Upon completing Lane_Change
22:if Lane_Change is completed then
23:Send Lane_Change_Completion message to platoon members
24:endif
25:else
26:Maintain at the same Lane
27:endif
28:elseif\(i\) is a platoon member (\(PM\)) then
29: Follow the Platoon_Status messages
30:if received a Join_Execution message or Lane_Change_Completion message then
31: Follow the driving instruction from \(PL\)
32:endif
33:if received a Lane_Change_Execution message then
34: Follow \(PL\) to perform Lane_Change
35:endif
36:else { # \(i\) is not in a platoon }
37:if received a Platoon_Status message and Platoon_Status.AllowJoin \(==\) True then
38: Send Join_Request to the \(PL\)
39:if received Join_Response.Permit message then
40:\(i\) joins the platoon and becomes a platoon member (\(PM\))
41:else
42:\(i\) becomes a platoon leader (\(PL\))
43:endif
44:endif
45:endif
46:Until \(i\) passes the accident spot
```  
**Algorithm 1** Coordinated Platooning Planning (CPP) algorithm  
Figure 3 illustrates the workflow of the proposed algorithms and key process. In the first free-driving section, vehicle \(i\) uses the ACC model to obey the safe distance description and avoid causing the freeway shockwave. When vehicle \(i\) drives into the second transition section, it uses the CACC model and follows the platoon maneuver commands (as described in Sections 4.2-4.5). Platoon-joining and lane-changing actions are integrated into the platoon leader's function. Finally, in the moving-in-order section, vehicle \(i\) passes the accident spot with the maximum velocity and minimum inter-vehicle gap according to  
the safety constraint of the proposed CACC platoon management. Therefore, depending on whether vehicle \(i\) uses the ACC mode (leader) or CACC mode (member), it will adjust its velocity based on the velocity and distance of the preceding vehicle. Note that the leader/members can decide whether they want to dissolve it or not after gaining its goal (to exit the congestion area successfully).