com.azalient.api.b.network
Interface IStream

All Superinterfaces:
IActionable, IAssociate, IBlocker, IDraggable, IJoiner, IRecord, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface IStream
extends IJoiner, IBlocker, StoreRecordRW

A stream connects two lanes across an intersection


Field Summary
static IStream[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Fields inherited from interface com.azalient.api.ui.clipboard.IAssociate
scratch
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 void add(IMotor v)
          Do not use @CommuterInternal
 double clearance()
          The distance (in m) back from the end of the stream at which the back of a vehicle has cleared the intersection
 IStream[] conflictingStreams()
          Returns an array of any streams that conflict with this one.
 boolean conflictsWith(IStream s)
          Returns true if this stream conflicts with the given stream.
 double crossGapTime()
          Additional time required on this stream to cross any other.
 void draw(IDrawing drw, int rgb, boolean dashed, boolean barred)
          Draw this stream.
 IMotor firstMotorNotOnIntersection(int exitLo, int exitHi)
          return first motor assigned to the stream but not yet on the intersection, optionally filtered by intersection exit index range, use (0,0) to indicate any exit
 IMotor firstMotorOnIntersection(int exitLo, int exitHi)
          return first motor assigned to the stream and on the intersection, optionally filtered by intersection exit index range, use (0,0) to indicate any exit
 Speed giveWaySpeed()
          The give-way speed on this stream
 boolean hasConflict()
          Returns true if this stream conflicts with any other.
 IIntersection intersection()
          The intersection on which this stream occurs
 ILane laneI()
          The inward lane leading to this stream - the approach lane
 ILane laneO()
          The outward lane to which this stream leads
 IMotor lastMotor()
          return last motor assigned to the stream, which may not yet be on the intersection
 IMotor lastMotorOnIntersection(int exitLo, int exitHi)
          return last motor assigned to the stream and on the intersection, optionally filtered by intersection exit index range, use (0,0) to indicate any exit
 UTime lastSignalChange()
          The time of the last change of the signal on this stream.
 ILink linkI()
          The inward link leading to this stream - the approach
 ILink linkO()
          The outward link to which this stream leads
 Speed maxTurnSpeed(IMotor m)
          The maximum turning speed on this stream for the given vehicle
 double mergeGapTime()
          Additional time required on this stream to merge with another stream going to the same lane.
 IPathway pathway()
          The pathway object for this stream
 void remove(IMotor v)
          Do not use @CommuterInternal
 IRestriction restriction()
          Any restriction attached to this stream.
 boolean selected()
          True if this is selected in GUI
 void selected(boolean v)
          Set to true to highlight this as selected in GUI
 Signal signal()
          The current signal state for this stream.
 void sortMotors()
          Do not use @CommuterInternal
 ITurn turn()
          The turn of which this stream forms part
 void turn(ITurn t)
          The turn to which this stream belongs
 double yieldAdvance()
          The distance (in m) forward from the stop line (the end of the lane) that a vehicle may proceed on a yield signal.
 void yieldAdvance(Distance d)
          Set the distance beyond the normal stop line to which a vehicle will advance on yield
 
Methods inherited from interface com.azalient.api.a.position.IJoiner
centreline
 
Methods inherited from interface com.azalient.api.ui.clipboard.IAssociate
clip, name, proxy, selected
 
Methods inherited from interface com.azalient.api.ui.clipboard.IDraggable
selectedForDraggingDraw
 
Methods inherited from interface com.azalient.api.ui.clipboard.IActionable
action
 
Methods inherited from interface com.azalient.api.sim.agents.IBlocker
blocked, blockerDescription, blockPointDistance, doneBlocking, nowBlocking
 
Methods inherited from interface com.azalient.api.file.StoreRecordRW
canRename, rename, store
 
Methods inherited from interface com.azalient.api.file.RecordR
extraSet, finished, isApplicable, isEditable, set
 
Methods inherited from interface com.azalient.api.a.tables.IRecord
name
 
Methods inherited from interface com.azalient.api.file.RecordW
extraCols, extraGet, extraGetB, extraGetD, extraGetI, extraGetS, extraGetT, get, isVolatile
 

Field Detail

ZERO

static final IStream[] ZERO
A static zero-length array, created for convenience, and to save memory

Method Detail

intersection

IIntersection intersection()
The intersection on which this stream occurs


turn

ITurn turn()
The turn of which this stream forms part


linkI

ILink linkI()
The inward link leading to this stream - the approach


linkO

ILink linkO()
The outward link to which this stream leads


laneI

ILane laneI()
The inward lane leading to this stream - the approach lane


laneO

ILane laneO()
The outward lane to which this stream leads


pathway

IPathway pathway()
The pathway object for this stream


restriction

IRestriction restriction()
Any restriction attached to this stream. This is a convenience method for turn().restriction(). Each turn may have at most one restriction.


signal

Signal signal()
The current signal state for this stream. This is a convenience method for turn().signal()


lastSignalChange

UTime lastSignalChange()
The time of the last change of the signal on this stream. This is a convenience method for turn().lastSignalChange()


hasConflict

boolean hasConflict()
Returns true if this stream conflicts with any other. Two streams conflict their paths cross


conflictsWith

boolean conflictsWith(IStream s)
Returns true if this stream conflicts with the given stream. Two streams conflict their paths cross


conflictingStreams

IStream[] conflictingStreams()
Returns an array of any streams that conflict with this one. Two streams conflict their paths cross


yieldAdvance

double yieldAdvance()
The distance (in m) forward from the stop line (the end of the lane) that a vehicle may proceed on a yield signal. This is used for turning vehicles at an intersection to "stack" in the intersection


clearance

double clearance()
The distance (in m) back from the end of the stream at which the back of a vehicle has cleared the intersection


mergeGapTime

double mergeGapTime()
Additional time required on this stream to merge with another stream going to the same lane. Can be positive ot negative.


crossGapTime

double crossGapTime()
Additional time required on this stream to cross any other. If the intersection is very large, set this negative


maxTurnSpeed

Speed maxTurnSpeed(IMotor m)
The maximum turning speed on this stream for the given vehicle


giveWaySpeed

Speed giveWaySpeed()
The give-way speed on this stream


turn

void turn(ITurn t)
The turn to which this stream belongs


yieldAdvance

void yieldAdvance(Distance d)
Set the distance beyond the normal stop line to which a vehicle will advance on yield


add

void add(IMotor v)
Do not use @CommuterInternal


remove

void remove(IMotor v)
Do not use @CommuterInternal


sortMotors

void sortMotors()
Do not use @CommuterInternal


firstMotorNotOnIntersection

IMotor firstMotorNotOnIntersection(int exitLo,
                                   int exitHi)
return first motor assigned to the stream but not yet on the intersection, optionally filtered by intersection exit index range, use (0,0) to indicate any exit


firstMotorOnIntersection

IMotor firstMotorOnIntersection(int exitLo,
                                int exitHi)
return first motor assigned to the stream and on the intersection, optionally filtered by intersection exit index range, use (0,0) to indicate any exit


lastMotorOnIntersection

IMotor lastMotorOnIntersection(int exitLo,
                               int exitHi)
return last motor assigned to the stream and on the intersection, optionally filtered by intersection exit index range, use (0,0) to indicate any exit


lastMotor

IMotor lastMotor()
return last motor assigned to the stream, which may not yet be on the intersection


selected

boolean selected()
True if this is selected in GUI

Specified by:
selected in interface IDraggable

selected

void selected(boolean v)
Set to true to highlight this as selected in GUI


draw

void draw(IDrawing drw,
          int rgb,
          boolean dashed,
          boolean barred)
Draw this stream.

Internal - Not recommended for use. Public as a side-effect of implementation method