资源简介
MOEA/D的C++源代码,很好的资源哟,做多目标算法不可缺少的哟!
代码片段和文件信息
/*==========================================================================
// Implementation of Multiobjective Evolutionary Algorithm based on
// Decomposition (MOEA/D) For Continuous Multiobjective Optimization Problems (2006)
//
// See the details of MOEA/D in the following paper
// Q. Zhang and H. Li MOEA/D: A Multi-objective Evolutionary Algorithm based on Decomposition
// IEEE Trans. on Evolutionary Computation in press 2007
//
// The source code of MOEA/D was 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 “global.h“
#include “dmoea.h“
void main()
{
// set the type of decomposition method
// “_TCH1“: Tchebycheff “_TCH2“: normalized Tchebycheff “_PBI“: Penalty-based BI
strcpy(strFunctionType“_TCH1“);
int total_run = 1; // totoal number of runs
int max_gen = 250; // maximal number of generations
int niche = 20; // neighborhood size
char *instances[] = {“ZDT1““ZDT2““ZDT3““ZDT4““ZDT6““DTLZ1““DTLZ2“}; // names of test instances
int nvars[] = {30 30 30 10 10 10 10}; // number of variables
int nobjs[] = {2 2 2 2 2 3 3}; // number of objectives
for(int n=0; n<7; n++)
{
strcpy(strTestInstanceinstances[n]);
numVariables = nvars[n];
numobjectives = nobjs[n];
for(int run=1; run<=total_run; run++)
{
seed = (seed + 111)%1235;
rnd_uni_init = -(long)seed;
TMOEAD MOEAD;
if(numobjectives==3) MOEAD.run(23 niche max_gen run); //23 -3 popsize 300
if(numobjectives==2) MOEAD.run(99 niche max_gen run); //99 -2 popsize 100
}
}
return;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1950 2007-10-05 14:47 main_moea.cpp
文件 4770 2007-07-02 13:29 MOEA.dsp
文件 533 2007-07-02 13:25 MOEA.dsw
文件 74752 2007-10-05 14:49 MOEA.ncb
文件 50688 2007-10-05 14:49 MOEA.opt
文件 1247 2007-10-05 14:48 MOEA.plg
文件 1229 2007-07-02 11:09 common.h
文件 5250 2007-10-05 14:48 dmoea.h
文件 825 2007-07-02 14:19 global.h
文件 2166 2007-07-02 14:17 individual.h
文件 2627 2007-10-05 14:13 ob
文件 1344 2006-06-29 03:42 random.h
文件 4533 2007-10-05 14:09 recombination.h
文件 2138 2007-10-05 14:12 scalarfunc.h
文件 9854 2007-10-05 14:26 ParetoFront\DMOEA_DTLZ1_R1.dat
文件 9807 2007-10-05 14:26 ParetoFront\DMOEA_DTLZ2_R1.dat
文件 2205 2007-10-05 14:20 ParetoFront\DMOEA_ZDT1_R1.dat
文件 2203 2007-10-05 14:20 ParetoFront\DMOEA_ZDT2_R1.dat
文件 2258 2007-10-05 14:20 ParetoFront\DMOEA_ZDT3_R1.dat
文件 2188 2007-10-05 14:20 ParetoFront\DMOEA_ZDT4_R1.dat
文件 2180 2007-10-05 14:20 ParetoFront\DMOEA_ZDT6_R1.dat
目录 0 2007-10-05 14:20 ParetoFront
----------- --------- ---------- ----- ----
184747 22
- 上一篇:c++电力系统潮流程序
- 下一篇:一些常见的数据结构ADT定义及相关数据运算
评论
共有 条评论