sim::mechanics

Module intersection

Source

Structsยง

  • Manages conflicts at intersections. When an agent has reached the end of a lane, they call maybe_start_turn to make a Request. Based on the intersection type (stop sign, traffic signal, or a โ€œfreeform policyโ€), the Request gets queued or immediately accepted. When agents finish turns or when some time passes (for traffic signals), the intersection also gets a chance to react, maybe granting one of the pending requests.
  • Request ๐Ÿ”’
  • SignalState ๐Ÿ”’
  • State ๐Ÿ”’

Constantsยง

Functionsยง