optaplanner cvrptwpd:是否可以根据旅游状态具有可变的服务持续时间?
我目前正在研究OptaPlanner来解决CVRPTWPD(随时间窗口以及接送和交付的电容车辆路由问题)。在每个位置,我必须执行需要时间的服务(装载或卸货)。
我想将仓库建模为 n 位置(如果有 n 客户位置),因此每个客户位置都有相应的仓库位置,用于拾取和交付的建模。
我面对的问题是:
如果车辆在仓库开始,我不想花任何时间来考虑加载或卸货(模拟早上已经装有计划货物的运输机),但是如果车辆返回仓库(在此中,案例一个或多个n个仓库位置)以捡起其他货物,然后再次离开仓库(这意味着下一个位置是客户位置),我想花时间加载和卸载。
我的问题是:
在优化运行时间期间,OptaPlanner是否有可能具有可变的服务持续时间?我会添加一个检查器,该检查器在游览状态下是否在此索引之前计划了一个客户位置,并在这种情况下添加服务持续时间,因为这意味着客户停止已经访问过,并且运输者正在返回仓库(因此需要服务时间)。
我希望我清楚地描述了一切。感谢您的帮助!
I'm currently looking into Optaplanner to solve a CVRPTWPD (Capacitated vehicle routing problem with time windows and pickup and delivery). At each location I have to perform a service (loading or unloading of shipments) which takes time.
I want to model the depot as n locations (if there are n customer locations), so each customer location has corresponding depot location for the modelling of pickup and delivery.
The problem I face is the following:
If the vehicle starts at the depot, I do not want to take any time for loading or unloading into account (simulating that the transporter is already loaded with the planned shipments in the morning), but if the vehicle returns to the depot (in this case one or more of the n depot locations) to pick up additional shipments and leaves the depot again afterwards (meaning the next location is a customer location), I want to take the time for loading and unloading into account.
My question is the following:
Is it possible for Optaplanner to have variable service duration during optimization run time? I would add a checker which check whether before the index of the depot location in the state of the tour there is a customer location planned before this index and add service duration in this case, because this means that a customer stop was already visited and the transporter is returning to the depot (and therefore service time is needed).
I hope I described everything clearly. Thank you for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,你可以。如果您查看TSP或VRP示例,您会注意到仓库和客户是另一种类型,但它们共享相同的界面。这使他们可以将其束缚在一起以形成一条路线。
为了允许可变的服务持续时间,您要做的就是检查计划实体的类型和先前的计划实体,以查看它是否是第一个仓库。
Yes, you can. If you look into the TSP or VRP example, you'd note that a Depot and Customer are a different type, but they share the same interface. This allows them to be chained together to form a route.
To allow for variable service duration, all you have to do is to check the type of the planning entity and the previous planning entity to see if it is the first depot or not.