public class RoadSegmentLocation extends Location
RoadLocation
,
but for high scale problems to avoid the memory issue of keeping the entire cost matrix in memory.
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 |
---|
RoadSegmentLocation() |
RoadSegmentLocation(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 |
getShortestDistanceDoubleThroughHubs(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 RoadSegmentLocation()
public RoadSegmentLocation(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 getShortestDistanceDoubleThroughHubs(RoadSegmentLocation location)
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.