✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
⛄ 内容介绍
这篇新颖的文章介绍了最近提出的蛾火焰优化器 (MFO) 的多目标版本,称为非支配排序蛾火焰优化器 (NSMFO)。所提出的 NSMFO 算法的工作方式是,它首先收集所有非支配 Pareto 最优解,直到最后一次迭代极限的演化。然后使用基于解决方案覆盖范围的拥挤距离机制作为导航策略,从所有 Pareto 最优解的集合中选择最佳解决方案,以引导飞蛾朝向多目标搜索空间的主导区域。为了验证所提出的 NSMFO 算法的效率和有效性,将其应用于一组标准的无约束、约束和工程设计问题。
⛄ 部分代码
%% Non Sorted Moth-flame Optimization Algorithm (NSMFO)
% NSMFO is developed by Pradeep Jangir
%% Objective Function
% The objective function description contains information about the
% objective function. M is the dimension of the objective space, D is the
% dimension of decision variable space, LB and UB are the
% range for the variables in the decision variable space. User has to
% define the objective functions using the decision variables. Make sure to
% edit the function 'evaluate_objective' to suit your needs.
clc
clear all
D = 30; % Number of decision variables
M = 2; % Number of objective functions
K=M+D;
LB = ones(1, D).*0; % LB - A vector of decimal values which indicate the minimum value for each decision variable.
UB = ones(1, D).*1; % UB - Vector of maximum possible values for decision variables.
Max_iteration = 100; % Set the maximum number of generation (GEN)
SearchAgents_no = 100; % Set the population size (Search Agent)
ishow = 10;
%% Initialize the population
% Population is initialized with random values which are within the
% specified range. Each chromosome consists of the decision variables. Also
% the value of the objective functions, rank and crowding distance
% information is also added to the chromosome vector but only the elements
% of the vector which has the decision variables are operated upon to
% perform the genetic operations like corssover and mutation.
chromosome = initialize_variables(SearchAgents_no, M, D, LB, UB);
%% Sort the initialized population
% Sort the population using non-domination-sort. This returns two columns
% for each individual which are the rank and the crowding distance
% corresponding to their position in the front they belong. At this stage
% the rank and the crowding distance for each chromosome is added to the
% chromosome vector for easy of computation.
intermediate_chromosome = non_domination_sort_mod(chromosome, M, D);
%% Perform Selection
% Once the intermediate population is sorted only the best solution is
% selected based on it rank and crowding distance. Each front is filled in
% ascending order until the addition of population size is reached. The
% last front is included in the population based on the individuals with
% least crowding distance
% Select NP fittest solutions using non dominated and crowding distance
% sorting and store in population
Population = replace_chromosome(intermediate_chromosome, M,D,SearchAgents_no);
%% Start the evolution process
% The following are performed in each generation
% * Select the parents which are fit for reproduction
% * Perfrom crossover and Mutation operator on the selected parents
% * Perform Selection from the parents and the offsprings
% * Replace the unfit individuals with the fit individuals to maintain a
% constant population size.
Pareto = NSMFO(D,M,LB,UB,Population,SearchAgents_no,Max_iteration,ishow);
save Pareto.txt Pareto -ascii; % save data for future use
%% Plot data
if M == 2
plot_data2(M,D,Pareto)
elseif M == 3
plot_data_TCQ(M,D,Pareto);
end
⛄ 运行结果
⛄ 参考文献
Pradeep J, Indrajit N T. Non-Dominated Sorting Moth Flame Optimizer: A Novel Multi-Objective Optimization Algorithm for Solving Engineering Design Problems. Eng Technol Open Acc。2018; 2(1): 555579. 10.19080/ETOAJ.2018.02.555579
⛄ 完整代码
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料