1 简介
2 部分代码
close all;
clear all;
clc;
addpath(genpath('./'));
%% Plan path
disp('Planning ...');
map = load_map('maps/map3.txt', 0.1, 0.5, 0.25);
%start = { [2 10 2],[1 -4 1],[9.2 17 3],[9.2 10 3],[0.1 10 2]};
% stop = {[1 -4 1],[0.1 17 3],[9 -4 1],[0.9 -4 5],[9 10 2]};
start = { [0 1 5],[0 2 5],[0 3 5],[19 4 5],[19 5 5]};
stop = {[19 0 5],[19 5 5],[19 4 5],[0 3 5],[0 1 5]};
visited_nodes = [];
nquad = length(start);
for qn = 1:nquad
v = cputime;
[path{qn},visited_nodes] = pso(map, start{qn}, stop{qn},visited_nodes);
c = cputime - v;
fprintf('Algo Execution time = %d \n',c);
end
if nquad == 1
plot_path(map, path{1});
else
% you could modify your plot_path to handle cell input for multiple robots
for qn = 1:nquad
plot_path(map, path{qn});
end
end
%% Additional init script
init_script;
%% Run trajectory
v = cputime;
trajectory = test_trajectory(start, stop, map, path, true); % with visualization
c = cputime - v;
fprintf('Simulation Execution time = %d \n',c);?
3 仿真结果
4 参考文献
-
O. Wilson, E., Sociobiology: The New Synthesis. 1976.
-
J Matari’c, M. and A. Brooks, Interaction and Intelligent Behavior. 1999.
-
Trelea, I.C., The particle swarm optimization algorithm: convergence analysis and parameter selection. Information Processing Letters, 2003. 85(6): p. 317-325.
-
Kennedy, J. and R. Eberhart. Particle swarm optimization. in Proceedings of ICNN’95 - International Conference on Neural Networks. 1995.
-
Zhan, Z., et al. Adaptive control of acceleration coefficients for particle swarm optimization based on clustering analysis. in 2007 IEEE Congress on Evolutionary Computation. 2007.
-
部分理论引用网络文献,若有侵权联系博主删除。
### 博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,有科研问题可私信交流。
**部分理论引用网络文献,若有侵权联系博主删除。**