基于象鼻虫损害优化算法的TSP问题求解附Matlab代码
✅作者简介热爱科研的Matlab仿真开发者修心和技术同步精进matlab项目合作可私信。个人主页Matlab科研工作室个人信条格物致知。更多Matlab仿真内容点击⛄ 内容介绍象鼻虫是一种长有细长鼻部的昆虫来自Curculionoide超科约97000种。它们中的大多数认为害虫会造成环境破坏但一些种类如小麦象鼻虫、玉米象鼻虫和棉铃象鼻虫都会造成巨大的危害对农作物特别是谷物的损害。本研究提出了一种新的基于群体的进化算法称为“象甲损伤优化算法”WDOA象鼻虫对农作物或农产品的飞力、鼻力和破坏力。用12个基准单峰和多峰人工景观或优化测试功能。此外拟议的WDOA用于五项工程以检查其解决问题的稳健性。问题包括旅行推销员问题TSP、n-Queens问题、投资组合问题、最优库存控制OIC问题、和装箱问题BPP。所有测试的功能都与广泛使用的基准测试相比较粒子群优化PSO、遗传算法GA、和谐搜索算法HS算法、帝国主义竞争算法ICA、萤火虫算法FA和差异进化DE算法。此外所有问题都用DE、FA和HS算法进行了测试。通过提供精确性和合理的速度所提出的算法在所有函数和问题上都表现出了鲁棒性和速度。⛄ 部分代码%% Weevil Damage Optimization Algorithm (WDOA) Portfolio Problem% Paper:% http://www.growingscience.com/jfs/Vol2/jfs_2022_17.pdf%%----------------------------------------------------------% Portfolio is a definition in finance which is based on receiving some values (prices)% as stock or any other financial assets and converting them into returns by aiming to% increase the return and decreasing the risk. Finally, those solutions which have highest% return and lowest risk, would be considers as a vector called efficient frontier.% Normally, portfolio solves by traditional methods such as mean-variance, mean semi% variance, and mean absolute deviation but not always guaranteed the best solution.c;clear;close all;%% Run Appdataload(mydata);Rdata.R;nAssetsize(R,2);MinRetmin(mean(R,1));MaxRetmax(mean(R,1));nSol10;DRlinspace(MinRet,MaxRet,nSol);model.RR;model.methodcvar;model.alpha0.95;Wzeros(nSol,nAsset);WReturnzeros(nSol,1);WRiskzeros(nSol,1);for k1:nSolmodel.DesiredRetDR(k);disp([Running for Solution # num2str(k) :]);%-----------------------------------out RunWDOA(model);%-----------------------------------disp(__________________________);disp();W(k,:)out.BestSol.Out.w;WReturn(k)out.BestSol.Out.ret;WRisk(k)out.BestSol.Out.rsk;endEFfind(~IsDominated(WRisk,WReturn));%% Resultsfigure;plot(WRisk,WReturn,y,LineWidth,2);hold on;plot(WRisk(EF),WReturn(EF),r,LineWidth,4);legend(,Efficient Frontier);ax gca;ax.FontSize 14;ax.FontWeightbold;set(gca,Color,w)grid on;xlabel(Risk);ylabel(Return);figure;plot(out.BestCost,k, LineWidth, 2);xlabel(ITR);ylabel(Cost Value);ax gca;ax.FontSize 14;ax.FontWeightbold;set(gca,Color,c)grid on;out.BestSol.Out⛄ 运行结果⛄ 参考文献Weevil damage optimization algorithm and its applications❤️ 关注我领取海量amatlab电子书和数学建模资料❤️部分理论引用网络文献若有侵权联系博主删除