The class TrafficSystem
Defines the components (lanes, lights) that comprise a specific traffic system.
- The constructor creates the components (lanes and lights).
-
The method
step()
performs a time step, by stepping its components, moving vehicles in and out of the system, past lights, and between lanes. -
The method
print()
outputs a snapshot of the system. -
The method
print_setup()
outputs the simulation parameters. -
The method
print_statistics()
outputs the current statistics.