com.azalient.api.b.network
Interface ICrossing

All Superinterfaces:
IBlocker, IRecord, IRestrictable, IWalkway, IWay, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW
All Known Subinterfaces:
IPhaseCrossing

public interface ICrossing
extends IWalkway, IBlocker

ICrossing is a walkway that crosses a road. There are several types of crossing, including phased, pelican, zebra and unmarked.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.azalient.api.b.network.IWalkway
IWalkway.WalkwayType
 
Field Summary
static String PREFIX_PELICAN
          The prefix used for new "pelican" signal crossings
static String PREFIX_SIGNAL
          The prefix used for new phased-signal crossings
static String PREFIX_UNMARKED
          The prefix used for new unmarked, unsignalised crossings
static String PREFIX_ZEBRA
          The prefix used for new "zebra" crossings
static ICrossing[] ZERO
          A static zero-length array of crossings, for convenience
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 int buttonPushes()
          Returns the number of button pushes.
 ICrossingTime[] crossingTimes()
          An array of crossing time objects, containing at least one element, or more if the crossing times vary over the course of the simulation
 IBlocker laneBlocker(ILane lane)
           
 void newState(int colour, boolean flash)
          Set the state (walk, don't walk etc) of this crossing
 boolean occupied(ILane lane)
          Returns true if there is a pedestrian on the section of this crossing that crosses the given lane
 void signal(Signal signal)
          Set the state (walk, don't walk etc) of this crossing
 boolean signalised()
          Returns true if this crossing is signalised
 
Methods inherited from interface com.azalient.api.b.network.IWalkway
addConnection, addConnectionNearest, area, capacity, coursesC, coursesD, deleteConnection, draw, isPrivate, population, selected, selected, shared, speedCD, stepHeight, stepLength, twigCD, twigDC, walkwayType, walled
 
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.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
 
Methods inherited from interface com.azalient.api.sim.agents.IBlocker
blocked, blockerDescription, blockPointDistance, doneBlocking, nowBlocking
 

Field Detail

ZERO

static final ICrossing[] ZERO
A static zero-length array of crossings, for convenience


PREFIX_SIGNAL

static final String PREFIX_SIGNAL
The prefix used for new phased-signal crossings

See Also:
Constant Field Values

PREFIX_PELICAN

static final String PREFIX_PELICAN
The prefix used for new "pelican" signal crossings

See Also:
Constant Field Values

PREFIX_ZEBRA

static final String PREFIX_ZEBRA
The prefix used for new "zebra" crossings

See Also:
Constant Field Values

PREFIX_UNMARKED

static final String PREFIX_UNMARKED
The prefix used for new unmarked, unsignalised crossings

See Also:
Constant Field Values
Method Detail

crossingTimes

ICrossingTime[] crossingTimes()
An array of crossing time objects, containing at least one element, or more if the crossing times vary over the course of the simulation


newState

void newState(int colour,
              boolean flash)
Set the state (walk, don't walk etc) of this crossing


signal

void signal(Signal signal)
Set the state (walk, don't walk etc) of this crossing


occupied

boolean occupied(ILane lane)
Returns true if there is a pedestrian on the section of this crossing that crosses the given lane


laneBlocker

IBlocker laneBlocker(ILane lane)
Internal - Not recommended for use. Public as a side-effect of implementation method
The agent blocker for the given lane

signalised

boolean signalised()
Returns true if this crossing is signalised


buttonPushes

int buttonPushes()
Returns the number of button pushes. This is the number of people that have arrived and want to cross the road. This number is available even for crossings which do not normally have buttons, such as unmarked or zebra crossings.

The count of people is on both sides of the road. There is no way of telling which side the people are waiting.