Class PlanningVisitFactory
- java.lang.Object
-
- org.optaweb.vehiclerouting.plugin.planner.domain.PlanningVisitFactory
-
public class PlanningVisitFactory extends Object
CreatesPlanningVisitinstances.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intDEFAULT_VISIT_DEMAND
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlanningVisitfromLocation(PlanningLocation location)Create visit withDEFAULT_VISIT_DEMAND.static PlanningVisitfromLocation(PlanningLocation location, int demand)Create visit of a location with the given demand.static PlanningVisittestVisit(long id)Create a test visit with the given ID.
-
-
-
Field Detail
-
DEFAULT_VISIT_DEMAND
static final int DEFAULT_VISIT_DEMAND
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromLocation
public static PlanningVisit fromLocation(PlanningLocation location)
Create visit withDEFAULT_VISIT_DEMAND.- Parameters:
location- visit's location- Returns:
- new visit with the default demand
-
fromLocation
public static PlanningVisit fromLocation(PlanningLocation location, int demand)
Create visit of a location with the given demand.- Parameters:
location- visit's locationdemand- visit's demand- Returns:
- visit with demand at the given location
-
testVisit
public static PlanningVisit testVisit(long id)
Create a test visit with the given ID.- Parameters:
id- ID of the visit and its location- Returns:
- visit with an ID only
-
-