0

setTimeWindow(new TimeWindow(start_time, end_time))

用于为任务/装运添加时间限制。但我想要一个完整的例子。有没有关于限时发货的jsprit的完整示例?

4

1 回答 1

2

您可以通过以下方式设置货件的取件和交货时间窗口:

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();

于 2016-01-29T14:16:23.130 回答