setTimeWindow(new TimeWindow(start_time, end_time))
用于为任务/装运添加时间限制。但我想有一个完整的例子。有没有完整的jsprit关于限时发货的例子?
您可以通过以下方式设置货件的取件和交货时间窗口:
Shipment shipment = Shipment.Builder.newInstance("1")
.addSizeDimension(0,1)
.setPickupLocation(Location.newInstance(5,7))
.setPickupTimeWindow(TimeWindow.newInstance(0,1200))
.setDeliveryLocation(Location.newInstance(6,9))
.setDeliveryTimeWindow(TimeWindow.newInstance(2000,4000))
.build();