public class RoutingRequest extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
int |
alightSlack |
boolean |
allowBikeRental |
boolean |
arriveBy
Whether the trip should depart at dateTime (false, the default), or arrive at dateTime.
|
HashSet<String> |
bannedAgencies
Do not use certain named agencies
|
RouteMatcher |
bannedRoutes
Do not use certain named routes
|
StopMatcher |
bannedStops
Do not use certain stops.
|
StopMatcher |
bannedStopsHard
Do not use certain stops.
|
HashMap<org.onebusaway.gtfs.model.AgencyAndId,BannedStopSet> |
bannedTrips
Do not use certain trips
|
boolean |
batch
when true, do not use goal direction or stop at the target, build a full SPT
|
int |
bikeBoardCost
Separate cost for boarding a vehicle with a bicycle, which is more difficult than on foot.
|
boolean |
bikeParkAndRide |
int |
bikeParkCost
Cost of parking a bike.
|
int |
bikeParkTime
Time to park a bike
|
int |
bikeRentalDropoffCost
Cost of dropping-off a rented bike
|
int |
bikeRentalDropoffTime
Time to drop-off a rented bike
|
int |
bikeRentalPickupCost
Cost of renting a bike.
|
int |
bikeRentalPickupTime
Time to rent a bike
|
double |
bikeSpeed |
int |
bikeSwitchCost
Cost of getting on and off your own bike
|
int |
bikeSwitchTime
Time to get on and off your own bike
|
RoutingRequest |
bikeWalkingOptions
Options specifically for the case that you are walking a bicycle.
|
int |
boardSlack
Invariant: boardSlack + alightSlack <= transferSlack.
|
double |
carAccelerationSpeed
The acceleration speed of an automobile, in meters per second per second.
|
double |
carDecelerationSpeed
The deceleration speed of an automobile, in meters per second per second.
|
int |
carDropoffTime
Time to park a car in a park and ride, w/o taking into account driving and walking cost
(time to park, switch off, pick your stuff, lock the car, etc...)
|
double |
carSpeed |
long |
clampInitialWait
The maximum wait time in seconds the user is willing to delay trip start.
|
boolean |
compactLegsByReversedSearch
When true, do a full reversed search to compact the legs of the GraphPath.
|
long |
dateTime
The epoch date/time that the trip should depart (or arrive, for requests where arriveBy is true)
|
boolean |
disableAlertFiltering
Option to disable the default filtering of GTFS-RT alerts by time.
|
boolean |
disableRemainingWeightHeuristic
If true, the remaining weight heuristic is disabled.
|
DominanceFunction |
dominanceFunction
The function that compares paths converging on the same vertex to decide which ones continue to be explored.
|
boolean |
driveOnRight
If true, cost turns as they would be in a country where driving occurs on the right; otherwise, cost them as they would be in a country where
driving occurs on the left.
|
int |
elevatorBoardCost
What is the cost of boarding an elevator?
|
int |
elevatorBoardTime
How long does it take to get an elevator, on average (actually, it probably should be a bit *more* than average, to prevent optimistic trips)?
Setting it to "seems like forever," while accurate, will probably prevent OTP from working correctly.
|
int |
elevatorHopCost
What is the cost of travelling one floor on an elevator?
|
int |
elevatorHopTime
How long does it take to advance one floor on an elevator?
|
Map<Object,Object> |
extensions
Extensions to the trip planner will require additional traversal options beyond the default
set.
|
GenericLocation |
from
The start location
|
boolean |
geoidElevation
Whether to apply the ellipsoid->geoid offset to all elevations in the response
|
boolean |
ignoreRealtimeUpdates
When true, realtime updates are ignored during this search.
|
List<GenericLocation> |
intermediatePlaces
An ordered list of intermediate locations to be visited.
|
boolean |
kissAndRide |
Locale |
locale |
boolean |
longDistance |
double |
maxHours
The maximum duration of a returned itinerary, in hours.
|
int |
maxPreTransitTime
The maximum time (in seconds) of pre-transit travel when using drive-to-transit (park and
ride or kiss and ride).
|
double |
maxSlope
The maximum slope of streets for wheelchair trips.
|
int |
maxTransfers |
double |
maxTransferWalkDistance
The maximum distance (in meters) the user is willing to walk for transfer legs.
|
double |
maxWalkDistance
The maximum distance (in meters) the user is willing to walk for access/egress legs.
|
double |
maxWeight
The worst possible weight that we will accept when planning a trip.
|
static int |
MIN_SIMILARITY |
TraverseModeSet |
modes
The set of TraverseModes that a user is willing to use.
|
int |
nonpreferredTransferPenalty
Penalty for using a non-preferred transfer
|
int |
numItineraries
The maximum number of itineraries to return.
|
boolean |
onlyTransitTrips
Accept only paths that use transit (no street-only paths).
|
OptimizeType |
optimize
The set of characteristics that the user wants to optimize for -- defaults to QUICK, or optimize for transit time.
|
int |
otherThanPreferredRoutesPenalty
Penalty added for using every route that is not preferred if user set any route as preferred.
|
HashMap<String,String> |
parameters
The complete list of incoming query parameters.
|
boolean |
parkAndRide |
HashSet<String> |
preferredAgencies
Set of preferred agencies by user.
|
RouteMatcher |
preferredRoutes
Set of preferred routes by user.
|
double |
preTransitOverageRate |
double |
preTransitPenalty |
RoutingContext |
rctx
The routing context used to actually carry out this search.
|
boolean |
reverseOptimizeOnTheFly
When true, reverse optimize this search on the fly whenever needed, rather than reverse-optimizing the entire path when it's done.
|
boolean |
reverseOptimizing
This is true when a GraphPath is being traversed in reverse for optimization purposes.
|
String |
routerId
The router ID -- internal ID to switch between router implementation (or graphs)
|
boolean |
showIntermediateStops
Whether the planner should return intermediate stops lists for transit legs.
|
boolean |
softPreTransitLimiting |
boolean |
softWalkLimiting |
double |
softWalkOverageRate |
double |
softWalkPenalty |
double |
stairsReluctance
Used instead of walk reluctance for stairs
|
org.onebusaway.gtfs.model.AgencyAndId |
startingTransitStopId
A transit stop that this trip must start from
|
org.onebusaway.gtfs.model.AgencyAndId |
startingTransitTripId
A trip where this trip must start from (depart-onboard routing)
|
GenericLocation |
to
The end location
|
int |
transferPenalty
An extra penalty added on transfers (i.e.
|
int |
transferSlack
A global minimum transfer time (in seconds) that specifies the minimum amount of time that must pass between exiting one transit vehicle and
boarding another.
|
IntersectionTraversalCostModel |
traversalCostModel
The model that computes turn/traversal costs.
|
double |
triangleSafetyFactor
For the bike triangle, how important safety is
|
double |
triangleSlopeFactor
For the bike triangle, how important slope is
|
double |
triangleTimeFactor
For the bike triangle, how important time is.
|
double |
turnReluctance
Multiplicative factor on expected turning time.
|
HashSet<String> |
unpreferredAgencies
Set of unpreferred agencies for given user.
|
RouteMatcher |
unpreferredRoutes
Set of unpreferred routes for given user.
|
boolean |
useBikeRentalAvailabilityInformation
Whether or not bike rental availability information will be used to plan bike rental trips
|
boolean |
useRequestedDateTimeInMaxHours
Whether maxHours limit should consider wait/idle time between the itinerary and the requested arrive/depart time.
|
boolean |
useTraffic
Should traffic congestion be considered when driving?
|
int |
useUnpreferredRoutesPenalty
Penalty added for using every unpreferred route.
|
double |
waitAtBeginningFactor
How much less bad is waiting at the beginning of the trip (replaces waitReluctance on the first boarding)
|
double |
waitReluctance
How much worse is waiting for a transit vehicle than being on a transit vehicle, as a multiplier.
|
int |
walkBoardCost
This prevents unnecessary transfers by adding a cost for boarding a vehicle.
|
boolean |
walkingBike |
double |
walkReluctance
A multiplier for how bad walking is, compared to being in transit for equal lengths of time.
|
double |
walkSpeed
max walk/bike speed along streets, in meters per second
|
boolean |
wheelchairAccessible
Whether the trip must be wheelchair accessible.
|
long |
worstTime
The worst possible time (latest for depart-by and earliest for arrive-by) to accept
|
Constructor and Description |
---|
RoutingRequest()
Constructor for options; modes defaults to walk and transit
|
RoutingRequest(QualifiedModeSet qmodes) |
RoutingRequest(String qmodes) |
RoutingRequest(TraverseMode mode) |
RoutingRequest(TraverseMode mode,
OptimizeType optimize) |
RoutingRequest(TraverseModeSet modes) |
RoutingRequest(TraverseModeSet modeSet,
OptimizeType optimize) |
Modifier and Type | Method and Description |
---|---|
void |
addIntermediatePlace(GenericLocation location)
Adds a GenericLocation to the end of the intermediatePlaces list.
|
void |
addMode(List<TraverseMode> mList)
Add multiple modes to the set of allowed modes.
|
void |
addMode(TraverseMode mode)
Add a TraverseMode to the set of allowed modes.
|
void |
banTrip(org.onebusaway.gtfs.model.AgencyAndId trip) |
void |
canSplitEdge(StreetEdge edge)
Does nothing if different edge is split in origin/destination search
But throws TrivialPathException if same edge is split in origin/destination search.
|
void |
cleanup()
Tear down any routing context (remove temporary edges from edge lists)
|
void |
clearIntermediatePlaces()
Clears any intermediate places from this request.
|
void |
clearModes()
Clear the allowed modes.
|
RoutingRequest |
clone() |
boolean |
containsExtension(Object key)
Determine if a particular extension parameter is present for the specified key.
|
boolean |
equals(Object o)
Equality does not mean that the fields of the two RoutingRequests are identical, but that they will produce the same SPT.
|
void |
freezeTraverseMode()
only allow traversal by the specified mode; don't allow walking bikes.
|
int |
getAlightTime(TraverseMode transitMode) |
int |
getBoardCost(TraverseMode mode) |
int |
getBoardCostLowerBound() |
int |
getBoardTime(TraverseMode transitMode) |
Date |
getDateTime() |
<T> T |
getExtension(Object key)
Get the extension parameter with the specified key.
|
NamedPlace |
getFromPlace() |
IntersectionTraversalCostModel |
getIntersectionTraversalCostModel()
Returns the model that computes the cost of intersection traversal.
|
double |
getMaxWalkDistance() |
ShortestPathTree |
getNewShortestPathTree()
Create a new ShortestPathTree instance using the DominanceFunction specified in this RoutingRequest.
|
int |
getNumItineraries() |
RoutingContext |
getRoutingContext() |
long |
getSecondsSinceEpoch() |
double |
getSpeed(TraverseMode mode) |
double |
getStreetSpeedUpperBound() |
NamedPlace |
getToPlace() |
double |
getTransitSpeedUpperBound()
Get the maximum expected speed over all transit modes.
|
int |
hashCode()
Equality and hashCode should not consider the routing context, to allow SPT caching.
|
boolean |
hasIntermediatePlaces()
Returns true if there are any intermediate places set.
|
long |
preferencesPenaltyForRoute(org.onebusaway.gtfs.model.Route route)
Check if route is preferred according to this request.
|
void |
putExtension(Object key,
Object value)
Add an extension parameter with the specified key.
|
void |
removeMode(TraverseMode mode) |
RoutingRequest |
reversedClone() |
void |
setArriveBy(boolean arriveBy) |
void |
setBannedAgencies(String s) |
void |
setBannedRoutes(String s) |
void |
setBannedStops(String s) |
void |
setBannedStopsHard(String s) |
void |
setBikeBoardCost(int bikeBoardCost) |
void |
setDateTime(Date dateTime) |
void |
setDateTime(String date,
String time,
TimeZone tz) |
void |
setDummyRoutingContext(Graph graph)
Used in internals API.
|
void |
setFromString(String from) |
void |
setIntermediatePlacesFromStrings(List<String> intermediates)
Sets intermediatePlaces by parsing GenericLocations from a list of string.
|
void |
setMaxPreTransitTime(int maxPreTransitTime) |
void |
setMaxWalkDistance(double maxWalkDistance) |
void |
setMode(TraverseMode mode) |
void |
setModes(TraverseModeSet modes) |
void |
setNumItineraries(int numItineraries) |
void |
setOptimize(OptimizeType optimize) |
void |
setOtherThanPreferredRoutesPenalty(int penalty) |
void |
setPreferredAgencies(String s) |
void |
setPreferredRoutes(String s) |
void |
setRoutingContext(Graph graph) |
void |
setRoutingContext(Graph graph,
Edge fromBackEdge,
Vertex from,
Vertex to)
For use in tests.
|
void |
setRoutingContext(Graph graph,
String from,
String to)
For use in tests.
|
void |
setRoutingContext(Graph graph,
Vertex from,
Vertex to) |
void |
setToString(String to) |
void |
setTriangleNormalized(double safe,
double slope,
double time)
Sets the bicycle triangle routing parameters -- the relative importance of safety, flatness, and speed.
|
void |
setTriangleSafetyFactor(double triangleSafetyFactor) |
void |
setTriangleSlopeFactor(double triangleSlopeFactor) |
void |
setTriangleTimeFactor(double triangleTimeFactor) |
void |
setUnpreferredAgencies(String s) |
void |
setUnpreferredRoutes(String s) |
void |
setWaitAtBeginningFactor(double waitAtBeginningFactor) |
void |
setWaitReluctance(double waitReluctance) |
void |
setWalkBoardCost(int walkBoardCost) |
void |
setWalkReluctance(double walkReluctance) |
void |
setWheelchairAccessible(boolean wheelchairAccessible) |
String |
toString() |
String |
toString(String sep) |
boolean |
transitAllowed() |
boolean |
tripIsBanned(org.onebusaway.gtfs.model.Trip trip)
tripIsBanned is a misnomer: this checks whether the agency or route are banned.
|
public IntersectionTraversalCostModel traversalCostModel
public final HashMap<String,String> parameters
public String routerId
public GenericLocation from
public GenericLocation to
public List<GenericLocation> intermediatePlaces
public double maxWalkDistance
public double maxTransferWalkDistance
public int maxPreTransitTime
public long worstTime
public double maxWeight
public double maxHours
public boolean useRequestedDateTimeInMaxHours
public TraverseModeSet modes
public OptimizeType optimize
public long dateTime
public boolean arriveBy
public boolean wheelchairAccessible
public int numItineraries
public double maxSlope
public boolean showIntermediateStops
public double walkSpeed
public double bikeSpeed
public double carSpeed
public Locale locale
public int transferPenalty
public double walkReluctance
public double stairsReluctance
public double turnReluctance
public int elevatorBoardTime
public int elevatorBoardCost
public int elevatorHopTime
public int elevatorHopCost
public int bikeSwitchTime
public int bikeSwitchCost
public int bikeRentalPickupTime
public int bikeRentalPickupCost
public int bikeRentalDropoffTime
public int bikeRentalDropoffCost
public int bikeParkTime
public int bikeParkCost
public int carDropoffTime
public double waitReluctance
public double waitAtBeginningFactor
public int walkBoardCost
public int bikeBoardCost
public RouteMatcher bannedRoutes
public HashMap<org.onebusaway.gtfs.model.AgencyAndId,BannedStopSet> bannedTrips
public StopMatcher bannedStops
public StopMatcher bannedStopsHard
public RouteMatcher preferredRoutes
public int otherThanPreferredRoutesPenalty
public RouteMatcher unpreferredRoutes
public HashSet<String> unpreferredAgencies
public int useUnpreferredRoutesPenalty
public int transferSlack
public int boardSlack
public int alightSlack
public int maxTransfers
public Map<Object,Object> extensions
public int nonpreferredTransferPenalty
public double triangleTimeFactor
public double triangleSlopeFactor
public double triangleSafetyFactor
public RoutingRequest bikeWalkingOptions
public boolean reverseOptimizing
public boolean batch
public boolean useBikeRentalAvailabilityInformation
public long clampInitialWait
public boolean reverseOptimizeOnTheFly
public boolean compactLegsByReversedSearch
public boolean driveOnRight
public double carDecelerationSpeed
public double carAccelerationSpeed
public boolean ignoreRealtimeUpdates
public boolean disableRemainingWeightHeuristic
public RoutingContext rctx
public org.onebusaway.gtfs.model.AgencyAndId startingTransitStopId
public org.onebusaway.gtfs.model.AgencyAndId startingTransitTripId
public boolean walkingBike
public boolean softWalkLimiting
public boolean softPreTransitLimiting
public double softWalkPenalty
public double softWalkOverageRate
public double preTransitPenalty
public double preTransitOverageRate
public boolean allowBikeRental
public boolean bikeParkAndRide
public boolean parkAndRide
public boolean kissAndRide
public boolean longDistance
public boolean useTraffic
public DominanceFunction dominanceFunction
public boolean onlyTransitTrips
public boolean disableAlertFiltering
public boolean geoidElevation
public static final int MIN_SIMILARITY
public RoutingRequest()
public RoutingRequest(TraverseModeSet modes)
public RoutingRequest(QualifiedModeSet qmodes)
public RoutingRequest(String qmodes)
public RoutingRequest(TraverseMode mode)
public RoutingRequest(TraverseMode mode, OptimizeType optimize)
public RoutingRequest(TraverseModeSet modeSet, OptimizeType optimize)
public boolean transitAllowed()
public long getSecondsSinceEpoch()
public void setArriveBy(boolean arriveBy)
public void setMode(TraverseMode mode)
public void setModes(TraverseModeSet modes)
public void setOptimize(OptimizeType optimize)
public void setWheelchairAccessible(boolean wheelchairAccessible)
public void freezeTraverseMode()
public void putExtension(Object key, Object value)
public boolean containsExtension(Object key)
public <T> T getExtension(Object key)
public IntersectionTraversalCostModel getIntersectionTraversalCostModel()
public double getMaxWalkDistance()
public void setWalkBoardCost(int walkBoardCost)
public void setBikeBoardCost(int bikeBoardCost)
public void setPreferredAgencies(String s)
public void setPreferredRoutes(String s)
public void setOtherThanPreferredRoutesPenalty(int penalty)
public void setUnpreferredAgencies(String s)
public void setUnpreferredRoutes(String s)
public void setBannedRoutes(String s)
public void setBannedStops(String s)
public void setBannedStopsHard(String s)
public void setBannedAgencies(String s)
public void setFromString(String from)
public void setToString(String to)
public void clearModes()
public void addMode(TraverseMode mode)
public void addMode(List<TraverseMode> mList)
public Date getDateTime()
public void setDateTime(Date dateTime)
public int getNumItineraries()
public void setNumItineraries(int numItineraries)
public void removeMode(TraverseMode mode)
public void setIntermediatePlacesFromStrings(List<String> intermediates)
public void clearIntermediatePlaces()
public boolean hasIntermediatePlaces()
public void addIntermediatePlace(GenericLocation location)
public void setTriangleSafetyFactor(double triangleSafetyFactor)
public void setTriangleSlopeFactor(double triangleSlopeFactor)
public void setTriangleTimeFactor(double triangleTimeFactor)
public NamedPlace getFromPlace()
public NamedPlace getToPlace()
public RoutingRequest clone()
public RoutingRequest reversedClone()
public void setRoutingContext(Graph graph)
public void setRoutingContext(Graph graph, Edge fromBackEdge, Vertex from, Vertex to)
public void setRoutingContext(Graph graph, String from, String to)
public void setDummyRoutingContext(Graph graph)
public RoutingContext getRoutingContext()
public boolean equals(Object o)
public int hashCode()
public void cleanup()
public double getSpeed(TraverseMode mode)
mode
- public double getStreetSpeedUpperBound()
public int getBoardCost(TraverseMode mode)
mode
- public int getBoardCostLowerBound()
public int getBoardTime(TraverseMode transitMode)
public int getAlightTime(TraverseMode transitMode)
public void setMaxWalkDistance(double maxWalkDistance)
public void setMaxPreTransitTime(int maxPreTransitTime)
public void setWalkReluctance(double walkReluctance)
public void setWaitReluctance(double waitReluctance)
public void setWaitAtBeginningFactor(double waitAtBeginningFactor)
public void banTrip(org.onebusaway.gtfs.model.AgencyAndId trip)
public boolean tripIsBanned(org.onebusaway.gtfs.model.Trip trip)
public long preferencesPenaltyForRoute(org.onebusaway.gtfs.model.Route route)
public double getTransitSpeedUpperBound()
public void setTriangleNormalized(double safe, double slope, double time)
public ShortestPathTree getNewShortestPathTree()
public void canSplitEdge(StreetEdge edge)
SimpleStreetSplitter
in SimpleStreetSplitter.link(Vertex, StreetEdge, double, RoutingRequest)
edge
- Copyright © 2018. All rights reserved.