ClosestFacilityParameters
which is used as an input
to ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
.- Since:
- 100.1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAddedCost
(String attributeName) Gets the added cost that was set for this incident.Gets theCurbApproach
that was set.double
Gets the current bearing in degrees, measured clockwise from true north.double
Gets the current bearing tolerance in degrees.double
Gets the distance to the network location in meters.Gets the location the incident should be placed on the map.double
Gets the impedance cutoff.int
Gets the incident ID.Gets the location status.getName()
Gets the name that was set for this incident.double
Gets the navigation latency in seconds.double
Gets the navigation speed in meters per second.Network location.int
Gets the target facility count.void
setAddedCost
(String attributeName, double addedCost) Sets the added cost for this incident.void
setCurbApproach
(CurbApproach curbApproach) Sets the direction from which a vehicle may arrive at or depart from the incident.void
setCurrentBearing
(double currentBearing) Sets the current bearing in degrees, measured clockwise from true north.void
setCurrentBearingTolerance
(double currentBearingTolerance) Sets the current bearing tolerance in degrees.void
setImpedanceCutoff
(double impedanceCutoff) Sets the impedance cutoff.void
setIncidentId
(int incidentId) Sets the incident ID.void
Sets the name for this incident.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) Network location.void
setTargetFacilityCount
(int targetFacilityCount) Sets the target facility count.
-
Constructor Details
-
Incident
Creates an instance of incident.- Parameters:
point
- location of the incident- Throws:
IllegalArgumentException
- if point is null- Since:
- 100.1.0
-
-
Method Details
-
getName
Gets the name that was set for this incident.- Returns:
- the name of incident. Default value is an empty string
- Since:
- 100.1.0
-
setName
Sets the name for this incident.- Parameters:
name
- incident's name. Null is treated as an empty string- Since:
- 100.1.0
-
getCurbApproach
Gets theCurbApproach
that was set.- Returns:
- the curb approach. Default value is
CurbApproach.EITHER_SIDE
- Since:
- 100.1.0
-
setCurbApproach
Sets the direction from which a vehicle may arrive at or depart from the incident.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:
IllegalArgumentException
- if curbApproach is null- Since:
- 100.1.0
-
getTargetFacilityCount
public int getTargetFacilityCount()Gets the target facility count.Specifies the number of facilities that need to be found for the incident. A value that equals to -1 means that the target facility count property is not considered, but the default is used instead. The default value can be obtained from
ClosestFacilityTaskInfo.getDefaultTargetFacilityCount()
. If target facility count is less than -1 thenClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
will fail to solve the closest facilities.- Returns:
- the target facility count. The default value is -1
- Since:
- 100.1.0
- See Also:
-
setTargetFacilityCount
public void setTargetFacilityCount(int targetFacilityCount) Sets the target facility count.Specifies the number of facilities that need to be found for the incident. A value that equals to -1 means that the target facility count property is not considered, but the default is used instead. The default value can be obtained from
ClosestFacilityTaskInfo.getDefaultTargetFacilityCount()
. If target facility count is less than -1 thenClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
will fail to solve the closest facilities.- Parameters:
targetFacilityCount
- target facility count- Since:
- 100.1.0
- See Also:
-
getNetworkLocation
Network location.The incident's location on the network that can be populated by closest facility task.
- Returns:
- network location, or null if none
- Since:
- 100.1.0
- See Also:
-
setNetworkLocation
Network location.The incident's location on the network that can be populated by closest facility task. Set to null for resetting a network location.
- Parameters:
networkLocation
- network location- Since:
- 100.1.0
- See Also:
-
getImpedanceCutoff
public double getImpedanceCutoff()Gets the impedance cutoff.For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the
TravelMode.getImpedanceAttributeName()
. For example, ifTravelMode.getImpedanceAttributeName()
is TravelTime, the defaultImpedanceCutoff is specified in minutes.- Returns:
- impedance cutoff. Returns Double.NaN by default
- Since:
- 100.1.0
- See Also:
-
setImpedanceCutoff
public void setImpedanceCutoff(double impedanceCutoff) Sets the impedance cutoff. Double.NaN by default.For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the
TravelMode.getImpedanceAttributeName()
. For example, ifTravelMode.getImpedanceAttributeName()
is TravelTime, the defaultImpedanceCutoff is specified in minutes.- Parameters:
impedanceCutoff
- impedance cutoff- Since:
- 100.1.0
- See Also:
-
getIncidentId
public int getIncidentId()Gets the incident ID.This is a caller supplied foreign key that can be used to associate output incidents with input incidents.
- Returns:
- the incident ID
- Since:
- 100.6.0
- See Also:
-
setIncidentId
public void setIncidentId(int incidentId) Sets the incident ID.This is a caller supplied foreign key that can be used to associate output incidents with input incidents.
- Parameters:
incidentId
- the incident ID- Since:
- 100.6.0
- See Also:
-
getDistanceToNetworkLocation
public double getDistanceToNetworkLocation()Gets the distance to the network location in meters.- Returns:
- the distance to the network location in meters. Returns NaN by default
- Since:
- 100.1.0
-
getLocationStatus
Gets the location status.- Returns:
- the location status. Returns
LocationStatus.NOT_LOCATED
by default - Since:
- 100.1.0
-
getGeometry
Gets the location the incident should be placed on the map.- Returns:
- a map point representing the location of the incident
- Since:
- 100.1.0
-
getAddedCost
Gets the added cost that was set for this incident.- 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.1.0
-
setAddedCost
Sets the added cost for this incident.- Parameters:
attributeName
- attribute name. It can be empty. Null is treated as an empty stringaddedCost
- added cost- Since:
- 100.1.0
-
getCurrentBearing
public double getCurrentBearing()Gets the current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN, negative values will have 360 added to them (e.g.-15 => 345
), values greater than 360 will have 360 subtracted from them (e.g.385 => 25
). For this property to be used the bearing tolerance also has to be set.- Returns:
- the current bearing
- Since:
- 100.7.0
-
setCurrentBearing
public void setCurrentBearing(double currentBearing) Sets the current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN, negative values will have 360 added to them (e.g.-15 => 345
), values greater than 360 will 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
- the new value for current bearing- Since:
- 100.7.0
-
getCurrentBearingTolerance
public double getCurrentBearingTolerance()Gets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.- Returns:
- the current bearing tolerance
- Since:
- 100.7.0
-
setCurrentBearingTolerance
public void setCurrentBearingTolerance(double currentBearingTolerance) Sets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.- Parameters:
currentBearingTolerance
- the new value for current bearing tolerance- Throws:
IllegalArgumentException
- if currentBearingTolerance is out of range- Since:
- 100.7.0
-