开发者社区> Matlab科研工作室> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

【智能优化算法-鲸鱼算法】基于鲸鱼算法求解多目标优化问题附matlab代码(NSWOA)

简介: 【智能优化算法-鲸鱼算法】基于鲸鱼算法求解多目标优化问题附matlab代码(NSWOA)
+关注继续查看

?1 内容介绍

为了解决多目标优化的相关问题,鲸鱼优化算法结合多目标相关理论,并在算法中加入了非排序思路,提出了一种求解多目标问题的鲸鱼优化算法.

image

image.gif编辑

image

image.gif编辑

image

image.gif编辑

image

image.gif编辑

image

image.gif编辑

image

image.gif编辑

image

image.gif编辑

2 仿真代码

%%?Non Sorted Whale Optimization Algorithm?(NSWOA)

% NSWOA 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 = NSWOA(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

3 运行结果

image

image.gif编辑

4 参考文献

[1]滕德云, 滕欢, 刘鑫,等. 基于改进鲸鱼优化算法的多目标无功优化调度[J]. 电力电容器与无功补偿, 2019, 40(3):7.

[2]梁倩. 基于反向精英保留和Levy变异的多目标鲸鱼优化算法[J]. 现代计算机, 2021(18):7.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
【电力系统经济调度】多元宇宙算法求解电力系统多目标优化问题(Matlab实现)【电气期刊论文复现】
【电力系统经济调度】多元宇宙算法求解电力系统多目标优化问题(Matlab实现)【电气期刊论文复现】
0 0
基于考虑成本敏感的人工蜂群算法求解多目标优化问题附matlab代码
基于考虑成本敏感的人工蜂群算法求解多目标优化问题附matlab代码
0 0
【电力系统经济调度】多元宇宙算法求解电力系统多目标优化问题附Matlab
【电力系统经济调度】多元宇宙算法求解电力系统多目标优化问题附Matlab
0 0
【多式联运】基于帝企鹅AFO 粒子群PSO 遗传GA算法求解不确定多式联运路径优化问题附matlab代码
【多式联运】基于帝企鹅AFO 粒子群PSO 遗传GA算法求解不确定多式联运路径优化问题附matlab代码
0 0
基于蜂虎狩猎 (BEH) 算法求解单目标优化问题附matlab代码
基于蜂虎狩猎 (BEH) 算法求解单目标优化问题附matlab代码
0 0
【MOSMA】基于粘菌算法求解多目标优化问题附matlab代码
【MOSMA】基于粘菌算法求解多目标优化问题附matlab代码
0 0
【算法系列】凸优化的应用——Python求解优化问题(附代码)
【算法系列】凸优化的应用——Python求解优化问题(附代码)
0 0
【智能优化算法-算术算法】基于算术优化算法 (MAOA)求解多目标优化问题附matlab代码
【智能优化算法-算术算法】基于算术优化算法 (MAOA)求解多目标优化问题附matlab代码
0 0
基于动态控制布谷鸟算法求解单目标优化问题(DDCS)附matlab代码
基于动态控制布谷鸟算法求解单目标优化问题(DDCS)附matlab代码
0 0
基于改进海洋捕食者算法求解单目标优化问题附matlab代码(NMPA)
基于改进海洋捕食者算法求解单目标优化问题附matlab代码(NMPA)
0 0
+关注
Matlab科研工作室
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题关注公众号 天天Matlab。
文章
问答
文章排行榜
最热
最新
相关电子书
更多
网易云音乐音视频算法处理的 Serverless 探索之路
立即下载
阿里技术参考图册-算法篇
立即下载
阿里千亿特征深度学习算法XNN实践
立即下载
http://www.vxiaotou.com