if (τ*presence* < 10 %) and (n*moving presence* = 0)
the state of downstream zone is *Empty* if (τ*presence* ≥ 10 %) and (τ*movement* < 10 %) et (n*moving presence* = 0)
the state of the downstream zone is *Stationary* if the state of the downstream zone is neither *Empty* nor *Stationary* if nmovement = n*end of presence* the state of the downstream zone is *P ast Movement* else the state of the downstream zone is *Movement* Algorithm 2. Qualification rules for an upstream zone.

if (τ*presence* < 10 %) and (n*end of presence* = 0)
the state of downstream zone is *Empty* if (τ*presence* ≥ 10 %) and (τ*movement* < 10 %) et (n*end of presence* = 0)
the state of the upstream zone is *Stationary* if the state of the upstream zone is neither *Empty* nor *Stationary* if nmovement = n*moving presence* the state of the downstream zone is *F uture Movement* else the state of the downstream zone is *Movement* Algorithm 3. Rules determining if the crossing conditions are met for upstream and downstream zones (¬*Movement* means any zone state except *Movement*).

if the state of the upstream zone is *Movement* the crossing condition for the upstream zone is met if the state of the upstream zone changes from Movement to ¬*Movement* the crossing condition for the upstream zone is *not met* if (the state of the downstream zone is *Movement*) and (the crossing condition of the upstream zone is met)
the crossing condition for the downstream zone is met else the crossing condition for the downstream zone is *not met* Algorithm 4. Rule to detect a crossing between an upstream and a downstream zone.

if the crossing conditions on the upstream and downstream zones are met if (the state of the upstream zone is *Movement*) and (nmovement ≥ 0.5 n*presence*)
A crossing between the two zones is detected Finally, a decision is made about the origin of the moving groups of road users in the conflict zone. It is assumed that all road users newly detected in a conflict zone originate from the same approach and crossed the stop line during the last second. It is simple if the method described above detected only one crossing from an upstream zone. If crossings were detected from the two upstream zones, the origin of the road users detected in the conflict zone is the upstream zone for which the traffic light was not red (if the two upstream traffic lights are red, the origin is the upstream zone for which the traffic light was most recently green).