🍁🥬🕒摘要🕒🥬🍁
旅行商问题作为组合优化研究中最具挑战的问题之一,自被提出以来就引起了学术界的广泛关注并提出了大量的方法来解决它.帝国主义竞争算法(ICA)是求解复杂组合优化问题的一种启发式仿生进化算法,是求解旅行商问题的有效手段。帝国主义竞争算法在未来对旅行商问题及其他不同领域的研究内容和研究热点的进一步发展提供了展望和依据。
✨🔎⚡运行结果⚡🔎✨
💂♨️👨🎓Matlab代码👨🎓♨️💂
clc; clear; close all; %% Problem Definition model=CreateModel(); CostFunction=@(s) MyCost(s,model); % Cost Function nVar=model.n; % Number of Decision Variables VarSize=[1 nVar]; % Decision Variables Matrix Size VarMin=0; % Lower Bound of Variables VarMax=1; % Upper Bound of Variables %% ICA Parameters MaxIt=500; % Maximum Number of Iterations nPop=80; % Population Size nEmp=10; % Number of Empires/Imperialists alpha=1; % Selection Pressure beta=2; % Assimilation Coefficient pRevolution=0.2; % Revolution Probability mu=0.05; % Revolution Rate zeta=0.1; % Colonies Mean Cost Coefficient ShareSettings; %% Initialization % Initialize Empires emp=CreateInitialEmpires(); % Array to Hold Best Cost Values BestCost=zeros(MaxIt,1); %% ICA Main Loop for it=1:MaxIt % Assimilation emp=AssimilateColonies(emp); % Revolution emp=DoRevolution(emp); % Intra-Empire Competition emp=IntraEmpireCompetition(emp); % Update Total Cost of Empires emp=UpdateTotalCost(emp); % Inter-Empire Competition emp=InterEmpireCompetition(emp); % Update Best Solution Ever Found imp=[emp.Imp]; [~, BestImpIndex]=min([imp.Cost]); BestSol=imp(BestImpIndex); % Update Best Cost BestCost(it)=BestSol.Cost; % Show Iteration Information disp(['Iteration ' num2str(it) ': Best Cost = ' num2str(BestCost(it))]); % Plot Best Solution figure(1); PlotSolution(BestSol.Sol.tour,model); end %% Results figure; plot(BestCost,'LineWidth',2); xlabel('Iteration'); ylabel('Best Cost');
📜📢🌈参考文献🌈📢📜
[1]秘向伟. 帝国主义竞争算法的改进与应用[D].燕山大学,2014.