文件名称:vrp
- 所属分类:
- matlab例程
- 资源属性:
- 上传时间:
- 2018-04-16
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- henry******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
首先实现一个ant蚂蚁类,用此蚂蚁类实现搜索。
算法按照tsp问题去解决,但是在最后计算路径的时候有区别。
比如有10个城市,城市1是配送站,蚂蚁搜索的得到的路径是1,3,5,9,4,10,2,6,8,7。
计算路径的时候把城市依次放入派送线路中,
每放入一个城市前,检查该城市放入后是否会超过车辆最大载重
如果没有超过就放入
如果超过,就重新开始一条派送路线
……
直到最后一个城市放完
就会得到多条派送路线
这样处理比较简单可以把vrp问题转为tsp问题求解
但是实际效果还需要验证。(First, we implement a ant ant class, and use this ant class to search.
The algorithm is solved according to the TSP problem, but there are differences when calculating the path at last.
For example, there are 10 cities, 1 of cities are distribution stations, and the path of ants search is 1,3,5,9,4,10,2,6,8,7.
When calculating the path, put the city into the delivery line in turn.
Before placing a city, check whether the city will exceed the maximum vehicle load after putting it into the city.
If it's not over, put it in
If it's over, start a new route.
......
Until the last city is finished
There will be multiple delivery routes
This process is relatively simple and can transform the VRP problem into TSP problem solving.
But the actual effect needs to be verified.)
算法按照tsp问题去解决,但是在最后计算路径的时候有区别。
比如有10个城市,城市1是配送站,蚂蚁搜索的得到的路径是1,3,5,9,4,10,2,6,8,7。
计算路径的时候把城市依次放入派送线路中,
每放入一个城市前,检查该城市放入后是否会超过车辆最大载重
如果没有超过就放入
如果超过,就重新开始一条派送路线
……
直到最后一个城市放完
就会得到多条派送路线
这样处理比较简单可以把vrp问题转为tsp问题求解
但是实际效果还需要验证。(First, we implement a ant ant class, and use this ant class to search.
The algorithm is solved according to the TSP problem, but there are differences when calculating the path at last.
For example, there are 10 cities, 1 of cities are distribution stations, and the path of ants search is 1,3,5,9,4,10,2,6,8,7.
When calculating the path, put the city into the delivery line in turn.
Before placing a city, check whether the city will exceed the maximum vehicle load after putting it into the city.
If it's not over, put it in
If it's over, start a new route.
......
Until the last city is finished
There will be multiple delivery routes
This process is relatively simple and can transform the VRP problem into TSP problem solving.
But the actual effect needs to be verified.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
vrp.m | 5824 | 2017-05-14 |