资源简介
基于蚁群算法实现的多机器人路径规划!
代码片段和文件信息
%Dynamic env
total = 10; % no of ants
iterations = 1000; %no. of iterations
phera_up = -1;
rho = 0.8;
alpha = 1;
beta = 0;
% initialization of env
mat = ones(250250);
path = ones(250250);
goal = [0 0];
[env goal] = env_dy(mat0goal);
goal_a = zeros(12);
reached = -1;
reached_count = 0;
figure(1);
% Initialization of ants
ant = zeros(totaliterations2);
ant_sta = zeros(total2);
ant(:1:) = 1;
ant_sta(:1) = 1;
phera = zeros(250250);
% Iterations
li =1:8;
lm = [0 -1;1 -1;1 0;1 1;0 1;-1 1;-1 0;-1 -1];
lm = lm * 5;
filter = ones(55) * 0.25; %gausian filter of size 3
filter(2:42:4) = ones(33) * 0.5;
filter(33) = 1;
for i = 1:iterations
for j = 1:total
if(ant_sta(j2) == 1)
continue;
end
min = -500;
r_temp = ant(jant_sta(j1)1);
c_temp = ant(jant_sta(j1)2);
l = li(randperm(8));
for ll = 1:8
r = ant(jant_sta(j1)1)+lm(l(ll)1);
c = ant(jant_sta(j1)2)+lm(l(ll)2);
if(r <= 0 || c <= 0 || r >= 251 || c >= 251 )
continue;
end
if(r>=goal(1)-1 && r<=goal(1)+10 && c>=goal(2)-1 && c<=goal(2)+10) %Goal Test
ant_sta(j2) = 1;
r_temp = goal(1);
c_temp = goal(2);
goal_a(1) = r;
goal_a(2) = c;
reached_count = reached_count + 1;
if(reached == -1)
rho = 0.8;
reached = 1;
beta = 0;
alpha = 1;
end
for b=1:ant_sta(j1)
a = ant_sta(j1) + 1 -b;
if(ant(ja1) <=10 || ant(ja2) <=10 ||ant(ja1) >= 241 || ant(ja2) >= 241 )
phera(ant(ja1)ant(ja2)) = max(phera(ant(ja1)ant(ja2)) 1/b);
else
temp_mat = filter*(1/b);
for u = 1:5
for v = 1:5
phera(ant(ja1)-15+5*uant(ja2)-15+5*v) = max(phera(ant(ja1)-15+5*uant(ja2)-15+5*v) temp_mat(uv));
end
end
end
end
break;
end
if( env(rc) == 1)
trans = (phera(rc)/abs(phera(rc)))*(abs(phera(rc))^alpha)/(((sqrt((goal_a(1)-r)^2+(goal_a(2)-c)^2)+1))^beta);
if(trans < min)
continue;
end
min = trans;
r_temp = r;
c_temp = c;
end
end
env(ant(jant_sta(j1)1)ant(jant_sta(j1)2)) = 1;
env(r_tempc_temp) = 0;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 8014 2016-03-31 21:27 multi_robot_navigation-ACO-master\code.m
....... 806 2016-03-31 21:27 multi_robot_navigation-ACO-master\env_dy.m
....... 335 2016-03-31 21:27 multi_robot_navigation-ACO-master\README.md
目录 0 2016-03-31 21:27 multi_robot_navigation-ACO-master
----------- --------- ---------- ----- ----
9155 4
- 上一篇:Windows窗口焦点检测器
- 下一篇:基于蚁群算法的路径规划
相关资源
- 万能红外学习代码 单片机
- 画bezier曲线代码
- 加权的核函数最小化程序
- QT 精美相册例程 可移动 纯代码
- 基于QT的桌面时钟 可放大缩小 透明
- ACP大数据认证培训全套资料、视频代
- PhotoZoomPro解锁代码
- 基于DSP的有源抗噪声耳罩设计5
- 夏宇闻著VERILOG数字系统设计教程例题
- 电视节目推荐完整代码与数据
- LSD直线检测源代码
- 尚硅谷spring boot资源,带代码。
- 基于西瓜书的聚类代码和介绍
- toutiao_第二次课代码 解决spring-boot兼容
- 前端代码-12月26号.rar
- MSP430G2553例程代码
- 数学建模2019美赛D题 逃离卢浮宫 代码
- AD7606驱动代码 stm32
- 最新老虎淘客系统+老虎app+微信淘宝客
- Obfuscator v2.0.4Unity代码混淆2018.4亲测可
- insight.io for github.rar
- dns攻击发包软件-源代码
- 网站验证码代码的使用
- tensorflow下手写汉字识别及其可视化代
- 最后一公里EC配送程序源代码
- 柔性作业车间调度遗传算法代码
- 079各类代码 修改WZ专用
- 北京四维图新导航地图数据规格书代
- 忆阻器的Pspice代码
- 纯pb代码操作json数据
评论
共有 条评论