多目标飞蛾扑火算法 (NSMFO) 附matlab代码

文章介绍了NSMFO,一种多目标版本的蛾火焰优化器,用于解决无约束、约束和工程设计问题。该算法通过非支配排序和拥挤距离机制选择最优解,经过一系列迭代找到Pareto前沿。实验结果验证了NSMFO的有效性和效率。
摘要由CSDN通过智能技术生成

✅作者简介:热爱科研的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电子书和数学建模资料

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值