|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.EdgeClasses
Definition of the properties of the classes of the network edges.
| Field Summary | |
protected int[] |
capacity
Capacity of the classes. |
protected java.awt.Color[] |
color
Color of the edge classes. |
protected int[] |
maxSpeed
Maximum speed of the classes. |
protected int |
maxSpeedDivisor
Initial maximum speed of the classes. |
protected int[] |
minScale
Minimum scales for depicting the edge classes. |
protected int |
num
Number of edge classes. |
protected java.util.Properties |
properties
The properties of the generator. |
protected Time |
time
The time object. |
| Constructor Summary | |
EdgeClasses(java.util.Properties properties)
EdgeClasses constructor. |
|
| Method Summary | |
void |
announce(Time time,
DataSpace ds,
int maxSpeedDivisor)
Announces the time object, the dataspace and the divisor of maximum speed to the object. |
int |
deceleratedSpeed(int c,
int edgeUsage)
Computes the decelerated speed of an edge class depending on the usage and the capacity of the edge. |
int |
getCapacity(int c)
Returns the capacity of an edge class. |
java.awt.Color |
getColor(int c)
Returns the color for depicting an edge class. |
int |
getMaxSpeed(int c)
Returns the maximum speed of an edge class. |
int |
getMaxSpeedDivisor()
Returns the maximum speed divisor. |
int |
getMinScale(int c)
Returns the minimum scale for depicting an edge class. |
int |
getNumber()
Returns the number of edge classes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Properties properties
protected Time time
protected int num
protected int maxSpeedDivisor
protected int[] maxSpeed
protected int[] capacity
protected int[] minScale
protected java.awt.Color[] color
| Constructor Detail |
public EdgeClasses(java.util.Properties properties)
properties - properties of the generator| Method Detail |
public void announce(Time time,
DataSpace ds,
int maxSpeedDivisor)
time - the time objectds - the dataspacemaxSpeedDivisor - divisor of maximum speed (10=fast, 50=middle, 250=slow)
public int deceleratedSpeed(int c,
int edgeUsage)
c - edge classedgeUsage - usage of the edge
public int getCapacity(int c)
c - edge class
public java.awt.Color getColor(int c)
c - edge class
public int getMaxSpeed(int c)
c - edge class
public int getMaxSpeedDivisor()
public int getMinScale(int c)
c - edge class
public int getNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||