% Please refer to the main paper:
% MOMPA: a high performance multi-objective optimizer based on marine predator algorithm
% Long Chen, Fangyi Xu, Kezhong Jin and Zhenzhou Tang
% GECCO '21: Proceedings of the Genetic and Evolutionary Computation Conference Companion
% DOI: https://doi.org/10.1145/3449726.3459581
% AND
% Marine Predators Algorithm: A nature-inspired metaheuristic
% Afshin Faramarzi, Mohammad Heidarinejad, Seyedali Mirjalili, Amir H. Gandomi
% Expert Systems with Applications
% DOI: https://doi.org/10.1016/j.eswa.2020.113377
% _____________________________________________________
function [fobj, fcon,P] = mompa_getMOFcn(F, decisionVar, numObj)
[N,D] = size(decisionVar);
switch F
case 'ZDT1'
fobj(:, 1) = decisionVar(:, 1);
g = 1 + 9*mean(decisionVar(:,2:end),2);
h = 1 - (fobj(:,1)./g).^0.5;
fobj(:,2) = g.*h;
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P(:,1) = (0:1/(N-1):1)';
P(:,2) = 1 - P(:,1).^0.5;
case 'ZDT2'
fobj(:,1) = decisionVar(:,1);
g = 1 + 9*mean(decisionVar(:,2:end),2);
h = 1 - (fobj(:,1)./g).^2;
fobj(:,2) = g.*h;
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P(:,1) = (0:1/(N-1):1)';
P(:,2) = 1 - P(:,1).^2;
case 'ZDT3'
fobj(:,1) = decisionVar(:,1);
g = 1 + 9*mean(decisionVar(:,2:end),2);
h = 1 - (fobj(:,1)./g).^0.5 - fobj(:,1)./g.*sin(10*pi*fobj(:,1));
fobj(:,2) = g.*h;
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P(:,1) = (0:1/(N-1):1)';
P(:,2) = 1 - P(:,1).^0.5 - P(:,1).*sin(10*pi*P(:,1));
P = P(NDSort(P,fcon,1)==1,:);
case 'ZDT4'
fobj(:,1) = decisionVar(:,1);
g = 1 + 10*(size(decisionVar,2)-1) + sum(decisionVar(:,2:end).^2-10*cos(4*pi*decisionVar(:,2:end)),2);
h = 1 - (fobj(:,1)./g).^0.5;
fobj(:,2) = g.*h;
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P(:,1) = (0:1/(N-1):1)';
P(:,2) = 1 - P(:,1).^0.5;
case 'ZDT6'
fobj(:,1) = 1 - exp(-4*decisionVar(:,1)).*sin(6*pi*decisionVar(:,1)).^6;
g = 1 + 9*mean(decisionVar(:,2:end),2).^0.25;
h = 1 - (fobj(:,1)./g).^2;
fobj(:,2) = g.*h;
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
minf1 = 0.280775;
P(:,1) = (minf1:(1-minf1)/(N-1):1)';
P(:,2) = 1 - P(:,1).^2;
case 'DTLZ1'
M = numObj;
g = 100*(D-M+1+sum((decisionVar(:,M:end)-0.5).^2-cos(20.*pi.*(decisionVar(:,M:end)-0.5)),2));
fobj = 0.5*repmat(1+g,1,M).*fliplr(cumprod([ones(N,1),decisionVar(:,1:M-1)],2)).*[ones(N,1),1-decisionVar(:,M-1:-1:1)];
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P = UniformPoint(N,numObj)/2;
case 'DTLZ2'
M = numObj;
g = sum((decisionVar(:,M:end)-0.5).^2,2);
fobj = repmat(1+g,1,M).*fliplr(cumprod([ones(size(g,1),1),cos(decisionVar(:,1:M-1)*pi/2)],2)).*[ones(size(g,1),1),sin(decisionVar(:,M-1:-1:1)*pi/2)];
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P = UniformPoint(N,numObj);
P = P./repmat(sqrt(sum(P.^2,2)),1,numObj);
case 'DTLZ3'
M = numObj;
g = 100*(D-M+1+sum((decisionVar(:,M:end)-0.5).^2-cos(20.*pi.*(decisionVar(:,M:end)-0.5)),2));
fobj = repmat(1+g,1,M).*fliplr(cumprod([ones(N,1),cos(decisionVar(:,1:M-1)*pi/2)],2)).*[ones(N,1),sin(decisionVar(:,M-1:-1:1)*pi/2)];
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P = UniformPoint(N,M);
P = P./repmat(sqrt(sum(P.^2,2)),1,M);
case 'DTLZ4'
M = numObj;
decisionVar(:,1:M-1) = decisionVar(:,1:M-1).^100;
g = sum((decisionVar(:,M:end)-0.5).^2,2);
fobj = repmat(1+g,1,M).*fliplr(cumprod([ones(size(g,1),1),cos(decisionVar(:,1:M-1)*pi/2)],2)).*[ones(size(g,1),1),sin(decisionVar(:,M-1:-1:1)*pi/2)];
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P = UniformPoint(N,M);
P = P./repmat(sqrt(sum(P.^2,2)),1,M);
case 'DTLZ5'
M = numObj;
g = sum((decisionVar(:,M:end)-0.5).^2,2);
Temp = repmat(g,1,M-2);
decisionVar(:,2:M-1) = (1+2*Temp.*decisionVar(:,2:M-1))./(2+2*Temp);
fobj = repmat(1+g,1,M).*fliplr(cumprod([ones(size(g,1),1),cos(decisionVar(:,1:M-1)*pi/2)],2)).*[ones(size(g,1),1),sin(decisionVar(:,M-1:-1:1)*pi/2)];
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P = [0:1/(N-1):1;1:-1/(N-1):0]';
P = P./repmat(sqrt(sum(P.^2,2)),1,size(P,2));
P = [P(:,ones(1,M-2)),P];
P = P./sqrt(2).^repmat([M-2,M-2:-1:0],size(P,1),1);
case 'DTLZ6'
M = numObj;
g = sum(decisionVar(:,M:end).^0.1,2);
Temp = repmat(g,1,M-2);
decisionVar(:,2:M-1) = (1+2*Temp.*decisionVar(:,2:M-1))./(2+2*Temp);
fobj = repmat(1+g,1,M).*fliplr(cumprod([ones(size(g,1),1),cos(decisionVar(:,1:M-1)*pi/2)],2)).*[ones(size(g,1),1),sin(decisionVar(:,M-1:-1:1)*pi/2)];
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
P = [0:1/(N-1):1;1:-1/(N-1):0]';
P = P./repmat(sqrt(sum(P.^2,2)),1,size(P,2));
P = [P(:,ones(1,M-2)),P];
P = P./sqrt(2).^repmat([M-2,M-2:-1:0],size(P,1),1);
case 'DTLZ7'
M = numObj;
fobj = zeros(size(decisionVar,1),M);
g = 1+9*mean(decisionVar(:,M:end),2);
fobj(:,1:M-1) = decisionVar(:,1:M-1);
fobj(:,M) = (1+g).*(M-sum(fobj(:,1:M-1)./(1+repmat(g,1,M-1)).*(1+sin(3*pi.*fobj(:,1:M-1))),2));
%......................
fcon(:, 1:D) = -decisionVar;
fcon(:, D+1: 2*D) = decisionVar - 1;
interval = [0,0.251412,0.631627,0.859401];
median = (interval(2)-interval(1))/(interval(4)-interval(3)+interval(2)-interval(1));
X = ReplicatePoint(N,M-1);
X(X<=median) = X(X<=median)*(interval(2)-interval(1))/median+interval(1);
X(X>median) = (X(X>median)-median)*(interval(4)-interval(3))/(1-median)+interval(3);
P = [X,2*(M-sum(X/2.*(1+sin(3*pi.*X)),2))];
case 'WFG1'
M = numObj;
K = M-1;
L = D - K;
D = 1;
S = 2 : 2 : 2*M;
A = ones(1,M-1);
z01 = decisionVar./repmat(2:2:size(decisionVar,2)*2,N,1);
t1 = zeros(N,K+L);
t1(:,1:K) = z01(:,1:K);
t1(:,K+1:end) = WFG_s_linear(z01(:,K+1:end),0.35);
t2 = zeros(N,K+L);
t2(:,1:K) = t1(:,1:K);
t2(:,K+1:end) = WFG1_b_flat(t1(:,K+1:end),0.8,0.75,0.85);
t3 = zeros(N,K+L);
t3 = WFG1_b_poly(t2,0.02);
t4 = zeros(N,M);
for i = 1 : M-1
t4(:,i) = WFG_r_sum(t3(:,(i-1)*K/(M-1)+1:i*K/(M-1)),2*((i-1)*K/(M-1)+1):2:2*i*K/(M-1));
end
t4(:,M) = WFG_r_sum(t3(:,K+1:K+L),2*(K+1):2:2*(K+L));
x = zeros(N,M);
for i = 1 : M-1
x(:,i) = max(t4(:,M),A(i)).*(t4(:,i)-0.5)+0.5;
end
x(:,M) = t4(:,M);
h = WFG_convex(x);
h(:,M) = WFG1_mixed(x);
fobj = repmat(D*x(:,M),1,M) + repmat(S,N,1).*h;
%......................
fcon = -decisionVar;
P = UniformPoint(N,M);
c = ones(size(P,1),M);
for i = 1 : size(P,1)
资源存储库
- 粉丝: 1w+
- 资源: 396
最新资源
- 2kw, 2.4kw, 3.6kw全系列双向储能电源解决方案,c语言源代码仿真,电池充电1200w, 离网逆变2kw,并网逆变2kw,全程工作最优模式
- 基于comsol的高频振动击碎微颗粒的乳化仿真 采用较高频率振动,击碎微颗粒,达到均质或其他目的 本模型计算了整个击碎的微观过程 通过comsol的流固耦合和两相流进行计算,合理的设置调试后,可以
- 基于范围选择的多目标进化算法,多目标优化算法程序代码,PESA-II,采用pesa2求解多目标优化问题,求解得到pareto最优解 基于matlab的.m程序,采用模块化编程,便于修改,注释率高,易
- 松下FP-XH PLC程序 旋转上下料机 松下FP-XH系列PLC程序,等输入输出模块 四轴轴脉冲控制伺服电机,绝对定位,真空报警、正负极限位报警、气缸报警,位置控制模式采用数据表设置模式
- 汽车制动盘热仿真分析matlab源代码 可用于不同材料,不同体积汽车制动盘的热性能仿真对比分析 适用于赛道刹车盘热工况,AMS工况热容量仿真分析等
- 转动惯量离线辨识算法仿真 1.模型简介 模型为永磁同步电机伺服控制仿真,采用Matlab R2018a Simulink搭建 模型内主要包含DC直流电压源、三相逆变器、永磁同步电机、采样模块、SVP
- 三菱FX5U系列程序 三菱FX5U程序,FX5U-80MT ES,FX5-16ET ES-H*4共12轴运动控制,FX5-32ET ES等输入输出模块 尺寸检测机 轴JOG,回原点,绝对定
- MATLAB代码:考虑电动汽车负荷随机性的蓄电池容量优化配置 关键词:蓄电池容量优化配置 储能优化配置 中长期配置 并网波动性 参考文档:《不确定环境下并网型光储微电网的容量规划》考虑电动汽车
- MATLAB代码:基于改进萤火虫算法的分布式电源选址定容-IEEE33节点 关键词:改进萤火虫算法 选址定容 分布式电源 参考文档:《基于改进萤火虫算法的分布式电源的选址和定容-史吏》基本复现
- MATLAB代码:基于NSGA-II的风光水多能互补协调优化调度 关键词:NSGA-II算法 多目标优化 水电-光伏多能互补 参考文档:《店主自写文档》基本复现; 仿真平台:MATLAB 主要
- 基于改进鲸鱼优化算法的冷热电联供微网多时间尺度优化调度模型 关键词:改进鲸鱼算法 冷热电联供微网 优化调度 多时间尺度 容量配置 主要内容:代码主要做的是一个冷热电联供微网的优化调度问题,为了优化其
- MATLAB代码:基于遗传算法的电动汽车有序充放电优化 关键词:遗传算法 电动汽车 有序充电 优化调度 参考文档:《精英自适应混合遗传算法及其实现-江建》 MATLAB 利用遗传算法对电动汽车有序
- MATLAB代码:基于MATLAB的三母线高斯赛德尔潮流分析计算 关键词:潮流计算 电力系统 高斯赛德尔迭代法 MATLAB 参考文献+自制详细实验文档 仿真平台:MATLAB 主要内容:潮流计算是判
- STM32 EtherCAT EtherCAT通信,量产伺服驱动器 采用STM32作为主控 支持ethercat从站IO,模拟输入 已实现底层驱动,中断处理,数据通信 包括原理图,源代码,说明文档 已
- 西门子smart 200 rtu方式通讯四台三菱E700变频器资料 硬件:smart plc.三菱E700变频器,mcgs触摸屏(电脑仿真也可) 功能:指针写法,通过modbus rtu方式,实现对
- 模块化多电平变器MMC的pi 无源控制 滑模控制策略实现(交流7kV-直流20kV整流)仿真,三个仿真均为外环pi控制输出稳压20kV,内环分别采用pi 无源控制 滑模控制 单桥臂二十子模块(子模块
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈