public class TrafficSystem
extends java.lang.Object
| Constructor and Description |
|---|
TrafficSystem() |
| Modifier and Type | Method and Description |
|---|---|
void |
loadProperties(java.lang.String filename)
Reads the lane lengths and the properties of the lights from a
property file.
|
int |
numberInSystem()
Compute the number of vehicles in the system
|
void |
print()
Prints the current situation using toString-methods in
lights and lanes
|
void |
printSetup()
Prints the simulation parameters and arrival probabilities used in
this run
|
void |
printStatistics()
Prints currently collected statistics
|
void |
step()
Advances the whole traffic system one timestep.
|
public void step()
public int numberInSystem()
public void printStatistics()
public void print()
public void printSetup()
public void loadProperties(java.lang.String filename)
throws java.io.FileNotFoundException
filename - The file containing the propertiesjava.io.FileNotFoundException - *
The the property file should define
Example of file contents:
laneLength : 10
laneWSLength : 8
lightPeriod : 14
lightWestGreen : 6
lightSouthGreen : 4