com.azalient.api.b.parking
Interface IParkingLane

All Superinterfaces:
IBlocker, IRecheckableBlocker

public interface IParkingLane
extends IRecheckableBlocker

This object holds additional parameters for a lane when it has been converted to a parking lane


Field Summary
static double MIN_TRANSITION_TIME
          The minimum transition time for a lane.
static double STD_DWELL_TIME_DROP_OFF
          The default drop-off time (seconds) for new lanes
static double STD_DWELL_TIME_PICK_UP
          The default wait-to-pick-up time (seconds) for new lanes
static double STD_TRANSITION_TIME
          The default transition time for new lanes
static IParkingLane[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Method Summary
 void addParkingListener(IParkingListener pl)
          Add the given listener to the list for this parking lane.
 double arrivalParkingTime()
          The sum of parking time and transition time, on arrival
 IPosition bayCentre(int bay)
          Given the lane bay index, return the centre point
 double bayLength()
          Returns the bay size, length for parallel bays, width for any other angle
 boolean bayOnThisLink(int zoneBay)
          Is the zone-index bay on this link
 int bays()
          Returns the number of bays on this parking lane
 double bayToDist(int bay)
          Return the distance of the upstream end of this lane bay from the end of the parking lane
 int bestBay()
          Returns best bay, 0..N-1, with 0 being downstream, or -1 meaning none
 boolean canEnterForward(int laneBay, IVehicle v)
          Can vehicle park in a forward direction
 IChannel channel()
          Returns the walkway connected to this parking lane.
 void channel(IChannel c)
          Sets the walkway connected to this parking lane.
 boolean channelAcrossRoad()
          Returns true if the walkway connected to this lane is on the other side of the road
 void channelAcrossRoad(boolean b)
          Set this to true if the walkway connected to this lane is on the other side of the road
 String cluster()
          Returns the name of the cluster to which this parking lane is assigned, or null, if no cluster
 void cluster(String s)
          Sets the name of the cluster to which this parking lane is assigned.
 ICourse[] courses()
          The connections from this parking lane to attached walkway
 double degrees()
          Returns the parking angle, in degrees
 void delete()
          [Internal] Called when a lane reverts to a normal lane from a parking lane
 double departureParkingTime()
          The sum of parking time and transition time, on departure
 IZone destinationBySplit(IPerson person)
          Returns a destination zone using the route-split definition for this parking zone
 int distToBay(double dist)
          Return the lane bay index corresponding to the given distance from the end of the parking lane
 double dropOffDwellTime(ITrip trip)
          The dwell time, after dropping off a person
 int[] dwellTimes()
          Returns statistics on parking duration.
 int full()
          Returns the number of occupied bays on this parking lane
 boolean isTaxiRank()
          Returns true if this parking lane is a taxi rank
 ILane lane()
          The lane to which this parkingLane object is attached
 int laneBayToZoneBay(int linkBay)
          return a value in the range 0 to ZN-1, where ZN is the number of bays on this zone
 int lanePopularity()
          Returns the popularity value for this parking lane
 String name()
          The name of the lane
 IVehicle newVehicle(ITrip trip, IOccupant occupant, int bay)
          [Internal] Creates a new vehicle when there is no suitable one already parked on this lane
 IVehicle newVehicle(IZone destination, IVehicleType type, IOccupant occupant, int bay)
          [Internal] Creates a new vehicle when there is no suitable one already parked on this lane
 boolean occupied(int bay)
          Check occupancy in given bay [0..N-1]
 IParkingVehicle occupiedParkingVehicle(int bay)
          Check occupancy in given bay [0..N-1], return IParkingVehicle or null
 boolean occupy(IParkingVehicle parkV, int bay, boolean newVehicle)
          Occupy the given bay with the given vehicle
 ITwig originTwig()
          The routing "twig" used as the first part of a trip from this parking lane to another parking zone
 boolean parallel()
          Returns true if the bays on this lane are parallel to traffic
 ParkingAngle parkingAngle()
          The parking angle on this lane, and the face-in, face-out specification
 IParkingDestination[] parkingDestinations()
          Possible parking destinations (other parking zones) reachable from this parking lane
 double parkTime()
          Returns the parking time, in seconds, for this lane
 void removeParkingListener(IParkingListener pl)
          Remove the given listener from the list for this parking lane.
 void rewind()
          [Internal] called when simulation time is rewound to the start
 IParkingVehicle selectParkedVehicle(ITrip vehicleTrip)
          Select a parked vehicle matching the given trip by type, and if found, assign it the given trip
 void setTripAndOccupant(IParkingVehicle pv, IOccupant occupant, IZone destination)
          Create a vehicle-trip from the destination and pv-origin, then set occupant and trip in v & pv
 int spaces()
          Returns the number of empty bays on this parking lane
 double transitionTime()
          Returns the transition time, in seconds, for this lane.
 boolean transverse()
          Returns true if the bays on this lane are at 90 degrees to traffic
 void unoccupyBayOnLeaving(IParkingVehicle parkV, boolean countBayEvent, boolean reCircle)
           
 IZone zone()
          The zone in which this parking lane lies
 int zoneBayToLaneBay(int zoneBay)
          return a value in the range 0 to LN-1, where LN is the number of bays on this link
 
Methods inherited from interface com.azalient.api.sim.agents.IRecheckableBlocker
stillValidForAgent
 
Methods inherited from interface com.azalient.api.sim.agents.IBlocker
blocked, blockerDescription, blockPointDistance, doneBlocking, nowBlocking
 

Field Detail

ZERO

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


MIN_TRANSITION_TIME

static final double MIN_TRANSITION_TIME
The minimum transition time for a lane. Some expressions used in the parking process use t - 1 or t - 2, so this cannot be less than 2

See Also:
Constant Field Values

STD_TRANSITION_TIME

static final double STD_TRANSITION_TIME
The default transition time for new lanes

See Also:
Constant Field Values

STD_DWELL_TIME_DROP_OFF

static final double STD_DWELL_TIME_DROP_OFF
The default drop-off time (seconds) for new lanes

See Also:
Constant Field Values

STD_DWELL_TIME_PICK_UP

static final double STD_DWELL_TIME_PICK_UP
The default wait-to-pick-up time (seconds) for new lanes

See Also:
Constant Field Values
Method Detail

name

String name()
The name of the lane


lane

ILane lane()
The lane to which this parkingLane object is attached


originTwig

ITwig originTwig()
The routing "twig" used as the first part of a trip from this parking lane to another parking zone


courses

ICourse[] courses()
The connections from this parking lane to attached walkway


zone

IZone zone()
The zone in which this parking lane lies


parkingDestinations

IParkingDestination[] parkingDestinations()
Possible parking destinations (other parking zones) reachable from this parking lane


destinationBySplit

IZone destinationBySplit(IPerson person)
Returns a destination zone using the route-split definition for this parking zone


zoneBayToLaneBay

int zoneBayToLaneBay(int zoneBay)
return a value in the range 0 to LN-1, where LN is the number of bays on this link


laneBayToZoneBay

int laneBayToZoneBay(int linkBay)
return a value in the range 0 to ZN-1, where ZN is the number of bays on this zone


bayOnThisLink

boolean bayOnThisLink(int zoneBay)
Is the zone-index bay on this link


canEnterForward

boolean canEnterForward(int laneBay,
                        IVehicle v)
Can vehicle park in a forward direction


bays

int bays()
Returns the number of bays on this parking lane


full

int full()
Returns the number of occupied bays on this parking lane


spaces

int spaces()
Returns the number of empty bays on this parking lane


bestBay

int bestBay()
Returns best bay, 0..N-1, with 0 being downstream, or -1 meaning none


degrees

double degrees()
Returns the parking angle, in degrees

See Also:
parkingAngle()

bayLength

double bayLength()
Returns the bay size, length for parallel bays, width for any other angle


rewind

void rewind()
[Internal] called when simulation time is rewound to the start

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

occupied

boolean occupied(int bay)
Check occupancy in given bay [0..N-1]


occupiedParkingVehicle

IParkingVehicle occupiedParkingVehicle(int bay)
Check occupancy in given bay [0..N-1], return IParkingVehicle or null


occupy

boolean occupy(IParkingVehicle parkV,
               int bay,
               boolean newVehicle)
Occupy the given bay with the given vehicle


unoccupyBayOnLeaving

void unoccupyBayOnLeaving(IParkingVehicle parkV,
                          boolean countBayEvent,
                          boolean reCircle)

bayToDist

double bayToDist(int bay)
Return the distance of the upstream end of this lane bay from the end of the parking lane


distToBay

int distToBay(double dist)
Return the lane bay index corresponding to the given distance from the end of the parking lane


bayCentre

IPosition bayCentre(int bay)
Given the lane bay index, return the centre point


dwellTimes

int[] dwellTimes()
Returns statistics on parking duration. Returns { count, sum, sum-squared } of parking stay duration


channel

IChannel channel()
Returns the walkway connected to this parking lane. A walkway can be connected to more than one parking lane, but a parking lane may be connected only to a single walkway


channel

void channel(IChannel c)
Sets the walkway connected to this parking lane. A walkway can be connected to more than one parking lane, but a parking lane may be connected only to a single walkway


selectParkedVehicle

IParkingVehicle selectParkedVehicle(ITrip vehicleTrip)
Select a parked vehicle matching the given trip by type, and if found, assign it the given trip


newVehicle

IVehicle newVehicle(ITrip trip,
                    IOccupant occupant,
                    int bay)
[Internal] Creates a new vehicle when there is no suitable one already parked on this lane

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

newVehicle

IVehicle newVehicle(IZone destination,
                    IVehicleType type,
                    IOccupant occupant,
                    int bay)
[Internal] Creates a new vehicle when there is no suitable one already parked on this lane

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

delete

void delete()
[Internal] Called when a lane reverts to a normal lane from a parking lane

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

parkTime

double parkTime()
Returns the parking time, in seconds, for this lane


transitionTime

double transitionTime()
Returns the transition time, in seconds, for this lane. This is the time taken by a person to get out of or into the car, between parking and walking


arrivalParkingTime

double arrivalParkingTime()
The sum of parking time and transition time, on arrival


departureParkingTime

double departureParkingTime()
The sum of parking time and transition time, on departure


dropOffDwellTime

double dropOffDwellTime(ITrip trip)
The dwell time, after dropping off a person


lanePopularity

int lanePopularity()
Returns the popularity value for this parking lane


channelAcrossRoad

boolean channelAcrossRoad()
Returns true if the walkway connected to this lane is on the other side of the road


channelAcrossRoad

void channelAcrossRoad(boolean b)
Set this to true if the walkway connected to this lane is on the other side of the road


isTaxiRank

boolean isTaxiRank()
Returns true if this parking lane is a taxi rank


setTripAndOccupant

void setTripAndOccupant(IParkingVehicle pv,
                        IOccupant occupant,
                        IZone destination)
Create a vehicle-trip from the destination and pv-origin, then set occupant and trip in v & pv


cluster

String cluster()
Returns the name of the cluster to which this parking lane is assigned, or null, if no cluster


cluster

void cluster(String s)
Sets the name of the cluster to which this parking lane is assigned. Set this to null for no cluster


addParkingListener

void addParkingListener(IParkingListener pl)
Add the given listener to the list for this parking lane. The listener will be notified when a bay is occupied or unoccupied


removeParkingListener

void removeParkingListener(IParkingListener pl)
Remove the given listener from the list for this parking lane.


parkingAngle

ParkingAngle parkingAngle()
The parking angle on this lane, and the face-in, face-out specification


parallel

boolean parallel()
Returns true if the bays on this lane are parallel to traffic


transverse

boolean transverse()
Returns true if the bays on this lane are at 90 degrees to traffic