-
大小: 1.16MB文件類型: .rar金幣: 2下載: 0 次發布日期: 2023-08-28
- 語言: 其他
- 標簽:
資源簡介
用于測試多目標算法的標準測試實例 ,程序內 plot_front 函數用于產生這些測試實例的真實pareto解集用于多目標算法的比較測試。

代碼片段和文件信息
// cec09.cpp
#include?“cec09.h“
#include?
namespace?CEC09
{
#define?PI??3.1415926535897932384626433832795
#define?MYSIGN(x)?((x)>0?1.0:-1.0)
/****************************************************************************/
//?unconstraint?test?instances
/****************************************************************************/
void?UF1(double?*x?double?*f?const?unsigned?int?nx)
{
unsigned?int?j?count1?count2;
double?sum1?sum2?yj;
sum1???=?sum2???=?0.0;
count1?=?count2?=?0;
for(j?=?2;?j?<=?nx;?j++)?
{
yj?=?x[j-1]?-?sin(6.0*PI*x[0]?+?j*PI/nx);
yj?=?yj?*?yj;
if(j?%?2?==?0)?
{
sum2?+=?yj;
count2++;
}?
else?
{
sum1?+=?yj;
count1++;
}
}
f[0]?=?x[0] +?2.0?*?sum1?/?(double)count1;
f[1]?=?1.0?-?sqrt(x[0])?+?2.0?*?sum2?/?(double)count2;
}
void?UF2(double?*x?double?*f?const?unsigned?int?nx)
{
unsigned?int?j?count1?count2;
double?sum1?sum2?yj;
sum1???=?sum2???=?0.0;
count1?=?count2?=?0;
for(j?=?2;?j?<=?nx;?j++)?
{
if(j?%?2?==?0)?
{
yj?=?x[j-1]-0.3*x[0]*(x[0]*cos(24.0*PI*x[0]+4.0*j*PI/nx)+2.0)*sin(6.0*PI*x[0]+j*PI/nx);
sum2?+=?yj*yj;
count2++;
}?
else?
{
yj?=?x[j-1]-0.3*x[0]*(x[0]*cos(24.0*PI*x[0]+4.0*j*PI/nx)+2.0)*cos(6.0*PI*x[0]+j*PI/nx);
sum1?+=?yj*yj;
count1++;
}
}
f[0]?=?x[0] +?2.0?*?sum1?/?(double)count1;
f[1]?=?1.0?-?sqrt(x[0])?+?2.0?*?sum2?/?(double)count2;
}
void?UF3(double?*x?double?*f?const?unsigned?int?nx)
{
unsigned?int?j?count1?count2;
double?sum1?sum2?prod1?prod2?yj?pj;
sum1???=?sum2???=?0.0;
count1?=?count2?=?0;
prod1??=?prod2??=?1.0;
for(j?=?2;?j?<=?nx;?j++)?
{
yj?=?x[j-1]-pow(x[0]0.5*(1.0+3.0*(j-2.0)/(nx-2.0)));
pj?=?cos(20.0*yj*PI/sqrt(j+0.0));
if?(j?%?2?==?0)?
{
sum2??+=?yj*yj;
prod2?*=?pj;
count2++;
}?
else?
{
sum1??+=?yj*yj;
prod1?*=?pj;
count1++;
}
}
f[0]?=?x[0] +?2.0*(4.0*sum1?-?2.0*prod1?+?2.0)?/?(double)count1;
f[1]?=?1.0?-?sqrt(x[0])?+?2.0*(4.0*sum2?-?2.0*prod2?+?2.0)?/?(double)count2;
}
void?UF4(double?*x?double?*f?const?unsigned?int?nx)
{
unsigned?int?j?count1?count2;
double?sum1?sum2?yj?hj;
sum1???=?sum2???=?0.0;
count1?=?count2?=?0;
for(j?=?2;?j?<=?nx;?j++)?
{
yj?=?x[j-1]-sin(6.0*PI*x[0]+j*PI/nx);
hj?=?fabs(yj)/(1.0+exp(2.0*fabs(yj)));
if?(j?%?2?==?0)?
{
sum2??+=?hj;
count2++;
}?
else?
{
sum1??+=?hj;
count1++;
}
}
f[0]?=?x[0] +?2.0*sum1?/?(double)count1;
f[1]?=?1.0?-?x[0]*x[0] +?2.0*sum2?/?(double)count2;
}
void?UF5(double?*x?double?*f?const?unsigned?int?nx)
{
unsigned?int?j?count1?count2;
double?sum1?sum2?yj?hj?N?E;
sum1???=?sum2???=?0.0;
count1?=?count2?=?0;
N?=?10.0;?E?=?0.1;
for(j?=?2;?j?<=?nx;?j++)?
{
yj?=?x[j-1]-sin(6.0*PI*x[0]+j*PI/nx);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????85??2007-01-19?19:34??測試函數集合\boundary_data\R2_DTLZ2_bound_10D.dat
?????文件????????379??2007-02-02?00:45??測試函數集合\boundary_data\R2_DTLZ2_bound_30D.dat
?????文件?????????41??2007-01-19?19:35??測試函數集合\boundary_data\R2_DTLZ2_lamda_10D.dat
?????文件????????185??2007-02-02?00:40??測試函數集合\boundary_data\R2_DTLZ2_lamda_30D.dat
?????文件????????350??2008-09-04?07:41??測試函數集合\boundary_data\R2_DTLZ2_M_10D.dat
?????文件???????4946??2008-09-04?07:46??測試函數集合\boundary_data\R2_DTLZ2_M_30D.dat
?????文件?????????85??2007-01-19?19:34??測試函數集合\boundary_data\R2_DTLZ3_bound_10D.dat
?????文件????????379??2007-02-02?00:45??測試函數集合\boundary_data\R2_DTLZ3_bound_30D.dat
?????文件?????????41??2007-01-19?19:35??測試函數集合\boundary_data\R2_DTLZ3_lamda_10D.dat
?????文件????????185??2007-02-02?00:40??測試函數集合\boundary_data\R2_DTLZ3_lamda_30D.dat
?????文件????????343??2008-09-04?07:31??測試函數集合\boundary_data\R2_DTLZ3_M_10D.dat
?????文件???????4952??2008-09-04?07:48??測試函數集合\boundary_data\R2_DTLZ3_M_30D.dat
?????文件??????34862??2009-04-21?11:29??測試函數集合\cec09.cpp
?????文件???????2260??2008-12-02?11:00??測試函數集合\cec09.h
?????文件??????30059??2009-04-21?11:30??測試函數集合\cec09.java
?????文件??????18434??2009-04-21?11:30??測試函數集合\cec09.m
?????文件???????4509??2008-10-02?18:53??測試函數集合\cec09m.cpp
?????文件??????37021??2009-04-21?11:29??測試函數集合\cec09m.h
?????文件??????23412??2018-05-13?10:11??測試函數集合\fre-fig8.fig
?????文件???????1280??2015-09-30?17:27??測試函數集合\generate_front_data.m
?????文件???????2569??2008-09-08?21:11??測試函數集合\IGD.cpp
?????文件???????8192??2008-10-27?20:43??測試函數集合\IGD.mexw32
?????文件????????433??2015-09-30?17:06??測試函數集合\IGDcalculate.m
?????文件???????8083??2008-09-09?19:19??測試函數集合\pareto.m
?????文件????????756??2015-09-28?20:43??測試函數集合\pf_data\CF1.dat
?????文件?????498624??2015-09-28?20:43??測試函數集合\pf_data\CF10.dat
?????文件??????35964??2015-09-28?20:43??測試函數集合\pf_data\CF2.dat
?????文件??????35964??2015-09-28?20:43??測試函數集合\pf_data\CF3.dat
?????文件??????36000??2015-09-28?20:43??測試函數集合\pf_data\CF4.dat
?????文件??????36000??2015-09-28?20:43??測試函數集合\pf_data\CF5.dat
............此處省略59個文件信息
評論
共有 條評論