Class PlanningLocationFactory
- java.lang.Object
-
- org.optaweb.vehiclerouting.plugin.planner.domain.PlanningLocationFactory
-
public class PlanningLocationFactory extends Object
CreatesPlanningLocations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlanningLocationfromDomain(Location location)Create planning location without a distance map.static PlanningLocationfromDomain(Location location, DistanceMap distanceMap)Create planning location from a domain location and a distance map.static PlanningLocationtestLocation(long id)Create test location without distance map and coordinates.static PlanningLocationtestLocation(long id, DistanceMap distanceMap)Create test location with distance map and without coordinates.
-
-
-
Method Detail
-
fromDomain
public static PlanningLocation fromDomain(Location location)
Create planning location without a distance map. This location cannot be used for planning but can be used for a problem fact change to remove a visit.- Parameters:
location- domain location- Returns:
- planning location without distance map
-
fromDomain
public static PlanningLocation fromDomain(Location location, DistanceMap distanceMap)
Create planning location from a domain location and a distance map.- Parameters:
location- domain locationdistanceMap- distance map of this planning location- Returns:
- planning location
-
testLocation
public static PlanningLocation testLocation(long id)
Create test location without distance map and coordinates. Coordinates will be initialized to zero.- Parameters:
id- location ID- Returns:
- planning location without distance map and coordinates
-
testLocation
public static PlanningLocation testLocation(long id, DistanceMap distanceMap)
Create test location with distance map and without coordinates. Coordinates will be initialized to zero.- Parameters:
id- location IDdistanceMap- distance map- Returns:
- planning location with distance map and without coordinates
-
-