多目标优化进化算法程序


基于NSGA-2思想的多目标优化程序,采用进化算法处理多目标实值优化问题
资源截图
代码片段和文件信息
/*==========================================================================
//  Implementation of MOEA/D based on Differential Evolution (DE) for Continuous Multiobjective 
//  Optimization Problems with Complicate Pareto Sets (2007)
//
//  See the details of MOEA/D-DE and test problems in the following paper
//  H. Li and Q. Zhang Comparison Between NSGA-II and MOEA/D on a Set of Multiobjective Optimization 
//  Problems with Complicated Pareto Sets Technical Report CES-476 Department of Computer Science
//  University of Essex 2007
//
//  The component functions of each test instance can be found in “objective.h“. 
//
//  The source code of MOEA/D-DE and NSGA-II-DE were implemented by Hui Li and Qingfu Zhang  
//
//  If you have any questions about the codes please contact 
//  Qingfu Zhang at qzhang@essex.ac.uk  or Hui Li at hzl@cs.nott.ac.uk
===========================================================================*/


#include “commonglobal.h“
#include “DMOEAdmoeafunc.h“
#include “NSGA2
sga2func.h“

void execute(char *alg);

void main()
{

// The settings of test instances F1-F9
// char *ins[] = {“F1“ “F2“ “F3“ “F4“ “F5“ “F6“ “F7“ “F8“ “F9“}
int pof[]      = {  21   21   21   21   21   31   21   21  22};       // type of pareto front       
int pos[]      = {  21   22   23   24   26   32   21   21  22};       // type of pareto set
int dis[]      = {   1    1    1    1    1    1    3    4   1};       // type of non-negative function
int var[]      = {  30   30   30   30   30   10   10   10  30};       // dimensionality of search space
int obj[]      = {   2    2    2    2    2    3    2    2   2};       // number of objective functions 

// The settings of algorithms
int pop[] = {300 300 300 300 300 595 300 300 300};     // population size
int gen[] = {500 500 500 500 500 500 500 500 500};     // number of generations 


for(int i=0; i<1; i++)
{
// the parameter setting of test instance
dtype = dis[i]; 
ptype = pof[i];  
ltype = pos[i];                  
nvar  = var[i];
nobj  = obj[i];


// the parameter setting of MOEA/D-DE and 
pops    = pop[i];
max_gen = gen[i];

sprintf(strTestInstance“P%dD%dL%d“ptype dtype ltype);
printf(“Instances: pf shape %d  - distance %d - ps shape %d 
 “ ptype dtype ltype);
execute(“NSGA-II“);
}
}

void execute(char *alg)
{
std::fstream fout;
char filename[1024];
// compute IGD-values

sprintf(filename“GD/GD_NSGA2_%s.dat“strTestInstance);
fout.open(filenamestd::ios::in);

for(int run=1; run<=max_run; run++) 
{
vector gd;
    
CNSGA2  NSGA2;     
gd = NSGA2.execute(run);  

for(int k=0; k fout< fout<<“
“;
gd.clear();
}
fout.close();
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4781  2007-05-31 11:16  MOEAcommonenchmark.h

     文件       6090  2007-06-11 01:34  MOEAcommoncommon.h

     文件       2153  2007-10-29 12:15  MOEAcommonglobal.h

     文件       1317  2007-04-14 18:45  MOEAcommonmylib.h

     文件       6142  2007-10-29 11:26  MOEAcommonobjective.h

     文件       1344  2006-06-29 03:42  MOEAcommon
andom.h

     文件       9587  2007-10-18 13:54  MOEAcommon
ecombination.h

     文件       2562  2007-10-29 11:36  MOEADMOEAdmoeaclass.h

     文件       9108  2007-10-29 12:18  MOEADMOEAdmoeafunc.h

     文件      17034  2007-09-13 18:51  MOEAF6Weight500.dat

     文件       2888  2011-05-26 21:48  MOEAmain_moea.cpp

     文件       4997  2011-05-26 20:30  MOEAMOEA.dsp

     文件        531  2007-04-19 22:33  MOEAMOEA.dsw

     文件     222208  2011-05-26 22:50  MOEAMOEA.ncb

     文件      56832  2011-05-26 22:50  MOEAMOEA.opt

     文件       1278  2011-05-26 20:59  MOEAMOEA.plg

     文件       1233  2007-04-19 16:55  MOEANSGA2NSGA2.plg

     文件       1750  2007-10-29 11:07  MOEANSGA2
sga2class.h

     文件       7181  2011-05-26 22:16  MOEANSGA2
sga2func.h

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D1L21.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D1L22.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D1L23.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D1L24.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D1L25.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D1L26.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D2L22.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D3L21.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D3L22.dat

     文件      17000  2007-05-25 15:22  MOEAPFpf_P21D4L21.dat

     文件      17000  2007-06-01 12:38  MOEAPFpf_P22D1L22.dat

............此处省略22个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)