资源简介
使用模拟退火算法解决带时间窗的车辆路径问题,matlab代码

代码片段和文件信息
%
% Copyright (c) 2015 Yarpiz (www.yarpiz.com)
% All rights reserved. Please read the “license.txt“ for license terms.
%
% Project Code: YPAP108
% Project title: Solving Vehicle Routing Problem using Simulated Annealing
% Publisher: Yarpiz (www.yarpiz.com)
%
% Developer: S. Mostapha Kalami Heris (Member of Yarpiz Team)
%
% Contact Info: sm.kalami@gmail.com info@yarpiz.com
%
function qnew=CreateNeighbor(q)
m=randi([1 3]);
switch m
case 1
% Do Swap
qnew=Swap(q);
case 2
% Do Reversion
qnew=Reversion(q);
case 3
% Do Insertion
qnew=Insertion(q);
end
end
function qnew=Swap(q)
n=numel(q);
i=randsample(n2);
i1=i(1);
i2=i(2);
qnew=q;
qnew([i1 i2])=q([i2 i1]);
end
function qnew=Reversion(q)
n=numel(q);
i=randsample(n2);
i1=min(i(1)i(2));
i2=max(i(1)i(2));
qnew=q;
qnew(i1:i2)=q(i2:-1:i1);
end
function qnew=Insertion(q)
n=numel(q);
i=randsample(n2);
i1=i(1);
i2=i(2);
if i1 qnew=[q(1:i1-1) q(i1+1:i2) q(i1) q(i2+1:end)];
else
qnew=[q(1:i2) q(i1) q(i2+1:i1-1) q(i1+1:end)];
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-09-21 04:41 YPAP108 Vehicle Routing Problem\
文件 1350 2015-08-23 04:39 YPAP108 Vehicle Routing Problem\license.txt
目录 0 2015-09-21 04:41 YPAP108 Vehicle Routing Problem\VRP using SA\
文件 1346 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\CreateNeighbor.m
文件 1655 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\CreateRandomModel.m
文件 504 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\CreateRandomSolution.m
文件 1350 2015-08-23 04:39 YPAP108 Vehicle Routing Problem\VRP using SA\license.txt
文件 400 2015-09-21 04:39 YPAP108 Vehicle Routing Problem\VRP using SA\main.m
文件 599 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\MyCost.m
文件 1293 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\ParseSolution.m
文件 1330 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\PlotSolution.m
文件 2347 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\sa.m
文件 759 2015-09-21 04:37 YPAP108 Vehicle Routing Problem\VRP using SA\SelectModel.m
目录 0 2015-09-21 04:26 YPAP108 Vehicle Routing Problem\VRP using SA\VRP Model Creation\
文件 366 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\VRP Model Creation\CreateAndSaveModels.m
文件 940 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_10x3.mat
文件 1412 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_14x4.mat
文件 2418 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_20x4.mat
文件 3511 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_25x5.mat
文件 4871 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_30x5.mat
文件 9920 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_40x6.mat
文件 15968 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_50x7.mat
文件 22800 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_60x7.mat
文件 31302 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_70x8.mat
文件 717 2012-05-10 23:03 YPAP108 Vehicle Routing Problem\VRP using SA\vrp_8x3.mat
文件 121 2015-08-23 04:35 YPAP108 Vehicle Routing Problem\VRP using SA\www.yarpiz.com.url
文件 121 2015-08-23 04:35 YPAP108 Vehicle Routing Problem\www.yarpiz.com.url
相关资源
- 十大算法之详解模拟退火,禁忌搜索
- 基于遗传模拟退火算法的模糊C均值聚
- 模拟退火算法解决0-1背包问题
- 粒子群 模拟退火 蚁群算法MATLAB实现
- Matlab模拟退火算法-模拟退火.zip
- matlab模拟退火工具箱-matlab模拟退火工
- matlab解决旅行商问题
- 基于MATLAB的模拟退火算法求解最短路
- 蚁群优化模拟退火算法、多目标,遗
- 简单的模拟退火算法,利用模拟退火
- 模拟退火法求解整数非线性规划MATL
- 磷虾群优化算法加入模拟退火思想和
- 模拟退火解决tsp的Matlab程序+设计报告
- Matlab的模拟退火算法工具包
- 模拟退火算法解决旅行商问题-matlab代
- 基于模拟退火算法的遗传模拟退火算
- 模拟退火算法计算费马点
- 用matlab实现模拟退火kmeans聚类
- 粒子群模拟退火算法
- 遗传模拟退火算法MATLAB
- 模拟退火算法matlab实现
- vrp+matlab+模拟退火
- 模拟退火的方法解TSP问题--matlab
- 模拟退火算法MATLAB实现代码2
- 模拟退火法求最小值
- 遗传模拟退火解决tsp问题
- 一维大地电磁测深模拟退火反演
- 模拟退火算法进行函数优化 matlab
- 基于模拟退火算法的TSP问题matlab实现
- 模拟退火算法的matlab程序,简单易懂
评论
共有 条评论