• 大小: 6KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-09
  • 语言: Matlab
  • 标签: MATLB  NSGA2  CODE  

资源简介

NSGA2,MATLBD代码 Non-dominated Sorting Genetic Algorithm II (NSGA-II)

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  MATLAB Code for                                              %
%                                                               %
%  Non-dominated Sorting Genetic Algorithm II (NSGA-II)         %
%  Version 1.1 - November 2011                                  %
%                                                               %
%  Programmed By: S. Mostapha Kalami Heris (MatlabSite Member)  %
%                                                               %
%         e-Mail: kalami@ee.kntu.ac.ir                          %
%                 kalami@matlabsite.com                         %
%                                                               %
%       Homepage: http://www.kalami.ir                          %
%                                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function i=BinaryTournamentSelection(pop)

    ii=randperm(numel(pop));
    
    i1=ii(1);
    i2=ii(2);
    
    if pop(i1).Rank        i=i1;
        
    elseif pop(i2).Rank        i=i2;
        
    else
        if pop(i1).CrowdingDistance>pop(i2).CrowdingDistance
            i=i1;
        else
            i=i2;
        end
    end
    
end

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

     文件       1334  2011-11-21 11:41  NSGA2-MATLAB Codes\BinaryTournamentSelection.m

     文件       1739  2011-11-21 11:41  NSGA2-MATLAB Codes\CalcCrowdingDistance.m

     文件       1258  2011-11-21 11:41  NSGA2-MATLAB Codes\Crossover.m

     文件       1130  2011-11-21 11:41  NSGA2-MATLAB Codes\Dominates.m

     文件       1252  2011-11-21 11:41  NSGA2-MATLAB Codes\Mutate.m

     文件       1102  2012-02-16 17:42  NSGA2-MATLAB Codes\MyCost.m

     文件       2150  2012-01-21 20:13  NSGA2-MATLAB Codes\NonDominatedSorting.m

     文件       3527  2012-02-16 17:31  NSGA2-MATLAB Codes\nsga2.m

     文件        743  2011-11-02 11:48  NSGA2-MATLAB Codes\rigidnd.m

     文件       1216  2011-11-21 11:41  NSGA2-MATLAB Codes\SortPopulation.m

     文件        295  2009-08-06 14:05  NSGA2-MATLAB Codes\Untitled2.m

     目录          0  2012-02-16 17:41  NSGA2-MATLAB Codes

----------- ---------  ---------- -----  ----

                15746                    12


评论

共有 条评论