generator2
Class MovingObjects

java.lang.Object
  |
  +--generator2.MovingObjects

public class MovingObjects
extends java.lang.Object

Container class for all current moving objects.


Constructor Summary
MovingObjects(WeightManagerForDataGenerator wm, Network net, ObjectGenerator objGen, Reporter reporter, ReRoute reroute)
          MovingObjects constructor.
 
Method Summary
protected  void add(MovingObject obj)
          Adds a moving object to the container.
 Network getNetwork()
          Returns the network.
 ObjectClasses getObjectClasses()
          Returns the description of the object classes.
 ReRoute getReRoute()
          Returns the rerouting decider.
 int getTotalDegreeOfTraversedNodes()
          Returns the total degree of traversed nodes.
 int getTotalNumberOfTraversedNodes()
          Returns the total number of traversed nodes.
 int getTotalNumOfObjects()
          Returns the total number of created moving objects.
 WeightManagerForDataGenerator getWeightManager()
          Returns the weight manager.
 void incTraversedDegreeBy(int value)
          Increments the counter for the degree of traversed nodes by a given value.
 void incTraversedNodesBy(int value)
          Increments the counter for the number of traversed nodes by a given value.
 void move(int time)
          Moves all objects.
 void remove(int index)
          Removes the moving object at a given index.
 void removeObjects()
          The positions during the route of all objects in the container are reported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MovingObjects

public MovingObjects(WeightManagerForDataGenerator wm,
                     Network net,
                     ObjectGenerator objGen,
                     Reporter reporter,
                     ReRoute reroute)
MovingObjects constructor.

Parameters:
wm - the weight manager
net - the network
objGen - the object generator
reporter - the reporter
reroute - reroute decider
Method Detail

add

protected void add(MovingObject obj)
Adds a moving object to the container.

Parameters:
obj - moving object

getNetwork

public Network getNetwork()
Returns the network.

Returns:
network

getObjectClasses

public ObjectClasses getObjectClasses()
Returns the description of the object classes.

Returns:
object classes

getReRoute

public ReRoute getReRoute()
Returns the rerouting decider.

Returns:
reroute

getTotalDegreeOfTraversedNodes

public int getTotalDegreeOfTraversedNodes()
Returns the total degree of traversed nodes.

Returns:
degree of traversed nodes

getTotalNumberOfTraversedNodes

public int getTotalNumberOfTraversedNodes()
Returns the total number of traversed nodes.

Returns:
number of traversed nodes

getTotalNumOfObjects

public int getTotalNumOfObjects()
Returns the total number of created moving objects.

Returns:
int

getWeightManager

public WeightManagerForDataGenerator getWeightManager()
Returns the weight manager.

Returns:
weight manager

incTraversedDegreeBy

public void incTraversedDegreeBy(int value)
Increments the counter for the degree of traversed nodes by a given value.

Parameters:
value - the increment

incTraversedNodesBy

public void incTraversedNodesBy(int value)
Increments the counter for the number of traversed nodes by a given value.

Parameters:
value - the increment

move

public void move(int time)
Moves all objects. The positions during the route of the objects, which have reached the destination node, are reported; these objects are removed from the container.

Parameters:
time - the current time stamp

remove

public void remove(int index)
Removes the moving object at a given index.

Parameters:
index - index of the object

removeObjects

public void removeObjects()
The positions during the route of all objects in the container are reported. Then, all objects are removed from the container.