|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITwig
A "twig" is one section or "branch" of a route. It can represent a walkway or a road or railway, or a section of a trip taken on public transport. It holds information about the number of possible exits and entries, restrictions on use, and places (origins or destinations) to which it is connected
| Field Summary | |
|---|---|
static ITwig[] |
ZERO
A static zero-length array, created for convenience, and to save memory |
| Method Summary | |
|---|---|
boolean |
allowed(IBehaviour behaviour)
Returns true if agents with this behaviour are allowed to travel on this twig |
boolean |
barred()
Returns true if this twig is permanently barred to all agents |
boolean |
barredTurn(ITwig that)
Returns true if the turn from this twig to that is permanently barred |
boolean |
canArriveHere()
Returns true if a trip can finish here - which means that this twig is inside or connected to a destination place |
boolean |
canDepartHere()
Returns true if a trip can start here - which means that this twig is inside or connected to an origin place |
IXyz |
centroid()
The location of a point that is near the centre of this twig. |
boolean |
connectedTo(ITwig that)
returns true if this link is connected to the given link |
void |
drawConnectionTo(ITwig that,
IDrawing drw,
int rgb,
double strength,
boolean drawInTwig,
ITwig origin,
IPlace dest,
IBehaviour b,
IType type)
Draw the connection between this twig and that in the given colour. |
void |
drawFilled(IDrawing drw,
int rgb)
Draw this twig in the given colour. |
IXyz |
endLocation()
Returns a point location at the end of this twig, used for route display and to centre the view on this twig |
int |
entries()
the number of open inward components |
int |
entriesXU()
the number of open inward components |
ITwig |
entry(int index)
an open inward component, index [1..N] |
ITwig |
exit(int index)
an open outward component, index [1..N] |
int |
exitIndex(ITwig exit)
Return the [1..N] index of the given outward link, or 0 if it is not connected. |
int |
exits()
the number of open outward components, including U_turn, if allowed |
int |
exitsXU()
the number of open outward components, excluding U-Turn |
boolean |
highlightAllOptions()
Returns true of all available options should be highlighted in the display when a highlighted trip passes this twig |
boolean |
inside(IPlace place)
Returns true if this twig is inside (or connected to) the given place |
boolean |
insidePlace()
Returns true if this twig is inside (or connected to) any place |
Distance |
length()
The (apparent) length of this twig, for routing purposes. |
boolean |
permittedByModeChanges(IBehaviour b)
Returns true if an agent with the given behaviour is permitted on this twig. |
boolean |
permittedByModeChanges(IModeChanges mc,
boolean set)
Returns true if an agent with the given set of recorded mode changes can use this twig |
IPlace[] |
places()
An array of places to which this twig is connected, or inside |
double |
releaseRate()
Returns the release rate for trips departing from this twig, in the range [0.0 ... |
void |
releaseRate(Double d)
Set the release rate for this twig, a value in the range [0.0 ... |
Strand |
routeChoiceStrand()
Return the route choice strand (of DNA) that is used for routing decisions on twigs of this type |
boolean |
selected()
Returns true if this twig is selected in the GUI. |
Signal |
signal(ITwig that)
Returns the current Signal associated with this twig, or null, if this type of twig does not support signalling |
void |
signal(ITwig that,
Signal signal)
Sets the current Signal associated with this twig. |
IXyz |
startLocation()
Returns a point location at the start of this twig, used for route display and to centre the view on this twig |
String |
traceDescription()
Returns a description of this twig, for route tracing |
TravelMode |
travelMode()
The mode of travel on this twig |
| Methods inherited from interface com.azalient.api.b.assignment.ITwigRouting |
|---|
alwaysEnd, alwaysStart, costFactor, distance, distance, perturbHere, price, price, routeClass, routeDistanceFactor, routeLength, routePrice, routePriceFactor, routeSpeed, routeTimeFactor, travelTime, travelTime |
| Methods inherited from interface com.azalient.api.b.assignment.IDecisionPoint |
|---|
addSplit, name, options, splits, splits |
| Methods inherited from interface com.azalient.api.b.assignment.IDecisionOption |
|---|
openFrom |
| Field Detail |
|---|
static final ITwig[] ZERO
| Method Detail |
|---|
TravelMode travelMode()
int exits()
int exitsXU()
ITwig exit(int index)
int exitIndex(ITwig exit)
int entries()
int entriesXU()
ITwig entry(int index)
Distance length()
IXyz centroid()
boolean allowed(IBehaviour behaviour)
boolean barred()
boolean barredTurn(ITwig that)
boolean canArriveHere()
boolean canDepartHere()
double releaseRate()
This is valid only if this is a departure twig and there are other departure twigs inside or connected to a place.
For example, if there were two departure twigs, and the rate on this twig was set to 0.8 and the rate on the other was set to 0.2, then on average 8 out of every 10 trips would be released from this twig.
void releaseRate(Double d)
releaseRate()
Signal signal(ITwig that)
void signal(ITwig that,
Signal signal)
boolean connectedTo(ITwig that)
void drawFilled(IDrawing drw,
int rgb)
IDrawing
void drawConnectionTo(ITwig that,
IDrawing drw,
int rgb,
double strength,
boolean drawInTwig,
ITwig origin,
IPlace dest,
IBehaviour b,
IType type)
IDrawing
String traceDescription()
Strand routeChoiceStrand()
boolean selected()
boolean highlightAllOptions()
boolean permittedByModeChanges(IModeChanges mc,
boolean set)
boolean permittedByModeChanges(IBehaviour b)
allowed(IBehaviour)
IXyz startLocation()
IXyz endLocation()
IPlace[] places()
boolean inside(IPlace place)
boolean insidePlace()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||