多目标粒子群matlab代码.docx

上传人:b****6 文档编号:16831264 上传时间:2023-07-17 格式:DOCX 页数:46 大小:283.69KB
下载 相关 举报
多目标粒子群matlab代码.docx_第1页
第1页 / 共46页
多目标粒子群matlab代码.docx_第2页
第2页 / 共46页
多目标粒子群matlab代码.docx_第3页
第3页 / 共46页
多目标粒子群matlab代码.docx_第4页
第4页 / 共46页
多目标粒子群matlab代码.docx_第5页
第5页 / 共46页
多目标粒子群matlab代码.docx_第6页
第6页 / 共46页
多目标粒子群matlab代码.docx_第7页
第7页 / 共46页
多目标粒子群matlab代码.docx_第8页
第8页 / 共46页
多目标粒子群matlab代码.docx_第9页
第9页 / 共46页
多目标粒子群matlab代码.docx_第10页
第10页 / 共46页
多目标粒子群matlab代码.docx_第11页
第11页 / 共46页
多目标粒子群matlab代码.docx_第12页
第12页 / 共46页
多目标粒子群matlab代码.docx_第13页
第13页 / 共46页
多目标粒子群matlab代码.docx_第14页
第14页 / 共46页
多目标粒子群matlab代码.docx_第15页
第15页 / 共46页
多目标粒子群matlab代码.docx_第16页
第16页 / 共46页
多目标粒子群matlab代码.docx_第17页
第17页 / 共46页
多目标粒子群matlab代码.docx_第18页
第18页 / 共46页
多目标粒子群matlab代码.docx_第19页
第19页 / 共46页
多目标粒子群matlab代码.docx_第20页
第20页 / 共46页
亲,该文档总共46页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

多目标粒子群matlab代码.docx

《多目标粒子群matlab代码.docx》由会员分享,可在线阅读,更多相关《多目标粒子群matlab代码.docx(46页珍藏版)》请在冰点文库上搜索。

多目标粒子群matlab代码.docx

多目标粒子群matlab代码

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%改进的多目标粒子群算法,包括多个测试函数

%对程序中的部分参数进行修改将更好地求解某些函数

%

ZDT1NP=cell(1,50);

ZDT1FV=cell(1,50);

ZDT1T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('ZDT1',0.1,50,100,2.0,1.0,0.4,200,30,zeros(1,30),ones(1,30));%--ZDT1

elapsedTime=toc;

ZDT1NP(i)={np};

ZDT1FV(i)={fv};

ZDT1T(i)=elapsedTime;display(strcat('ZDT1',num2str(i)));

end

zdt1fv=cell2mat(ZDT1FV');

zdt1fv=GetLeastFunctionValue(zdt1fv);

ZDT2NP=cell(1,50);

ZDT2FV=cell(1,50);

ZDT2T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('ZDT2',0.1,50,100,2.0,1.0,0.4,200,30,zeros(1,30),ones(1,30),[1,zeros(1,29)]);%--ZDT2

elapsedTime=toc;

ZDT2NP(i)={np};

ZDT2FV(i)={fv};

ZDT2T(i)=elapsedTime;display(strcat('ZDT2',num2str(i)));

end

zdt2fv=cell2mat(ZDT2FV');

zdt2fv=GetLeastFunctionValue(zdt2fv);

%%%%%%%%%%%%%%%%%%%%%%%%%%%5

ZDT3NP=cell(1,50);

ZDT3FV=cell(1,50);

ZDT3T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('ZDT3',0.1,50,100,2.0,1.0,0.4,400,30,zeros(1,30),ones(1,30));%--ZDT3

elapsedTime=toc;

ZDT3NP(i)={np};

ZDT3FV(i)={fv};

ZDT3T(i)=elapsedTime;display(strcat('ZDT3',num2str(i)));

end

zdt3fv=cell2mat(ZDT3FV');

zdt3fv=GetLeastFunctionValue(zdt3fv);

ZDT4NP=cell(1,50);

ZDT4FV=cell(1,50);

ZDT4T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals]=ParticleSwarmOpt('ZDT4',0.1,50,100,2.0,1.0,0.4,200,10,[0,-5,-5,-5,-5,-5,-5,-5,-5,-5],[1,5,5,5,5,5,5,5,5,5],[1,0,0,0,0,0,0,0,0,0]);%--ZDT4

elapsedTime=toc;

ZDT4NP(i)={np};

ZDT4FV(i)={fv};

ZDT4T(i)=elapsedTime;display(strcat('ZDT4',num2str(i)));

end

zdt4fv=cell2mat(ZDT4FV');

zdt4fv=GetLeastFunctionValue(zdt4fv);

%%%%%%%%%%%%%%%%%%%%%%%%

ZDT6NP=cell(1,50);

ZDT6FV=cell(1,50);

ZDT6T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('ZDT6',0.1,50,100,2.0,1.0,0.4,200,10,zeros(1,10),ones(1,10));%--ZDT6

elapsedTime=toc;

ZDT6NP(i)={np};

ZDT6FV(i)={fv};

ZDT6T(i)=elapsedTime;display(strcat('ZDT6',num2str(i)));

end

zdt6fv=cell2mat(ZDT6FV');

zdt6fv=GetLeastFunctionValue(zdt6fv);

CTP1NP=cell(1,50);

CTP1FV=cell(1,50);

CTP1T=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP1',0.1,50,100,2.0,1.0,0.4,1500,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[],struct('isfmopso',false,'istargetdis',false,'stopatborder',true));%--CTP1

elapsedTime=toc;

CTP1NP(i)={np};

CTP1FV(i)={fv};

CTP1T(i)=elapsedTime;display(strcat('CTP1',num2str(i)));

end

ctp1fv=cell2mat(CTP1FV');

ctp1fv=GetLeastFunctionValue(ctp1fv);

CTP1fmNP=cell(1,50);

CTP1fmFV=cell(1,50);

CTP1fmT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP1',0.1,50,100,2.0,1.0,0.4,400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[00000],struct('isfmopso',true,'istargetdis',false,'stopatborder',true));%--CTP1

elapsedTime=toc;

CTP1fmNP(i)={np};

CTP1fmFV(i)={fv};

CTP1fmT(i)=elapsedTime;display(strcat('CTP1fm',num2str(i)));

end

ctp1fmfv=cell2mat(CTP1fmFV');

ctp1fmfv=GetLeastFunctionValue(ctp1fmfv);

CTP2NP=cell(1,50);

CTP2FV=cell(1,50);

CTP2T=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP2',0.1,50,100,2.0,1.0,0.4,1500,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[],struct('isfmopso',false,'istargetdis',false,'stopatborder',true));%--CTP2

elapsedTime=toc;

CTP2NP(i)={np};

CTP2FV(i)={fv};

CTP2T(i)=elapsedTime;display(strcat('CTP2',num2str(i)));

end

ctp2fv=cell2mat(CTP2FV');

ctp2fv=GetLeastFunctionValue(ctp2fv);

CTP2fmNP=cell(1,50);

CTP2fmFV=cell(1,50);

CTP2fmT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP2',0.1,50,100,2.0,1.0,0.4,400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[00000],struct('isfmopso',true,'istargetdis',false,'stopatborder',true));%--CTP2

elapsedTime=toc;

CTP2fmNP(i)={np};

CTP2fmFV(i)={fv};

CTP2fmT(i)=elapsedTime;display(strcat('CTP2fm',num2str(i)));

end

ctp2fmfv=cell2mat(CTP2fmFV');

ctp2fmfv=GetLeastFunctionValue(ctp2fmfv);

CTP3NP=cell(1,50);

CTP3FV=cell(1,50);

CTP3T=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP3',0.1,50,100,2.0,1.0,0.4,1400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[],struct('isfmopso',false,'istargetdis',false,'stopatborder',true));%--CTP3

elapsedTime=toc;

CTP3NP(i)={np};

CTP3FV(i)={fv};

CTP3T(i)=elapsedTime;display(strcat('CTP3',num2str(i)));

end

ctp3fv=cell2mat(CTP3FV');

ctp3fv=GetLeastFunctionValue(ctp3fv);

CTP3fmNP=cell(1,50);

CTP3fmFV=cell(1,50);

CTP3fmT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP3',0.1,50,100,2.0,1.0,0.4,400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[00000],struct('isfmopso',true,'istargetdis',false,'stopatborder',true));%--CTP3

elapsedTime=toc;

CTP3fmNP(i)={np};

CTP3fmFV(i)={fv};

CTP3fmT(i)=elapsedTime;display(strcat('CTP3fm',num2str(i)));

end

ctp3fmfv=cell2mat(CTP3fmFV');

ctp3fmfv=GetLeastFunctionValue(ctp3fmfv);

CTP4NP=cell(1,50);

CTP4FV=cell(1,50);

CTP4T=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP4',0.1,50,100,2.0,1.0,0.4,1400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[],struct('isfmopso',false,'istargetdis',false,'stopatborder',true));%--CTP4

elapsedTime=toc;

CTP4NP(i)={np};

CTP4FV(i)={fv};

CTP4T(i)=elapsedTime;display(strcat('CTP4',num2str(i)));

end

ctp4fv=cell2mat(CTP4FV');

ctp4fv=GetLeastFunctionValue(ctp4fv);

CTP4fmNP=cell(1,50);

CTP4fmFV=cell(1,50);

CTP4fmT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP4',0.1,50,100,2.0,1.0,0.4,400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[00100],struct('isfmopso',true,'istargetdis',false,'stopatborder',true));%--CTP4

elapsedTime=toc;

CTP4fmNP(i)={np};

CTP4fmFV(i)={fv};

CTP4fmT(i)=elapsedTime;display(strcat('CTP4fm',num2str(i)));

end

ctp4fmfv=cell2mat(CTP4fmFV');

ctp4fmfv=GetLeastFunctionValue(ctp4fmfv);

CTP5NP=cell(1,50);

CTP5FV=cell(1,50);

CTP5T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP5',0.1,50,100,2.0,1.0,0.4,200,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[00000]);%--CTP5

elapsedTime=toc;

CTP5NP(i)={np};

CTP5FV(i)={fv};

CTP5T(i)=elapsedTime;display(strcat('CTP5',num2str(i)));

end

ctp5fv=cell2mat(CTP5FV');

ctp5fv=GetLeastFunctionValue(ctp5fv);

CTP6NP=cell(1,50);

CTP6FV=cell(1,50);

CTP6T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP6',0.1,50,100,2.0,1.0,0.4,400,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[00000]);%--CTP6

elapsedTime=toc;

CTP6NP(i)={np};

CTP6FV(i)={fv};

CTP6T(i)=elapsedTime;display(strcat('CTP6',num2str(i)));

end

ctp6fv=cell2mat(CTP6FV');

ctp6fv=GetLeastFunctionValue(ctp6fv);

CTP7NP=cell(1,50);

CTP7FV=cell(1,50);

CTP7T=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP7',0.1,50,100,2.0,1.0,0.4,1000,5,[0,-5,-5,-5,-5],[1,5,5,5,5],[10000]);%--CTP7

elapsedTime=toc;

CTP7NP(i)={np};

CTP7FV(i)={fv};

CTP7T(i)=elapsedTime;display(strcat('CTP7',num2str(i)));

end

ctp7fv=cell2mat(CTP7FV');

ctp7fv=GetLeastFunctionValue(ctp7fv);

CONSTRNP=cell(1,50);

CONSTRFV=cell(1,50);

CONSTRT=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP8',0.1,50,100,2.0,1.0,0.4,200,2,[0.1,0],[1,5]);%--CTP8,CONSTR

elapsedTime=toc;

CONSTRNP(i)={np};

CONSTRFV(i)={fv};

CONSTRT(i)=elapsedTime;display(strcat('CTP8',num2str(i)));

end

constrfv=cell2mat(CONSTRFV');

constrfv=GetLeastFunctionValue(constrfv);

SRNNP=cell(1,50);

SRNFV=cell(1,50);

SRNT=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP9',0.1,50,100,2.0,1.0,0.4,200,2,[-20,-20],[20,20]);%--CTP9,SRN

elapsedTime=toc;

SRNNP(i)={np};

SRNFV(i)={fv};

SRNT(i)=elapsedTime;display(strcat('CTP9',num2str(i)));

end

srnfv=cell2mat(SRNFV');

srnfv=GetLeastFunctionValue(srnfv);

TNKNP=cell(1,50);

TNKFV=cell(1,50);

TNKT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP10',0.1,50,100,2.0,1.0,0.4,1300,2,[0,0],[pi,pi],[],struct('isfmopso',false,'istargetdis',false,'stopatborder',false));%--CTP10,TNK

elapsedTime=toc;

TNKNP(i)={np};

TNKFV(i)={fv};

TNKT(i)=elapsedTime;display(strcat('CTP10',num2str(i)));

end

tnkfv=cell2mat(TNKFV');

tnkfv=GetLeastFunctionValue(tnkfv);

TNKfmNP=cell(1,50);

TNKfmFV=cell(1,50);

TNKfmT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('CTP10',0.1,50,100,2.0,1.0,0.4,300,2,[0,0],[pi,pi],[],struct('isfmopso',true,'istargetdis',false,'stopatborder',false));%--CTP10,TNK

elapsedTime=toc;

TNKfmNP(i)={np};

TNKfmFV(i)={fv};

TNKfmT(i)=elapsedTime;display(strcat('CTP10fm',num2str(i)));

end

tnkfmfv=cell2mat(TNKfmFV');

tnkfmfv=GetLeastFunctionValue(tnkfmfv);

BNHNP=cell(1,50);

BNHFV=cell(1,50);

BNHT=zeros(1,50);

fori=1:

50

tic;

%[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('BNH',0.1,50,100,2.0,1.0,0.4,200,2,zeros(1,2),[5,3]);%--BNH

elapsedTime=toc;

BNHNP(i)={np};

BNHFV(i)={fv};

BNHT(i)=elapsedTime;display(strcat('BNH',num2str(i)));

end

bnhfv=cell2mat(BNHFV');

bnhfv=GetLeastFunctionValue(bnhfv);

OSYNP=cell(1,50);

OSYFV=cell(1,50);

OSYT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('OSY',0.1,50,100,2.0,1.0,0.4,1500,6,[0,0,1,0,1,0],[10,10,5,6,5,10],[],struct('isfmopso',false,'istargetdis',false,'stopatborder',true));%--OSY

elapsedTime=toc;

OSYNP(i)={np};

OSYFV(i)={fv};

OSYT(i)=elapsedTime;display(strcat('OSY',num2str(i)));

end

osyfv=cell2mat(OSYFV');

osyfv=GetLeastFunctionValue(osyfv);

OSYfmNP=cell(1,50);

OSYfmFV=cell(1,50);

OSYfmT=zeros(1,50);

fori=1:

50

tic;

[np,nprule,dnp,fv,goals,pbest]=ParticleSwarmOpt('OSY',0.1,50,100,2.0,1.0,0.4,500,6,[0,0,1,0,1,0],[10,10,5,6,5,10],[],struct('isfmopso',true,'istargetdis',false,'stopatborder',true));%--OSY

elapsedTime=toc;

OSYfmNP(i)={np};

OSYfmFV(i)={fv};

OSYfmT(i)=elapsedTime;display(strcat('OSYfm',num2str(i)));

end

o

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 教学研究 > 教学案例设计

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2