• 沒有找到結果。

多重進化遺傳演算法於結構最佳化設計之應用

N/A
N/A
Protected

Academic year: 2021

Share "多重進化遺傳演算法於結構最佳化設計之應用"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會補助專題研究計畫成果報告

※※※※※※※※※※※※※※※※※※※※※※※※※

※ ※

※ 多重進化遺傳演算法於結構最佳化設計之應用 ※

※ ※

※※※※※※※※※※※※※※※※※※※※※※※※※

計畫類別:

þ

個別型計畫

□整合型計畫

計畫編號:NSC 90-2212-E-002-173

執行期間:90 年 8 月 1 日至 91 年 7 月 31 日

計畫主持人:鍾添東 副教授

計畫參與人員:李臻誠、謝阜錝

本成果報告包括以下應繳交之附件:

□赴國外出差或研習心得報告一份

□赴大陸地區出差或研習心得報告一份

□出席國際學術會議心得報告及發表之論文各一份

□國際合作研究計畫國外研究報告書一份

執行單位:國立台灣大學機械工程學系

國 91 年 10 月 18 日

(2)

行政院國家科學委員會專題研究計畫成果報告

多重進化遺傳演算法於結構最佳化設計之應用

Application of Coevolutionary Genetic Algorithms in Optimum Design of Structures

計畫編號:NSC 90-2212-E-002-173

執行期限:90 年 8 月 1 日至 91 年 7 月 31 日

主持人:鍾添東 博士 國立台灣大學機械工程學系

計畫參與人員:李臻誠 國立台灣大學機械工程學系

一、中文摘要 本計畫研究多重進化遺傳演算法於結構 最佳化設計之應用。利用懲罰技術將具有限 制條件之最佳化問題轉換為無限制條件問 題,即可應用一般性之遺傳演算法求解設計 問題之最佳解。首先,定義三個懲罰參數來 控制懲罰項之大小:第一個懲罰參數為與合 理區界線之距離有關,第二個懲罰參數與違 反限制條件之程度有關,而第三個懲罰參數 則與違反限制條件之數目有關。接著定義兩 組母群體﹔第一組為上述三個懲罰參數之母 群體,另一個為設計變數之母群體,應用多 重進化遺傳演算法使這兩組母群體同時進 化,以求出適合設計問題之最佳懲罰參數。 最後,發展一套結合多重進化程序和商用 ANSYS 有限元素分析軟體的結構最佳化程 式。利用此程式求解一些測試範例和實際結 構設計問題,從這些分析結果可知,本計畫 提出的方法對於一般結構最佳化問題皆能得 到令人十分滿意的收斂結果。 關鍵詞:多重進化遺傳演算法、遺傳演算法、 結構最佳化設計、懲罰技術 Abstr act

This paper studies the application of coevolutionary genetic algorithms (CEGA) in

optimum design of structures. Penalty

techniques are used to transform the

constrained design problem into an

unconstrained problem such that the

conventional genetic algorithm can be applied

to find the optimum solution for the design problem. First, three penalty factors are defined to control the amount of penalty terms. The first factor relates to the threshold distance from the feasible region, the second factor relates to the degree of constraint violation, and the third factor relates to the number of violated constraints. Then, two populations are defined: one for the three penalty factors and the other for design variables. The coevoluationary genetic algorithm is applied such that these two populations are evolved simultaneously, and the best penalty factors for the design problem can be found. Finally, a computer program that integrates the coevolutionary process and the ANSYS finite element analysis program are developed. By using the developed program, optimum results of some test examples and practical structural design problems are given. From these results, it shows that the proposed method gives quite satisfactory convergent results for general structural optimization problems.

Keywords: coevolutionary genetic algorithms, genetic algorithms, structural optimization, penalty techniques.

二、緣由與目的

John Holland 提出遺傳演算法(genetic algorithm),此方法模仿遺傳學「物競天擇適 者生存」的原理,運用電腦模擬運算所發展 出來的一種搜尋法[Holland, 1975]。此方法採 用多點同時搜尋的技巧,能避免傳統最佳化 方法只能搜尋到區域性最佳解(local optimum) 的 缺 失 , 求 得 趨 近 全 域 之 最 佳 解 (global

(3)

optimum),故可應用於複雜結構或大型結構 上來進行全域最佳化的搜尋。 一般結構最佳化問題均具有限制條件, 而遺傳演算法適合用在設計變數為離散且不 帶有限制條件的問題,因此必須將有限制條 件的最佳化問題轉換成無限制條件的最佳化 問題。Michaclewicz 提出下面幾種處理限制 條件的方法:(1)保留合理區的解,非合理區 的解完全剔除。(2)採用懲罰函數法。(3)採取 分開合理區和非合理區的解來處理。(4)混合 法。其中懲罰函數法是目前應用最廣的一種 方法[Michalewicz, 1994]。 使用遺傳演算法處理限制條件的缺點是 可能只對某一些問題有較佳的結果,但是對 於其他問題則否。Michalewicz 與 Nazhiyath 提出多重進化(coevolutionary)的概念,發展出 一 套 多 重 進 化 演 算 法 , 稱 為 Genocop III [Michalewicz and Nazhiyath, 1995],並以五個 測試範例來證實此方法可求解非線性限制條 件之最佳化問題﹔Barbosa 使用多重進化遺 傳演算法,以兩組獨立的遺傳演算法做進化 運算,求解有限制條件的最佳化問題[Barbosa, 1999] ﹔Weicker 改良多重進化演算法,並提 出 可 適 性 多 重 進 化 演 算 法 (Adaptive

coevolutionary algorithm) [Weicker and

Weicker, 1999]。 使用懲罰函數法時,懲罰參數的決定將 影響搜尋解的好壞,如何以可行的方式發展 決定懲罰參數之方法,使遺傳演算法能更快 速且穩定地收斂至合理區,此為本計畫之研 究動機。本計畫之研究目的為運用多重進化 遺傳演算法的概念來求得適合特定最佳化問 題的懲罰參數值,進而求得最佳化問題之全 域最佳解。期望以此方式發展出的最佳化方 法可對一般最佳化問題有較好的收斂效果。 三、多重進化可適性懲罰函數法 多重進化遺傳演算法之應用方式為將具 有複雜度高的問題分割為數個簡單而且具有 交互作用關係的子問題,每個子問題均單獨 進化而得到部分解答,子問題在進化時以某 些特定的方式與其他子問題進行「資訊交 換」,而資訊交換的方式隨設計問題之不同 而異。 3.1 最佳化方法之設計 一般結構最佳化問題之數學模型通常如 式(1)所示。 c i n n i x g x F x x x x ,..., 2 , 1 0 ) ( Subject to min. ) ( Such that ) , , , ( Find 1 2 = ≤ → = v v K v (1) 式中xr為設計變數(design variable), ) (x F r 為目標函數(objective function),gi(x) r 為限制條件(constraint),nc為限制條件的 數目。 本計畫以多重進化遺傳演算法的概念所 發展的最佳化方法,其目標函數與限制條件 為修改近合理區可適性懲罰函數法[Coit and Smith, 1996],其表示式如下。 ) , ( ) , , ( ) ( ) , ( ~ 3 2 1 ω ω ω ω F x p x p x x F v v = v + d v + n v (2) 2 1 1 2 2 1 ) , ( ) ( ) , , (

=    < > ∆ = nc i i i d k x g F x p ω ε ω ω ω v v (3) G i i k n k k 1,2,..., 1 ) , ( 1 0 1 = +ω = ε ω ε (4) ) ( ) , ( 3 3 F x n n x p c v n v v = ω ω (5) all feas F F F = − ∆ (6) all all F F F 2 1 . 0 ≤∆ ≤ (7)    >= < . infeasible is if ) ( feasible. is if 0 ) ( x x g x x g i i v v v v (8) 式中F~(xr)為適應度函數﹔pd(x,ω1,ω2) v 示 個 體 違 反 限 制 條 件 程 度 之 懲 罰 項 ﹔ ) , (3 pn v 表示個體違反限制條件數目之懲罰 項﹔εi(ω1,k)與 0 i ε 為動態近合理區界線設定 值與初始值﹔nv為某一個體違反限制條件的 數目﹔nc為限制條件的數目﹔Ffeas為合理區 內最佳之目適應度值﹔Fall 為全區最佳之目 標函數值﹔∆FFfeasFall的差值﹔ω1為可 適性懲罰函數法中動態近合理區界線之調整 值﹔ω2為與族群中之個體違反限制條件程度 有關的參數﹔ω3為與族群中個體違反限制條 件數目有關的參數。 本計畫之適應度函數為與設計變數xv和 懲罰參數ωv有關之函數,適應度函數中之懲 罰項設定方式可作如下之說明。 1. 採用可適性懲罰函數法之理論來定義族 群中個體違反限制條件程度之懲罰項, 並且在可適性懲罰函數法中採取動態近 合理區界線的概念,其數學函數表示式

(4)

如式(3)與(4)﹔同時避免太大或是太小 之懲罰程度,將式(3)以式(7)限制其範 圍。 2. ω1、ω2與ω3數值的大小為最佳化問題能 否收斂的重要因素。 3. 族群中個體違反限制條件的數目亦為影 響遺傳演算法收斂與否的因素之一。本 計畫將個體違反限制條件的數目以適當 比例縮放後之懲罰項,附加於適應度函 數中,如式(2)與(5)所示。 3.2 多重進化遺傳演算法之設計 本計畫以多重進化遺傳演算法的理論為 基礎,配合可適性懲罰函數法理論,發展出 一套多重進化可適性懲罰函數法,其運算流 程如圖 1 所示。程式流程分內層及外層迴 圈,其內容稍後會詳細說明。當內層迴圈與 外層迴圈經過多重進化的過程後,可決定最 佳化問題的懲罰參數值,再將這組懲罰參數 值代入最佳化問題中,便可以求得全域最佳 解。

Generate Initial Population

Get Fitness Value for Outer Loop

Outer Loop Selection and Reproduction

Outer Loop Crossover

Outer Loop Mutation

Generate Offspring for Outer Loop

Yes No

Stop?

i

ωv

Wait for Inner Loop Evolving Input Penalty Factors

Generate Initial Population

Compute Fitness for

Inner Loop Selection and Reproduction

Inner Loop Crossover

Inner Loop Mutation

Generate Offspring for Inner Loop

Yes No Stop? j xv i ωv j x v

Compute Fitness Value for Outer Loop

Outer Loop Inner Loop 1 1 1=k+ k 1 2 2=k+ k End 圖 1. 多重進化可適性懲罰函數法進化流程圖 l 外層迴圈參數設定方式 外層迴圈的設計變數為控制懲罰項大小 之懲罰參數ωv=(ω1,ω2,ω3),外層迴圈中對某一 組懲罰參數ωi v 的適應度函數其定義表示式如 下所示(假設求解最小化問題):

(

)

      ≠ = = ∞ =

= 0 , ) , ( ~ 1 ) ( ~ 0 , ) ( ~ 2 1 2 2 1 2 1 2 f n j i j f i f i n if x F n F n if F f ω ω ω v v v v (9) 式中F~2(xj,ωi) v v 為某個內層迴圈中「最終 代」的合理區個體適應度值;nf2為內層迴圈 最終代中合理區個體的數目。 外層迴圈之適應度函數為與內層迴圈最 終代個體的資訊有密切關係。外層迴圈適應 度函數之定義方式說明如下。 1. 內層迴圈進化完成後,若在內層迴圈中 最終代合理區個體之數目為零,則表示 該組懲罰參數不能使內層迴圈收斂至合 理區。 2. 式(9)中為內層迴圈之最終代合理區個體 之平均適應度值表示式。 l 內層迴圈參數設定方式 內層迴圈的運作方式與求解一般最佳化 問題的流程大致上相同,比較不同的地方是 在進行內層迴圈的進化過程時,多了兩個額 外步驟如下所述。 1. 內層迴圈開始運作之前,必須先輸入懲 罰參數(由外層迴圈決定)。 2. 進化終了時,對最終代的一些個體作一 統計,求出外層迴圈之適應度值。 內層迴圈中對某一組設計變數xj v 的適 應度函數其定義表示式如下: ) , ( ) , , ( ) ( ) , ( ~ 3 2 2 1 2 2 ω ω ω ω j n j d j i j x p x p x F x F v v v v v + + = (10) 式中 pd2(xvj,ω1,ω2)表示內層迴圈中個體 違反限制條件程度之懲罰項﹔pn2(xvj,ω3)表示 內層迴圈中個體違反限制條件數目之懲罰 項﹔其他參數之定義同式(2)~(8)。 四、實例應用 本節列舉十桿結構實例來驗證本計畫所 發展的方法,並與其他方法比較。其中 CoEA 為本計畫所發展的多重進化可適性懲罰函數 法,GA-A 為可適性懲罰函數法,GA-D 為動 態懲罰函數法,OPT 為十桿結構問題之正確 解。

(5)

十桿結構和受力狀況如圖 2 所示,材料 特性列於表 1。十桿結構為一平面結構,受 平面負荷作用。結構分析目的為輕量化,以 桿件截面積為設計變數。 1 2 3 4 5 6 7 8 9 10 360in 360in 360in P=100 klb P=100 klb 圖 2. 十桿結構外型圖 表 1. 十桿結構設計的相關資料 2 2 3 32 Area Each 1 0 : s Constraint Size 25 Members all of s Constraint Stress 0 . 2 : Nodes All in s Constraint nt Displaceme 29 . 0 / 1 . 0 10000 in in . kpsi in u in lb kpsi E y ≤ ≤ = = = = = ρ υ 由圖 3 及表 2 可知動態懲罰函數法 (GA-D)收斂速度慢,而可適性懲罰函數法 (GA-A)則會浪費太多時間在非合理區的搜 尋,本計畫發展之多重進化可適性懲罰函數 法(CoEA),收斂速度遠比另兩種方法快很 多,收斂結果也較準確,故為較佳之最佳化 方法。 0 20 40 60 80 100 Generations 5000 6000 7000 8000 9000 W e ig h t( lb ) GA-CoEA GA-A GA-D 圖 3. 十桿結構最佳化過程圖 表 2. 十桿結構最佳化結果 1 x x2 x3 x4 x5 x6 x7 x8 x9 x10 Weight (lb) GA-A 30.1 2.75 24.07 11.14 0.63 2.24 14.49 19.88 24.33 2.12 5648.5 GA-D 29.8 2.12 21.25 24.22 0.12 1.16 9.3 18.22 26.05 1.62 5645.7 CoEA 28.1 0.62 20.75 16.18 0.62 0.71 10.14 21.54 25.3 0.42 5332.6 OPT 30.3 0.11 23.14 15.54 0.12 0.11 7.41 21.16 21.11 0.1 5030.3 五、結論 本計畫探討遺傳演算法中懲罰參數對於 結構最佳化設計之影響,並採取懲罰函數法 來處理具限制條件之最佳化問題,進而發展 出多重進化可適性懲罰函數法來進化懲罰參 數,再利用經進化後之最佳懲罰參數值,增 進遺傳演算法之收斂效率與收斂能力。本計 畫研究成果如下: 1. 發展的可決定適合特定最佳化問題之懲 罰參數值,不需多次測試不同之懲罰參 數。 2. 運用多重進化的概念,將懲罰函數法中 之動態近合理區界線、個體違反限制條 件程度與個數所代表的懲罰參數,以內 層迴圈與外層迴圈來進化,得到適合特 定最佳化問題之最佳懲罰參數值。 3. 由實際測試結果可知,對於一般結構最 佳化問題,可提供較佳的收斂結果與良 好的收斂穩定性。 4. 可結合商用 ANSYS 軟體與 MDT 軟體, 對於複雜之大型結構亦可進行結構最佳 化與外型最佳化之分析。 六、參考文獻

[1] Barbosa, H. J. C., “A Coevolutionary Genetic

Algorithm for Constrained Optimization”,

Evolutionary Computation, Vol.3, pp. 1605-1611, 1999.

[2] Coit, D.W., and Smith, A.E., “Penalty Guided

Genetic Search For Reliability Design Optimization”,

International Journal of Computers and Industrial Engineering, Vol. 30, No. 4, pp. 895-904, 1996.

[3] Holland, J.H., Adaptation in Natural and Artificial

System, University of Michigan Press, Ann Arbor, Mich., 1975.

[4] Michalewicz, Z., Logan. T., and Swaminath, S.

“Evolutionary Operators for Continuous Convex

Parameter Spaces”, In Proceedings of the 3rd annual

Conference on Evolutionary Programming. World Scientific, pp. 84-97, 1994.

[5] Michalewicz, Z., and Nazhiyath, G., “Genocop III: A

Coevolutionary Algorithm for Numerical

Optimization Problems with Nonlinear Constraints”,

Evolutionary Computation, Vol. 2, pp. 647-651, 1995.

[6] Weicker, K., and Weicher, N., “On the Improvement

of Coevolutionary Optimizers by Learning Variable

Interdependencies”, IEEE Transactions on

Evolutionary Computation, CEC 99, Vol. 3, pp. 1627-1632, 1999.

參考文獻

相關文件

The first case occurs when #1 is the second candidate after the sub- ordinate player’s rejection point and the best applicant before the subor- dinate player’s rejection point is

The main advantages of working with continuous designs are (i) the same method- ology can be essentially used to find continuous optimal designs for all design criteria and

The hashCode method for a given class can be used to test for object equality and object inequality for that class. The hashCode method is used by the java.util.SortedSet

Numerical results are reported for some convex second-order cone programs (SOCPs) by solving the unconstrained minimization reformulation of the KKT optimality conditions,

Then, it is easy to see that there are 9 problems for which the iterative numbers of the algorithm using ψ α,θ,p in the case of θ = 1 and p = 3 are less than the one of the

Courtesy: Ned Wright’s Cosmology Page Burles, Nolette &amp; Turner, 1999?. Total Mass Density

If the best number of degrees of freedom for pure error can be specified, we might use some standard optimality criterion to obtain an optimal design for the given model, and

Abstract We investigate some properties related to the generalized Newton method for the Fischer-Burmeister (FB) function over second-order cones, which allows us to reformulate