| Modifier and Type | Field and Description |
|---|---|
protected TimeWindowsImpl |
deliveryTimeWindows |
| Modifier and Type | Method and Description |
|---|---|
Shipment.Builder |
addDeliveryTimeWindow(double earliest,
double latest) |
Shipment.Builder |
addDeliveryTimeWindow(TimeWindow timeWindow) |
Shipment.Builder |
addPickupTimeWindow(double earliest,
double latest) |
Shipment.Builder |
addPickupTimeWindow(TimeWindow timeWindow) |
Shipment.Builder |
addRequiredSkill(String skill) |
Shipment.Builder |
addSizeDimension(int dimensionIndex,
int dimensionValue)
Adds capacity dimension.
|
Shipment |
build()
Builds the shipment.
|
static Shipment.Builder |
newInstance(String id)
Returns new instance of this builder.
|
Shipment.Builder |
setDeliveryLocation(Location deliveryLocation)
Sets delivery location.
|
Shipment.Builder |
setDeliveryServiceTime(double deliveryServiceTime)
Sets the delivery service-time.
|
Shipment.Builder |
setDeliveryTimeWindow(TimeWindow timeWindow)
Sets the timeWindow for the delivery, i.e.
|
Shipment.Builder |
setName(String name) |
Shipment.Builder |
setPickupLocation(Location pickupLocation)
Sets pickup location.
|
Shipment.Builder |
setPickupServiceTime(double serviceTime)
Sets pickupServiceTime.
|
Shipment.Builder |
setPickupTimeWindow(TimeWindow timeWindow)
Sets the timeWindow for the pickup, i.e.
|
Shipment.Builder |
setPriority(int priority)
Set priority to shipment.
|
protected TimeWindowsImpl deliveryTimeWindows
public static Shipment.Builder newInstance(String id)
id - the id of the shipment which must be a unique identifier among all jobspublic Shipment.Builder setPickupLocation(Location pickupLocation)
pickupLocation - pickup locationpublic Shipment.Builder setPickupServiceTime(double serviceTime)
ServiceTime is intended to be the time the implied activity takes at the pickup-location.
serviceTime - the service time / duration the pickup of the associated shipment takesIllegalArgumentException - if servicTime < 0.0public Shipment.Builder setPickupTimeWindow(TimeWindow timeWindow)
By default timeWindow is [0.0, Double.MAX_VALUE}
timeWindow - the time window within the pickup operation/activity can STARTIllegalArgumentException - if timeWindow is nullpublic Shipment.Builder setDeliveryLocation(Location deliveryLocation)
deliveryLocation - delivery locationpublic Shipment.Builder setDeliveryServiceTime(double deliveryServiceTime)
ServiceTime is intended to be the time the implied activity takes at the delivery-location.
deliveryServiceTime - the service time / duration of shipment's deliveryIllegalArgumentException - if serviceTime < 0.0public Shipment.Builder setDeliveryTimeWindow(TimeWindow timeWindow)
By default timeWindow is [0.0, Double.MAX_VALUE}
timeWindow - the time window within the associated delivery is allowed to STARTIllegalArgumentException - if timeWindow is nullpublic Shipment.Builder addSizeDimension(int dimensionIndex, int dimensionValue)
dimensionIndex - the dimension index of the corresponding capacity valuedimensionValue - the capacity valueIllegalArgumentException - if dimVal < 0public Shipment build()
IllegalArgumentException - if neither pickup-location nor pickup-coord is set or if neither delivery-location nor delivery-coord
is setpublic Shipment.Builder addRequiredSkill(String skill)
public Shipment.Builder setName(String name)
public Shipment.Builder addDeliveryTimeWindow(TimeWindow timeWindow)
public Shipment.Builder addDeliveryTimeWindow(double earliest, double latest)
public Shipment.Builder addPickupTimeWindow(TimeWindow timeWindow)
public Shipment.Builder addPickupTimeWindow(double earliest, double latest)
public Shipment.Builder setPriority(int priority)
Default is 2 = medium.
priority - Copyright © 2013–2016. All rights reserved.