Queuing ======== Queuing Types -------------- - Vertical queues: Congestion on one edge does not impact congestion on the other edges. - Horizontal queues with overtakes: Pending agents are impacting congestion on the edge they are coming from but overtake if possible (e.g., an agent who is turning left can overtake an agent waiting to turn right). This is what is done in Metropolis 1. Note that this is incompatible with a true bottleneck model. - Horizontal queues with blockage of upstream edges: Pending agents are blocking the edge they are coming from; no overtake if possible. It is still possible to cross the intersection (if coming from another downstream edge not blocked and going to another upstream edge not full). This is only compatible with a true bottleneck model. - Horizontal queues with full blockage: Pending agents are assumed to enter the intersection and to block all traffic going through it. .. warning:: There is another possible queuing type where overtake is only possible for agents turning right (when the front or left edge is full, for right-hand traffic). This could be implemented at the intersection level. To detect right- and left-turns an automatic process could be implemented by comparing the orientation of the downstream edges. .. warning:: For a more realistic model, we could assume that the upstream edge gets blocked only if it has one lane. For more complex models (e.g., the edge is blocked if it has two lanes and someone is waiting to turn right and someone else is waiting to turn left), this could be implemented at the intersection level. Route Choice ------------ If route lookahead is enabled, agents observe the status of the downstream edges (full or not) and the number of vehicles in the queue, at any intersection. Then, the total expected travel time to destination for a downstream edge that is full depends on the expected waiting time for this edge. The expected waiting time is a function of the number of vehicles in the queue and the expected discharge rate of the edge. If route lookahead is disabled, route choice is based on the expected travel times of the edges, which are based on the travel times of the previous iterations, that include potential waiting times. Revisions --------- When blocked at an intersection, waiting for an edge to be accessible, an agent can make a revision, i.e., he/she can choose to stop waiting and take another downstream edge. The timing of the revisions is based on the expected discharge rate of the edge, i.e., the rate at which vehicles are leaving the queue. At each revision, the predicted discharge rate of the edge is updated based on what was observed during the time spent waiting so far. .. warning:: TODO: Check if the timing of the revisions could be improved by accounting for the difference in travel time or travel utility between the route chosen and the second-best alternative (this is more difficult with stochastic route choice). Revisions v2 ------------ Common data: exit rate of a road full to capacity. This is used to compute route choice. The exit rate is update e.g., every 30 seconds. When the exit rate is updated, the first vehicle in the queue can revise its choice.