public class Shipment extends AbstractJob
It distinguishes itself from Service as two locations are involved a pickup where usually
something is loaded to the transport unit and a delivery where something is unloaded.
By default serviceTimes of both pickup and delivery is 0.0 and timeWindows of both is [0.0, Double.MAX_VALUE],
A shipment can be built with a builder. You can get an instance of the builder by coding Shipment.Builder.newInstance(...).
This way you can specify the shipment. Once you build the shipment, it is immutable, i.e. fields/attributes cannot be changed anymore and
you can only 'get' the specified values.
Note that two shipments are equal if they have the same id.
| Modifier and Type | Class and Description |
|---|---|
static class |
Shipment.Builder
Builder that builds the shipment.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Two shipments are equal if they have the same id.
|
List<Activity> |
getActivities() |
Location |
getDeliveryLocation() |
double |
getDeliveryServiceTime()
Returns service-time of delivery.
|
TimeWindow |
getDeliveryTimeWindow()
Returns the time-window of delivery.
|
Collection<TimeWindow> |
getDeliveryTimeWindows() |
String |
getId()
Returns the unique identifier (id) of a job.
|
double |
getMaxTimeInVehicle() |
String |
getName()
Returns name.
|
Location |
getPickupLocation() |
double |
getPickupServiceTime()
Returns the pickup service-time.
|
TimeWindow |
getPickupTimeWindow()
Returns the time-window of pickup.
|
Collection<TimeWindow> |
getPickupTimeWindows() |
int |
getPriority()
Get priority of shipment.
|
Skills |
getRequiredSkills() |
Capacity |
getSize()
Returns size, i.e.
|
int |
hashCode() |
String |
toString()
Returns a string with the shipment's attributes.
|
getIndex, getUserData, setIndex, setUserDatapublic String getId()
Jobpublic Location getPickupLocation()
public double getPickupServiceTime()
By default service-time is 0.0.
public Location getDeliveryLocation()
public double getDeliveryServiceTime()
public TimeWindow getDeliveryTimeWindow()
public Collection<TimeWindow> getDeliveryTimeWindows()
public TimeWindow getPickupTimeWindow()
public Collection<TimeWindow> getPickupTimeWindows()
public String toString()
String is built as follows: [attr1=val1][attr2=val2]...
public boolean equals(Object obj)
public Capacity getSize()
Jobpublic Skills getRequiredSkills()
public int getPriority()
Default is 2.
public double getMaxTimeInVehicle()
Copyright © 2013–2024. All rights reserved.