用optaplanner解决VRPMT问题的最佳实践是什么? [英] What is the best practice for solving VRPMT problem with optaplanner?

查看:139
本文介绍了用optaplanner解决VRPMT问题的最佳实践是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们当前的方法多次运行求解器.我想知道是否有更好的方法.

Our current approach is running solver many times. I am wondering if there is a better approach.

一些解释:

多行程车辆路线问题(VRPMT):车辆可以执行多条路线.

Vehicle Routing Problem with Multiple Trips (VRPMT): The vehicles can do more than one route.

推荐答案

以VRP示例为例,将Vehicle重命名为VehiclePerDay,然后在其上引入2个字段:车辆和LocalDate.假设每天一趟.

Take the VRP example, rename Vehicle to VehiclePerDay, then introduce 2 fields on it: the vehicle and the LocalDate. This is presuming one trip per day.

如果您在同一天进行多次旅行,则有2种方法:

If you do multiple trips on the same day, there are 2 approaches:

1)如上所述,将车辆分成VehicleTrip,并使其指向前一辆.因此,第二次行程是在同一辆车的第一次行程返回到仓库(加上装载时间)之后离开的

1) Split Vehicle into VehicleTrip as above and have them point at the previous one. So the second trip leaves when the first trip of the same vehicle returns back to the depot (plus loading time)

2)使用影子变量总和使用量,直到每次访问为止,并引入自动"返回到仓库的时刻. 基本上,如果一辆汽车的容量为10,并交付到5个地点(每个地点包含3件物品),则它看起来像这样:

2) Use shadow variable sum capacity usage until each visit and introduce "automatic" return back to depot moments. Basically, if a vehicle has a capacity of 10 and delivers to 5 locations with 3 items each, it looks like this:

  • 车辆A
    • 访问1:总容量需要3,@ ShadowVariable goBackToDepotFirst = false
    • 访问2:总容量需要6,@ ShadowVariable goBackToDepotFirst = false
    • 访问3:总容量需要9,@ ShadowVariable goBackToDepotFirst = false
    • 访问4:总容量需要3,@ ShadowVariable goBackToDepotFirst = true
    • 访问5:总容量需要6,@ ShadowVariable goBackToDepotFirst = false
    • Vehicle A
      • Visit 1: total capacity need 3, @ShadowVariable goBackToDepotFirst=false
      • Visit 2: total capacity need 6, @ShadowVariable goBackToDepotFirst=false
      • Visit 3: total capacity need 9, @ShadowVariable goBackToDepotFirst=false
      • Visit 4: total capacity need 3, @ShadowVariable goBackToDepotFirst=true
      • Visit 5: total capacity need 6, @ShadowVariable goBackToDepotFirst=false

      这篇关于用optaplanner解决VRPMT问题的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆