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

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

?? nsga_2.html

?? NSGA-II多目標(biāo)優(yōu)化的matlab代碼
?? HTML
字號:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <!--
This HTML is auto-generated from an M-file.
To make changes, update the M-file and republish this document.
      -->
      <title>Main Function</title>
      <meta name="generator" content="MATLAB 7.0">
      <meta name="date" content="2006-03-07">
      <meta name="m-file" content="nsga_2"><style>
body {
  background-color: white;
  margin:10px;
}
h1 {
  color: #990000; 
  font-size: x-large;
}
h2 {
  color: #990000;
  font-size: medium;
}
p.footer {
  text-align: right;
  font-size: xx-small;
  font-weight: lighter;
  font-style: italic;
  color: gray;
}

pre.codeinput {
  margin-left: 30px;
}

span.keyword {color: #0000FF}
span.comment {color: #228B22}
span.string {color: #A020F0}
span.untermstring {color: #B20000}
span.syscmd {color: #B28C00}

pre.showbuttons {
  margin-left: 30px;
  border: solid black 2px;
  padding: 4px;
  background: #EBEFF3;
}

pre.codeoutput {
  color: gray;
  font-style: italic;
}
pre.error {
  color: red;
}

/* Make the text shrink to fit narrow windows, but not stretch too far in 
wide windows.  On Gecko-based browsers, the shrink-to-fit doesn't work. */ 
p,h1,h2,div {
  /* for MATLAB's browser */
  width: 600px;
  /* for Mozilla, but the "width" tag overrides it anyway */
  max-width: 600px;
  /* for IE */
  width:expression(document.body.clientWidth > 620 ? "600px": "auto" );
}

    </style></head>
   <body>
      <h1>Main Function</h1>
      <introduction>
         <p>Main program to run the NSGA-II MOEA. Read the corresponding documentation to learn more about multiobjective optimization
            using evolutionary algorithms. initialize_variables has two arguments; First being the population size and the second the
            problem number. '1' corresponds to MOP1 and '2' corresponds to MOP2.
         </p>
      </introduction>
      <h2>Contents</h2>
      <div>
         <ul>
            <li><a href="#1">Initialize the variables</a></li>
            <li><a href="#2">Sort the initialized population</a></li>
            <li><a href="#3">Start the evolution process</a></li>
            <li><a href="#4">Result</a></li>
            <li><a href="#5">Visualize</a></li>
         </ul>
      </div>
      <h2>Initialize the variables<a name="1"></a></h2>
      <p>Declare the variables and initialize their values pop - population gen - generations pro - problem number</p><pre class="codeinput">pop = 200;
gen = 1;
pro = 1;

<span class="keyword">switch</span> pro
    <span class="keyword">case</span> 1
        <span class="comment">% M is the number of objectives.</span>
        M = 2;
        <span class="comment">% V is the number of decision variables. In this case it is</span>
        <span class="comment">% difficult to visualize the decision variables space while the</span>
        <span class="comment">% objective space is just two dimensional.</span>
        V = 6;
    <span class="keyword">case</span> 2
        M = 3;
        V = 12;
<span class="keyword">end</span>

<span class="comment">% Initialize the population</span>
chromosome = initialize_variables(pop,pro);
</pre><h2>Sort the initialized population<a name="2"></a></h2>
      <p>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.
      </p><pre class="codeinput">chromosome = non_domination_sort_mod(chromosome,pro);
</pre><h2>Start the evolution process<a name="3"></a></h2><pre class="codeinput"><span class="comment">% The following are performed in each generation</span>
<span class="comment">% Select the parents</span>
<span class="comment">% Perfrom crossover and Mutation operator</span>
<span class="comment">% Perform Selection</span>

<span class="keyword">for</span> i = 1 : gen
    <span class="comment">% Select the parents</span>
    <span class="comment">% Parents are selected for reproduction to generate offspring. The</span>
    <span class="comment">% original NSGA-II uses a binary tournament selection based on the</span>
    <span class="comment">% crowded-comparision operator. The arguments are</span>
    <span class="comment">% pool - size of the mating pool. It is common to have this to be half the</span>
    <span class="comment">%        population size.</span>
    <span class="comment">% tour - Tournament size. Original NSGA-II uses a binary tournament</span>
    <span class="comment">%        selection, but to see the effect of tournament size this is kept</span>
    <span class="comment">%        arbitary, to be choosen by the user.</span>
    pool = round(pop/2);
    tour = 2;
    parent_chromosome = tournament_selection(chromosome,pool,tour);

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

    <span class="comment">% Intermediate population</span>
    <span class="comment">% Intermediate population is the combined population of parents and</span>
    <span class="comment">% offsprings of the current generation. The population size is almost 1 and</span>
    <span class="comment">% half times the initial population.</span>
    [main_pop,temp] = size(chromosome);
    [offspring_pop,temp] = size(offspring_chromosome);
    intermediate_chromosome(1:main_pop,:) = chromosome;
    intermediate_chromosome(main_pop + 1 : main_pop + offspring_pop,1 : M+V) = <span class="keyword">...</span>
        offspring_chromosome;

    <span class="comment">% Non-domination-sort of intermediate population</span>
    <span class="comment">% The intermediate population is sorted again based on non-domination sort</span>
    <span class="comment">% before the replacement operator is performed on the intermediate</span>
    <span class="comment">% population.</span>
    intermediate_chromosome = <span class="keyword">...</span>
        non_domination_sort_mod(intermediate_chromosome,pro);
    <span class="comment">% Perform Selection</span>
    <span class="comment">% Once the intermediate population is sorted only the best solution is</span>
    <span class="comment">% selected based on it rank and crowding distance. Each front is filled in</span>
    <span class="comment">% ascending order until the addition of population size is reached. The</span>
    <span class="comment">% last front is included in the population based on the individuals with</span>
    <span class="comment">% least crowding distance</span>
    chromosome = replace_chromosome(intermediate_chromosome,pro,pop);
    <span class="keyword">if</span> ~mod(i,10)
        fprintf(<span class="string">'%d\n'</span>,i);
    <span class="keyword">end</span>
<span class="keyword">end</span>
</pre><h2>Result<a name="4"></a></h2>
      <p>Save the result in ASCII text format.</p><pre class="codeinput">save <span class="string">solution.txt</span> <span class="string">chromosome</span> <span class="string">-ASCII</span>
</pre><h2>Visualize<a name="5"></a></h2>
      <p>The following is used to visualize the result for the given problem.</p><pre class="codeinput"><span class="keyword">switch</span> pro
    <span class="keyword">case</span> 1
        plot(chromosome(:,V + 1),chromosome(:,V + 2),<span class="string">'*'</span>);
        title(<span class="string">'MOP1 using NSGA-II'</span>);
        xlabel(<span class="string">'f(x_1)'</span>);
        ylabel(<span class="string">'f(x_2)'</span>);
    <span class="keyword">case</span> 2
        plot3(chromosome(:,V + 1),chromosome(:,V + 2),chromosome(:,V + 3),<span class="string">'*'</span>);
        title(<span class="string">'MOP2 using NSGA-II'</span>);
        xlabel(<span class="string">'f(x_1)'</span>);
        ylabel(<span class="string">'f(x_2)'</span>);
        zlabel(<span class="string">'f(x_3)'</span>);
<span class="keyword">end</span>
</pre><p class="footer"><br>
         Published with MATLAB&reg; 7.0<br></p>
      <!--
##### SOURCE BEGIN #####

%% Main Function
% Main program to run the NSGA-II MOEA.
% Read the corresponding documentation to learn more about multiobjective
% optimization using evolutionary algorithms.
% initialize_variables has two arguments; First being the population size
% and the second the problem number. '1' corresponds to MOP1 and '2'
% corresponds to MOP2.

%% Initialize the variables
% Declare the variables and initialize their values
% pop - population
% gen - generations
% pro - problem number

pop = 200;
gen = 1;
pro = 1;

switch pro
    case 1
        % M is the number of objectives.
        M = 2;
        % V is the number of decision variables. In this case it is
        % difficult to visualize the decision variables space while the
        % objective space is just two dimensional.
        V = 6;
    case 2
        M = 3;
        V = 12;
end

% Initialize the population
chromosome = initialize_variables(pop,pro);


%% 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. 
chromosome = non_domination_sort_mod(chromosome,pro);

%% Start the evolution process

% The following are performed in each generation
% Select the parents
% Perfrom crossover and Mutation operator
% Perform Selection

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;
    parent_chromosome = tournament_selection(chromosome,pool,tour);

    % Perfrom crossover and Mutation operator
    % The original NSGA-II algorithm uses Simulated Binary Crossover (SBX) and
    % Polynomial crossover. 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,pro,mu,mum);

    % Intermediate population
    % Intermediate population is the combined population of parents and
    % offsprings of the current generation. The population size is almost 1 and
    % half times the initial population.
    [main_pop,temp] = size(chromosome);
    [offspring_pop,temp] = size(offspring_chromosome);
    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,pro);
    % 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,pro,pop);
    if ~mod(i,10)
        fprintf('%d\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 for the given problem.
switch pro
    case 1
        plot(chromosome(:,V + 1),chromosome(:,V + 2),'*');
        title('MOP1 using NSGA-II');
        xlabel('f(x_1)');
        ylabel('f(x_2)');
    case 2
        plot3(chromosome(:,V + 1),chromosome(:,V + 2),chromosome(:,V + 3),'*');
        title('MOP2 using NSGA-II');
        xlabel('f(x_1)');
        ylabel('f(x_2)');
        zlabel('f(x_3)');
end       
##### SOURCE END #####
-->
   </body>
</html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品久久99久久久久| 国产色一区二区| 91成人免费网站| 一本色道综合亚洲| 色婷婷综合久久久久中文| 一本到高清视频免费精品| 在线视频国产一区| 欧美色男人天堂| 欧美剧在线免费观看网站| 欧美高清hd18日本| 日韩女优电影在线观看| 日韩欧美一二三| 精品嫩草影院久久| 久久久久久毛片| ●精品国产综合乱码久久久久 | 亚洲欧美日韩国产一区二区三区| 国产欧美一区二区精品性色| 国产精品国产三级国产普通话蜜臀 | 亚洲三级电影全部在线观看高清| 亚洲欧美精品午睡沙发| 一区二区三区.www| 视频在线观看国产精品| 久久精品国产999大香线蕉| 国产真实乱子伦精品视频| 在线看国产一区二区| 色噜噜狠狠色综合中国| 欧美日韩精品免费观看视频| 日韩一级片网站| 日本一区二区成人在线| 伊人夜夜躁av伊人久久| 日韩不卡一二三区| 国产精品一区二区x88av| 91亚洲永久精品| 欧美日韩电影一区| 国产亚洲一区二区在线观看| 国产精品久久久久天堂| 香港成人在线视频| 国产伦精品一区二区三区免费迷 | 在线观看亚洲精品| 日韩一区二区三| 国产精品国产三级国产普通话蜜臀 | 久久中文字幕电影| 一区二区在线免费观看| 美女尤物国产一区| 99国产精品久久久久久久久久久| 欧美在线看片a免费观看| 欧美tickle裸体挠脚心vk| 国产精品久久久久天堂| 免费在线观看视频一区| 97精品电影院| 欧美成人三级在线| 亚洲欧美欧美一区二区三区| 久国产精品韩国三级视频| 在线观看免费成人| 久久精品夜色噜噜亚洲aⅴ| 亚洲综合一区二区| 国产成人在线视频网站| 91精品国模一区二区三区| 国产精品国模大尺度视频| 免费亚洲电影在线| 在线亚洲免费视频| 欧美国产丝袜视频| 青青草原综合久久大伊人精品 | 日韩视频在线永久播放| 亚洲精品精品亚洲| 国产成a人亚洲精品| 欧美一区二区三区视频| 一区二区在线观看视频| 国产成人亚洲综合a∨婷婷| 欧美剧情片在线观看| 亚洲欧美另类在线| 成人午夜又粗又硬又大| 日韩一级免费观看| 亚洲一卡二卡三卡四卡| 成人国产精品免费观看| 久久老女人爱爱| 日韩av网站免费在线| 在线日韩国产精品| 亚洲欧洲国产日本综合| 国产成人午夜精品5599| 欧美va在线播放| 日本vs亚洲vs韩国一区三区| 欧日韩精品视频| 亚洲色图制服丝袜| av电影天堂一区二区在线观看| 久久久久久久久久久久久久久99| 日韩电影在线观看电影| 欧美日韩成人综合天天影院| 亚洲综合色网站| 91免费版在线看| 中文字幕一区免费在线观看| 粉嫩蜜臀av国产精品网站| 久久久99精品免费观看| 国产精品自拍三区| 久久这里只有精品6| 久久99精品一区二区三区三区| 在线综合视频播放| 肉色丝袜一区二区| 制服视频三区第一页精品| 天天影视网天天综合色在线播放| 欧美三级在线看| 亚洲高清视频的网址| 欧美性大战久久久久久久| 亚洲综合丝袜美腿| 欧美三级视频在线| 亚洲高清免费观看| 欧美亚洲愉拍一区二区| 亚洲一级在线观看| 欧美一区二区三区在线电影| 日本免费新一区视频| 日韩精品在线网站| 国产福利不卡视频| 中文字幕亚洲视频| 色哟哟精品一区| 午夜精品视频在线观看| 91精品国产综合久久精品图片| 91蝌蚪porny成人天涯| 欧美日韩一区二区三区四区 | 精品在线播放午夜| 欧美一级高清片| 国模一区二区三区白浆| 国产精品麻豆一区二区| 91在线精品一区二区| 一区二区三区在线观看网站| 欧美乱妇15p| 激情五月播播久久久精品| 欧美国产亚洲另类动漫| 色域天天综合网| 青青草国产精品97视觉盛宴| www国产亚洲精品久久麻豆| 国产精品综合在线视频| 亚洲免费观看视频| 欧美一区二区三区免费观看视频| 国产精品综合久久| 亚洲另类中文字| 欧美一区二区精美| 成人美女视频在线观看18| 亚洲精品国产高清久久伦理二区| 51精品视频一区二区三区| 激情五月婷婷综合网| 亚洲欧美一区二区久久| 日韩一级高清毛片| 99视频精品在线| 日本中文在线一区| 中文字幕久久午夜不卡| 欧美视频在线不卡| 国产精品白丝jk白祙喷水网站| 一区二区三区免费观看| 日韩欧美国产一区二区三区| 99久久精品久久久久久清纯| 五月天视频一区| 国产精品不卡在线观看| 3751色影院一区二区三区| av中文字幕亚洲| 日本不卡视频在线| 亚洲乱码日产精品bd| 精品久久久久久久一区二区蜜臀| 成人黄色小视频| 久久99精品久久久久久 | 成人手机在线视频| 午夜不卡av在线| 国产精品网站一区| 6080日韩午夜伦伦午夜伦| 99久久99久久久精品齐齐| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产成人精品网址| 日韩av网站在线观看| 免费久久精品视频| 亚洲欧洲国产日韩| 久久色中文字幕| 欧美久久久久久久久| 97超碰欧美中文字幕| 狠狠色丁香久久婷婷综| 亚洲va国产va欧美va观看| 国产精品视频看| 欧美xxxxxxxx| 欧美欧美欧美欧美| 日本乱人伦aⅴ精品| 成人午夜免费视频| 国产一区二区三区最好精华液| 亚洲成人午夜电影| 一区二区三区在线播放| 国产精品免费av| 久久久久久久久久久久久久久99 | 91精品国产高清一区二区三区 | 欧美男人的天堂一二区| 91美女在线看| 不卡在线观看av| 国产成人在线视频网站| 国内精品视频一区二区三区八戒| 日韩电影免费在线观看网站| 亚洲一区二区中文在线| 亚洲丝袜另类动漫二区| 国产精品免费aⅴ片在线观看| 久久久无码精品亚洲日韩按摩| 日韩精品自拍偷拍| 日韩美一区二区三区| 日韩一级黄色大片| 日韩免费成人网| 精品久久99ma|