Research Article

STEIM: A Spatiotemporal Event Interaction Model in V2X Systems Based on a Time Period and a Raster Map

Algorithm 1

Based on the Petri Net Model of Event Flow-Processing Algorithm.
Input: temporal and spatial event flow, STEIM statement Petri net model
Output: an event instance that satisfies the STEIM statement condition
(1)while TRUE do
(2) Event  it is an instance of an Event that the current pointer points to.
 for each Event.Attribute do
(3)  TransitionStart.InputToken  Event.Attribute;
(4) end
(5) for each TransitionStart do
(6)  if InputToken satisfies Guard then
(7)   OutputToken  InputToken;
(8)  else
(9)   Clear the Event value, Event pointer ++;
(10)  end
(11)end
(12) for each TransitionMid do
(13)  if TransitionMid.InputToken satisfies Guard then
(14)   OutputToken  OutputToken ⊙ InputToken;
(15)  else
(16)   Clear the Event value, Event pointer ++;
(17)  end
(18) end
(19) for each TransitionParallel do
(20)  if TransitionParallel.InputToken satisfies Guard
  then
(21)   OutputToken  OutputToken InputToken;
(22)  else
(23)   Clear the Event value, Event pointer ++;
(24)  end
(25) end
(26) for each TransitionEnd do
(27)  if TransitionEnd.InputToken satisfies Guard then
(28)   OutputToken  OutputToken ⊙ InputToken;
   return OutputToken;
(29)  else
(30)   Clear the Event value, Event pointer ++;
(31)  end
(32) end
(33) Clear the Event value, Event pointer ++;
(34)end