public class HubSegmentLocation extends Location
RoadSegmentLocation
.
Used with DistanceType.SEGMENTED_ROAD_DISTANCE
.Modifier and Type | Field and Description |
---|---|
protected Map<HubSegmentLocation,Double> |
hubTravelDistanceMap |
protected Map<RoadSegmentLocation,Double> |
nearbyTravelDistanceMap |
latitude, longitude, name
id
Constructor and Description |
---|
HubSegmentLocation() |
HubSegmentLocation(long id,
double latitude,
double longitude) |
Modifier and Type | Method and Description |
---|---|
double |
getDistanceDouble(RoadSegmentLocation location) |
long |
getDistanceTo(Location location)
The distance's unit of measurement depends on the
VehicleRoutingSolution 's DistanceType . |
Map<HubSegmentLocation,Double> |
getHubTravelDistanceMap() |
Map<RoadSegmentLocation,Double> |
getNearbyTravelDistanceMap() |
protected double |
getShortestDistanceDoubleThroughOtherHub(RoadSegmentLocation location) |
void |
setHubTravelDistanceMap(Map<HubSegmentLocation,Double> hubTravelDistanceMap) |
void |
setNearbyTravelDistanceMap(Map<RoadSegmentLocation,Double> nearbyTravelDistanceMap) |
getAirDistanceDoubleTo, getAngle, getLatitude, getLongitude, getName, setLatitude, setLongitude, setName, toString
compareTo, getId, setId
protected Map<RoadSegmentLocation,Double> nearbyTravelDistanceMap
protected Map<HubSegmentLocation,Double> hubTravelDistanceMap
public HubSegmentLocation()
public HubSegmentLocation(long id, double latitude, double longitude)
public Map<RoadSegmentLocation,Double> getNearbyTravelDistanceMap()
public void setNearbyTravelDistanceMap(Map<RoadSegmentLocation,Double> nearbyTravelDistanceMap)
public Map<HubSegmentLocation,Double> getHubTravelDistanceMap()
public void setHubTravelDistanceMap(Map<HubSegmentLocation,Double> hubTravelDistanceMap)
public long getDistanceTo(Location location)
Location
VehicleRoutingSolution
's DistanceType
.
It can be in miles or km, but for most cases it's in the TSPLIB's unit of measurement.getDistanceTo
in class Location
location
- never nullpublic double getDistanceDouble(RoadSegmentLocation location)
protected double getShortestDistanceDoubleThroughOtherHub(RoadSegmentLocation location)
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.