资源简介
NSGA-2是遗传算法的一个改进,该压缩文件中有程序说明,是外国人编写的程序,可以运行
代码片段和文件信息
function f = evaluate_objective(x M V)
%% function f = evaluate_objective(x M V)
% Function to evaluate the objective functions for the given input vector
% x. x is an array of decision variables and f(1) f(2) etc are the
% objective functions. The algorithm always minimizes the objective
% function hence if you would like to maximize the function then multiply
% the function by negative one. M is the numebr of objective functions and
% V is the number of decision variables.
%
% This functions is basically written by the user who defines his/her own
% objective function. Make sure that the M and V matches your initial user
% input. Make sure that the
%
% An example objective function is given below. It has two six decision
% variables are two objective functions.
% f = [];
% %% objective function one
% % Decision variables are used to form the objective function.
% f(1) = 1 - exp(-4*x(1))*(sin(6*pi*x(1)))^6;
% sum = 0;
% for i = 2 : 6
% sum = sum + x(i)/4;
% end
% %% Intermediate function
% g_x = 1 + 9*(sum)^(0.25);
%
% %% objective function two
% f(2) = g_x*(1 - ((f(1))/(g_x))^2);
%% Kursawe proposed by Frank Kursawe.
% Take a look at the following reference
% A variant of evolution strategies for vector optimization.
% In H. P. Schwefel and R. M鋘ner editors Parallel Problem Solving from
% Nature. 1st Workshop PPSN I volume 496 of Lecture Notes in Computer
% Science pages 193-197 Berlin Germany oct 1991. Springer-Verlag.
%
% Number of objective is two while it can have arbirtarly many decision
% variables within the range -5 and 5. Common number of variables is 3.
f = [];
% objective function one
sum = 0;
for i = 1 : V - 1
sum = sum - 10*exp(-0.2*sqrt((x(i))^2 + (x(i + 1))^2));
end
% Decision variables are used to form the objective function.
f(1) = sum;
% objective function two
sum = 0;
for i = 1 : V
sum = sum + (abs(x(i))^0.8 + 5*(sin(x(i)))^3);
end
% Decision variables are used to form the objective function.
f(2) = sum;
%% Check for error
if length(f) ~= M
error(‘The number of decision variables does not match you previous input. Kindly check your objective function‘);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 49664 2008-03-26 22:05 遗传算法程序.doc
----------- --------- ---------- ----- ----
49664 1
相关资源
- 图论软件包
- 医学图像配准
- GSA算法源程序
- 遗传算法优化rbf网络108003
- 用于图象处理的量子遗传算法
- 遗传算法优化BP网络(用于电力负荷预
- GAOT工具箱
- contourlet代码
- 图像栅格化处理
- 基于遗传算法的多目标优化.rar
- 遗传算法工具箱gatool
- 一维大地电磁测深遗传算法反演
- 计算机图形学实验报告及代码2
- HDL-Coder详细教程
- 老外编的kriging插值
- 基于遗传算法的供应链网络的建立与
- 雷达中的微多普勒效应 程序代码
- 多点交叉基本遗传算法
- 并行多家族遗传算法
- SAR图像变化检测方法,包括了对数比
- 矩量法计算线天线辐射方向图
- 车间调度算法
- 非局部均值滤波
- 直流微网建模,母线电压200V,改进下
- NSGAII.pdf
- 遗传算法的BP神经网络优化算法
- 遗传算法外文文献
- GA遗传算法TSP城市集合算例
- 自校正PID控制算法
- relief算法的代码实现
评论
共有 条评论