Modifier and Type | Field and Description |
---|---|
Edge |
backEdge |
protected State |
backState |
protected State |
next |
protected int[] |
pathParserStates |
StateData |
stateData |
protected long |
time |
protected Vertex |
vertex |
double |
walkDistance |
double |
weight |
Constructor and Description |
---|
State(RoutingRequest opt)
Create an initial state representing the beginning of a search for the given routing context.
|
State(Vertex vertex,
Edge backEdge,
long timeSeconds,
long startTime,
RoutingRequest options)
Create an initial state, forcing vertex, back edge, time and start time to the specified values.
|
State(Vertex vertex,
Edge backEdge,
long timeSeconds,
RoutingRequest options)
Create an initial state, forcing vertex, back edge and time to the specified values.
|
State(Vertex vertex,
long timeSeconds,
RoutingRequest options)
Create an initial state, forcing vertex and time to the specified values.
|
State(Vertex vertex,
RoutingRequest opt)
Create an initial state, forcing vertex to the specified value.
|
Modifier and Type | Method and Description |
---|---|
State |
addToExistingResultChain(State existingResultChain)
Extend an exiting result chain by appending this result to the existing chain.
|
void |
checkNegativeWeight() |
protected State |
clone() |
State |
detachNextResult() |
void |
dumpPath() |
StateEditor |
edit(Edge e)
Create a state editor to produce a child of this state, which will be the result of
traversing the given edge.
|
boolean |
exceedsWeightLimit(double maxWeight) |
int |
getAbsTimeDeltaSeconds() |
long |
getActiveTime()
Returns the length of the trip in seconds up to this time, not including the initial wait.
|
String |
getBackDirection()
Get the name of the direction used to get to this state.
|
Edge |
getBackEdge() |
TraverseMode |
getBackMode() |
State |
getBackState() |
org.onebusaway.gtfs.model.Trip |
getBackTrip()
Get the back trip of the given state.
|
Set<String> |
getBikeRentalNetworks() |
RoutingContext |
getContext() |
long |
getElapsedTimeSeconds()
returns the length of the trip in seconds up to this state
|
Object |
getExtension(Object key)
Retrieve a State extension based on its key.
|
long |
getLastAlightedTimeSeconds() |
int |
getLastNextArrivalDelta() |
TripPattern |
getLastPattern() |
State |
getNextResult()
Optional next result that allows
Edge to return multiple results. |
TraverseMode |
getNonTransitMode()
This method is on State rather than RoutingRequest because we care whether the user is in
possession of a rented bike.
|
int |
getNumBoardings() |
double |
getOptimizedElapsedTimeSeconds() |
RoutingRequest |
getOptions() |
String |
getPathParserStates() |
int |
getPreTransitTime() |
int |
getPreTransitTimeDelta() |
org.onebusaway.gtfs.model.Stop |
getPreviousStop() |
org.onebusaway.gtfs.model.Trip |
getPreviousTrip() |
boolean |
getReverseOptimizing() |
org.onebusaway.gtfs.model.AgencyAndId |
getRoute() |
ServiceDay |
getServiceDay() |
long |
getStartTimeSeconds() |
int |
getTimeDeltaSeconds() |
long |
getTimeInMillis() |
long |
getTimeSeconds()
Returns time in seconds since epoch
|
org.onebusaway.gtfs.model.AgencyAndId |
getTripId() |
TripTimes |
getTripTimes() |
Vertex |
getVertex() |
double |
getWalkAtLastTransit() |
double |
getWalkDistance() |
double |
getWalkDistanceDelta() |
double |
getWalkSinceLastTransit() |
double |
getWeight() |
double |
getWeightDelta() |
String |
getZone() |
boolean |
hasEnteredNoThruTrafficArea() |
boolean |
isBackWalkingBike() |
boolean |
isBikeParked() |
boolean |
isBikeRenting() |
boolean |
isCarParked() |
boolean |
isEverBoarded()
Whether this path has ever previously boarded (or alighted from, in a reverse search) a
transit vehicle
|
boolean |
isFinal() |
boolean |
isOnboard() |
boolean |
multipleOptionsBefore() |
State |
optimize()
Reverse-optimize a path after it is complete, by default
|
State |
optimizeOrReverse(boolean optimize,
boolean forward)
Reverse the path implicit in the given state, re-traversing all edges in the opposite
direction so as to remove any unnecessary waiting in the resulting itinerary.
|
State |
reverse()
Reverse a path
|
State |
reversedClone() |
boolean |
routeSequencePrefix(State that) |
boolean |
routeSequenceSubset(State that) |
boolean |
routeSequenceSubsetSymmetric(State that) |
boolean |
routeSequenceSuperset(State that) |
String |
toString() |
String |
toStringVerbose() |
protected long time
public double weight
protected Vertex vertex
protected State backState
public Edge backEdge
protected State next
public StateData stateData
public double walkDistance
protected int[] pathParserStates
public State(RoutingRequest opt)
public State(Vertex vertex, RoutingRequest opt)
public State(Vertex vertex, long timeSeconds, RoutingRequest options)
public State(Vertex vertex, Edge backEdge, long timeSeconds, RoutingRequest options)
public State(Vertex vertex, Edge backEdge, long timeSeconds, long startTime, RoutingRequest options)
public StateEditor edit(Edge e)
e
- public Object getExtension(Object key)
key
- - An Object that is a key in this State's extension mappublic String toStringVerbose()
public long getTimeSeconds()
public long getElapsedTimeSeconds()
public TripTimes getTripTimes()
public long getActiveTime()
public org.onebusaway.gtfs.model.AgencyAndId getTripId()
public org.onebusaway.gtfs.model.Trip getPreviousTrip()
public String getZone()
public org.onebusaway.gtfs.model.AgencyAndId getRoute()
public int getNumBoardings()
public boolean isEverBoarded()
public boolean isBikeRenting()
public boolean isCarParked()
public boolean isBikeParked()
public boolean isFinal()
public org.onebusaway.gtfs.model.Stop getPreviousStop()
public long getLastAlightedTimeSeconds()
public double getWalkDistance()
public int getPreTransitTime()
public Vertex getVertex()
public int getLastNextArrivalDelta()
public double getWeight()
public int getTimeDeltaSeconds()
public int getAbsTimeDeltaSeconds()
public double getWalkDistanceDelta()
public int getPreTransitTimeDelta()
public double getWeightDelta()
public void checkNegativeWeight()
public boolean isOnboard()
public State getBackState()
public TraverseMode getBackMode()
public boolean isBackWalkingBike()
public String getBackDirection()
public org.onebusaway.gtfs.model.Trip getBackTrip()
public Edge getBackEdge()
public boolean exceedsWeightLimit(double maxWeight)
public long getStartTimeSeconds()
public State getNextResult()
Edge
to return multiple results.public State addToExistingResultChain(State existingResultChain)
TraverseResult result = null;
for( ... ) {
TraverseResult individualResult = ...;
result = individualResult.addToExistingResultChain(result);
}
return result;
existingResultChain
- the tail of an existing result chain, or null if the chain has not
been startedpublic State detachNextResult()
public RoutingContext getContext()
public RoutingRequest getOptions()
public TraverseMode getNonTransitMode()
public State reversedClone()
public void dumpPath()
public long getTimeInMillis()
public boolean routeSequencePrefix(State that)
public boolean routeSequenceSubsetSymmetric(State that)
public boolean routeSequenceSubset(State that)
public boolean routeSequenceSuperset(State that)
public double getWalkSinceLastTransit()
public double getWalkAtLastTransit()
public boolean multipleOptionsBefore()
public String getPathParserStates()
public TripPattern getLastPattern()
public ServiceDay getServiceDay()
public State optimizeOrReverse(boolean optimize, boolean forward)
optimize
- Should this path be optimized or just reversed?forward
- Is this an on-the-fly reverse search in the midst of a forward search?public State optimize()
public State reverse()
public boolean getReverseOptimizing()
public double getOptimizedElapsedTimeSeconds()
public boolean hasEnteredNoThruTrafficArea()
Copyright © 2018. All rights reserved.