Public Member Functions | |
Region (int x, int y, int leftBoundary, int rightBoundary, int upperBoundary, int lowerBoundary) | |
Node | addNode (Node node, boolean doCheck) |
void | delNode (Node node) |
void | addRSU (RSU rsu) |
void | delRSU (RSU rsu) |
void | addStreet (Street street, boolean doCheck) |
void | checkStreetsForBridges () |
void | delStreet (Street street) |
synchronized void | addVehicle (Vehicle vehicle, boolean doCheck) |
synchronized void | delVehicle (Vehicle vehicle) |
int | getX () |
int | getY () |
void | calculateJunctions () |
void | addMixZone (Node node, int radius) |
void | deleteMixZone (Node node) |
void | prepareLogs (Node[] nodes) |
String[] | getIntersectionPoints (Node mixNode, Region region12) |
void | clearMixZones () |
void | clearRSUs () |
void | cleanVehicles () |
void | clearTrafficLights () |
Node[] | getNodes () |
Node[] | getMixZoneNodes () |
RSU[] | getRSUs () |
Street[] | getStreets () |
ArrayList< Vehicle > | getVehicleArrayList () |
Vehicle[] | getVehicleArray () |
void | createBacklink (WorkerThread thread, int numberinThread) |
int | getLeftBoundary () |
int | getRightBoundary () |
int | getUpperBoundary () |
int | getLowerBoundary () |
Public Attributes | |
ArrayList< String > | xxx = new ArrayList<String>() |
ArrayList< String > | yyy = new ArrayList<String>() |
ArrayList< String > | nnn = new ArrayList<String>() |
A region stores all objects in a specific part of the map. It stores streets, nodes and vehicles.
|
inline |
Constructor for a region.
x | the position on the x axis of the new region |
y | the position on the y axis of the new region |
leftBoundary | the coordinate of the left boundary |
rightBoundary | the coordinate of the right boundary |
upperBoundary | the coordinate of the upper boundary |
lowerBoundary | the coordinate of the lower boundary |
|
inline |
adds mix zone at the location of "node" if no mix zone on this location already exists
Function to add a node to this region.
node | the node to add |
doCheck | true if a check should be made if this node already exists; else false to skip the test |
node
if it already existed and check
was true)
|
inline |
Function to add a Road-Side-Units to this region.
rsu | the RSU to add |
|
inline |
Function to add a street to this region. This also checks if it is intersecting with other streets in this region and sets the appropriate flag on the streets!
street | the street to add |
doCheck | true if a check should be made if this street already exists; else false to skip the test |
|
inline |
Function to add a vehicle to this region.
vehicle | vehicle to add |
doCheck | true if a check should be made if this vehicle already exists; else false to skip the test |
|
inline |
This function should be called before starting simulation. All nodes calculate if they are junctions and and what their priority streets are. Furthermore, mixing zones are generated.
|
inline |
Checks all streets in this region for possible bridges.
|
inline |
This function should be called before initializing a new scenario to delete all vehicles.
|
inline |
clear all mix zones from this region.
|
inline |
clear all RSUs from this region.
|
inline |
This function deletes all traffic lights in this region
|
inline |
Creates a backlink to the worker thread which computes this region.
thread | the thread |
numberinThread | the number in the thread |
|
inline |
deletes mix zone at the node
node | Node where mix zone is placed on |
|
inline |
Delete a node.
node | the node |
|
inline |
Delete a Road-Side-Unit.
rsu | the RSU to delete |
|
inline |
Delete a street.
street | the street |
|
inline |
Function to delete a vehicle from this region.
vehicle | the vehicle to remove |
Gets intersection points between mix-zone and streets. Before evoking check if this node is a mix-zone. Note that the performance of this function is very bad. It has to be evoked before the start of the simulation!
|
inline |
Gets the coordinate of the left boundary of this region.
|
inline |
Gets the coordinate of the lower boundary of this region.
|
inline |
Returns all mix zone nodes in this region.
|
inline |
Returns all nodes in this region.
|
inline |
Gets the coordinate of the right boundary of this region.
|
inline |
Returns all Road-Side-Units in this region.
|
inline |
Returns all streets in this region.
|
inline |
Gets the coordinate of the upper boundary of this region.
|
inline |
Creates an array as a copy of the vehicle ArrayList
to prevent problems during simulation caused by changing the ArrayList
while reading it in another thread. The array is cached so that new ones are only created when needed.
|
inline |
Used to return the ArrayList
of all vehicles. Note that it can not guaranteed, that no changes are made after you received this.
ArrayList
containing all vehicles
|
inline |
Function to get the x axis position of this region.
|
inline |
Function to get the y axis position of this region.
|
inline |
Method to prepare the log files. Calculates all intersections beetween streets and mix-zones