In a real-world scenario, there might be a case when process of delivery was significantly delayed (for example, driver’s vehicle malfunctioned). Despite having specified hard delivery time windows, Shipments have to be delivered any way.
First, I tried to make sure that driver stays on route until all shipments are delivered by removing latestArrival time:
vehicleBuilder1.setEarliestStart(curVehicle.shift_start);
//.setLatestArrival(curVehicle.shift_end);
Then, I’ve considered setting delivery time window end to be large value (year 2038, or smth):
double deliveryStart = Double.parseDouble(res_shipment.delivery_start);
double deliveryFinish = 2147483647;
…
ShipmentBuilder.setDeliveryTimeWindow(TimeWindow.newInstance(deliveryStart, deliveryFinish))
Is this a decent approach to ensure that everything will be delivered, even if driver will arrive too late?