Research Article

Stopping Accidents before They Happen: Perceiving Lane-Level Moving Vehicle Danger Regions to Warn Surrounding Drivers and Pedestrians

Algorithm 2

Running algorithm.
Input: , ,
Output: No
   (1) Map stage
   (2) FOR IN DO
   (3) // Acquire the dynamic danger region () of current query object
(4)
(5)
(6) FOR IN
   (7)
   (8) Insert into
   (9) END FOR
   (10) END FOR
   (11) Reduce Stage
   (12)
   (13) FOR IN
DO
   (14) FOR IN DO
   (15)
     // Send safety information to nearby vehicles
   (16) END FOR
   (17) END FOR