## 4 Procedures for VTL and Platoon Management over the Virtual Nodes
### VTL Computation and Platooning Maneuvers  
Once a VTL leader has been elected, it proceeds to compute and disseminate the VTL signals in the VTL area. For this purpose, it maintains a table of information -computed from the _M_Hello_ messages--about the vehicles arriving at the intersection through any of the neighboring L2 VNs.  
Figure 4: The state machine of the procedure used to choose a VTL leader.  
According to this information, in a general case, the leader will give the green light to the first vehicles in the most congested lane, as well as the first vehicles in other inlets, as long as their trajectories do not interfere. The rest of the lanes will be served sequentially, always giving the green light to several vehicles proportional to the number of vehicles detected in each lane. This way, we try to avoid congestion in the busiest roads without incurring in starvation at the least busy ones. When the cycle finishes and the leader receives the green light, it sends an _M_LeaderDesignation_ message to start the new leader election.  
Up to here, the VTL operation is largely similar to the proposal of [14], with priorities assigned depending on congestion measurements. Our approach, however, makes some additional provisions to facilitate the flow of the platoons and vehicles interested in joining them, taking advantage from the fact that the platooning announcements are processed and leave persistent information in the L1 VNs:  
* On the one hand, the VTL leaders check that information so that, when a platoon is about to arrive at the intersection, the arrival lane gets increased priority, giving the green light to a greater number of vehicles in every cycle (until the estimation time plus a little margin of error that depends on the distance of the platoon since the last announcement).
* On the other hand, vehicles interested in joining a platoon can check the estimated arrivals information and try to reach the intersection on time. The potential joiners include the ID of the platoon in their _M_Hello_ messages, so the VTL leader can give green lights selectively to facilitate their incorporation at the end of the trains.  
A join maneuver is depicted in Figure 5. The car represented by the white square wants to join the platoon led by the one represented by a white circle, but two other vehicles ahead of it--represented by gray triangles--obstruct the operation. In this situation, the VTL leader gives the green light to those two vehicles first, then to the platoon, and finally to the joiner. It must be noticed that our algorithm follows a \"first come, first served\" policy with the potential joiners, as there may be situations in which more than one vehicle is ready to join the platoon, but not all of them can be satisfied due to the traffic conditions.  
Currently, the join maneuvers are only considered when the potential joiners are awaiting at the intersection upon arrival of the platoon. If a potential joiner arrives to the intersection before the platoon, it is treated as an ordinary vehicle, so it may green light before the arrival of the platoon. Therefore, the joining does not happen--it could, afterwards, if the platoon arrives from behind and the vehicle becomes the head of it. We do not consider delaying the traffic flow along the lane of early-arriving vehicles, because it could increase congestion and make other vehicles wait unnecessarily to cross the intersection.  
Leave maneuvers are easier to handle, because there is no need for coordination by the VTL leader. Yet, the intended path of the vehicle that wants to leave a platoon must be notified to the VTL leader in the _M_Hello_ messages, to avoid giving at the same time the green light to other vehicles that could interfere with it. The leaving vehicle only must communicate with the platoon leader to increase the space with its preceding and following vehicles as soon as the platoon receives the green light.  
Figure 5: Join maneuver coordinated by the VTL protocol.