|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--generator2.ObjectGenerator
|
+--generator2.ConstantObjectGenerator
Example for an object generator garanteeing a constant number of moving objects during all time stamps.
| Field Summary | |
protected java.util.Stack |
deadObjs
Container of dead objects. |
| Fields inherited from class generator2.ObjectGenerator |
currId, dataspace, maxLength, node, nodes, numOfGeneratedNodes, numOfObjAtBeginning, numOfObjPerTime, objClasses, properties, random, time, totalLength |
| Constructor Summary | |
ConstantObjectGenerator(java.util.Properties properties,
Time time,
DataSpace ds,
Nodes nodes,
ObjectClasses objClasses,
int numOfObjPerTime,
int numOfObjAtBeginning)
ConstantObjectGenerator 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 |
computeObjectClass(int currTime)
Computes the object class of a new object. |
Node |
computeStartingNode(int time,
int objClass)
Computes a new starting node. |
int |
numberOfNewObjects(int time)
Returns the number of new objects at a time stamp. |
void |
reachDestination(MovingObject obj)
Stores the object for using its properties for new objects. |
| Methods inherited from class generator2.ObjectGenerator |
computeLengthOfRoute, getAverageRouteLength |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Stack deadObjs
| Constructor Detail |
public ConstantObjectGenerator(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)
computeDestinationNode in class ObjectGeneratortime - the time stampstartingNode - the starting node of the routelength - preferred length of the routeobjClass - the class of the object
public int computeId(int currTime)
computeId in class ObjectGeneratorcurrTime - the current time
public int computeObjectClass(int currTime)
computeObjectClass in class ObjectGeneratorcurrTime - the current time
public Node computeStartingNode(int time,
int objClass)
computeStartingNode in class ObjectGeneratortime - the time stampobjClass - the class of the object
public int numberOfNewObjects(int time)
numberOfNewObjects in class ObjectGeneratortime - the time stamp
public void reachDestination(MovingObject obj)
reachDestination in class ObjectGeneratorobj - the moving object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||