Class TimeWindowedCustomer
java.lang.Object
org.optaplanner.examples.common.domain.AbstractPersistable
org.optaplanner.examples.vehiclerouting.domain.Customer
org.optaplanner.examples.vehiclerouting.domain.timewindowed.TimeWindowedCustomer
- All Implemented Interfaces:
LocationAware
-
Field Summary
Fields inherited from class org.optaplanner.examples.vehiclerouting.domain.Customer
demand, location, nextCustomer, previousCustomer, vehicleFields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id -
Constructor Summary
ConstructorsConstructorDescriptionTimeWindowedCustomer(long id, Location location, int demand, long readyTime, long dueTime, long serviceDuration) -
Method Summary
Modifier and TypeMethodDescriptionlonglonglonglongbooleanbooleanvoidsetArrivalTime(Long arrivalTime) voidsetDueTime(long dueTime) voidsetReadyTime(long readyTime) voidsetServiceDuration(long serviceDuration) Methods inherited from class org.optaplanner.examples.vehiclerouting.domain.Customer
getDemand, getDistanceFromPreviousStandstill, getDistanceToDepot, getLocation, getNextCustomer, getPreviousCustomer, getVehicle, setDemand, setLocation, setNextCustomer, setPreviousCustomer, setVehicle, toStringMethods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
Constructor Details
-
TimeWindowedCustomer
public TimeWindowedCustomer() -
TimeWindowedCustomer
public TimeWindowedCustomer(long id, Location location, int demand, long readyTime, long dueTime, long serviceDuration)
-
-
Method Details
-
getReadyTime
public long getReadyTime()- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
setReadyTime
public void setReadyTime(long readyTime) -
getDueTime
public long getDueTime()- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
setDueTime
public void setDueTime(long dueTime) -
getServiceDuration
public long getServiceDuration()- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
setServiceDuration
public void setServiceDuration(long serviceDuration) -
getArrivalTime
- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
setArrivalTime
-
getDepartureTime
- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
isArrivalBeforeReadyTime
public boolean isArrivalBeforeReadyTime() -
isArrivalAfterDueTime
public boolean isArrivalAfterDueTime() -
getTimeWindowGapTo
- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-