com.azalient.api.b.demand
Interface IDwell

All Superinterfaces:
IClippable, IDecisionOption, IDeletable, IRecord, IUserData, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface IDwell
extends IClippable, IDecisionOption, IUserData, StoreRecordRW

A Dwell contains demand-based information about dwell time, passenger arrivals & departures, for a service at a stand.


Field Summary
static Class[] KEY_TYPES
          A dwell has a two-field key, service and stand, both are string types
static double STD_MIN_DWELL_TIME
          The default minimum dwell time, in seconds.
static IDwell[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Fields inherited from interface com.azalient.api.ui.clipboard.IClippable
scratch
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 void addPassenger(IPassenger passenger)
          Add a passenger to the queue at this dwell.
 boolean anyMoreTransports()
          Returns true if any more transport vehicles are due to arrive at this stand before the end of the simulation term
 ITransport currentTransport()
          The last transport to arrive at the stand, if it is still at the stand, otherwise null.
 IDwell destinationBySplit(IPerson person)
          Return a destination dwell for the given person according to splits defined at this dwell
 Distance distance()
          The distance of this dwell from the first stand on the service
 double dwellTimeMaximum()
          Returns the maximum dwell time in seconds
 double dwellTimeMinimum()
          Returns the minimum dwell time in seconds
 void dwellTimeMinimum(double sec)
          Sets the minimum dwell time in seconds
 IDwell followingDwell(int relIndex1)
          Return a dwell after this one on the service, with a relative index in the range 1..N
 int followingDwells()
          Return the number of dwells following this one on the service
 String nextTransportDescription()
          Return a text description of the time at which the next transport is due, for example "Due at 08:05:00"
 int nextTransportDueSeconds()
          Returns the time, in seconds until the next transport vehicle is due
 ITwig onboardTwig()
          Return the "on-board" routing twig for this dwell, which defines where a passenger will get off.
 IPassenger passengerInQueue(int position)
          Return the passenger at the given position in the queue [0 ...
 void passengerRemove(IPassenger p)
          Remove the given passenger under abnormal conditions (e.g.
 IPassenger popFirstPassenger()
          Remove the first passenger from the queue
 int positionInQueue(IPassenger pass)
          Return the position [0 ...
 int queueLength()
          Return the number of passengers waiting at this dwell
 void reAssignPassengers()
          Reselect the exit for each person in the queue, assigning them to the best current dwell
 void recalcDestinationStands()
          This is called when stands have been changed, and the array of possible destination stands should be rebuilt
 IService service()
          The service to which this dwell relates.
 IStand stand()
          The stand to which this dwell relates
 ITimingPoint timingPoint()
          Returns the timing point for this dwell.
 void timingPoint(ITimingPoint tp)
          Sets the timing point for this dwell.
 
Methods inherited from interface com.azalient.api.ui.clipboard.IClippable
children, getAlt, references, tableName
 
Methods inherited from interface com.azalient.api.ui.clipboard.IDeletable
delete, deleted, name
 
Methods inherited from interface com.azalient.api.b.assignment.IDecisionOption
openFrom
 
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 IDwell[] ZERO
A static zero-length array, created for convenience, and to save memory


KEY_TYPES

static final Class[] KEY_TYPES
A dwell has a two-field key, service and stand, both are string types


STD_MIN_DWELL_TIME

static final double STD_MIN_DWELL_TIME
The default minimum dwell time, in seconds.

See Also:
Constant Field Values
Method Detail

service

IService service()
The service to which this dwell relates.


stand

IStand stand()
The stand to which this dwell relates


dwellTimeMinimum

double dwellTimeMinimum()
Returns the minimum dwell time in seconds


dwellTimeMinimum

void dwellTimeMinimum(double sec)
Sets the minimum dwell time in seconds


dwellTimeMaximum

double dwellTimeMaximum()
Returns the maximum dwell time in seconds


timingPoint

void timingPoint(ITimingPoint tp)
Sets the timing point for this dwell.


timingPoint

ITimingPoint timingPoint()
Returns the timing point for this dwell.


addPassenger

void addPassenger(IPassenger passenger)
Add a passenger to the queue at this dwell. This passenger will board the next transport vehicle on this service, if there is space.


popFirstPassenger

IPassenger popFirstPassenger()
Remove the first passenger from the queue

Returns:
the first passenger in the queue
Internal - Not recommended for use. Public as a side-effect of implementation method

passengerRemove

void passengerRemove(IPassenger p)
Remove the given passenger under abnormal conditions (e.g. when person is forcibly removed)

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

queueLength

int queueLength()
Return the number of passengers waiting at this dwell


positionInQueue

int positionInQueue(IPassenger pass)
Return the position [0 ... n-1] of the given passenger in the queue, or -1, if the passenger is not found.


passengerInQueue

IPassenger passengerInQueue(int position)
Return the passenger at the given position in the queue [0 ... n-1]


reAssignPassengers

void reAssignPassengers()
Reselect the exit for each person in the queue, assigning them to the best current dwell


anyMoreTransports

boolean anyMoreTransports()
Returns true if any more transport vehicles are due to arrive at this stand before the end of the simulation term


nextTransportDueSeconds

int nextTransportDueSeconds()
Returns the time, in seconds until the next transport vehicle is due


nextTransportDescription

String nextTransportDescription()
Return a text description of the time at which the next transport is due, for example "Due at 08:05:00"


destinationBySplit

IDwell destinationBySplit(IPerson person)
Return a destination dwell for the given person according to splits defined at this dwell


onboardTwig

ITwig onboardTwig()
Return the "on-board" routing twig for this dwell, which defines where a passenger will get off. Teh "exits" for the onboard twig are all the remaining stands on the service route


followingDwells

int followingDwells()
Return the number of dwells following this one on the service


followingDwell

IDwell followingDwell(int relIndex1)
Return a dwell after this one on the service, with a relative index in the range 1..N


distance

Distance distance()
The distance of this dwell from the first stand on the service


currentTransport

ITransport currentTransport()
The last transport to arrive at the stand, if it is still at the stand, otherwise null.


recalcDestinationStands

void recalcDestinationStands()
This is called when stands have been changed, and the array of possible destination stands should be rebuilt