freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

畢業(yè)論文-基于matlab的遺傳算法程序設計及優(yōu)化問題研究(完整版)

2025-02-23 06:29上一頁面

下一頁面
  

【正文】 ./(2^bit_n 1);bit_n=cumsun(bit_n);bit_n=[0 bit_n];for i=1:n_varbe_var(i)=be_gen(:,bits(i)+1:bit_n(i+1));var(i)= range(1)(i)+sum(ones(popusize,1)*2.^(size(be_var(i),2) 1: 1:0).*be_var(i),2).*sca_dec(i);endvgen=[var(1,:)];for i=1:popusizefitness(i)=eval([f,’(var_gene(i,:))’] );end(3)選擇選擇就是利用碼后求得的各個個體的適應度的大小,從中選出一些適應度高的個體,并淘汰一些適應度較小的個體以生成交配池的過程. 然后再對優(yōu)良的個體進行交叉和變異操作. 在選擇算子中,先找出當前群體中適應度最高和最低的個體,將最佳個體bes_ind 保留并替換最差個體,直接進入下一代,將剩余個體evol_gen 按適應值16比例選擇法進行操作,即采用輪盤賭(roulettewheel)方式來實現(xiàn). 這種方式首先計算每個個體的適應值,然后計算出該適應值在群體適應值總和中所占的比例,來表示該個體被選中的概率,這樣既能保證最佳個體的適應度值不會減小,最佳個體不會被交叉變異操作所破壞,也能不斷提高該群體的平均適應度值. 比例選擇法體現(xiàn)了生物進化過程中“優(yōu)勝劣汰,適者生存” 的思想,并且保證將優(yōu)良的基因遺傳給下一代. 我們可以用下面的函數(shù)來實現(xiàn)選擇算子:function [evol_gen,bes_ind,max_fitness]=selection(old_gen,fitness)[min_fitn,expo(b)]=min(fitn); [max_fitn,expo(a)]=max_(fitn);popusize=length(fitness);bes_ind=old_gen(expo(a),:);expo=[1:popusize]。for i=1:50 %求出群體的碼串最小長度 mif (ba)/e2^(i)m=i+1。py=py1。% 從小到大排列wheel=1。newpopu(i+1,:)=[popu(i+1,1:cpoint) popu(i,cpoint+1:chromlength)]。24if newpopu(i,mpoint)==0newpopu(i,mpoint)=1。endr(j)=a+sum(bestindividual,2)*(ba)/(21)。r*39。 %計算最大值及其位置result=[r(index) y]。s Premier League match at Chelsea on Sunday.I am going to be at the match tomorrow and I have asked to meet Yaya Toure, he told BBC Sport.For me it39。總覺得自己自己似乎應該去做點什么,或者寫點什么。Originally, this world, can produce a chemical reaction to an event, in addition to resolutely, have to do, and time.    原來,這個世界上,對某個事件能產生化學反應的,除了非做不可的堅決,還有,時間。t want to give vent to out your inner voice can be in the high school children of the feelings in a period, but was eventually infarction when graduation party in the throat, later again stood on the pitch he has sweat profusely, looked at his thrown a basketball hoops, suddenly found himself has already can39。 May be back in the past, to oneself the paranoid weird belief disillusionment, these days, my mind has been very messy, in my mind constantly. Always feel oneself should go to do something, or write something. Twenty years of life trajectory deeply shallow, suddenly feel something, do it.26    一字開頭的年齡已經(jīng)到了尾聲。s antiracism taskforce, is in London for the Football Association39。y39。hold on。for i=1:py %進行二進制轉換成十進制的解碼操作bestindividual(1,i)=2.^(py1).*bestindividual(:,i)。mpoint=1。for i=1:2:popusize1 %執(zhí)行交叉操作if randpccpoint=round(rand*chromlength)。%個體被選中的概率fitscore=cumsum(fitscore)。 %隨機產生 n 行 m 列的初始群體while j=30 %設置程序中止條件py=chromlength。pm—變異概率。expo(expo(a))=0。elsei=i+1。endpopu2=sum(popu1,2)。fitone=1。elsenewpopu(i,:)=popu(i,:)。elsenewpopu(i,mpoint)=0。popu=newpopu。)。% 返回優(yōu)化結果g an employment tribunal claimEmployment tribunals sort out disagreements between employers and employees.You may need to make a claim to an employment tribunal if:? you don39。s about how he felt and I would like to speak to him first to find out what his experience was.Uefa has opened disciplinary proceedings against CSKA for the racist behaviour of their fans during City39。二十年的人生軌跡深深淺淺,突然就感覺到有些事情,非做不可了。A person39。 Then in high school, think don39。s plaint. In a statement the Russian side added: We found no racist insults from fans of CSKA.Age has reached the end of the beginning of a word. May be guilty in his seems to passing a lot of different life became the appearance of the same day。re clear about the terms of the agreement. It might be best to get advice from an experienced adviser, for example, at a Citizens Advice Bureau. To find your nearest CAB, including those that give advice by , click on nearest CAB.For more information about making a claim to an employment tribunal, see Employment tribunals.The (lack of) air up there Watch mCayman Islandsbased Webb, the head of Fifa39。ylabel(39。,[a b])。py=chromlength。if mpoint=0。endendpopu=newpopu。endendfitscore=yvalue/sum(yvalue)。popu=round(rand(popusize,chromlength))。%pc—交叉概率。expo(expo(b))=0;expo=nonzeros(expo);evol_gen=old_gen(expo,:);evol_fitness=fitness(expo,:);evol_popusize=popusize2;posel=evol_fitness/sum(evol_fitness);poselcum=cusum(posel);r=rand(1,evol_popusize);selected=1+sum(poselcum*ones(1,evol_popusize)ones(evol_popusize,1)*r);evol_gen=evol_gen(selection,:);(4)重組重組算子是產生新個體的主要方法,它決定了遺傳算法的全局搜索能力. 重組操作的作用是將原有的優(yōu)良基因遺傳給下一代個體. 并生成包含更優(yōu)良基因的新個體. 通常使用的遺傳算子是一點交叉法,就是按交叉概率pc(0pc1)實施交叉操作,兩個個體編碼串(string)在交叉位置處(crossp)相互交換各自的部分編碼,從而形成新的一對個體. 程序如下:function [new_gen]=rebination(old_gen,pc)[nouse,match]=sort(rand(size(old_gen,1),1));match_gen=old_gen(match,:);17pairs=size(match gen,1)/2;bit_n=size(match_gene,2);string=rand(pairs,1)pc;crossp=randint(string,1,[1,bit_n]);crossp=string.*crossp;for i=1:pairsnew_gen([2*i1 2*i],:)=[match_gen([2*i1 2*i],1:crossp(i)) match_gen([2*i 2*i1],crossp(i)+1:bin_n)];end另外,一點交叉法操作的信息比較小,交叉點的位置的選擇可能會帶來較大的偏差,一點交叉算子不利于長距離的保留和重組.(5)變異變異算子是模擬自然界生物進化的中染色體的基因突變現(xiàn)象,從而改變染色體的結構和物理性狀. 變異算子是產生新個體的輔助方法,它決定了遺傳算法的局部搜索(mp)隨機反轉某位等位基因的二進制字符的值來實現(xiàn). 程序如下:function [new_gen]=mutation(old_gen,pm)mpoints=find(rand(size(old_gen))pm);new_gen=old_gen;new_gen(mpoints)=1 old_gen(mpoints);end當重組操作發(fā)生早熟收斂時,這時引入變異算子會有很好的效果. 一方面,變異算子可以使群體進化中丟失的等位基因信息得以恢復,保持群體基因中的差異性,防止發(fā)生早熟收斂;另一方面,當種群規(guī)模較大時,在重組操作基礎上引入適度的變異,也能夠提高遺傳算法的局部搜索效率.5 遺傳算法的函數(shù)優(yōu)化的應用舉例考慮如下的一個優(yōu)化問題:max{f(x)|x∈X},這里f是X上的一個函數(shù),X是問題的解空間. 它可以是一個有限集合(如組合優(yōu)化問題),也可以是實空間Rn的一個子集(如連接優(yōu)化問題)等. 有了以上的理論基礎,現(xiàn)在來舉個簡單的實例來說明,如優(yōu)18化如下的目標函數(shù)(求最大值):f(x)=2x2cos(3x)+xsin(5x)+8 (7)打開并進入 Matlab, 文件,輸入附錄上的程序內容,并保存名為 的文件. 完成后,返回到控制窗口,輸入如下的內容:sga(40,2,10,). 執(zhí)行即可得出如下結果,x=;y=,如圖 2 所示(與精確值基本相同),可見此算法是正確的.圖 2 遺傳算法程序優(yōu)化結果圖6 結論 主要發(fā)現(xiàn)遺傳算法的研究歸納起來分為理論與技術研究、應用研究兩個方面. 理論與技術研究主要從遺傳操作、群體大小、參數(shù)控制、適應度評價以及并行實現(xiàn)技術等方面來提高遺傳算法的性能. 并且Matlab軟件有功能強大的數(shù)學函數(shù)支持編程效率高,語句簡單,功能齊備利用Matlab來編寫遺傳算法程序簡單而且易于操作. 啟示任何事物之間都存在著必然的聯(lián)系,就如遺傳算法. 遺傳算法的理論本身來源于自然界中“遺傳與選擇”的進化過程然而現(xiàn)在遺傳算法的基本理論已經(jīng)廣泛用于函數(shù)優(yōu)19化、組合優(yōu)化、生產調度、自動控制、機器人智能、人工生命、機
點擊復制文檔內容
試題試卷相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1