public class ProfileRequest extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
EnumSet<LegMode> |
accessModes
The modes used to access transit
|
float |
bikeSpeed
The speed of cycling, in meters per second
|
int |
bikeTrafficStress
maximum level of traffic stress for cycling, 1 - 4
|
float |
carSpeed
The speed of driving, in meters per second.
|
LocalDate |
date
The date of the search
|
EnumSet<LegMode> |
directModes
The modes used to reach the destination without transit
|
EnumSet<LegMode> |
egressModes
The modes used to reach the destination after leaving transit
|
double |
fromLat
The latitude of the origin.
|
double |
fromLon
The longitude of the origin.
|
int |
fromTime
The beginning of the departure window, in seconds since midnight.
|
InRoutingFareCalculator |
inRoutingFareCalculator
An object that should have at a minimum a "type" set according to the list in InRoutingFareCalculator.
|
int |
limit
the maximum number of options presented PER ACCESS MODE
|
int |
maxBikeTime
Maximum bike time when using transit, in minutes
|
int |
maxCarTime
Maximum car time before when using transit, in minutes
|
int |
maxFare
Maximum fare for constraining monetary cost of paths during search in Analysis.
|
int |
maxRides
The maximum number of rides, e.g.
|
int |
maxTripDurationMinutes
The maximum duration of any trip found by this search.
|
int |
maxWalkTime
Maximum walk time before and after using transit, in minutes
NB the time to reach the destination after leaving transit is considered separately from the time to reach
transit at the start of the search; e.g.
|
int |
minBikeTime
Minimum time to ride a bike (to prevent extremely short bike legs), in minutes
|
int |
minCarTime
Minimum time to drive (to prevent extremely short driving legs), in minutes
|
int |
monteCarloDraws
Number of Monte Carlo draws to take for frequency searches.
|
boolean |
reverseSearch
If true current search is reverse search AKA we are looking for a path from destination to origin in reverse
It differs from searchType because it is used as egress search.
|
Scenario |
scenario
A non-destructive scenario to apply when executing this request
|
String |
scenarioId
The ID of a scenario stored in S3 as JSON.
|
int |
streetTime
Maximum time to reach the destination without using transit in minutes
|
int |
suboptimalMinutes
This parameter compensates for the fact that GTFS does not contain information about schedule deviation (lateness).
|
double |
toLat
The latitude of the destination.
|
double |
toLon
The longitude of the destination.
|
int |
toTime
The end of the departure window, in seconds since midnight.
|
EnumSet<TransitModes> |
transitModes
The transit modes used
|
float |
walkSpeed
The speed of walking, in meters per second
|
boolean |
wheelchair
Require all streets and transit to be wheelchair-accessible.
|
ZoneId |
zoneId |
Constructor and Description |
---|
ProfileRequest() |
Modifier and Type | Method and Description |
---|---|
ProfileRequest |
clone() |
static ProfileRequest |
fromGraphqlEnvironment(graphql.schema.DataFetchingEnvironment environment,
ZoneId timezone)
Factory method to create a profile request with query parameters from a GraphQL request
|
long |
getFromTimeDate()
Returns number of milliseconds UNIX time made with date and fromTime
It reads date as date in transportNetwork timezone when it is converted to UNIX time it is in UTC
It needs to be decided how to do this correctly: #37
If date isn't set current date is used.
|
ZonedDateTime |
getFromTimeDateZD()
Returns ZonedDateTime made with date and fromTime fields
It reads date as date in transportNetwork timezone when it is converted to UNIX time it is in UTC
It needs to be decided how to do this correctly: #37
If date isn't set current date is used.
|
int |
getMaxTimeSeconds(LegMode mode) |
int |
getMaxTimeSeconds(StreetMode mode) |
int |
getMinTimeSeconds(StreetMode mode) |
int |
getMonteCarloDrawsPerMinute()
Return the number of Monte Carlo draws that must be done each minute to get at least the desired number of total
Monte Carlo draws over all minutes.
|
float |
getSpeedForMode(StreetMode streetMode) |
int |
getTimeWindowLengthMinutes()
Return the length of the time window in truncated integer minutes
|
boolean |
hasTransit() |
void |
setTime(String fromTime,
String toTime)
Sets time and date from fromTime and toTime
It is used in tests
|
public double fromLat
public double fromLon
public double toLat
public double toLon
public int fromTime
public int toTime
public float walkSpeed
public float bikeSpeed
public int bikeTrafficStress
public float carSpeed
public int streetTime
public int maxWalkTime
public int maxBikeTime
public int maxCarTime
public int minBikeTime
public int minCarTime
public LocalDate date
public int limit
public EnumSet<LegMode> egressModes
public EnumSet<LegMode> directModes
public EnumSet<TransitModes> transitModes
public int suboptimalMinutes
public int maxTripDurationMinutes
public int maxRides
public Scenario scenario
public String scenarioId
public ZoneId zoneId
public boolean wheelchair
public boolean reverseSearch
public int maxFare
public InRoutingFareCalculator inRoutingFareCalculator
public int monteCarloDraws
public ProfileRequest clone()
public long getFromTimeDate()
getFromTimeDateZD()
public ZonedDateTime getFromTimeDateZD()
public float getSpeedForMode(StreetMode streetMode)
public int getMaxTimeSeconds(StreetMode mode)
public boolean hasTransit()
public static ProfileRequest fromGraphqlEnvironment(graphql.schema.DataFetchingEnvironment environment, ZoneId timezone)
public void setTime(String fromTime, String toTime)
fromTime
- The beginning of the departure window, in ISO 8061 YYYY-MM-DDTHH:MM:SS+HH:MMtoTime
- The end of the departure window, in ISO 8061 YYYY-MM-DDTHH:MM:SS+HH:MMpublic int getMaxTimeSeconds(LegMode mode)
public int getMinTimeSeconds(StreetMode mode)
public int getTimeWindowLengthMinutes()
public int getMonteCarloDrawsPerMinute()
Copyright © 2019. All rights reserved.