|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.ObjectGenerator
Class for defining the properties of moving objects. An example is the computations of new starting and destination nodes.
| Field Summary | |
protected static int |
currId
The value of the next identifier. |
protected DataSpace |
dataspace
The dataspace of the network. |
protected double |
maxLength
The maximum length of routes. |
protected Node[] |
node
The nodes of the network as an array. |
protected Nodes |
nodes
The nodes of the network. |
protected int |
numOfGeneratedNodes
The number of generated node pairs. |
protected int |
numOfObjAtBeginning
Indicator for the number of moving objects at the beginning. |
protected int |
numOfObjPerTime
Indicator for the number of moving objects per time. |
protected ObjectClasses |
objClasses
The object classes. |
protected java.util.Properties |
properties
Properties of the generator. |
protected java.util.Random |
random
The random generator. |
protected Time |
time
The time object. |
protected double |
totalLength
The total length of routes. |
| Constructor Summary | |
ObjectGenerator(java.util.Properties properties,
Time time,
DataSpace ds,
Nodes nodes,
ObjectClasses objClasses,
int numOfObjPerTime,
int numOfObjAtBeginning)
ObjectGenerator constructor. |
|
| Method Summary | |
Node |
computeDestinationNode(int time,
Node startingNode,
int length,
int objClass)
Computes a new destination node of a route. |
int |
computeId(int currTime)
Returns the identifier of the next new moving object. |
int |
computeLengthOfRoute(int time,
int objClass)
Generates the length of a new route. |
int |
computeObjectClass(int currTime)
Computes the object class of a new object. |
Node |
computeStartingNode(int time,
int objClass)
Computes a new starting node. |
int |
getAverageRouteLength()
Returns the average distance of routes. |
int |
numberOfNewObjects(int time)
Returns the number of new objects at a time stamp. |
void |
reachDestination(MovingObject obj)
Method, which is called, when a moving object reaches its destination. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static int currId
protected java.util.Properties properties
protected Time time
protected DataSpace dataspace
protected ObjectClasses objClasses
protected Nodes nodes
protected Node[] node
protected int numOfObjPerTime
protected int numOfObjAtBeginning
protected double maxLength
protected int numOfGeneratedNodes
protected double totalLength
protected java.util.Random random
| Constructor Detail |
public ObjectGenerator(java.util.Properties properties,
Time time,
DataSpace ds,
Nodes nodes,
ObjectClasses objClasses,
int numOfObjPerTime,
int numOfObjAtBeginning)
properties - properties of the generatortime - the time objectnodes - the nodes of the networkobjClasses - description of the object classesnumOfObjPerTime - indicator for the number of objects per timenumOfObjAtBeginning - indicator for the number of moving objects at the beginning| Method Detail |
public Node computeDestinationNode(int time,
Node startingNode,
int length,
int objClass)
time - the time stampstartingNode - the starting node of the routelength - preferred length of the routeobjClass - the class of the object
public int computeId(int currTime)
currTime - the current time
public int computeLengthOfRoute(int time,
int objClass)
time - time stampobjClass - object class of the moving object
public int computeObjectClass(int currTime)
currTime - the current time
public Node computeStartingNode(int time,
int objClass)
time - the time stampobjClass - the class of the object
public int getAverageRouteLength()
public int numberOfNewObjects(int time)
time - the time stamp
public void reachDestination(MovingObject obj)
obj - the moving object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||