Class Stop
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.networkanalysis.Stop
-
public final class Stop extends java.lang.Object
Represent stops - locations that must be visited along a route. Stops are part ofRouteParameters
which is used as an input toRouteTask.solveRouteAsync(RouteParameters)
. You need at least two stops to compute a route, although you can have more.- Since:
- 100.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Stop.Type
Specifies the type of a route stop.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAddedCost(java.lang.String attributeName)
Gets the added cost that was set for this Stop.CurbApproach
getArrivalCurbApproach()
Gets the direction from which a vehicle arrives at this stop.java.util.Calendar
getArrivalTime()
Gets time of arrival at the stop.double
getArrivalTimeShift()
Gets shift for arrival time.double
getCumulativeCost(java.lang.String attributeName)
Gets the cumulative cost.CurbApproach
getCurbApproach()
Gets theCurbApproach
that was set.double
getCurrentBearing()
Gets the current bearing in degrees.double
getCurrentBearingTolerance()
Gets the current bearing tolerance in degrees.CurbApproach
getDepartureCurbApproach()
Gets the direction from which a vehicle departs from the stop.java.util.Calendar
getDepartureTime()
Gets time of departure from the stop.double
getDepartureTimeShift()
Gets shift for departure time.double
getDistanceToNetworkLocation()
Gets the distance to network location in meters.Point
getGeometry()
Gets the location the Stop should be placed on the map.LocationStatus
getLocationStatus()
Gets the location status.java.lang.String
getName()
Gets the name that was set for this Stop.double
getNavigationLatency()
Gets the navigation latency in seconds.double
getNavigationSpeed()
Gets the navigation speed in meters per second.NetworkLocation
getNetworkLocation()
Gets the Stop's location in the underlying transportation network.java.lang.String
getRouteName()
Gets the name of the route to which this Stop belongs.int
getSequence()
Gets the order in which stop is visited along the route.int
getStopId()
Gets the stop ID.java.util.Calendar
getTimeWindowEnd()
Gets the time window end that was set.java.util.Calendar
getTimeWindowStart()
Gets the time window start that was set.Stop.Type
getType()
Gets the type that was set for this stop.double
getViolationTime()
Gets the time (in minutes) by which the route arrives later than the permissible time window for the stop.double
getWaitTime()
Gets the time (in minutes) spent at the stop waiting for the time window to open when the route arrives early This is the difference betweengetArrivalTime()
andgetTimeWindowStart()
void
setAddedCost(java.lang.String attributeName, double addedCost)
Sets the added cost for this Stop.void
setCurbApproach(CurbApproach curbApproach)
Sets the direction from which a vehicle may arrive at or depart from the stop.void
setCurrentBearing(double currentBearing)
Sets the current bearing in degrees.void
setCurrentBearingTolerance(double currentBearingTolerance)
Sets the current bearing tolerance in degrees.void
setGeometry(Point location)
Sets the location at which this Stop should be placed on the map.void
setName(java.lang.String name)
Sets the name for this Stop.void
setNavigationLatency(double navigationLatency)
Sets the navigation latency in seconds.void
setNavigationSpeed(double navigationSpeed)
Sets the navigation speed in meters per second.void
setNetworkLocation(NetworkLocation networkLocation)
Sets the Stop's location in the underlying transportation network.void
setRouteName(java.lang.String routeName)
Sets the name of the route to which this Stop belongs.void
setStopId(int stopId)
Sets the stop ID.void
setTimeWindowEnd(java.util.Calendar timeWindowEnd)
Sets ending time of a permissible time window for the stop.void
setTimeWindowStart(java.util.Calendar timeWindowStart)
Sets the beginning time of a permissible time window for the stop.void
setType(Stop.Type type)
Sets the type for this stop.
-
-
-
Constructor Detail
-
Stop
public Stop(Point point)
Creates an instance of Stop.- Parameters:
point
- geometry of the stop- Throws:
java.lang.IllegalArgumentException
- if point is null- Since:
- 100.0.0
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name that was set for this Stop.- Returns:
- the name. Default value is an empty string
- Since:
- 100.0.0
-
setName
public void setName(java.lang.String name)
Sets the name for this Stop.- Parameters:
name
- name. Null is treated as an empty string.- Since:
- 100.0.0
-
getType
public Stop.Type getType()
Gets the type that was set for this stop.- Returns:
- the stop's type. Default value is
Stop.Type.STOP
- Since:
- 100.1.0
-
setType
public void setType(Stop.Type type)
Sets the type for this stop.- Parameters:
type
- the stop's type- Since:
- 100.1.0
-
getRouteName
public java.lang.String getRouteName()
Gets the name of the route to which this Stop belongs.- Returns:
- the route name. Default value is an empty string
- Since:
- 100.0.0
-
setRouteName
public void setRouteName(java.lang.String routeName)
Sets the name of the route to which this Stop belongs. You can use this to group Stops into separate routes.- Parameters:
routeName
- route name. Null is treated as an empty string.- Since:
- 100.0.0
-
getCurbApproach
public CurbApproach getCurbApproach()
Gets theCurbApproach
that was set.- Returns:
- the curb approach. Default value is
CurbApproach.EITHER_SIDE
- Since:
- 100.0.0
-
setCurbApproach
public void setCurbApproach(CurbApproach curbApproach)
Sets the direction from which a vehicle may arrive at or depart from the stop. For example, a school bus must approach and depart a school from its door side so that students entering/exiting the bus will not have to cross the street.- Parameters:
curbApproach
- curb approach- Throws:
java.lang.IllegalArgumentException
- if curbApproach is null- Since:
- 100.0.0
-
getAddedCost
public double getAddedCost(java.lang.String attributeName)
Gets the added cost that was set for this Stop.- Parameters:
attributeName
- attribute name. It can be empty. Null is treated as an empty string.- Returns:
- the added cost. Returns 0 if it was not set.
- Since:
- 100.0.0
-
setAddedCost
public void setAddedCost(java.lang.String attributeName, double addedCost)
Sets the added cost for this Stop.- Parameters:
attributeName
- attribute name. It can be empty. Null is treated as an empty string.addedCost
- added cost- Since:
- 100.0.0
-
getNetworkLocation
public NetworkLocation getNetworkLocation()
Gets the Stop's location in the underlying transportation network.- Returns:
- the network location. Returns null by default
- Since:
- 100.0.0
-
setNetworkLocation
public void setNetworkLocation(NetworkLocation networkLocation)
Sets the Stop's location in the underlying transportation network.- Parameters:
networkLocation
- network location. It can't be null- Throws:
java.lang.IllegalArgumentException
- if networkLocation is null- Since:
- 100.0.0
-
getDistanceToNetworkLocation
public double getDistanceToNetworkLocation()
Gets the distance to network location in meters.- Returns:
- the distance to network location in meters. Returns NaN by default.
- Since:
- 100.0.0
-
getCurrentBearing
public double getCurrentBearing()
Gets the current bearing in degrees.- Returns:
- the current bearing in degrees. Returns Double.NaN by default
- Since:
- 100.0.0
- See Also:
setCurrentBearing(double)
-
setCurrentBearing
public void setCurrentBearing(double currentBearing)
Sets the current bearing in degrees.Current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN. Negative values will be subtracted from 360 (e.g. -15 => 345). Values greater than 360 will be have 360 subtracted from them (e.g. 385 => 25). For this property to be used, the bearing tolerance also has to be set.
- Parameters:
currentBearing
- current bearing in degrees- Since:
- 100.0.0
- See Also:
getCurrentBearing()
,getCurrentBearingTolerance()
,setCurrentBearingTolerance(double)
-
getCurrentBearingTolerance
public double getCurrentBearingTolerance()
Gets the current bearing tolerance in degrees.- Returns:
- the current bearing tolerance in degrees. Returns Double.NaN by default.
- Since:
- 100.0.0
- See Also:
setCurrentBearingTolerance(double)
-
setCurrentBearingTolerance
public void setCurrentBearingTolerance(double currentBearingTolerance)
Sets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.- Parameters:
currentBearingTolerance
- current bearing tolerance in degrees- Since:
- 100.0.0
- See Also:
getCurrentBearingTolerance()
-
getNavigationLatency
public double getNavigationLatency()
Gets the navigation latency in seconds.- Returns:
- the navigation latency in seconds. Returns Double.NaN by default
- Since:
- 100.0.0
-
setNavigationLatency
public void setNavigationLatency(double navigationLatency)
Sets the navigation latency in seconds.- Parameters:
navigationLatency
- navigation latency in seconds- Since:
- 100.0.0
-
getNavigationSpeed
public double getNavigationSpeed()
Gets the navigation speed in meters per second.- Returns:
- the navigation speed in meters per second. Returns Double.NaN by default
- Since:
- 100.0.0
-
setNavigationSpeed
public void setNavigationSpeed(double navigationSpeed)
Sets the navigation speed in meters per second.- Parameters:
navigationSpeed
- navigation speed in meters per second- Since:
- 100.0.0
-
getArrivalCurbApproach
public CurbApproach getArrivalCurbApproach()
Gets the direction from which a vehicle arrives at this stop.- Returns:
- the arrival curb approach. Returns
CurbApproach.UNKNOWN
by default - Since:
- 100.0.0
-
getDepartureCurbApproach
public CurbApproach getDepartureCurbApproach()
Gets the direction from which a vehicle departs from the stop.- Returns:
- the departure curb approach. Returns
CurbApproach.UNKNOWN
by default - Since:
- 100.0.0
-
getCumulativeCost
public double getCumulativeCost(java.lang.String attributeName)
Gets the cumulative cost. The valid set of attribute names can be obtained fromRouteTaskInfo.getCostAttributes()
.- Parameters:
attributeName
- attribute name- Returns:
- the cumulative cost
- Since:
- 100.0.0
-
getArrivalTime
public java.util.Calendar getArrivalTime()
Gets time of arrival at the stop.- Returns:
- the arrival time. Returns null by default
- Since:
- 100.0.0
-
getArrivalTimeShift
public double getArrivalTimeShift()
Gets shift for arrival time.- Returns:
- a value of time zone shift in minutes
- Since:
- 100.0.0
-
getDepartureTime
public java.util.Calendar getDepartureTime()
Gets time of departure from the stop.- Returns:
- the departure time. Returns null by default
- Since:
- 100.0.0
-
getDepartureTimeShift
public double getDepartureTimeShift()
Gets shift for departure time.- Returns:
- a value of time zone shift in minutes
- Since:
- 100.0.0
-
getTimeWindowStart
public java.util.Calendar getTimeWindowStart()
Gets the time window start that was set.- Returns:
- the time window start. Returns null if it was not set
- Since:
- 100.0.0
-
setTimeWindowStart
public void setTimeWindowStart(java.util.Calendar timeWindowStart)
Sets the beginning time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.- Parameters:
timeWindowStart
- time window start, Allows null value- Since:
- 100.0.0
-
getTimeWindowEnd
public java.util.Calendar getTimeWindowEnd()
Gets the time window end that was set.- Returns:
- the time window end. Returns null if it was not set
- Since:
- 100.0.0
-
setTimeWindowEnd
public void setTimeWindowEnd(java.util.Calendar timeWindowEnd)
Sets ending time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.- Parameters:
timeWindowEnd
- time window end, allows null value- Since:
- 100.0.0
-
getLocationStatus
public LocationStatus getLocationStatus()
Gets the location status.- Returns:
- the location status. Returns
LocationStatus.NOT_LOCATED
by default. - Since:
- 100.0.0
-
getGeometry
public Point getGeometry()
Gets the location the Stop should be placed on the map.- Returns:
- the location of this Stop on the map
- Since:
- 100.0.0
-
setGeometry
public void setGeometry(Point location)
Sets the location at which this Stop should be placed on the map.- Parameters:
location
- the location at which this Stop should be placed on the map- Throws:
java.lang.IllegalArgumentException
- if location is null- Since:
- 100.4.0
-
getSequence
public int getSequence()
Gets the order in which stop is visited along the route. A value of 1 implies it is the first stop, and so on.- Returns:
- the sequence. Returns 0 by default
- Since:
- 100.0.0
-
getStopId
public int getStopId()
Gets the stop ID.This is a caller supplied foreign key that can be used to associate output stops with input stops.
- Returns:
- the stop ID
- Since:
- 100.6.0
- See Also:
RouteParameters.setStops(Iterable)
,RouteParameters.setStops(ArcGISFeatureTable, QueryParameters)
,Route.getStops()
-
setStopId
public void setStopId(int stopId)
Sets the stop ID.This is a caller supplied foreign key that can be used to associate output stops with input stops.
- Parameters:
stopId
- the stop ID- Since:
- 100.6.0
- See Also:
RouteParameters.setStops(Iterable)
,RouteParameters.setStops(ArcGISFeatureTable, QueryParameters)
,Route.getStops()
-
getViolationTime
public double getViolationTime()
Gets the time (in minutes) by which the route arrives later than the permissible time window for the stop. This is the difference betweengetArrivalTime()
andgetTimeWindowEnd()
- Returns:
- the violation time. Returns 0 by default
- Since:
- 100.0.0
-
getWaitTime
public double getWaitTime()
Gets the time (in minutes) spent at the stop waiting for the time window to open when the route arrives early This is the difference betweengetArrivalTime()
andgetTimeWindowStart()
- Returns:
- the wait time. Returns 0 by default
- Since:
- 100.0.0
-
-