资源简介
基于蚁群算法实现的多机器人路径规划!

代码片段和文件信息
%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窗口焦点检测器
- 下一篇:基于蚁群算法的路径规划
相关资源
- bp神经网络源代码,可直接运行
- 随机森林R语言代码
- 计算机图形学 边填充算法实现代码
- 直流无刷电机方波驱动 stm32 例程代码
- 仿知乎界面小程序源代码
- 贪吃蛇源代码.fla
- 周立功开发板ProASIC3实验-syn_FIFO代码
- IMX385驱动代码.zip
- dotnet 写字板 实验 源代码 不好请要不
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- linux应用层的华容道游戏源代码
- 交通咨询模拟系统完整代码
- http请求状态代码
- 数值分析所有实验代码
- 网上拍卖系统完整源代码
- 音乐代码转换软件 单片机编程时用
- CSMA/CD等动画演示加源代码
- silicon lab公司的收音IC SI47XX全套开发工
- 用51单片机实现G代码翻译
- 合同管理系统的源代码(附数据库)
- 用VC 编写的仿QQ聊天室程序源代码
- web班级网站设计代码
- 38k单片机红外发送代码、keil
- STM32F103 串口程序(完整版)
- 网络唤醒代码
- VPC3_DPV1源代码,Profibus
- PB做的托盘程序(最小化后在左下角显
- RSA算法源码
- ubuntu9.10 可加载内核模块和字符设备驱
评论
共有 条评论