在optaplanner中获得更少的解决方案和更多的机会 [英] getting fewer solutions with more opportunities in optaplanner

查看:78
本文介绍了在optaplanner中获得更少的解决方案和更多的机会的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计划变量是可以由单个车辆执行的4条车辆行驶(路线)的组合.各个运行是计划实体.目标是找到车辆在该路线上进行所有行驶的最大满载路线数.运行只能与一条路线关联.严格的约束条件可以确保某条跑道在包含该特定路线的路线上着陆.

My planning variable is combinations of 4 vehicle runs (routes) that can be performed by a single vehicle. The individual runs are the planning entity. The goal is to find the maximum number of fully loaded routes where a vehicle performs all runs on the route. A run can only be associated with a single route. A hard constraints ensures that a run lands on a route that includes the particular run.

我的问题是,当使用较少数量的路由(300)时,我似乎得到了一个合理的解决方案,但是当路由数量增加到30,000时,路由数量就会减少而不是增加.它应该增加,因为存在更多的可能性.

My issue is that it appears that I get a reasonable solution when using a smaller number of routes (300), but when the number routes increases to 30,000 the number of routes decreases instead of increasing. It should increase because there are significantly more possibilities.

为了得分,我将与跑步相关的路线的数量减至最少,从而在最少路线上最大化了跑步的数量.其他分数可最大程度地减少/平衡路线松弛和旅行时间-这条规则在其他地方对我有用.我正在使用默认移动和交换.

For scoring, I’m minimizing the number routes associated with runs, thus maximizing the number of runs on fewest number of routes. Other scores minimize/balance route slack and travel times - this rule worked for me elsewhere. I'm using default move and swap.

推荐答案

一旦您的客户超过1万,正常的VRP实施将无法实现.例如,要在RAM内存中保持20K客户之间的真实距离,您需要一个二维数组,该数组包含长度为20K和20K的32位整数.总计将近2GB RAM.而且它不是线性扩展的.

Once you go above 10K customers, a normal VRP implementation won't do. For example, to keep the real distances between 20K customers in RAM memory, you 'd need a 2 dimensional array of 32 bit integers of lengths 20K and 20K. That amounts to almost 2GB RAM. And it doesn't scale linearly.

在美国的VRP中,将波士顿连接到圣地亚哥可能没用.因此性能也是有问题的.

And in a USA VRP, it's probably useless to connect Boston to San Diego. So performance is problematic too.

由于这个原因,我将在OptaPlanner 6.2中添加一个有10万个客户的示例(即将推出),并通过限制波士顿连接到其附近的城市来解决该问题(这比这要复杂一些,但这就是要点).如果您在接下来的几周内需要一些帮助,建议您参考推荐页.请注意,我的方法将与地理围栏有所不同,并且尚无证据表明哪种方法更好(但我相信我的方法当然会更好).

For this reason, I am going to add an example with 100K customers in OptaPlanner 6.2 (coming soon), and solve it by limiting Boston to connect to the cities near it (it's a bit more complex than that, but that's the gist of it). If you need something in the next couple of weeks, I suggest to look into the geo-fencing approach as described in the article on the testimonial page. Note that my approach will be somewhat different than geo-fencing and there's no proof yet which is better (but I believe mine is of course ;).

这篇关于在optaplanner中获得更少的解决方案和更多的机会的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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