Class TimeWindowedCustomer
- java.lang.Object
-
- org.optaplanner.examples.common.domain.AbstractPersistableJackson
-
- org.optaplanner.examples.vehiclerouting.domain.Customer
-
- org.optaplanner.examples.vehiclerouting.domain.timewindowed.TimeWindowedCustomer
-
public class TimeWindowedCustomer extends Customer
-
-
Field Summary
-
Fields inherited from class org.optaplanner.examples.vehiclerouting.domain.Customer
demand, location, nextCustomer, previousCustomer, vehicle
-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistableJackson
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()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, getDistanceFromPreviousStandstill, getDistanceToDepot, getLocation, getNextCustomer, getPreviousCustomer, getVehicle, setDemand, setLocation, setNextCustomer, setPreviousCustomer, setVehicle, toString
-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistableJackson
getId
-
-
-
-
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()
-
getTimeWindowGapTo
public long getTimeWindowGapTo(TimeWindowedCustomer other)
- Returns:
- a positive number, the time multiplied by 1000 to avoid floating point arithmetic rounding errors
-
-