1 简介

随着智能技术与机器人系统的快速发展,多机器人系统的运用也越来越广泛。群体机器人的多任务分配问题是多机器人系统一个重要研究领域,任务分配问题就是一类典型的组合优化问题。多处理器系统上的最优任务分配的研究是有效利用系统资源处理实际问题的热点课题,这方面的研究结果在大规模数值计算、VLSI和计算机网络技术等方面都有很好的应用背景。在理论方面,由于任务分配问题是被公认的NP难题,所有如何构造有效的启发式算法或近似算法是目前研究的热点领域。区域覆盖就是多机器人多目标任务,并且有着广泛的应用前景如清洁机器人、海洋资源开发以及搜救。在多机器人系统中机器人数量和任务数量的增多使任务分配问题变得相当复杂。智能算法有着鲁棒性强、并行性强等优点,能够很好解决多目标分配的问题。本文针对移动多机器人在未知环境中的多机器人任务分配和区域覆盖分别进行研究,并提出基于蚁群算法的解决办法。蚁群算法作为一种模拟蚂蚁觅食的智能算法,在不同类别的组合优化问题上有广泛的应用。在任务分配中,采用的是概率搜索策略,实现了多机器人多任务的分配。

2 部分代码
function [best_ant_path,min_distance] =
find_best_ant_path(all_ant_path,worker_number,task_number,ant_num,Robot_position,Target_position,
UAV_speed)​% Define the calculated distanceSumOfDistance=zeros(ant_num,1);​%
Calculate the distance between robots and targets positions, and then% compare
them to find the best task allocation strategy%ite = 1;if (task_number >=
worker_number) for i=1:ant_num
OneOfPath=all_ant_path((i-1)*task_number+1:(i-1)*task_number+task_number,:);
[Lia, Locb]=ismember(zeros(1,task_number), OneOfPath','rows'); if (Lia == 0)
[row,col]=find(OneOfPath==1); for j=1:worker_number % display(OneOfPath) %
display(col) % display(row) mid = find(col==j); len = length(mid);
allo=mid(randi(len)); SumOfDistance(i)=SumOfDistance(i)+sqrt(
(Robot_position(j,1)-Target_position(row(allo),1))^2 ... +
(Robot_position(j,2)-Target_position(row(allo),2))^2) / UAV_speed(j); end %ite=
ite+1; end endelse for i=1:ant_num
OneOfPath=all_ant_path((i-1)*task_number+1:(i-1)*task_number+task_number,:);
[row,col]=find(OneOfPath==1); if(length(col)-length(unique(col)) == 0) for
j=1:length(row) SumOfDistance(i)=SumOfDistance(i)+sqrt(
(Robot_position(j,1)-Target_position(row(j),1))^2 ... +
(Robot_position(j,2)-Target_position(row(j),2))^2) / UAV_speed(j); end end
%ite= ite+1; endend​​​%display(SumOfDistance);
[min_distance,ind]=min(SumOfDistance(find(SumOfDistance~=0)));if
(isempty(min_distance) ==0) %min_distance = min(SumOfDistance);
index=find(SumOfDistance==min_distance); %display(index) choice =
index(unidrnd(size(index,1))); %display(choice); best_ant_path =
all_ant_path((choice-1)*task_number+1:(choice-1)*task_number+task_number,:);end
end​
3 仿真结果

4 参考文献

[1]蔡标. 基于蚁群算法的多机器人任务分配研究[D]. 齐齐哈尔大学.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

技术
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信