• 大小: 7KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: Matlab
  • 标签: matlab  NSGA  NSGA-II  

资源简介

很不错的一个国外学者写得NSGA-II_matlab库

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  MATLAB Code for                                              %
%                                                               %
%  Non-dominated Sorting Genetic Algorithm II (NSGA-II)         %
%  Version 1.0 - April 2010                                     %
%                                                               %
%  Programmed By: S. Mostapha Kalami Heris                      %
%                                                               %
%         e-Mail: sm.kalami@gmail.com                           %
%                 kalami@ee.kntu.ac.ir                          %
%                                                               %
%       Homepage: http://www.kalami.ir                          %
%                                                               %
%  BinaryTournamentSelection.m : implelemnts binary tournament  %
%                                selection                      %
%                                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function p=BinaryTournamentSelection(pop)

    npop=numel(pop);
    
    i=randint(12[1 npop]);
    
    p1=pop(i(1));
    p2=pop(i(2));
    
    if p1.Rank < p2.Rank
        p=p1;
    elseif p1.Rank > p2.Rank
        p=p2;
    else
        if p1.CrowdingDistance>p2.CrowdingDistance
            p=p1;
        else
            p=p2;
        end
    end

end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-04-26 01:16  NSGA-II\
     文件        1521  2010-04-26 00:05  NSGA-II\BinaryTournamentSelection.m
     文件        1637  2010-04-26 00:06  NSGA-II\CalcCrowdingDistance.m
     文件        1242  2010-04-26 00:07  NSGA-II\Cost.m
     文件        1462  2010-04-26 00:08  NSGA-II\CreateEmptyIndividuals.m
     文件        1357  2010-04-26 00:09  NSGA-II\Crossover.m
     文件        1244  2010-04-26 00:10  NSGA-II\Dominates.m
     文件        1187  2010-04-26 00:11  NSGA-II\GetCosts.m
     文件        1317  2010-04-26 01:13  NSGA-II\Mutate.m
     文件        2488  2010-04-26 00:12  NSGA-II\NonDominatedSorting.m
     文件        3140  2010-04-26 01:13  NSGA-II\nsga2.m
     文件        1645  2010-04-26 00:14  NSGA-II\PlotFronts.m
     文件        1442  2010-04-26 00:16  NSGA-II\SortPopulation.m
     文件         110  2010-04-26 01:16  NSGA-II\www.kalami.ir.url

评论

共有 条评论