public class TransferTable extends Object implements Serializable
StopTransfer, SpecificTransfer
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
TransferTable.Transfer
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
preferredTransfers
Preferred transfers (or timed transfers, which are preferred as well) are present if true
|
protected HashMap<P2<FeedScopedId>,StopTransfer> |
table
Table which contains transfers between two stops
|
Constructor and Description |
---|
TransferTable() |
Modifier and Type | Method and Description |
---|---|
void |
addTransferTime(Stop fromStop,
Stop toStop,
Route fromRoute,
Route toRoute,
Trip fromTrip,
Trip toTrip,
int transferTime)
Add a transfer time to the transfer table.
|
int |
determineTransferPenalty(int transferTime,
int nonpreferredTransferPenalty)
Determines the transfer penalty given a transfer time and a penalty for non-preferred
transfers.
|
Iterable<TransferTable.Transfer> |
getAllFirstSpecificTransfers()
Deprecated.
|
int |
getTransferTime(Stop fromStop,
Stop toStop,
Trip fromTrip,
Trip toTrip,
boolean forwardInTime)
Get the transfer time that should be used when transferring from a trip to another trip.
|
boolean |
hasPreferredTransfers() |
protected HashMap<P2<FeedScopedId>,StopTransfer> table
protected boolean preferredTransfers
public boolean hasPreferredTransfers()
public int getTransferTime(Stop fromStop, Stop toStop, Trip fromTrip, Trip toTrip, boolean forwardInTime)
fromStop
- is the arriving stoptoStop
- is the departing stopfromTrip
- is the arriving triptoTrip
- is the departing tripforwardInTime
- is true when moving forward in time; false when moving
backwards in time (usually this will be the variable "boarding")public void addTransferTime(Stop fromStop, Stop toStop, Route fromRoute, Route toRoute, Trip fromTrip, Trip toTrip, int transferTime)
fromStop
- is the arriving stoptoStop
- is the departing stopfromRoute
- is the arriving route; is allowed to be nulltoRoute
- is the departing route; is allowed to be nullfromTrip
- is the arriving trip; is allowed to be nulltoTrip
- is the departing trip; is allowed to be nulltransferTime
- is the transfer time in seconds. May contain special (negative) values
which meaning can be found in the StopTransfer.*_TRANSFER constants. If no transfer is found,
StopTransfer.UNKNOWN_TRANSFER is returned.public int determineTransferPenalty(int transferTime, int nonpreferredTransferPenalty)
transferTime
- is the transfer timenonpreferredTransferPenalty
- is the penalty for non-preferred transfers@Deprecated public Iterable<TransferTable.Transfer> getAllFirstSpecificTransfers()
TransferGraphLinker
Copyright © 2019. All rights reserved.