亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nsga_2.m

?? 演化、遺傳計(jì)算方法NSGA2的源代碼
?? M
字號(hào):
function nsga_2(pop,gen)

%% function nsga_2(pop,gen)
% is a multi-objective optimization function where the input arguments are 
% pop - Population size
% gen - Total number of generations
% 
% This functions is based on evolutionary algorithm for finding the optimal
% solution for multiple objective i.e. pareto front for the objectives. 
% Initially enter only the population size and the stoping criteria or
% the total number of generations after which the algorithm will
% automatically stopped. 
%
% You will be asked to enter the number of objective functions, the number
% of decision variables and the range space for the decision variables.
% Also you will have to define your own objective funciton by editing the
% evaluate_objective() function. A sample objective function is described
% in evaluate_objective.m. Kindly make sure that the objective function
% which you define match the number of objectives that you have entered as
% well as the number of decision variables that you have entered. The
% decision variable space is continuous for this function, but the
% objective space may or may not be continuous.
%
% Original algorithm NSGA-II was developed by researchers in Kanpur Genetic
% Algorithm Labarotary and kindly visit their website for more information
% http://www.iitk.ac.in/kangal/

%% Simple error checking
% Number of Arguments
% Check for the number of arguments. The two input arguments are necessary
% to run this function.
if nargin < 2
    error('NSGA-II: Please enter the population size and number of generations as input arguments.');
end
% Both the input arguments need to of integer data type
if isnumeric(pop) == 0 || isnumeric(gen) == 0
    error('Both input arguments pop and gen should be integer datatype');
end
% Minimum population size has to be 20 individuals
if pop < 20
    error('Minimum population for running this function is 20');
end
if gen < 5
    error('Minimum number of generations is 5');
end
% Make sure pop and gen are integers
pop = round(pop);
gen = round(gen);
%% Objective Function
% The objective function description contains information about the
% objective function. M is the dimension of the objective space, V is the
% dimension of decision variable space, min_range and max_range are the
% range for the variables in the decision variable space. User has to
% define the objective functions using the decision variables. Make sure to
% edit the function 'evaluate_objective' to suit your needs.
[M, V, min_range, max_range] = objective_description_function();

%% Initialize the population
% Population is initialized with random values which are within the
% specified range. Each chromosome consists of the decision variables. Also
% the value of the objective functions, rank and crowding distance
% information is also added to the chromosome vector but only the elements
% of the vector which has the decision variables are operated upon to
% perform the genetic operations like corssover and mutation.
chromosome = initialize_variables(pop, M, V, min_range, max_range);


%% Sort the initialized population
% Sort the population using non-domination-sort. This returns two columns
% for each individual which are the rank and the crowding distance
% corresponding to their position in the front they belong. At this stage
% the rank and the crowding distance for each chromosome is added to the
% chromosome vector for easy of computation.
chromosome = non_domination_sort_mod(chromosome, M, V);

%% Start the evolution process
% The following are performed in each generation
% * Select the parents which are fit for reproduction
% * Perfrom crossover and Mutation operator on the selected parents
% * Perform Selection from the parents and the offsprings
% * Replace the unfit individuals with the fit individuals to maintain a
%   constant population size.

for i = 1 : gen
    % Select the parents
    % Parents are selected for reproduction to generate offspring. The
    % original NSGA-II uses a binary tournament selection based on the
    % crowded-comparision operator. The arguments are 
    % pool - size of the mating pool. It is common to have this to be half the
    %        population size.
    % tour - Tournament size. Original NSGA-II uses a binary tournament
    %        selection, but to see the effect of tournament size this is kept
    %        arbitary, to be choosen by the user.
    pool = round(pop/2);
    tour = 2;
    % Selection process
    % A binary tournament selection is employed in NSGA-II. In a binary
    % tournament selection process two individuals are selected at random
    % and their fitness is compared. The individual with better fitness is
    % selcted as a parent. Tournament selection is carried out until the
    % pool size is filled. Basically a pool size is the number of parents
    % to be selected. The input arguments to the function
    % tournament_selection are chromosome, pool, tour. The function uses
    % only the information from last two elements in the chromosome vector.
    % The last element has the crowding distance information while the
    % penultimate element has the rank information. Selection is based on
    % rank and if individuals with same rank are encountered, crowding
    % distance is compared. A lower rank and higher crowding distance is
    % the selection criteria.
    parent_chromosome = tournament_selection(chromosome, pool, tour);

    % Perfrom crossover and Mutation operator
    % The original NSGA-II algorithm uses Simulated Binary Crossover (SBX) and
    % Polynomial  mutation. Crossover probability pc = 0.9 and mutation
    % probability is pm = 1/n, where n is the number of decision variables.
    % Both real-coded GA and binary-coded GA are implemented in the original
    % algorithm, while in this program only the real-coded GA is considered.
    % The distribution indeices for crossover and mutation operators as mu = 20
    % and mum = 20 respectively.
    mu = 20;
    mum = 20;
    offspring_chromosome = ...
        genetic_operator(parent_chromosome, ...
        M, V, mu, mum, min_range, max_range);

    % Intermediate population
    % Intermediate population is the combined population of parents and
    % offsprings of the current generation. The population size is two
    % times the initial population.
    
    [main_pop,temp] = size(chromosome);
    [offspring_pop,temp] = size(offspring_chromosome);
    % temp is a dummy variable.
    clear temp
    % intermediate_chromosome is a concatenation of current population and
    % the offspring population.
    intermediate_chromosome(1:main_pop,:) = chromosome;
    intermediate_chromosome(main_pop + 1 : main_pop + offspring_pop,1 : M+V) = ...
        offspring_chromosome;

    % Non-domination-sort of intermediate population
    % The intermediate population is sorted again based on non-domination sort
    % before the replacement operator is performed on the intermediate
    % population.
    intermediate_chromosome = ...
        non_domination_sort_mod(intermediate_chromosome, M, V);
    % Perform Selection
    % Once the intermediate population is sorted only the best solution is
    % selected based on it rank and crowding distance. Each front is filled in
    % ascending order until the addition of population size is reached. The
    % last front is included in the population based on the individuals with
    % least crowding distance
    chromosome = replace_chromosome(intermediate_chromosome, M, V, pop);
    if ~mod(i,100)
        clc
        fprintf('%d generations completed\n',i);
    end
end

%% Result
% Save the result in ASCII text format.
save solution.txt chromosome -ASCII

%% Visualize
% The following is used to visualize the result if objective space
% dimension is visualizable.
if M == 2
    plot(chromosome(:,V + 1),chromosome(:,V + 2),'*');
elseif M ==3
    plot3(chromosome(:,V + 1),chromosome(:,V + 2),chromosome(:,V + 3),'*');
end
    

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
六月丁香婷婷久久| 国产在线不卡一区| 美女视频一区二区三区| 成人丝袜高跟foot| 欧美一级日韩一级| 亚洲色图第一区| 国产成人亚洲综合a∨婷婷图片| 欧美日韩另类国产亚洲欧美一级| 欧美国产一区二区在线观看| 欧美aa在线视频| 欧美色精品在线视频| 亚洲欧美视频在线观看视频| 成人综合在线观看| 日韩毛片精品高清免费| 91黄视频在线观看| 日韩一区日韩二区| 不卡的电视剧免费网站有什么| 26uuu成人网一区二区三区| 日韩成人dvd| 91精品国产综合久久精品| 亚洲精品亚洲人成人网| 成人午夜激情在线| 一区二区三区蜜桃网| 91激情五月电影| 久久成人18免费观看| 中文字幕中文字幕中文字幕亚洲无线| 国产一区二区精品久久99| 亚洲欧美怡红院| 日韩女优电影在线观看| 日韩电影在线一区| 国产精品拍天天在线| 成人午夜视频网站| 日韩中文字幕91| 欧美一区二区三区四区五区| 国产成人午夜精品5599| 亚洲妇女屁股眼交7| 6080yy午夜一二三区久久| 国产黄色精品视频| 日韩精品午夜视频| 中文字幕一区视频| 精品日韩一区二区| 国产美女主播视频一区| 亚洲一卡二卡三卡四卡无卡久久| 欧洲av一区二区嗯嗯嗯啊| 亚洲不卡一区二区三区| 欧美日本在线播放| www.激情成人| 亚洲图片欧美一区| 国产精品久久综合| 欧美www视频| 欧美性大战xxxxx久久久| 日韩av中文字幕一区二区三区| 综合久久综合久久| 国产亚洲欧美日韩俺去了| 99久久久久免费精品国产 | 欧美国产精品一区二区三区| 欧美精品123区| 国产一区在线看| 丝袜诱惑亚洲看片| 玉足女爽爽91| 亚洲色欲色欲www| 欧美国产乱子伦| 久久精品视频一区二区三区| 3atv一区二区三区| 欧美日韩1234| 欧美年轻男男videosbes| 在线观看www91| 日本大香伊一区二区三区| 91免费国产在线观看| 免费观看在线综合色| 亚洲一级在线观看| 亚洲最大的成人av| 亚洲欧美日韩在线| 最新热久久免费视频| 国产精品久久免费看| 国产综合色在线视频区| 日韩欧美国产综合在线一区二区三区 | 亚洲成人久久影院| 一区二区三区在线视频观看58 | 一二三四区精品视频| 亚洲久本草在线中文字幕| 最新久久zyz资源站| 国产精品无遮挡| 国产精品久久毛片a| 国产精品毛片久久久久久| 欧美经典一区二区三区| 欧美精品18+| 91精品国产综合久久香蕉的特点 | 久久久不卡影院| 欧美在线一区二区| 欧美性一二三区| 7777女厕盗摄久久久| 日韩一区二区三区视频在线| 日本韩国欧美一区| 欧美日韩国产精品自在自线| 欧美日韩国产不卡| 欧美sm极限捆绑bd| 国产日本欧美一区二区| 亚洲欧洲av一区二区三区久久| 亚洲精品国产一区二区三区四区在线| 亚洲欧美日韩国产综合| 亚洲福利视频导航| 久久福利资源站| av亚洲产国偷v产偷v自拍| 91蝌蚪porny| 51久久夜色精品国产麻豆| 欧美精品一区二区三区在线| 欧美日韩高清影院| 欧美精品一区二区三| 国产欧美一区二区精品秋霞影院 | 亚洲男人的天堂一区二区| 亚洲国产精品一区二区久久| 久久国产福利国产秒拍| 不卡一区在线观看| 7777精品久久久大香线蕉| 久久噜噜亚洲综合| 亚洲欧美区自拍先锋| 免费看黄色91| 99久久99久久精品免费观看| 欧美精品在线观看一区二区| 国产欧美日韩另类视频免费观看| 亚洲理论在线观看| 精品综合久久久久久8888| 久久99久久99精品免视看婷婷 | 国产伦理精品不卡| 日本乱人伦aⅴ精品| 精品国产91洋老外米糕| 亚洲免费av高清| 国产一区二区看久久| 欧美日韩一区精品| 国产精品毛片大码女人| 免费人成黄页网站在线一区二区 | 国产一区二区视频在线| 欧美午夜精品久久久久久超碰| 欧美精品一区二区久久婷婷| 亚洲成人福利片| 成人免费视频免费观看| 日韩精品一区二区在线观看| 一区二区三区免费网站| 国产白丝精品91爽爽久久| 成人的网站免费观看| 欧美一级在线观看| 亚洲影视在线观看| www.日韩大片| 中文字幕国产精品一区二区| 美女脱光内衣内裤视频久久影院| 在线观看av不卡| 亚洲日本在线看| 丁香另类激情小说| 2017欧美狠狠色| 奇米一区二区三区| 欧美日韩免费电影| 夜夜爽夜夜爽精品视频| 91美女在线看| 中文字幕中文乱码欧美一区二区| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品国产a| 国产一区久久久| 2017欧美狠狠色| 激情综合网av| 精品女同一区二区| 免费成人你懂的| 欧美一区二区三区日韩| 天堂资源在线中文精品| 国产一区二区三区观看| 精品福利一区二区三区免费视频| 日韩av在线发布| 7777精品久久久大香线蕉| 五月婷婷色综合| 91精品国产综合久久精品麻豆| 亚洲国产色一区| 欧美日韩精品免费观看视频| 亚洲国产日韩a在线播放性色| 在线观看区一区二| 午夜精品久久久久久久久| 欧美日韩在线精品一区二区三区激情| 亚洲一区二区三区激情| 欧美日韩一区二区在线视频| 视频精品一区二区| 91精品国产综合久久久蜜臀粉嫩 | 亚洲国产精品高清| a级精品国产片在线观看| 自拍偷在线精品自拍偷无码专区| 97se亚洲国产综合自在线观| 一区二区三区小说| 欧美日韩三级在线| 精品一区二区三区日韩| 久久精品亚洲精品国产欧美kt∨| 国产91高潮流白浆在线麻豆| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 国产无遮挡一区二区三区毛片日本| 国产精品2024| 日韩一级黄色片| 国产精品1区2区| 亚洲精品ww久久久久久p站| 3d动漫精品啪啪一区二区竹菊| 精品亚洲欧美一区| 国产精品超碰97尤物18| 欧美精品日韩一本| 国产精品一区在线|