% ======================================================================= %
% Social Network Search (SNS) for solving costraint optimizaztion problems
% ----------------------------------------------------------------------- %
% Programer: Hadi Bayzidi
% E-mail: [email protected]
% Homepage: https://www.researchgate.net/profile/Hadi-Bayzidi
% ----------------------------------------------------------------------- %
% Supervisor: Siamak Talatahari
% E-mail: [email protected]
% Homepage: https://www.researchgate.net/profile/Siamak-Talatahari
% ----------------------------------------------------------------------- %
% Co-author: Maysam saraee
% E-mail: [email protected]
% ----------------------------------------------------------------------- %
% Co-author: Charles-Philippe Lamarche
% E-mail: [email protected]
% Homepage: https://www.researchgate.net/profile/Charles-Philippe-Lamarche
% ----------------------------------------------------------------------- %
% Main papers:
% (1) Talatahari, Siamak, Hadi Bayzidi, and Meysam Saraee.
% "Social Network Search for solving engineering problems."
% Computational Intelligence and Neuroscience (2021).
%
% (2) Talatahari, Siamak, Hadi Bayzidi, and Meysam Saraee.
% "Social Network Search for Global Optimization."
% IEEE Access 9 (2021): 92815-92863.
% https://doi.org/10.1109/ACCESS.2021.3091495
% ======================================================================= %
function [nDim, LB, UB, Vio, GloMin, Obj] = ProbInfo(n)
nDim = [7,3,4,2,4,5,4,2,4,4,11,4,3];
if n == 1
% Speed Reducer
LB = [2.6, 0.7, 17, 7.3, 7.3, 2.9, 5];
UB = [3.6, 0.8, 28, 8.3, 8.3, 3.9, 5.5];
Vio = [50 10 1 1 1 20 1 300 1 1 50 1];
Obj = @f1;
GloMin = 2994.4244658;
elseif n == 2
% Tension/compression spring design
LB = [0.05,0.25,2.00];
UB = [2,1.3,15.0];
Vio = [3 4 0.1 0.1 1];
Obj = @f2;
GloMin = 0.012665232788;
elseif n == 3
% Pressure vessel design
LB = [0.51,0.51,10,10];
UB = [99.49,99.49,200,200];
Vio = [12000 8000 1 1 1];
Obj = @f3;
GloMin = 6059.714335048436 ;
elseif n == 4
% Three-bar truss design problem
LB = 0*ones(1,nDim(n));
UB = 1*ones(1,nDim(n));
Vio = [140 7 15 1];
Obj = @f4;
GloMin = 2.6389584338E+02;
elseif n == 5
% Design of gear train
LB = 12*ones(1,nDim(n));
UB = 60*ones(1,nDim(n));
Vio = [1 1];
Obj = @f5;
GloMin = 2.70085714e-12-1e-4;
elseif n == 6
% Cantilever beam
LB = [0.01 0.01 0.01 0.01 0.01];
UB = [100 100 100 100 100];
Vio = [10 1];
Obj = @f6;
GloMin = 1.3399576;
elseif n == 7
% Minimize I-beam vertical deflection
LB = [10 10 0.9 0.9];
UB = [80 50 5.0 5.0];
Vio = 0.1*[1 1 1];
Obj = @f7;
GloMin = 0.0130741;
elseif n == 8
% Tubular column design
LB = [2 0.2];
UB = [14 0.8];
Vio = [100 1 1 1 1 1 1];
Obj = @f8;
GloMin = 26.486361473;
elseif n == 9
% Piston lever
LB = [0.05 0.05 0.05 0.05];
UB = [500 500 500 120];
Vio = [1 1 1 100 1];
Obj = @f9;
GloMin = 8.41269832311;
elseif n == 10
% Corrugated bulkhead design
LB = [0 0 0 0];
UB = [100 100 100 5];
Vio = [1 1 3 3 100 1 1];
Obj = @f10;
GloMin = 6.8429580100808;
elseif n == 11
% Car side impact design
LB = [0.50 0.50 0.50 0.50 0.50 0.50 0.50 0 0 -30 -30];
UB = [1.50 1.50 1.50 1.50 1.50 1.50 1.50 1 1 +30 +30];
Vio = [1 1 1 1 1 1 10 29.8 2 6 1];
Obj = @f11;
GloMin = 22.84296954;
elseif n == 12
% Design of welded beam design
LB = [0.1 0.1 0.1 0.1];
UB = [2 10 10 2];
Vio = [1 1 4 0.001 1 0.5 1 1];
Obj = @f12;
GloMin = 1.724852308597366;
elseif n==13
% Reinforced concrete beam design
LB = [0 0 5];
UB = [1 1 10];
Vio = [50 30 1];
Obj=@f13;
GloMin=359.2080;
end
nDim = nDim(n);
end
%% Objective Subjective Functions
function [z, g, h] = f1(x)
% Weight Minimization of a Speed Reducer
z = 0.7854*x(:,1).*x(:,2).^2.*(3.3333.*x(:,3).^2+14.9334.*x(:,3)-43.0934)-1.508.*x(:,1).*(x(:,6).^2+x(:,7).^2).....
+7.477.*(x(:,6).^3+x(:,7).^3)+0.7854.*(x(:,4).*x(:,6).^2+x(:,5).*x(:,7).^2);
g(:,1) = -x(:,1).*x(:,2).^2.*x(:,3)+27;
g(:,2) = -x(:,1).*x(:,2).^2.*x(:,3).^2+397.5;
g(:,3) = -x(:,2).*x(:,6).^4.*x(:,3).*x(:,4).^(-3)+1.93;
g(:,4) = -x(:,2).*x(:,7).^4.*x(:,3)./x(:,5).^3+1.93;
g(:,5) = 10.*x(:,6).^(-3).*sqrt(16.91.*10^6+(745.*x(:,4)./(x(:,2).*x(:,3))).^2)-1100;
g(:,6) = 10.*x(:,7).^(-3).*sqrt(157.5.*10^6+(745.*x(:,5)./(x(:,2).*x(:,3))).^2)-850;
g(:,7) = x(:,2).*x(:,3)-40;
g(:,8) = -x(:,1)./x(:,2)+5;
g(:,9) = x(:,1)./x(:,2)-12;
g(:,10) = 1.5.*x(:,6)-x(:,4)+1.9;
g(:,11) = 1.1.*x(:,7)-x(:,5)+1.9;
h = 0;
end
function [z, g, h] = f2(x)
% Tension/compression spring design (case 1)
z = x(:,1).^2.*x(:,2).*(x(:,3)+2);
h = 0;
g(:,1) = 1-(x(:,2).^3.*x(:,3))./(71785.*x(:,1).^4);
g(:,2) = (4.*x(:,2).^2-x(:,1).*x(:,2))./(12566.*(x(:,2).*x(:,1).^3-x(:,1).^4))....
+ 1./(5108.*x(:,1).^2)-1;
g(:,3) = 1-140.45.*x(:,1)./(x(:,2).^2.*x(:,3));
g(:,4) = (x(:,1)+x(:,2))./1.5-1;
end
function [z, g, h] = f3(x)
% update
x(:,1) = 0.0625.*round(x(:,1));
x(:,2) = 0.0625.*round(x(:,2));
% Pressure vessel design
z = 0.6224.*x(:,1).*x(:,3).*x(:,4)+1.7781.*x(:,2).*x(:,3).^2....
+3.1661.*x(:,1).^2.*x(:,4)+19.84.*x(:,1).^2.*x(:,3);
g(:,1) = -x(:,1)+0.0193.*x(:,3);
g(:,2) = -x(:,2)+0.00954.*x(:,3);
g(:,3) = -pi.*x(:,3).^2.*x(:,4)-4/3.*pi.*x(:,3).^3+1296000;
g(:,4) = x(:,4)-240;
h = 0;
end
function [z, g, h] = f4(x)
% Three-bar truss design problem
z = (2.*sqrt(2).*x(:,1)+x(:,2))*100;
g(:,1) = (sqrt(2).*x(:,1)+x(:,2))./(sqrt(2).*x(:,1).^2+2.*x(:,1).*x(:,2))*2-2;
g(:,2) = x(:,2)./(sqrt(2).*x(:,1).^2+2.*x(:,1).*x(:,2))*2-2;
g(:,3) = 1./(sqrt(2).*x(:,2)+x(:,1))*2-2;
h=0;
end
function [z, g, h] = f5(x)
% Design of gear train - True
x=round(x); term1=1/6.931; term2=(x(3)*x(2))/(x(1)*x(4));
z = (term1-term2)^2;
g = 0;
h = 0;
end
function [z, g, h] = f6(x)
% Cantilever beam
z = 0.0624*(x(1)+x(2)+x(3)+x(4)+x(5));
g(1) = (61/x(1)^3)+(37/x(2)^3)+(19/x(3)^3)+(7/x(4)^3)+(1/x(5)^3)-1;
h = 0;
end
function [z, g, h] = f7(x)
% Minimize I-beam vertical deflection
term1 = x(3)*(x(1)-2*x(4))^3/12; term2 = x(2)*x(4)^3/6; term3 = 2*x(2)*x(4)*((x(1)-x(4))/2)^2;
z = 5000/(term1+term2+term3);
g(1) = 2*x(2)*x(4)+x(3)*(x(1)-2*x(4))-300;
term1 = x(3)*(x(1)-2*x(4))^3;
term2 = 2*x(2)*x(4)*(4*x(4)^2+3*x(1)*(x(1)-2*x(4)));
term3 = (x(1)-2*x(4))*x(3)^3;
term4 = 2*x(4)*x(2)^3;
g(2) = ((18*x(1)*10^4)/(term1+term2))+((15*x(2)*10^3)/(term3+term4))-6;
h = 0;
end
function [z, g, h] = f8(x)
% Tubular column design
z = 9.8*x(1)*x(2)+2*x(1);
g(1)=1.59-x(1)*x(2);
g(2)=47.4-x(1)*x(2)*(x(1)^2+x(2)^2);
g(3)=2/x(1)-1;
g(4)=x(1)/14-1;
g(5)=2/x(1)-1;
g(6)=x(1)/8-1;
h = 0;
end
function [z, g, h] = f9(x)
% Piston lever
teta = 0.25*pi; H=x(1); B=x(2); D=x(3); X=x(4);
l2=((X*sin(teta)+H)^2+(B-X*cos(teta))^2)^0.5;
l1=((X-B)^2+H^2)^0.5;
z=0.25*pi*D^2*(l2-l1);
teta = 0.25*pi; H=x(1); B=x(2); D=x(3); X=x(4); P=1500; Q=10000; L=240; Mmax=1.8e+6;
R=abs(-X*(X*sin(teta)+H)+H*(B-X*cos(teta)))/sqrt((X-B)^2+H^2);
F=0.25*pi*P*D^2;
l2=((X*sin(teta)+H)^2+(B-X*cos(teta))^2)^0.5;
l1=((X-B)^2+H^2)^0.5;
g(1)=Q*L*cos(teta)-R*F;
g(2)=Q*(L-X)-Mmax;
g(3)=1.2*(l2-l1)-l1;
g(4)=0.5*D-B;
h = 0;
end
function [z, g, h] = f10(x)
% Corrugated bulkhead design
b=x(1); h=x(2); l=x(3); t=x(4); ABD = abs(l^2-h^2);
z = (5.885*t*(b+l))/(b+(abs(l^2-h^2))^0.5);
g(1)=-t*h*(0.4*b+l/6)+8.94*(b+(ABD)^0.5);
g(2)=-t*h^2*(0.2*b+l/12)+2.2*(8.94*(b+(ABD)^0.5))^(4/3);
g(3)=-t+0.0156*b+0.15;
g(4)=-t+0.0156*l+0.15;
g(5)=-t+1.05;
g(6)=-l+h;
h = 0;
end
function [z, g, h
基于社交网络搜索算法求解单目标问题附matlab代码(SNS,Social Network Search )标准.zip
版权申诉
80 浏览量
2023-09-27
10:19:10
上传
评论
收藏 94KB ZIP 举报
Matlab科研辅导帮
- 粉丝: 1w+
- 资源: 7553
最新资源
- postgresql-42.7.3.jar
- 2024-05-21 20-36-43.mkv
- 基于QT+C++的智能云监护仪项目,能够实时显示使用者心电、血氧、血压波形及其它各种参数+源码(毕业设计&课程设计&项目开发)
- 基于java开发的app接收硬件端传输的心音信号,具有显示心音波形,发出心音的功能+源码(毕业设计&课程设计&项目开发)
- Python 程序语言设计模式思路-行为型模式:职责链模式:将请求从一个处理者传递到下一个处理者
- 9241703124789646.16健身系统2.apk
- postgresql-16.3-1-windows-x64.exe
- Python 程序语言设计模式思路-结构型模式:装饰器讲解及利用Python装饰器模式实现高效日志记录和性能测试
- 基于YOLOv5和DeepSORT的多目标跟踪仿真与记录
- Python 程序语言设计模式思路-创建型模式:原型模式:通过复制现有对象来创建新对象,面向对象编程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈