|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.ReRoute
Class which decides about the re-routing.
| Field Summary | |
protected DataSpace |
ds
The data space |
protected int |
eventProbability
Probability for re-routing because of an event in 1/p. |
protected int |
numOfRoutesByComparison
How often has "computeNewRouteByComparison" returned "true". |
protected int |
numOfRoutesByEvent
How often has "computeNewRouteByEvent" returned "true". |
protected java.util.Properties |
properties
The properties of the generator. |
protected java.util.Random |
random
Random generator |
protected int |
speedProbability
Probability for re-routing because of a speed change in 1/p. |
protected int |
speedThreshold
Speed threshold (as factor) for re-routing |
protected Time |
time
The time object. |
protected int |
timeLimit
Time limit for re-routing. |
| Constructor Summary | |
ReRoute(java.util.Properties properties,
Time time,
DataSpace ds)
ReRoute constructor. |
|
| Method Summary | |
boolean |
computeNewRouteByComparison(int lastTime,
int actTime,
int origSpeed,
int actSpeed)
Decides whether a route should be recomputed or not because of the comparison of the speed on an edge. |
boolean |
computeNewRouteByEvent(int lastTime,
int actTime)
Decides whether a route should be recomputed or not because of an event. |
int |
getNumberOfRoutesByComparison()
Returns how often has "computeNewRouteByComparison" returned "true". |
int |
getNumberOfRoutesByEvent()
Returns how often has "computeNewRouteByEvent" returned "true". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Time time
protected DataSpace ds
protected java.util.Properties properties
protected int numOfRoutesByComparison
protected int numOfRoutesByEvent
protected int speedProbability
protected int eventProbability
protected int timeLimit
protected int speedThreshold
protected java.util.Random random
| Constructor Detail |
public ReRoute(java.util.Properties properties,
Time time,
DataSpace ds)
properties - properties of the generatortime - the time objectds - the dataspace| Method Detail |
public boolean computeNewRouteByComparison(int lastTime,
int actTime,
int origSpeed,
int actSpeed)
lastTime - time when the last route was computedactTime - actual timeorigSpeed - speed of the edge when the last route was computed
public boolean computeNewRouteByEvent(int lastTime,
int actTime)
lastTime - time when the last route was computedactTime - actual time
public int getNumberOfRoutesByComparison()
public int getNumberOfRoutesByEvent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||