一、小龙虾优化算法COA
小龙虾优化算法(Crayfsh optimization algorithm,COA)由Jia Heming 等人于2023年提出,该算法模拟小龙虾的避暑、竞争和觅食行为,具有搜索速度快,搜索能力强,能够有效平衡全局搜索和局部搜索的能力。
参考文献:
[1] Jia, H., Rao, H., Wen, C. et al. Crayfish optimization algorithm. Artif Intell Rev (2023). Crayfish optimization algorithm | Artificial Intelligence Review
二、无人机模型
单个无人机三维路径规划问题及其建模_IT猿手的博客-CSDN博客
参考文献:
[1]胡观凯,钟建华,李永正,黎万洪.基于IPSO-GA算法的无人机三维路径规划[J].现代电子技术,2023,46(07):115-120
三、COA求解无人机路径规划
(1)部分代码
close all clear clc warning off; %% 三维路径规划模型定义 global startPos goalPos N N=2;%待优化点的个数(可以修改) startPos = [10, 10, 80]; %起点(可以修改) goalPos = [80, 90, 150]; %终点(可以修改) SearchAgents_no=30; % 种群大小(可以修改) Function_name='F2'; %F1:随机产生地图 F2:导入固定地图 Max_iteration=100; %最大迭代次数(可以修改) % Load details of the selected benchmark function [lb,ub,dim,fobj]=Get_Functions_details(Function_name); [Best_score,Best_pos,curve]=COA(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);%算法优化求解 AlgorithmName='COA';%算法名字 figure semilogy(curve,'Color','r','linewidth',3) xlabel('迭代次数'); ylabel('飞行路径长度'); legend(AlgorithmName) display(['算法得到的最优适应度: ', num2str(Best_score)]); Position=[Best_pos(1:dim/3); Best_pos(1+dim/3:2*(dim/3)); Best_pos(1+(2*dim/3):end)]'; %优化点的XYZ坐标(每一行是一个点) plotFigure(Best_pos,AlgorithmName)%画最优路径
(2)部分结果
无人机飞行路径坐标:
1.0000000e+01 1.0000000e+01 8.0000000e+01
1.4671343e+01 1.2096840e+01 8.2471270e+01
1.9013264e+01 1.4172151e+01 8.4898411e+01
2.3034818e+01 1.6225688e+01 8.7281557e+01
2.6745057e+01 1.8257207e+01 8.9620845e+01
3.0153034e+01 2.0266463e+01 9.1916411e+01
3.3267803e+01 2.2253213e+01 9.4168390e+01
3.6098415e+01 2.4217212e+01 9.6376918e+01
3.8653926e+01 2.6158215e+01 9.8542131e+01
4.0943387e+01 2.8075979e+01 1.0066416e+02
4.2975852e+01 2.9970259e+01 1.0274315e+02
4.4760374e+01 3.1840811e+01 1.0477923e+02
4.6306005e+01 3.3687391e+01 1.0677254e+02
4.7621800e+01 3.5509754e+01 1.0872322e+02
4.8716811e+01 3.7307656e+01 1.1063139e+02
4.9600091e+01 3.9080852e+01 1.1249719e+02
5.0280693e+01 4.0829099e+01 1.1432077e+02
5.0767671e+01 4.2552153e+01 1.1610225e+02
5.1070078e+01 4.4249768e+01 1.1784178e+02
5.1196966e+01 4.5921700e+01 1.1953948e+02
5.1157389e+01 4.7567706e+01 1.2119549e+02
5.0960400e+01 4.9187542e+01 1.2280996e+02
5.0615051e+01 5.0780961e+01 1.2438301e+02
5.0130397e+01 5.2347722e+01 1.2591478e+02
4.9515490e+01 5.3887578e+01 1.2740541e+02
4.8779384e+01 5.5400286e+01 1.2885503e+02
4.7931130e+01 5.6885602e+01 1.3026377e+02
4.6979783e+01 5.8343281e+01 1.3163178e+02
4.5934396e+01 5.9773080e+01 1.3295919e+02
4.4804022e+01 6.1174753e+01 1.3424614e+02
4.3597713e+01 6.2548056e+01 1.3549275e+02
4.2324523e+01 6.3892746e+01 1.3669917e+02
4.0993505e+01 6.5208577e+01 1.3786554e+02
3.9613712e+01 6.6495306e+01 1.3899198e+02
3.8194197e+01 6.7752689e+01 1.4007863e+02
3.6744014e+01 6.8980480e+01 1.4112564e+02
3.5272215e+01 7.0178436e+01 1.4213313e+02
3.3787853e+01 7.1346313e+01 1.4310124e+02
3.2299982e+01 7.2483866e+01 1.4403010e+02
3.0817655e+01 7.3590851e+01 1.4491986e+02
2.9349925e+01 7.4667023e+01 1.4577065e+02
2.7905844e+01 7.5712139e+01 1.4658260e+02
2.6494467e+01 7.6725953e+01 1.4735585e+02
2.5124845e+01 7.7708223e+01 1.4809054e+02
2.3806033e+01 7.8658703e+01 1.4878679e+02
2.2547083e+01 7.9577149e+01 1.4944475e+02
2.1357049e+01 8.0463317e+01 1.5006456e+02
2.0244982e+01 8.1316962e+01 1.5064634e+02
1.9219938e+01 8.2137841e+01 1.5119024e+02
1.8290968e+01 8.2925709e+01 1.5169639e+02
1.7467126e+01 8.3680322e+01 1.5216492e+02
1.6757465e+01 8.4401435e+01 1.5259597e+02
1.6171039e+01 8.5088805e+01 1.5298968e+02
1.5716899e+01 8.5742186e+01 1.5334618e+02
1.5404099e+01 8.6361335e+01 1.5366561e+02
1.5241693e+01 8.6946007e+01 1.5394810e+02
1.5238733e+01 8.7495959e+01 1.5419380e+02
1.5404272e+01 8.8010945e+01 1.5440283e+02
1.5747365e+01 8.8490721e+01 1.5457533e+02
1.6277063e+01 8.8935044e+01 1.5471143e+02
1.7002419e+01 8.9343669e+01 1.5481128e+02
1.7932488e+01 8.9716351e+01 1.5487501e+02
1.9076322e+01 9.0052846e+01 1.5490275e+02
2.0442974e+01 9.0352911e+01 1.5489464e+02
2.2041497e+01 9.0616300e+01 1.5485082e+02
2.3880944e+01 9.0842770e+01 1.5477141e+02
2.5970369e+01 9.1032077e+01 1.5465657e+02
2.8318824e+01 9.1183975e+01 1.5450641e+02
3.0935364e+01 9.1298220e+01 1.5432109e+02
3.3829039e+01 9.1374569e+01 1.5410073e+02
3.7008905e+01 9.1412777e+01 1.5384547e+02
4.0484013e+01 9.1412600e+01 1.5355544e+02
4.4263418e+01 9.1373793e+01 1.5323079e+02
4.8356172e+01 9.1296113e+01 1.5287164e+02
5.2771328e+01 9.1179314e+01 1.5247813e+02
5.7517939e+01 9.1023153e+01 1.5205041e+02
6.2605059e+01 9.0827386e+01 1.5158859e+02
6.8041740e+01 9.0591767e+01 1.5109283e+02
7.3837036e+01 9.0316053e+01 1.5056326e+02
8.0000000e+01 9.0000000e+01 1.5000000e+02