Skip navigation links
G I L M N P R S T V 

G

getBornTime() - Method in class Vehicle
Get method for the born time
getDestination() - Method in class Vehicle
Get method for the destination
getFirst() - Method in class Lane
Access method for the vehicle in the first position.
getTime() - Static method in class Simulation
Returns current simulation time

I

isGreen() - Method in class Light
Checks if the light is green.

L

Lane - Class in <Unnamed>
Represents a lane as an array of Vehicles.
Lane(int) - Constructor for class Lane
Constructs a lane with a specified capacity.
lastFree() - Method in class Lane
Checks if the last position is free.
Light - Class in <Unnamed>
Represents a traffic light.
Light(int, int) - Constructor for class Light
Constructs and initializes a light.
loadProperties(String) - Method in class TrafficSystem
Reads the lane lengths and the properties of the lights from a property file.

M

main(String[]) - Static method in class Lane
Demonstrates the use of the the class and it's methods.
main(String[]) - Static method in class Light
Demonstrates the stepping of a signal.
main(String[]) - Static method in class Simulation
 
main(String[]) - Static method in class VehicleGenerator
Demonstration program for the VehicleGenerator

N

numberInSystem() - Method in class TrafficSystem
Compute the number of vehicles in the system
numberOfVehicles() - Method in class Lane
Counts the number of Vehicles on the lane.

P

print() - Method in class TrafficSystem
Prints the current situation using toString-methods in lights and lanes
print() - Method in class VehicleGenerator
Prints the current setup of the generator
printSetup() - Method in class TrafficSystem
Prints the simulation parameters and arrival probabilities used in this run
printStatistics() - Method in class TrafficSystem
Prints currently collected statistics
putLast(Vehicle) - Method in class Lane
Put a vehicle in the last position.

R

removeFirst() - Method in class Lane
Removes the first vehicle (index 0) from the lane and makes it empty.

S

setTime(int) - Static method in class Simulation
Sets the global time, Note: This method should ONLY be used by JUnit test programs
Simulation - Class in <Unnamed>
Main class for running a simulation This class does not need to be changed
Simulation() - Constructor for class Simulation
 
step() - Method in class Lane
Advances all except the first vehicle one position provided the target position is free.
step() - Method in class TrafficSystem
Advances the whole traffic system one timestep.
step() - Method in class VehicleGenerator
Generate a vehicle according to the probabilities for this time step

T

toString() - Method in class Lane
A string representation of the lane.
toString() - Method in class Light
Returns a string representation of the signal.
toString() - Method in class Vehicle
Return a string representation indicating the destination
toString() - Method in class VehicleGenerator
Returns the current state
TrafficSystem - Class in <Unnamed>
Defines the components and behaviour of s specific traffic system
TrafficSystem() - Constructor for class TrafficSystem
 

V

Vehicle - Class in <Unnamed>
Represents a vehicle with its born time (the time when it enters the system) and its destination.
Vehicle(char) - Constructor for class Vehicle
Constructs a Vehicle
VehicleGenerator - Class in <Unnamed>
Generates vehicles with varying probability.
VehicleGenerator() - Constructor for class VehicleGenerator
Will use the predefined array arrivals to generate vehicles.
VehicleGenerator(int) - Constructor for class VehicleGenerator
Hard coded probabilities.
VehicleGenerator(String) - Constructor for class VehicleGenerator
This constructor reads the arrival and turning probabilities for different time periods from a file.
G I L M N P R S T V 
Skip navigation links