With the rapid development of intelligent technology and robot system, multi robot system is used more and more widely. The multi task assignment problem of swarm robots is an important research field of multi robot systems. The task assignment problem is a typical combinatorial optimization problem. The research on optimal task allocation on multiprocessor systems is a hot topic to effectively use system resources to deal with practical problems. The research results in this field have a good application background in large-scale numerical calculation, VLSI and computer network technology. In theory, because the task allocation problem is a recognized NP hard problem, how to construct effective heuristic algorithms or approximate algorithms is a hot research field at present. Area coverage is a multi robot and multi-objective task, and has a wide range of application prospects, such as cleaning robots, marine resources development and search and rescue. In the multi robot system, the increasing number of robots and tasks makes the task allocation problem very complex. Intelligent algorithm has the advantages of strong robustness and parallelism, and can well solve the problem of multi-objective allocation. In this paper, multi robot task allocation and area coverage of mobile multi robot in unknown environment are studied respectively, and a solution based on ant colony algorithm is proposed. As an intelligent algorithm simulating ant foraging, ant colony algorithm is widely used in different types of combinatorial optimization problems. In the task allocation, the probability search strategy is adopted to realize the multi robot multi task allocation.
Part 2 code
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,:);endend
3 simulation results
 Cai Biao Research on multi robot task allocation based on ant colony algorithm [D] Qiqihar University
Blogger profile: good at matlab simulation in intelligent optimization algorithm, neural network prediction, signal processing, cellular automata, image processing, path planning, UAV and other fields. Relevant matlab code problems can be exchanged through private letters.
Some theories cite online literature. If there is infringement, contact the blogger and delete it.