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:
Standstill
public class TimeWindowedCustomer extends Customer
-
-
Field Summary
-
Fields inherited from class org.optaplanner.examples.vehiclerouting.domain.Customer
demand, location, nextCustomer, previousStandstill, vehicle
-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
-
-
Constructor Summary
Constructors Constructor Description TimeWindowedCustomer()TimeWindowedCustomer(long id, Location location, int demand, long readyTime, long dueTime, long serviceDuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetArrivalTime()LonggetDepartureTime()longgetDueTime()TimeWindowedCustomergetNextCustomer()longgetReadyTime()longgetServiceDuration()longgetTimeWindowGapTo(TimeWindowedCustomer other)booleanisArrivalAfterDueTime()booleanisArrivalBeforeReadyTime()voidsetArrivalTime(Long arrivalTime)voidsetDueTime(long dueTime)voidsetReadyTime(long readyTime)voidsetServiceDuration(long serviceDuration)-
Methods inherited from class org.optaplanner.examples.vehiclerouting.domain.Customer
getDemand, getDistanceFrom, getDistanceFromPreviousStandstill, getDistanceTo, getLocation, getPreviousStandstill, getVehicle, setDemand, setLocation, setNextCustomer, setPreviousStandstill, setVehicle, toString
-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
-
-
-
Constructor Detail
-
TimeWindowedCustomer
public TimeWindowedCustomer()
-
TimeWindowedCustomer
public TimeWindowedCustomer(long id, Location location, int demand, long readyTime, long dueTime, long serviceDuration)
-
-
Method Detail
-
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
public Long getArrivalTime()
- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
setArrivalTime
public void setArrivalTime(Long arrivalTime)
-
getDepartureTime
public Long 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()
-
getNextCustomer
public TimeWindowedCustomer getNextCustomer()
- Specified by:
getNextCustomerin interfaceStandstill- Overrides:
getNextCustomerin classCustomer- Returns:
- sometimes null
-
getTimeWindowGapTo
public long getTimeWindowGapTo(TimeWindowedCustomer other)
- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
-