setTimeWindow(new TimeWindow(start_time, end_time))
用于为任务/装运添加时间限制。但我想有一个完整的例子。 jsprit on time bound 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();
关于algorithm - 如何在jsprit中添加时间限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35080600/