com.azalient.api.b.network
Interface ILane

All Superinterfaces:
IRecord, IRestrictable, ISurface, IUserData, IWay, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface ILane
extends IWay, ISurface, IUserData, StoreRecordRW

A lane is the basic surface on which vehicles move. A lane:


Field Summary
static ILane[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 IUndoable addCrossing()
          Add a crossing to this lane (prompts user for input)
 boolean avoidance()
          Returns true if avoidance is switched on for this lane
 void changeRadius(ICentre c, double d)
          Change the radius on this lane by the given amount.
 boolean contains(IXyz p)
          Returns true if the polygon defined by the edges of the lane contains the given point
 double distanceToIntersection(double lookAhead)
          Return the distance from the end of this lane to the next intersection, given a lookahead distance.
 void drawPart(IDrawing drw, double partFill, int rgb)
          Draw the lane, filling and colouring as appropriate.
 IPosition entry()
          Returns an object containing {point, bearing, gradient} at the start of the lane
 IPosition exit()
          Returns an object containing {point, bearing, gradient} at the end of the lane
 IMotor firstMotor()
          Returns the first motor on this lane, nearest the end.
 IMotorCalibration.FollowingModel followingModel()
          Returns the car-following model for this lane
 boolean fullLaneK()
          Returns true if there is a lane to the kerb-side of this one that is at least as long as this one
 boolean fullLaneM()
          Returns true if there is a lane to the median-side of this one that is at least as long as this one
 double headwayFactor()
          Returns the multiplicative headway factor for the lane, default 1.0
 int index()
          Returns the lane index, in the range 1..N, used for matching rules.
 boolean isDiscrete()
          Returns true if this lane is discrete - separate from the other lanes, like a cycle lane with a lateral division.
 boolean isFilter()
          Returns true if this lane is a filter lane
 boolean isLaneK(ILane lane)
          Returns true if the given lane is located to the kerb-side of this one
 boolean isLaneM(ILane lane)
          Returns true if the given lane is located to the median-side of this one
 boolean isLift()
          Returns true if this is a special lane used for a lift shaft.
 boolean isParking()
          Returns true if this lane is a parking lane.
 double laneHoldDistance()
          Returns the distance from the end beyond which vehicles will no longer change lane, under normal circumstances
 ILane laneK(IXyz location)
          Returns the lane located to the kerb side of this lane at the point on the kerb edge nearest to the given point.
 ILane laneM(IXyz location)
          Returns the lane located to the median side of this lane at the point on the median edge nearest to the given point.
 IMotor lastMotor()
          Returns the last motor on this lane, nearest the start.
 boolean leadingTo(ILane that, int depth)
          Returns true if this lane leads to that lane, with a maximum recursion depth as given.
 double length()
          Returns the length of the lane, from the centreline
 ILink link()
          Returns the link associated with this lane
 ILoop[] loops()
          Returns an array of all loops on the lane, arranged in distance order from the start.
 IMotor[] motors()
          Return an array of motors on this lane
 int[] nextlane(int exitI)
          Deprecated.  
 void nextlane(int exitI, int next, int range)
          Deprecated.  
 IBlocker noExitBlocker(ITrip trip)
          Return a blocker interface at the end of this lane if there are no exits (streams or lane)
 IParkingLane parkingLane()
          Returns the parking lane object for this lane, if it is a parking lane.
 IPosition position(double distance)
          Returns a newly-created object containing {point, bearing, gradient} at the given distance along the bezier curve
 double reactionFactor()
          Returns the multiplicative reaction factor for the lane, default 1.0
 void recalcArcs(ICentre c)
          Set this lane to be an arc, with the given centre, and recalculate curve segments
 IChannel sideWalk()
          Return a handle to any "side-walk" channel that has been created.
 ISign[] signs()
          Returns an array of all signs on the lane, arranged in distance order from the start.
 void sortMotors()
          Sort the motors into order.
 Speed speed()
          Returns the speed limit on the lane
 IStand[] stands()
          Returns an array of all stands on the lane, arranged in distance order from the start.
 IStream[] streamI()
          Returns an array of the inward streams to this lane.
 IStream[] streamO()
          Returns an array of the outward streams from this lane.
 boolean suitableForArrival(ITrip trip, boolean report)
          Is this lane a suitable last lane (arrival lane) for the given trip
 boolean suitableForDeparture(ITrip trip, boolean report)
          Is this lane a suitable first lane (departure lane) for the given trip
 ISurface surfaceI()
          Returns the inward surface from which traffic can flow onto the start of the lane.
 ISurface surfaceO()
          Returns the outward surface to which traffic can flow off the end of the lane.
 double yellowBoxSpeed()
          Returns the yellow box speed, in m/s.
 boolean zipMerge()
          Returns true if the special rules for zip-merging are enabled on this lane
 
Methods inherited from interface com.azalient.api.b.network.IWay
centreline, halfWidth, halfWidthE, halfWidthS, kerb, median, width, widthE, widthS
 
Methods inherited from interface com.azalient.api.b.network.IRestrictable
allows, allows, closed, closed, multipleRestrictions, multipleRestrictions, name, restriction, restriction, restrictionIndex
 
Methods inherited from interface com.azalient.api.b.network.ISurface
add, name, remove, selected
 
Methods inherited from interface com.azalient.api.a.IUserData
userData, userData, userDataHashCode
 
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 ILane[] ZERO
A static zero-length array, created for convenience, and to save memory

Method Detail

surfaceI

ISurface surfaceI()
Returns the inward surface from which traffic can flow onto the start of the lane. This can return null if there is no inward surface. The surface is either an intersection or another lane


surfaceO

ISurface surfaceO()
Returns the outward surface to which traffic can flow off the end of the lane. This can return null if there is no outward surface. The surface is either an intersection or another lane


index

int index()
Returns the lane index, in the range 1..N, used for matching rules. 0 means not set


loops

ILoop[] loops()
Returns an array of all loops on the lane, arranged in distance order from the start. Loops may not overlap.


stands

IStand[] stands()
Returns an array of all stands on the lane, arranged in distance order from the start.


signs

ISign[] signs()
Returns an array of all signs on the lane, arranged in distance order from the start.


link

ILink link()
Returns the link associated with this lane


speed

Speed speed()
Returns the speed limit on the lane


motors

IMotor[] motors()
Return an array of motors on this lane


firstMotor

IMotor firstMotor()
Returns the first motor on this lane, nearest the end. May return null


lastMotor

IMotor lastMotor()
Returns the last motor on this lane, nearest the start. May return null


sortMotors

void sortMotors()
Sort the motors into order.

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

position

IPosition position(double distance)
Returns a newly-created object containing {point, bearing, gradient} at the given distance along the bezier curve


entry

IPosition entry()
Returns an object containing {point, bearing, gradient} at the start of the lane


exit

IPosition exit()
Returns an object containing {point, bearing, gradient} at the end of the lane


length

double length()
Returns the length of the lane, from the centreline


laneHoldDistance

double laneHoldDistance()
Returns the distance from the end beyond which vehicles will no longer change lane, under normal circumstances


headwayFactor

double headwayFactor()
Returns the multiplicative headway factor for the lane, default 1.0


reactionFactor

double reactionFactor()
Returns the multiplicative reaction factor for the lane, default 1.0


streamO

IStream[] streamO()
Returns an array of the outward streams from this lane. If none, returns IStream.ZERO


streamI

IStream[] streamI()
Returns an array of the inward streams to this lane. If none, returns IStream.ZERO


contains

boolean contains(IXyz p)
Returns true if the polygon defined by the edges of the lane contains the given point


isLaneK

boolean isLaneK(ILane lane)
Returns true if the given lane is located to the kerb-side of this one


isLaneM

boolean isLaneM(ILane lane)
Returns true if the given lane is located to the median-side of this one


laneK

ILane laneK(IXyz location)
Returns the lane located to the kerb side of this lane at the point on the kerb edge nearest to the given point. If there is no kerb-side lane here, it returns null.


laneM

ILane laneM(IXyz location)
Returns the lane located to the median side of this lane at the point on the median edge nearest to the given point. If there is no median-side lane here, it returns null.


fullLaneK

boolean fullLaneK()
Returns true if there is a lane to the kerb-side of this one that is at least as long as this one


fullLaneM

boolean fullLaneM()
Returns true if there is a lane to the median-side of this one that is at least as long as this one


leadingTo

boolean leadingTo(ILane that,
                  int depth)
Returns true if this lane leads to that lane, with a maximum recursion depth as given. That is, iff you can get to that from this in (depth) or less changes of surface, then return true.


distanceToIntersection

double distanceToIntersection(double lookAhead)
Return the distance from the end of this lane to the next intersection, given a lookahead distance. The returned value will never be greater than the lookahead


drawPart

void drawPart(IDrawing drw,
              double partFill,
              int rgb)
Draw the lane, filling and colouring as appropriate.

See Also:
IBezier.fill(IDrawing, int, double)

isFilter

boolean isFilter()
Returns true if this lane is a filter lane


isDiscrete

boolean isDiscrete()
Returns true if this lane is discrete - separate from the other lanes, like a cycle lane with a lateral division. This does not affect the simulation, only the graphcis of drawing the intersection


isLift

boolean isLift()
Returns true if this is a special lane used for a lift shaft.


changeRadius

void changeRadius(ICentre c,
                  double d)
Change the radius on this lane by the given amount.

See Also:
ICentre.changeRadius(IXyz, double)

recalcArcs

void recalcArcs(ICentre c)
Set this lane to be an arc, with the given centre, and recalculate curve segments


addCrossing

IUndoable addCrossing()
Add a crossing to this lane (prompts user for input)


noExitBlocker

IBlocker noExitBlocker(ITrip trip)
Return a blocker interface at the end of this lane if there are no exits (streams or lane)


yellowBoxSpeed

double yellowBoxSpeed()
Returns the yellow box speed, in m/s. A high value causes the largest change in behaviour.

If this speed is a non-zero value it holds back vehicles from transferring off this lane to an intersection until any other vehicle already on the stream is travelling at the yellow box speed or more


isParking

boolean isParking()
Returns true if this lane is a parking lane.


parkingLane

IParkingLane parkingLane()
Returns the parking lane object for this lane, if it is a parking lane. See isParking()


suitableForDeparture

boolean suitableForDeparture(ITrip trip,
                             boolean report)
Is this lane a suitable first lane (departure lane) for the given trip

Parameters:
trip - the trip under test
report - set this to true to generate report messages in the log window

suitableForArrival

boolean suitableForArrival(ITrip trip,
                           boolean report)
Is this lane a suitable last lane (arrival lane) for the given trip

Parameters:
trip - the trip under test
report - set this to true to generate report messages in the log window

avoidance

boolean avoidance()
Returns true if avoidance is switched on for this lane


followingModel

IMotorCalibration.FollowingModel followingModel()
Returns the car-following model for this lane


zipMerge

boolean zipMerge()
Returns true if the special rules for zip-merging are enabled on this lane


sideWalk

IChannel sideWalk()
Return a handle to any "side-walk" channel that has been created. This may be null. Only the kerb side lane on a road can have a side walk.


nextlane

int[] nextlane(int exitI)
Deprecated. 


nextlane

void nextlane(int exitI,
              int next,
              int range)
Deprecated.