🚅座右铭:行百里者,半于九十。
🏆代码获取方式:
CSDN Matlab武动乾坤—代码获取方式
更多Matlab路径规划仿真内容点击👇
①Matlab路径规划(进阶版)
⛳️关注CSDN Matlab武动乾坤,更多资源等你来!!
1 A Star算法及其应用现状
进行搜索任务时提取的有助于简化搜索过程的信息被称为启发信息.启发信息经过文字提炼和公式化后转变为启发函数.启发函数可以表示自起始顶点至目标顶点间的估算距离, 也可以表示自起始顶点至目标顶点间的估算时间等.描述不同的情境、解决不同的问题所采用的启发函数各不相同.我们默认将启发函数命名为H (n) .以启发函数为策略支持的搜索方式我们称之为启发型搜索算法.在救援机器人的路径规划中, A Star算法能结合搜索任务中的环境情况, 缩小搜索范围, 提高搜索效率, 使搜索过程更具方向性、智能性, 所以A Star算法能较好地应用于机器人路径规划相关领域.
2 A Star算法流程
承接2.1节, A Star算法的启发函数是用来估算起始点到目标点的距离, 从而缩小搜索范围, 提高搜索效率.A Star算法的数学公式为:F (n) =G (n) +H (n) , 其中F (n) 是从起始点经由节点n到目标点的估计函数, G (n) 表示从起点移动到方格n的实际移动代价, H (n) 表示从方格n移动到目标点的估算移动代价.
function varargout = astar_jw(varargin)
end
function [path, directions] = search(grid, init, goal, delta, printDebugInfo)
% This function implements the A* algorithm
end
function A = deleteRows(A, rows)
% The following way to delete rows was taken from the mathworks website
% that compared multiple ways to do it. The following appeared to be the
% fastest.
index = true(1, size(A,1));
index(rows) = false;
A = A(index, 😃;
end
function A = addRow(A, row)
A(end+1,:) = row;
end
function [open, closed, expanded] = expand(grid, open, closed, delta, expanded, h)
% This function expands the open list by taking the coordinate (row) with
% the smallest f value (path cost) and adds its neighbors to the open list.
end
function h = computeHeuristic(varargin)
% This function is used to compute the distance heuristic, h. By default
% this function computes the Euclidean distance from each grid space to the
% goal. The calling sequence for this function is as follows:
% h = computeHeuristic(grid, goal[, distanceType])
% where distanceType may be one of the following:
% ‘euclidean’ (default value)
% ‘city-block’
% ‘empty’ (returns all zeros for heuristic function)
grid = varargin{1};
goal = varargin{2};
if nargin==3
distanceType = varargin{3};
else
distanceType = ‘euclidean’;
end
[m n] = size(grid);
[x y] = meshgrid(1:n,1:m);
if strcmp(distanceType, ‘euclidean’)
h = sqrt((x-goal(2)).^2 + (y-goal(1)).^2);
elseif strcmp(distanceType, ‘city-block’)
h = abs(x-goal(2)) + abs(y-goal(1));
elseif strcmp(distanceType, ‘empty’)
h = zeros(m,n);
else
warning(‘Unknown distanceType for determining heuristic, h!’)
h = [];
end
end
function neighbors = findNeighbors(grid, open, row, delta)
% This function takes the desired row in the open list to expand and finds
% all potential neighbors (neighbors reachable through legal moves, as
% defined in the delta list).
end
function neighbors = removeListedNeighbors(neighbors, open, closed)
% This function removes any neighbors that are on the open or closed lists
end
function goalRow = checkForGoal(closed, goal)
% This function looks for the final goal destination on the closed list.
% Note, you could check the open list instead (and find the goal faster);
% however, we want to have a chance to expand the goal location itself, so
% we wait until it is on the closed list.
[~, goalRow] = ismember(goal, closed(:,1:2), ‘rows’);
end
function displayDebugInfo(grid, init, goal, open, closed, h)
% Display the open and closed lists in the command window, and display an
% image of the current search of the grid.
home
disp('Open: ‘)
disp(open)
disp(’ ')
disp('Closed: ')
disp(closed)
end
function displaySearchStatus(grid, init, goal, open, closed, h)
% This function displays a graphical grid and search status to make
% visualization easier.
grid = double(~grid);
grid(init(1),init(2)) = 0.66;
grid(goal(1),goal(2)) = 0.33;
end
function displayPath(grid, path, h)
grid = double(~grid);
end
1 matlab版本
2014a
2 参考文献
[1]钱程,许映秋,谈英姿.A Star算法在RoboCup救援仿真中路径规划的应用[J].指挥与控制学报. 2017,3(03)
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除
🍅 仿真咨询
1 各类智能优化算法改进及应用
生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化
2 机器学习和深度学习方面
卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM、XGBOOST、TCN实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断
3 图像处理方面
图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知
4 路径规划方面
旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划、天线线性阵列分布优化、车间布局优化
5 无人机应用方面
无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配
6 无线传感器定位及布局方面
传感器部署优化、通信协议优化、路由优化、目标定位优化、Dv-Hop定位优化、Leach协议优化、WSN覆盖优化、组播优化、RSSI定位优化
7 信号处理方面
信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号、信号配时优化
8 电力系统方面
微电网优化、无功优化、配电网重构、储能配置
9 元胞自动机方面
交通流 人群疏散 病毒扩散 晶体生长