Optaplanner - availability of Vehicles

蓝咒 提交于 2019-12-06 07:24:40

This following should work:

  • add 2 fields (start and end) on (TimeWindowed)Vehicle
  • in ArrivalTimeUpdatingVariableListener use at least the vehicle's start time before it leaves a depot
  • add a hard constraint that the vehicle should be back at the depot by it's end time. Make sure to penalize not just -1, but instead, minus the amount of time it's overdue (to avoid a score trap, see docs).
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!