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

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

?? genetic_operator.html

?? NSGA原代碼
?? 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>function f  = genetic_operator(parent_chromosome, M, V, mu, mum, l_limit, u_limit)</title>      <meta name="generator" content="MATLAB 7.0">      <meta name="date" content="2006-03-16">      <meta name="m-file" content="genetic_operator"><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>function f  = genetic_operator(parent_chromosome, M, V, mu, mum, l_limit, u_limit)</h1>      <p>This function is utilized to produce offsprings from parent chromosomes. The genetic operators corssover and mutation which         are carried out with slight modifications from the original design. For more information read the document enclosed.      </p>      <p>parent_chromosome - the set of selected chromosomes. M - number of objective functions V - number of decision varaiables mu         - distribution index for crossover (read the enlcosed pdf file) mum - distribution index for mutation (read the enclosed pdf         file) l_limit - a vector of lower limit for the corresponding decsion variables u_limit - a vector of upper limit for the         corresponding decsion variables      </p>      <p>The genetic operation is performed only on the decision variables, that is the first V elements in the chromosome vector.</p><pre class="codeinput">[N,m] = size(parent_chromosome);clear <span class="string">m</span>p = 1;<span class="comment">% Flags used to set if crossover and mutation were actually performed.</span>was_crossover = 0;was_mutation = 0;<span class="keyword">for</span> i = 1 : N    <span class="comment">% With 90 % probability perform crossover</span>    <span class="keyword">if</span> rand(1) &lt; 0.9        <span class="comment">% Initialize the children to be null vector.</span>        child_1 = [];        child_2 = [];        <span class="comment">% Select the first parent</span>        parent_1 = round(N*rand(1));        <span class="keyword">if</span> parent_1 &lt; 1            parent_1 = 1;        <span class="keyword">end</span>        <span class="comment">% Select the second parent</span>        parent_2 = round(N*rand(1));        <span class="keyword">if</span> parent_2 &lt; 1            parent_2 = 1;        <span class="keyword">end</span>        <span class="comment">% Make sure both the parents are not the same.</span>        <span class="keyword">while</span> isequal(parent_chromosome(parent_1,:),parent_chromosome(parent_2,:))            parent_2 = round(N*rand(1));            <span class="keyword">if</span> parent_2 &lt; 1                parent_2 = 1;            <span class="keyword">end</span>        <span class="keyword">end</span>        <span class="comment">% Get the chromosome information for each randomnly selected</span>        <span class="comment">% parents</span>        parent_1 = parent_chromosome(parent_1,:);        parent_2 = parent_chromosome(parent_2,:);        <span class="comment">% Perform corssover for each decision variable in the chromosome.</span>        <span class="keyword">for</span> j = 1 : V            <span class="comment">% SBX (Simulated Binary Crossover).</span>            <span class="comment">% For more information about SBX refer the enclosed pdf file.</span>            <span class="comment">% Generate a random number</span>            u(j) = rand(1);            <span class="keyword">if</span> u(j) &lt;= 0.5                bq(j) = (2*u(j))^(1/(mu+1));            <span class="keyword">else</span>                bq(j) = (1/(2*(1 - u(j))))^(1/(mu+1));            <span class="keyword">end</span>            <span class="comment">% Generate the jth element of first child</span>            child_1(j) = <span class="keyword">...</span>                0.5*(((1 + bq(j))*parent_1(j)) + (1 - bq(j))*parent_2(j));            <span class="comment">% Generate the jth element of second child</span>            child_2(j) = <span class="keyword">...</span>                0.5*(((1 - bq(j))*parent_1(j)) + (1 + bq(j))*parent_2(j));            <span class="comment">% Make sure that the generated element is within the specified</span>            <span class="comment">% decision space else set it to the appropriate extrema.</span>            <span class="keyword">if</span> child_1(j) &gt; u_limit(j)                child_1(j) = u_limit(j);            <span class="keyword">elseif</span> child_1(j) &lt; l_limit(j)                child_1(j) = l_limit(j);            <span class="keyword">end</span>            <span class="keyword">if</span> child_2(j) &gt; u_limit(j)                child_2(j) = u_limit(j);            <span class="keyword">elseif</span> child_2(j) &lt; l_limit(j)                child_2(j) = l_limit(j);            <span class="keyword">end</span>        <span class="keyword">end</span>        <span class="comment">% Evaluate the objective function for the offsprings and as before</span>        <span class="comment">% concatenate the offspring chromosome with objective value.</span>        child_1(:,V + 1: M + V) = evaluate_objective(child_1, M, V);        child_2(:,V + 1: M + V) = evaluate_objective(child_2, M, V);        <span class="comment">% Set the crossover flag. When crossover is performed two children</span>        <span class="comment">% are generate, while when mutation is performed only only child is</span>        <span class="comment">% generated.</span>        was_crossover = 1;        was_mutation = 0;    <span class="comment">% With 10 % probability perform mutation. Mutation is based on</span>    <span class="comment">% polynomial mutation.</span>    <span class="keyword">else</span>        <span class="comment">% Select at random the parent.</span>        parent_3 = round(N*rand(1));        <span class="keyword">if</span> parent_3 &lt; 1            parent_3 = 1;        <span class="keyword">end</span>        <span class="comment">% Get the chromosome information for the randomnly selected parent.</span>        child_3 = parent_chromosome(parent_3,:);        <span class="comment">% Perform mutation on eact element of the selected parent.</span>        <span class="keyword">for</span> j = 1 : V           r(j) = rand(1);           <span class="keyword">if</span> r(j) &lt; 0.5               delta(j) = (2*r(j))^(1/(mum+1)) - 1;           <span class="keyword">else</span>               delta(j) = 1 - (2*(1 - r(j)))^(1/(mum+1));           <span class="keyword">end</span>           <span class="comment">% Generate the corresponding child element.</span>           child_3(j) = child_3(j) + delta(j);           <span class="comment">% Make sure that the generated element is within the decision</span>           <span class="comment">% space.</span>           <span class="keyword">if</span> child_3(j) &gt; u_limit(j)               child_3(j) = u_limit(j);           <span class="keyword">elseif</span> child_3(j) &lt; l_limit(j)               child_3(j) = l_limit(j);           <span class="keyword">end</span>        <span class="keyword">end</span>        <span class="comment">% Evaluate the objective function for the offspring and as before</span>        <span class="comment">% concatenate the offspring chromosome with objective value.</span>        child_3(:,V + 1: M + V) = evaluate_objective(child_3, M, V);        <span class="comment">% Set the mutation flag</span>        was_mutation = 1;        was_crossover = 0;    <span class="keyword">end</span>    <span class="comment">% Keep proper count and appropriately fill the child variable with all</span>    <span class="comment">% the generated children for the particular generation.</span>    <span class="keyword">if</span> was_crossover        child(p,:) = child_1;        child(p+1,:) = child_2;        was_cossover = 0;        p = p + 2;    <span class="keyword">elseif</span> was_mutation        child(p,:) = child_3(1,1 : M + V);        was_mutation = 0;        p = p + 1;    <span class="keyword">end</span><span class="keyword">end</span>f = child;</pre><p class="footer"><br>         Published with MATLAB&reg; 7.0<br></p>      <!--##### SOURCE BEGIN #####

%% function f  = genetic_operator(parent_chromosome, M, V, mu, mum, l_limit, u_limit)
% 
% This function is utilized to produce offsprings from parent chromosomes.
% The genetic operators corssover and mutation which are carried out with
% slight modifications from the original design. For more information read
% the document enclosed. 
%
% parent_chromosome - the set of selected chromosomes.
% M - number of objective functions
% V - number of decision varaiables
% mu - distribution index for crossover (read the enlcosed pdf file)
% mum - distribution index for mutation (read the enclosed pdf file)
% l_limit - a vector of lower limit for the corresponding decsion variables
% u_limit - a vector of upper limit for the corresponding decsion variables
%
% The genetic operation is performed only on the decision variables, that
% is the first V elements in the chromosome vector. 

[N,m] = size(parent_chromosome);

clear m
p = 1;
% Flags used to set if crossover and mutation were actually performed. 
was_crossover = 0;
was_mutation = 0;


for i = 1 : N
    % With 90 % probability perform crossover
    if rand(1) < 0.9
        % Initialize the children to be null vector.
        child_1 = [];
        child_2 = [];
        % Select the first parent
        parent_1 = round(N*rand(1));
        if parent_1 < 1
            parent_1 = 1;
        end
        % Select the second parent
        parent_2 = round(N*rand(1));
        if parent_2 < 1
            parent_2 = 1;
        end
        % Make sure both the parents are not the same. 
        while isequal(parent_chromosome(parent_1,:),parent_chromosome(parent_2,:))
            parent_2 = round(N*rand(1));
            if parent_2 < 1
                parent_2 = 1;
            end
        end
        % Get the chromosome information for each randomnly selected
        % parents
        parent_1 = parent_chromosome(parent_1,:);
        parent_2 = parent_chromosome(parent_2,:);
        % Perform corssover for each decision variable in the chromosome.
        for j = 1 : V
            % SBX (Simulated Binary Crossover).
            % For more information about SBX refer the enclosed pdf file.
            % Generate a random number
            u(j) = rand(1);
            if u(j) <= 0.5
                bq(j) = (2*u(j))^(1/(mu+1));
            else
                bq(j) = (1/(2*(1 - u(j))))^(1/(mu+1));
            end
            % Generate the jth element of first child
            child_1(j) = ...
                0.5*(((1 + bq(j))*parent_1(j)) + (1 - bq(j))*parent_2(j));
            % Generate the jth element of second child
            child_2(j) = ...
                0.5*(((1 - bq(j))*parent_1(j)) + (1 + bq(j))*parent_2(j));
            % Make sure that the generated element is within the specified
            % decision space else set it to the appropriate extrema.
            if child_1(j) > u_limit(j)
                child_1(j) = u_limit(j);
            elseif child_1(j) < l_limit(j)
                child_1(j) = l_limit(j);
            end
            if child_2(j) > u_limit(j)
                child_2(j) = u_limit(j);
            elseif child_2(j) < l_limit(j)
                child_2(j) = l_limit(j);
            end
        end
        % Evaluate the objective function for the offsprings and as before
        % concatenate the offspring chromosome with objective value.
        child_1(:,V + 1: M + V) = evaluate_objective(child_1, M, V);
        child_2(:,V + 1: M + V) = evaluate_objective(child_2, M, V);
        % Set the crossover flag. When crossover is performed two children
        % are generate, while when mutation is performed only only child is
        % generated.
        was_crossover = 1;
        was_mutation = 0;
    % With 10 % probability perform mutation. Mutation is based on
    % polynomial mutation. 
    else
        % Select at random the parent.
        parent_3 = round(N*rand(1));
        if parent_3 < 1
            parent_3 = 1;
        end
        % Get the chromosome information for the randomnly selected parent.
        child_3 = parent_chromosome(parent_3,:);
        % Perform mutation on eact element of the selected parent.
        for j = 1 : V
           r(j) = rand(1);
           if r(j) < 0.5
               delta(j) = (2*r(j))^(1/(mum+1)) - 1;
           else
               delta(j) = 1 - (2*(1 - r(j)))^(1/(mum+1));
           end
           % Generate the corresponding child element.
           child_3(j) = child_3(j) + delta(j);
           % Make sure that the generated element is within the decision
           % space.
           if child_3(j) > u_limit(j)
               child_3(j) = u_limit(j);
           elseif child_3(j) < l_limit(j)
               child_3(j) = l_limit(j);
           end
        end
        % Evaluate the objective function for the offspring and as before
        % concatenate the offspring chromosome with objective value.    
        child_3(:,V + 1: M + V) = evaluate_objective(child_3, M, V);
        % Set the mutation flag
        was_mutation = 1;
        was_crossover = 0;
    end
    % Keep proper count and appropriately fill the child variable with all
    % the generated children for the particular generation.
    if was_crossover
        child(p,:) = child_1;
        child(p+1,:) = child_2;
        was_cossover = 0;
        p = p + 2;
    elseif was_mutation
        child(p,:) = child_3(1,1 : M + V);
        was_mutation = 0;
        p = p + 1;
    end
end
f = child;##### SOURCE END #####-->   </body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩精品一区二区三区| 国产91清纯白嫩初高中在线观看| 久久久久久久网| 精品国产乱码久久久久久蜜臀 | 亚洲午夜三级在线| 亚洲一区电影777| 亚洲成人av一区二区| 性感美女久久精品| 毛片不卡一区二区| 国产精品资源在线观看| 成人午夜在线视频| 色诱亚洲精品久久久久久| 欧美午夜影院一区| 日韩欧美亚洲国产另类| 久久精品一区二区三区不卡| 国产精品你懂的在线| 一区二区三区资源| 日韩av一二三| 国产99精品视频| 欧洲国内综合视频| 欧美一级日韩不卡播放免费| 久久精品在线观看| 亚洲国产精品久久久久婷婷884| 日韩精品91亚洲二区在线观看| 精品一区二区三区视频在线观看| youjizz久久| 在线成人小视频| 国产欧美日韩综合| 亚洲色图色小说| 日韩二区在线观看| www.欧美精品一二区| 欧美一区二区三区视频免费播放| 久久九九99视频| 图片区小说区国产精品视频| 国产精品18久久久久| 欧美在线免费视屏| 中文字幕不卡三区| 日韩精品一二三四| av在线不卡电影| 精品国产91洋老外米糕| 亚洲乱码国产乱码精品精可以看| 久久99精品久久久久久| 在线观看成人小视频| 久久久精品日韩欧美| 亚洲最新视频在线观看| 国产一区二区在线电影| 欧美日韩另类一区| 中文字幕在线不卡视频| 麻豆精品久久久| 久久久久国产精品厨房| 日韩高清在线不卡| 欧美日韩综合一区| 亚洲人一二三区| 成人在线视频一区| 国产午夜精品久久久久久免费视 | 亚洲影院理伦片| 粉嫩久久99精品久久久久久夜| 日韩欧美另类在线| 日韩一区欧美二区| 欧美老肥妇做.爰bbww| 一区二区成人在线视频| 97久久超碰精品国产| 国产精品美女久久久久aⅴ| 国产在线乱码一区二区三区| 日韩三级在线免费观看| 免费人成精品欧美精品| 在线不卡的av| 免费国产亚洲视频| 日韩视频123| 国产一区亚洲一区| 久久久久久久综合| 成人一区在线看| 国产精品国产自产拍在线| 成人av电影在线播放| 国产精品免费看片| 91亚洲男人天堂| 亚洲美腿欧美偷拍| 欧美人牲a欧美精品| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩一区国产二区欧美三区| 麻豆国产精品一区二区三区 | 精品国产一区久久| 蜜臀精品久久久久久蜜臀| 777久久久精品| 久久www免费人成看片高清| 精品毛片乱码1区2区3区| 精品在线亚洲视频| 国产精品萝li| 欧美日韩亚洲综合在线| 蜜臀av一区二区在线免费观看| 久久理论电影网| bt欧美亚洲午夜电影天堂| 一区二区高清在线| 日韩欧美精品在线| kk眼镜猥琐国模调教系列一区二区| 亚洲伦在线观看| 日韩一级完整毛片| 波多野结衣视频一区| 亚洲一区二区三区影院| 欧美电影免费观看高清完整版在线观看| 精品亚洲porn| 国产精品久久久久久久久久久免费看 | 日韩va亚洲va欧美va久久| 精品久久久久久最新网址| av激情成人网| 久久精品国产一区二区| 国产精品久久久久一区| 欧美日韩成人一区二区| 国产一区二区导航在线播放| 亚洲欧美日韩国产手机在线| 欧美mv日韩mv| 在线观看欧美黄色| 国产成人精品网址| 天堂久久一区二区三区| 国产精品成人免费精品自在线观看| 欧美日韩激情在线| 99久久er热在这里只有精品15 | 国产午夜亚洲精品午夜鲁丝片| 一本久久精品一区二区| 国内精品写真在线观看| 亚洲一级在线观看| 中文字幕国产一区| 欧美xxxx老人做受| 欧美日韩中文另类| www.欧美.com| 国产成a人亚洲| 久久精品国产一区二区三区免费看| 亚洲男人电影天堂| 国产精品久线在线观看| 久久亚洲二区三区| 日韩一级黄色大片| 欧美老女人第四色| 欧美日韩一区成人| 91免费观看在线| 99在线精品免费| 成人综合婷婷国产精品久久蜜臀| 久久精品久久综合| 麻豆精品在线观看| 石原莉奈一区二区三区在线观看| 国产精品区一区二区三区| 久久―日本道色综合久久| 日韩欧美国产一区在线观看| 欧美一区二区福利视频| 欧美美女bb生活片| 欧美日韩卡一卡二| 欧美一区二区视频在线观看| 91精品在线免费观看| 欧美肥妇bbw| 日韩欧美精品在线视频| 欧美一级精品在线| 欧美大片一区二区| 日韩免费看网站| 国产亚洲精品精华液| 中文字幕乱码久久午夜不卡| 国产精品福利av| 亚洲欧美日本韩国| 婷婷综合久久一区二区三区| 奇米影视一区二区三区| 激情五月婷婷综合| 国产在线国偷精品免费看| 国产在线播放一区二区三区| 国产福利视频一区二区三区| 成人免费毛片aaaaa**| 成人激情免费视频| 色综合久久久网| 欧美在线啊v一区| 精品视频999| 日韩免费视频一区二区| 国产精品伦理在线| 亚洲人成网站精品片在线观看| 亚洲久草在线视频| 免费黄网站欧美| a亚洲天堂av| 欧美日本一区二区| 久久久99久久精品欧美| 亚洲女人小视频在线观看| 午夜成人免费视频| 国产高清视频一区| 欧美性大战久久久久久久蜜臀| 777午夜精品视频在线播放| 国产亚洲一区字幕| 亚洲成人你懂的| 国产成人亚洲精品狼色在线 | 91精品国产综合久久婷婷香蕉| 日韩精品一区二区在线| 国产精品二区一区二区aⅴ污介绍| 无吗不卡中文字幕| 岛国精品在线播放| 日韩一级二级三级精品视频| 国产精品美女久久久久高潮| 日韩高清不卡一区二区| 成人av在线看| 2023国产精品| 午夜av区久久| 99vv1com这只有精品| 久久久青草青青国产亚洲免观| 亚洲电影你懂得| 99国产精品一区| 日本一区二区电影| 精品制服美女丁香|