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<FeedScopedId,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.
|
long |
clockTimeSec
Keep track of epoch time the request was created by OTP.
|
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?
|
boolean |
enterStationsWithCar
This parameter is used in GTFS-Flex routing.
|
Map<Object,Object> |
extensions
Extensions to the trip planner will require additional traversal options beyond the default
set.
|
double |
flexCallAndRideReluctance
Reluctance for call-n-ride.
|
int |
flexDeviatedRouteExtraPenalty
Extra penalty added for deviated-route boarding/alighting.
|
double |
flexFlagStopBufferSize
Control the size of flag-stop buffer returned in API response.
|
int |
flexFlagStopExtraPenalty
Extra penalty added for flag-stop boarding/alighting.
|
boolean |
flexIgnoreDrtAdvanceBookMin
Whether to ignore DRT time limits.
|
int |
flexMaxCallAndRideSeconds
Total time which can be spent on a call-n-ride leg.
|
int |
flexMinPartialHopLength
Minimum length in meters of partial hop edges.
|
double |
flexReduceCallAndRideRatio
Control the reduction of call-and-ride time.
|
int |
flexReduceCallAndRideSeconds
Control the reduction of call-and-ride time.
|
boolean |
flexUseEligibilityServices
Whether to use eligibility-based services.
|
boolean |
flexUseReservationServices
Whether to use reservation-based services.
|
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 |
String |
pathComparator
Which path comparator to use
|
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)
|
int |
serviceDayLookout
How many extra ServiceDays to look in the future (or back, if arriveBy=true)
This parameter allows the configuration of how far, in service days, OTP should look for
transit service when evaluating the next departure (or arrival) at a stop.
|
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
|
FeedScopedId |
startingTransitStopId
A transit stop that this trip must start from
|
FeedScopedId |
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.
|
HashSet<String> |
whiteListedAgencies
Only use certain named agencies
|
RouteMatcher |
whiteListedRoutes
Only use certain named routes
|
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(FeedScopedId 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() |
Comparator<GraphPath> |
getPathComparator(boolean compareStartTimes) |
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(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) |
void |
resetClockTime() |
RoutingRequest |
reversedClone() |
boolean |
routeIsBanned(Route route) |
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,
Collection<Vertex> temporaryVertices) |
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 |
setServiceDayLookout(int serviceDayLookout) |
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) |
void |
setWhiteListedAgencies(String s) |
void |
setWhiteListedRoutes(String s) |
String |
toString() |
String |
toString(String sep) |
boolean |
transitAllowed() |
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 RouteMatcher whiteListedRoutes
public HashMap<FeedScopedId,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 int flexFlagStopExtraPenalty
public int flexDeviatedRouteExtraPenalty
public double flexCallAndRideReluctance
public int flexMaxCallAndRideSeconds
public int flexReduceCallAndRideSeconds
public double flexReduceCallAndRideRatio
public double flexFlagStopBufferSize
public boolean flexUseReservationServices
public boolean flexUseEligibilityServices
public boolean flexIgnoreDrtAdvanceBookMin
public RoutingContext rctx
public FeedScopedId startingTransitStopId
public FeedScopedId 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 int serviceDayLookout
public String pathComparator
public boolean enterStationsWithCar
public int flexMinPartialHopLength
public long clockTimeSec
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 setWhiteListedRoutes(String s)
public void setBannedStops(String s)
public void setBannedStopsHard(String s)
public void setBannedAgencies(String s)
public void setWhiteListedAgencies(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, Collection<Vertex> temporaryVertices)
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(FeedScopedId trip)
public boolean routeIsBanned(Route route)
public long preferencesPenaltyForRoute(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
- public void resetClockTime()
public void setServiceDayLookout(int serviceDayLookout)
public Comparator<GraphPath> getPathComparator(boolean compareStartTimes)
Copyright © 2019. All rights reserved.