com.azalient.api.sim.agents
Interface IPassenger

All Superinterfaces:
IRecord, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface IPassenger
extends StoreRecordRW

A passenger represents a person (or person-group) travelling in/on a public transport vehicle.


Field Summary
static IPassenger[] 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
 boolean aboard()
          Returns true if the person is aboard
 boolean alighting()
          Returns true if the person is currently getting off
 void clear()
          Clears the expected and unexpected wait times for this passenger
 IDwell destination()
          The dwell at which the passenger will leave the transport.
 boolean finished()
          Returns true if the person has finished (but not necessarily arrived, may have been destroyed before it could not reach its destination)
 void kill()
          Kills this passenger object, normally when person arrives at destination
 IDwell origin()
          The dwell at which the passenger will board the transport
 IPerson person()
          The person, the prime mover of any group
 ITransport transport()
          The public transport vehicle carrying the person
 Distance travelDistance()
          Returns the distance travelling on transport
 UTime travelTime()
          Returns the time travelling on transport vehicle
 UTime tripTime()
          Returns the time waiting for transport plus time travelling
 
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 IPassenger[] ZERO
A static zero-length array, created for convenience, and to save memory

Method Detail

person

IPerson person()
The person, the prime mover of any group


transport

ITransport transport()
The public transport vehicle carrying the person


origin

IDwell origin()
The dwell at which the passenger will board the transport


destination

IDwell destination()
The dwell at which the passenger will leave the transport. This is decided as soon as the passenger is created, which is when the person reaches the stand, which may be before the transport arrives. Opportunistic travel, where a passenger boards "any transport going in the right direction" is handled by initially assigning a service and a corresponding origin and destination, and then changing these at the time of arrival of a suitable transport.


aboard

boolean aboard()
Returns true if the person is aboard


finished

boolean finished()
Returns true if the person has finished (but not necessarily arrived, may have been destroyed before it could not reach its destination)


alighting

boolean alighting()
Returns true if the person is currently getting off


clear

void clear()
Clears the expected and unexpected wait times for this passenger


kill

void kill()
Kills this passenger object, normally when person arrives at destination


travelTime

UTime travelTime()
Returns the time travelling on transport vehicle


tripTime

UTime tripTime()
Returns the time waiting for transport plus time travelling


travelDistance

Distance travelDistance()
Returns the distance travelling on transport