TWM633222U - Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm - Google Patents

Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm Download PDF

Info

Publication number
TWM633222U
TWM633222U TW111207583U TW111207583U TWM633222U TW M633222 U TWM633222 U TW M633222U TW 111207583 U TW111207583 U TW 111207583U TW 111207583 U TW111207583 U TW 111207583U TW M633222 U TWM633222 U TW M633222U
Authority
TW
Taiwan
Prior art keywords
module
mutation
chromosomes
fitness
mating
Prior art date
Application number
TW111207583U
Other languages
Chinese (zh)
Inventor
陳煒群
Original Assignee
兆豐國際商業銀行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 兆豐國際商業銀行股份有限公司 filed Critical 兆豐國際商業銀行股份有限公司
Priority to TW111207583U priority Critical patent/TWM633222U/en
Publication of TWM633222U publication Critical patent/TWM633222U/en

Links

Images

Landscapes

  • Calculators And Similar Devices (AREA)

Abstract

An electronic apparatus for providing multi-objective optimal solution based on genetic algorithm is provided, which includes a storage device with multiple modules and a processor for accessing and executing the multiple modules. The modules includes: an initialization module generating an initialize population; a fitness value calculation module calculating fitness values of all chromosomes; a fitness sharing module obtaining a filtered sample set from the initialize population based on the fitness values; a selection module obtaining a parent collection from the filtered sample set; a crossover module performing crossover on the parent collection to generate an offspring set; and a mutation module performing mutation based on the offspring set to update the initialize population. The fitness value calculation module, the fitness sharing module, the selection module, the crossover module and the mutation module are repeatedly executed until a termination conditions is met, and an optimal solution is obtained.

Description

基於遺傳演算法提供多目標最佳解的電子裝置Electronic device for providing multi-objective optimal solution based on genetic algorithm

本新型創作是有關於一種電子裝置,且特別是有關於一種基於遺傳演算法提供多目標最佳解的電子裝置。The present invention relates to an electronic device, and in particular to an electronic device providing multi-objective optimal solutions based on a genetic algorithm.

為了拓展金融,銀行的各個分行時常需要各自去發掘新的合作商家。實務上,商家指派給哪間分行服務,是一種多目標的衝突情況下的權衡取捨,是多目標最佳化的問題。例如只考慮分派給離商家最鄰近的分行,但未考慮各分行的業務屬性、人力配置、分行服務能量、分行的業務目標量。由於不同分行的業務屬性、人力配置、分行服務能量、分行業務目標量等皆不同,因此,如何為合作商家分配最適合該商家的服務銀行分行,是本領域亟待解決的問題之一。In order to expand finance, each branch of the bank often needs to discover new cooperative merchants individually. In practice, which branch a merchant assigns to serve is a trade-off in the case of multi-objective conflicts, and it is a matter of multi-objective optimization. For example, only the branch closest to the merchant is considered, but the business attributes, manpower allocation, branch service capacity, and business target volume of each branch are not considered. Since different branches have different business attributes, manpower allocation, branch service capacity, and branch business target volume, how to assign the most suitable service bank branch to a cooperative merchant is one of the problems to be solved in this field.

本新型創作提供一種基於遺傳演算法提供多目標最佳解的電子裝置,可獲得全域最佳解。This novel creation provides an electronic device that provides multi-objective optimal solutions based on genetic algorithms, and can obtain global optimal solutions.

本新型創作的基於遺傳演算法提供多目標最佳解的電子裝置,包括:儲存設備,包括多個模組;以及處理器,耦接至儲存設備,且經配置以存取並執行所述多個模組,其中這些模組包括:初始化模組,產生初始化群體,初始化群體包括多個染色體;適應值計算模組,分別計算所述多個染色體的多個適應值;適應度分享模組,在所述適應值中找出最佳適應值,取出與具有最佳適應值的染色體相距在指定範圍內的染色體,將具有最佳適應值的染色體以及在指定範圍內的染色體分類至篩選樣本集;選擇模組,自篩選樣本集中獲得母代集合;交配模組,對母代集合執行交配以產生子代集合;以及突變模組,基於子代集合來執行突變,以更新初始化群體。在未滿足終止條件的情況下,處理器重複執行適應值計算模組、適應度分享模組、選擇模組、交配模組以及突變模組,直到滿足終止條件,而獲得最佳解。The electronic device for providing multi-objective optimal solutions based on a genetic algorithm of the present invention includes: a storage device including a plurality of modules; and a processor coupled to the storage device and configured to access and execute the multiple modules, wherein these modules include: an initialization module, which generates an initialization group, and the initialization group includes a plurality of chromosomes; a fitness value calculation module, which respectively calculates a plurality of fitness values of the plurality of chromosomes; a fitness sharing module, Find the best fitness value among the fitness values, take out the chromosomes that are within a specified range from the chromosome with the best fitness value, and classify the chromosomes with the best fitness value and the chromosomes within the specified range into the screening sample set ; a selection module to obtain a set of mothers from the screening sample set; a mating module to perform mating on the set of mothers to generate a set of offspring; and a mutation module to perform mutation based on the set of offspring to update the initialization population. If the termination condition is not satisfied, the processor repeatedly executes the fitness value calculation module, fitness sharing module, selection module, mating module and mutation module until the termination condition is met and an optimal solution is obtained.

在本新型創作的一實施例中,所述選擇模組採用等級輪盤式選擇,自篩選樣本集中獲得母代集合。In an embodiment of the present invention, the selection module adopts grade roulette selection to obtain a parent set from the screening sample set.

在本新型創作的一實施例中,所述模組更包括終止判斷模組,其用以判斷是否滿足終止條件。In an embodiment of the present invention, the module further includes a termination judging module, which is used to judge whether the termination condition is satisfied.

在本新型創作的一實施例中,所述模組更包括:設定模組,其用以設定多個參數,其中所述參數包括初始化群體所包括的染色體數量、染色體長度、交配機率、突變機率以及終止條件。In an embodiment of the new creation, the module further includes: a setting module, which is used to set multiple parameters, wherein the parameters include the number of chromosomes included in the initialization population, the length of chromosomes, the probability of mating, and the probability of mutation and termination conditions.

在本新型創作的一實施例中,所述各染色體包括多個基因,這些基因分別代表不同商家指派給不同銀行分行的可行解。In an embodiment of the present invention, each chromosome includes a plurality of genes, and these genes respectively represent feasible solutions assigned by different merchants to different bank branches.

在本新型創作的一實施例中,所述交配模組採用單點交配、雙點交配、多點交配以及均勻交配其中一個。In an embodiment of the new creation, the mating module adopts one of single-point mating, double-point mating, multi-point mating and uniform mating.

在本新型創作的一實施例中,所述突變模組採用單點突變、雙點突變、移動突變以及均勻突變其中一個。In an embodiment of the present invention, the mutation module adopts one of single-point mutation, double-point mutation, mobile mutation and uniform mutation.

基於上述,本揭露在演算選擇操作之前利用適應度分享機制,可降低演算法收斂的速度,解決了傳統遺傳演算法中因過度收斂而陷入區域最佳解的情況,進而可獲得全域最佳解,。Based on the above, this disclosure uses the fitness sharing mechanism before the calculation selection operation, which can reduce the convergence speed of the algorithm, solve the problem of falling into the regional optimal solution due to excessive convergence in the traditional genetic algorithm, and then obtain the global optimal solution ,.

為了使本揭露之內容可以被更容易明瞭,以下特舉實施例作為本揭露確實能夠據以實施的範例。另外,凡可能之處,在圖式及實施方式中使用相同標號的元件/構件/步驟,係代表相同或類似部件。In order to make the content of the present disclosure easier to understand, the following specific embodiments are taken as examples in which the present disclosure can indeed be implemented. In addition, wherever possible, elements/components/steps using the same reference numerals in the drawings and embodiments represent the same or similar parts.

圖1根據本新型創作一實施例的基於遺傳演算法提供多目標最佳解的電子裝置的方塊圖。電子裝置100包括處理器110以及儲存設備120。本實施例的電子裝置100是基於遺傳演算法來提供多目標最佳解。FIG. 1 is a block diagram of an electronic device for providing multi-objective optimal solutions based on a genetic algorithm according to an embodiment of the present invention. The electronic device 100 includes a processor 110 and a storage device 120 . The electronic device 100 of this embodiment provides multi-objective optimal solutions based on the genetic algorithm.

遺傳演算法就是在特定大小的解集合中,透過增添亂數、兩兩排列組合等操作來改變/產生新的解,並從中挑選較好的解保留到下個世代中,以確保解變異的方向能夠逐漸收斂。在遺傳演算法中將會使用以下名詞及觀念,群體(population)是由一堆個體(individual)所組成,其個體是由一堆基因(gene)組成,基因是構成染色體(chromosome)的基本單位。一個世代(generation)就是一次的演化過程的結果。染色體是由一連串的整數表達,適合用來表示組合優化問題的解。The genetic algorithm is to change/generate a new solution by adding random numbers, pairwise permutations, etc. in a solution set of a specific size, and select a better solution to keep it in the next generation to ensure that the solution is mutated. The direction can gradually converge. In the genetic algorithm, the following nouns and concepts will be used. A population is composed of a bunch of individuals. An individual is composed of a bunch of genes. Genes are the basic units of chromosomes. . A generation is the result of an evolutionary process. Chromosomes are represented by a series of integers, which are suitable for representing solutions to combinatorial optimization problems.

處理器110例如中央處理單元(Central Processing Unit,CPU)、物理處理單元(Physics Processing Unit,PPU)、可程式化之微處理器(Microprocessor)、嵌入式控制晶片、數位訊號處理器(Digital Signal Processor,DSP)、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)或其他類似裝置。處理器110可耦接至儲存設備120,用以存取和執行儲存於儲存設備120中的多個模組和各種應用程式。The processor 110 is, for example, a central processing unit (Central Processing Unit, CPU), a physical processing unit (Physics Processing Unit, PPU), a programmable microprocessor (Microprocessor), an embedded control chip, a digital signal processor (Digital Signal Processor) , DSP), Application Specific Integrated Circuits (Application Specific Integrated Circuits, ASIC) or other similar devices. The processor 110 can be coupled to the storage device 120 for accessing and executing multiple modules and various application programs stored in the storage device 120 .

儲存設備120例如是任意型式的固定式或可移動式隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash memory)、硬碟或其他類似裝置或這些裝置的組合。儲存裝置220中包括多個模組,所述模組在被安裝後,會由處理器110來執行。所述模組包括設定模組121、初始化模組122、適應值計算模組123、終止判斷模組124、適應度分享模組125、選擇模組126、交配模組127及突變模組128。The storage device 120 is, for example, any type of fixed or removable random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), flash memory (Flash memory), hard Disc or other similar device or combination of these devices. The storage device 220 includes a plurality of modules, and the modules will be executed by the processor 110 after being installed. The modules include a setting module 121 , an initialization module 122 , a fitness calculation module 123 , a termination judgment module 124 , a fitness sharing module 125 , a selection module 126 , a mating module 127 and a mutation module 128 .

一般來說,遺傳演算法包括下述四個階段:第一階段,隨機產生n個染色體(初始化群體);第二階段,利用適應函數計算所有染色體的適應值;第三階段,依據每個染色體的適應值來選擇、複製染色體:第四階段:對留下的染色體進行交配(crossover)及突變(mutation)的動作。完成上述第二至第四階段的動作成為一次進化過程。重複上述第二至第四階段的動作直到滿足終止條件(收斂),便可獲得最佳解。In general, the genetic algorithm includes the following four stages: the first stage, randomly generating n chromosomes (initialization population); the second stage, using the fitness function to calculate the fitness value of all chromosomes; the third stage, according to each chromosome The fitness value is used to select and copy chromosomes: the fourth stage: perform crossover and mutation actions on the remaining chromosomes. Completing the actions of the second to fourth stages above becomes an evolutionary process. The best solution can be obtained by repeating the actions of the second to fourth stages above until the termination condition (convergence) is met.

圖2是依照本新型創作一實施例的基於遺傳演算法提供多目標最佳解的方法流程圖。在本實施例中,搭配上述各模組來進行說明,請同時參照圖1及圖2。FIG. 2 is a flowchart of a method for providing multi-objective optimal solutions based on a genetic algorithm according to an embodiment of the present invention. In this embodiment, the above-mentioned modules are combined for description, please refer to FIG. 1 and FIG. 2 at the same time.

在步驟S205中,設定模組121設定多個參數。在此,所述參數包括初始化群體所包括的染色體數量、染色體長度、交配機率、突變機率以及終止條件。染色體數量代表每一個世代有幾個染色體。染色體長度表示一個染色體中包含了多少個基因。終止條件可以是:進化次數的限制,即設定最大演化世代的次數;計算耗費的資源限制(例如計算時間、計算占用的記憶體等);一個染色體已經滿足最佳值的條件,即最佳值已經找到;適應值已經達到飽和,繼續進化不會產生適應值更好的染色體;或人為干預;以及以上兩種或更多種的組合。In step S205, the setting module 121 sets a plurality of parameters. Here, the parameters include the number of chromosomes included in the initialization population, chromosome length, mating probability, mutation probability and termination conditions. Chromosome number represents how many chromosomes each generation has. Chromosome length indicates how many genes are contained in a chromosome. The termination condition can be: the limit of the number of evolutions, that is, the maximum number of evolution generations; the resource limit of calculation (such as calculation time, memory occupied by calculation, etc.); the condition that a chromosome has met the optimal value, that is, the optimal value It has been found; the fitness value has reached saturation, and continued evolution will not produce chromosomes with better fitness values; or human intervention; and a combination of two or more of the above.

在步驟S210中,初始化模組122用以產生初始化群體(initialize population)。初始化群體包括M個染色體,每一個染色體包括N個基因,其中M、N為正整數。舉例來說,表1為以指派銀行給多個商家為例進行說明。即,N個基因代表N個商家與對應指派的銀行分行的可行解。以染色體編號#1的基因#1而言,(A1, B1)代表的是商家A1被指派給銀行分行B1的一個可行解。以染色體編號#2的基因#1而言,(A1, B2)代表的是商家A1被指派給銀行分行B2的一個可行解。在表1中,基因#1代表商家A1對應的可行解,基因#2代表商家A2對應的可行解,基因#N代表商家AN對應的可行解。由此可知,N個商家具有M個可行解。In step S210, the initialization module 122 is used to generate an initialization population (initialize population). The initialization population includes M chromosomes, and each chromosome includes N genes, where M and N are positive integers. For example, Table 1 is an example of assigning banks to multiple merchants. That is, N genes represent feasible solutions of N merchants and corresponding assigned bank branches. In terms of gene #1 of chromosome number #1, (A1, B1) represents a feasible solution in which merchant A1 is assigned to bank branch B1. In terms of gene #1 of chromosome number #2, (A1, B2) represents a feasible solution for merchant A1 to be assigned to bank branch B2. In Table 1, gene #1 represents the feasible solution corresponding to merchant A1, gene #2 represents the feasible solution corresponding to merchant A2, and gene #N represents the feasible solution corresponding to merchant AN. It can be seen from this that N merchants have M feasible solutions.

表1 染色體編號 基因#1 基因#2 基因#N #1 (A1, B1) (A2, B2) (AN, B6) #2 (A1, B2) (A2, B3) (AN, B1) #M (A1, B4) (A2, B5) (AN, B3) Table 1 chromosome number Gene #1 Gene #2 Gene #N #1 (A1, B1) (A2, B2) (AN, B6) #2 (A1, B2) (A2, B3) (AN, B1) #M (A1, B4) (A2, B5) (AN, B3)

在步驟S215中,適應值計算模組123分別計算所述多個染色體的多個適應值(fitness value)。適應值計算模組123利用適應函數(fitness function)計算適應值。適應值表示染色體適應程度的數值表現,而不同的適應函數在不同的應用情境下將對應到不同的計算方式。In step S215 , the fitness value calculation module 123 respectively calculates a plurality of fitness values (fitness values) of the plurality of chromosomes. The fitness value calculation module 123 calculates the fitness value using a fitness function. The fitness value represents the numerical performance of the degree of chromosome fitness, and different fitness functions will correspond to different calculation methods in different application scenarios.

在步驟S220中,終止判斷模組124判斷是否滿足終止條件。倘若未滿足終止條件,往下繼續執行步驟S225~S240;倘若滿足終止條件,則在步驟S245中,判定獲得最佳解。終止條件可以是:進化次數的限制,即設定最大演化世代的次數;計算耗費的資源限制(例如計算時間、計算占用的記憶體等);一個染色體已經滿足最佳值的條件,即最佳值已經找到;適應值已經達到飽和,繼續進化不會產生適應值更好的染色體;或人為干預;以及以上兩種或更多種的組合。In step S220, the termination judging module 124 judges whether the termination condition is satisfied. If the termination condition is not satisfied, continue to execute steps S225-S240; if the termination condition is satisfied, then in step S245, it is determined that the best solution has been obtained. The termination condition can be: the limit of the number of evolutions, that is, the maximum number of evolution generations; the resource limit of calculation (such as calculation time, memory occupied by calculation, etc.); the condition that a chromosome has met the optimal value, that is, the optimal value It has been found; the fitness value has reached saturation, and continued evolution will not produce chromosomes with better fitness values; or human intervention; and a combination of two or more of the above.

在步驟S225中,適應度分享模組125在所述多個適應值中找出最佳適應值,取出與具有最佳適應值的染色體相距在指定範圍內的染色體,將具有最佳適應值的染色體以及在指定範圍內的染色體分類至篩選樣本集。In step S225, the fitness sharing module 125 finds the best fitness value among the plurality of fitness values, takes out the chromosome with the best fitness value within a specified range, and assigns the chromosome with the best fitness value Chromosomes and chromosomes within specified ranges are sorted into screening sample sets.

為了避免演算法過早收斂落入區域最佳解,把優良染色體的適應值分享給其他的染色體,讓其他染色體也有機會保留至下一世代,以提昇染色體族群的異質性,這就是適應度分享。且此機制以染色體間的距離作為分享的基礎,避免優良的染色體適應度過度分享給太多的染色體。In order to avoid premature convergence of the algorithm and fall into the optimal solution of the region, the fitness value of the excellent chromosome is shared with other chromosomes, so that other chromosomes also have the opportunity to be retained for the next generation, so as to improve the heterogeneity of the chromosome population. This is fitness sharing . And this mechanism uses the distance between chromosomes as the basis of sharing to avoid excessive sharing of excellent chromosome fitness to too many chromosomes.

在一實施例中,適應度分享模組125可採用共享函數(sharing function)來找出與最佳適應值對應的最佳染色體相似的其他染色體。共享函數是表示群體中兩個個體之間密切關係程度的一個函數,個體 x i 和個體 x j 之間的共享函數為 sh( d ij )。其中, d ij 為個體 x i 和個體 x j 之間的直覺模糊距離,用來衡量兩個個體之間的相似程度。 sh( d ij )越大表明二者關係密切,即相似度高。 In one embodiment, the fitness sharing module 125 can use a sharing function to find other chromosomes that are similar to the best chromosome corresponding to the best fitness value. The sharing function is a function that expresses the degree of close relationship between two individuals in a group, and the sharing function between individual x i and individual x j is sh ( d ij ). Among them, d ij is the intuitionistic fuzzy distance between individual x i and individual x j , which is used to measure the similarity between two individuals. The larger sh ( d ij ) indicates that the two are closely related, that is, the similarity is high.

在另一實施例中,也可設定為取適應值最大者作為最佳適應值。接著,將最佳適應值對應的染色體(底下稱為最佳染色體)分享給其他染色體,其具體作法為:以最佳染色體作為基準點,並設定一指定範圍,落於指定範圍內的染色體皆可被加入至篩選樣本集。假設染色體的適應值包括4、7、12、13、10、15,則選擇15作為最佳適應值,並且設定一分享值半徑為3,則指定範圍設定為大於或等於12(=15-3)且小於或等於15。接著,將適應值落在12~15內的染色體分類至篩選樣本集。In another embodiment, it may also be set to take the one with the largest fitness value as the best fitness value. Then, share the chromosome corresponding to the best fitness value (hereinafter referred to as the best chromosome) to other chromosomes. Can be added to the screening sample set. Assuming that the fitness values of chromosomes include 4, 7, 12, 13, 10, and 15, then choose 15 as the best fitness value, and set a shared value radius of 3, then set the specified range to be greater than or equal to 12 (=15-3 ) and less than or equal to 15. Next, the chromosomes whose fitness values fall within 12-15 are classified into the screening sample set.

在步驟S230中,選擇模組126自篩選樣本集中獲得母代集合。即,選擇模組126是用來留下好的染色體,排除不好的染色體。In step S230, the selection module 126 obtains a parent set from the screening sample set. That is, the selection module 126 is used to keep good chromosomes and exclude bad chromosomes.

在一實施例中,選擇模組126採用等級輪盤式選擇(rank based wheel selection)。選擇模組126先根據適應值的大來排序染色體。即,每一個染色體都會按照適應值進行排序。接著,利用輪盤式選擇(roulette wheel selection)來計算出一比例。輪盤式選擇是將一輪盤分成N個部分,根據各染色體的適應值大小來決定其盤面面積大小,適應值越大面積就越大。而等級輪盤式選擇會根據染色體的適應值的排名來增加或遞減其所佔面積的比例。每個染色體在輪盤上佔有的面積比例越大代表被挑選到母代集合(交配池)中的機率越大。選擇模組126隨機選取輪盤的一點,其所對應的染色體即被選入到母代集合中。In one embodiment, the selection module 126 adopts a rank based wheel selection. The selection module 126 first sorts the chromosomes according to the large fitness value. That is, each chromosome will be sorted according to its fitness value. Next, a ratio is calculated using roulette wheel selection. The roulette selection is to divide the roulette into N parts, and the size of the disk is determined according to the fitness value of each chromosome. The larger the fitness value, the larger the area. The grade roulette selection will increase or decrease the proportion of the area occupied by the chromosome according to the ranking of its fitness value. The larger the proportion of the area occupied by each chromosome on the roulette, the greater the probability of being selected into the mother collection (mating pool). The selection module 126 randomly selects a point of the roulette wheel, and the corresponding chromosome is selected into the parent set.

在步驟S235中,交配模組127對母代集合執行交配以產生子代集合。交配是主要的遺傳運算。交配過程是隨機地選取母代集合(交配池)中的兩個染色體彼此交換資訊,進而組成另外兩個新的染色體。兩個染色體要不要交配基於交配機率來決定,交配的位置則是隨機決定。所述交配可以是單點交配(single point crossover)、雙點交配(two point crossover)、多點交配(multi-point crossover)或均勻交配(uniform crossover)。In step S235, the mating module 127 performs mating on the parent set to generate the offspring set. Mating is a major genetic operation. The mating process is to randomly select two chromosomes in the parent set (mating pool) to exchange information with each other, and then form another two new chromosomes. Whether two chromosomes will mate is determined based on the probability of mating, and the location of mating is determined randomly. The crossover may be single point crossover, two point crossover, multi-point crossover or uniform crossover.

在步驟S240中,突變模組128基於子代集合來執行突變,以更新初始化群體。突變是針對子代集合的遺傳基因以一定機率(突變機率),更動某一基因値,以防止染色體於複製及交配過程中,遺漏重要訊息或落入局部最佳解。所述突變為單點突變(single point mutation)、雙點突變(two point mutation)、移動突變(shift mutation)、倒置突變(inversion mutation)或均勻突變(uniform mutation)。例如,在步驟S205中會先針對每一個染色體設定一個突變機率。在步驟S240中,當染色體的突變率低於設定的突變率則會進行突變。In step S240, the mutation module 128 performs mutation based on the offspring set to update the initialization population. Mutation is to change a certain gene value with a certain probability (mutation probability) for the genetic genes of the offspring set, so as to prevent chromosomes from missing important information or falling into a local optimal solution during the process of replication and mating. The mutation is single point mutation, two point mutation, shift mutation, inversion mutation or uniform mutation. For example, in step S205, a mutation probability is firstly set for each chromosome. In step S240, when the mutation rate of the chromosome is lower than the set mutation rate, mutation will be performed.

之後,更新初始化群體,即,將表現較佳的子代染色體(突變後染色體)取代初始化群體中較差的母代染色體。返回步驟S215,針對更新後的初始化群體重新計算適應值,並在步驟S220中判斷是否滿足終止條件。Afterwards, the initialization population is updated, that is, the better-performing offspring chromosomes (mutated chromosomes) are replaced by poorer parent chromosomes in the initialization population. Return to step S215, recalculate the fitness value for the updated initialization population, and judge whether the termination condition is met in step S220.

即,處理器110在依序執行初始化模組122、適應值計算模組123、適應度分享模組125、選擇模組126以及交配模組127及突變模組128之後,透過終止判斷124模組判斷是否滿足終止條件。倘若未滿足終止條件,則重複執行適應值計算模組123、適應度分享模組125、選擇模組126以及交配模組127及突變模組128,直到滿足終止條件,而獲得最佳解。That is, after the processor 110 sequentially executes the initialization module 122, the fitness value calculation module 123, the fitness sharing module 125, the selection module 126, the mating module 127 and the mutation module 128, the judgment module 124 is terminated. Determine whether the termination condition is met. If the termination condition is not satisfied, the fitness value calculation module 123 , the fitness sharing module 125 , the selection module 126 , the mating module 127 and the mutation module 128 are executed repeatedly until the termination condition is satisfied, and an optimal solution is obtained.

據此,當將上述電子裝置100用於針對多個商家指定銀行分行的情況下,電子裝置100可根據最佳解來為商家指派服務的銀行分行。Accordingly, when the above-mentioned electronic device 100 is used to designate bank branches for multiple merchants, the electronic device 100 can assign service bank branches to merchants according to the best solution.

綜上所述,本新型創作在選擇操作前加入適應度分享機制,可降低演算法收斂的速度,把優良染色體的適應值分享給其它的染色體,一方面可把優良的染色體給壓下來,另一方面可讓其它染色體也有機會可以保留至下一世代,並且以此方法提升染色體族群之間的異質性。此外,本揭露以染色體之間的距離做為是否分享的基礎,可避免造成優良的染色體適應值過度分享給太多的染色體。據此,本揭露可獲得全域最佳解,解決了傳統遺傳演算法中因過度收斂而陷入區域最佳解的情況。To sum up, this new creation adds a fitness sharing mechanism before the selection operation, which can reduce the convergence speed of the algorithm and share the fitness value of good chromosomes with other chromosomes. On the one hand, good chromosomes can be suppressed, and on the other hand On the one hand, other chromosomes can also have the opportunity to be retained in the next generation, and in this way, the heterogeneity among chromosome groups can be improved. In addition, this disclosure uses the distance between chromosomes as the basis for whether to share, which can avoid excessive sharing of excellent chromosome fitness values to too many chromosomes. Accordingly, the present disclosure can obtain the global optimal solution, which solves the problem of falling into the regional optimal solution due to excessive convergence in the traditional genetic algorithm.

100:電子裝置 110:處理器 120:儲存設備 121:設定模組 122:初始化模組 123:適應值計算模組 124:終止判斷模組 125:適應度分享模組 126:選擇模組 127:交配模組 128:突變模組 S205~S245:基於遺傳演算法提供多目標最佳解的方法的步驟 100: Electronic device 110: Processor 120: storage equipment 121: Setting Module 122: Initialize the module 123:Fitness value calculation module 124: Termination Judgment Module 125:Fitness sharing module 126:Select module 127: Mating Module 128: Mutation Module S205~S245: steps of the method for providing multi-objective optimal solution based on genetic algorithm

圖1根據本新型創作一實施例的基於遺傳演算法提供多目標最佳解的電子裝置的方塊圖。 圖2是依照本新型創作一實施例的基於遺傳演算法提供多目標最佳解的方法流程圖。 FIG. 1 is a block diagram of an electronic device for providing multi-objective optimal solutions based on a genetic algorithm according to an embodiment of the present invention. FIG. 2 is a flowchart of a method for providing multi-objective optimal solutions based on a genetic algorithm according to an embodiment of the present invention.

100:電子裝置 100: Electronic device

110:處理器 110: Processor

120:儲存設備 120: storage equipment

121:設定模組 121: Setting Module

122:初始化模組 122: Initialize the module

123:適應值計算模組 123:Fitness value calculation module

124:終止判斷模組 124: Termination Judgment Module

125:適應度分享模組 125:Fitness sharing module

126:選擇模組 126:Select module

127:交配模組 127: Mating Module

128:突變模組 128: Mutation Module

Claims (7)

一種基於遺傳演算法提供多目標最佳解的電子裝置,包括: 一儲存設備,包括多個模組;以及 一處理器,耦接至該儲存設備,且經配置以存取並執行該些模組,其中該些模組包括: 一初始化模組,產生一初始化群體,該初始化群體包括多個染色體; 一適應值計算模組,分別計算該些染色體的多個適應值; 一適應度分享模組,在該些適應值中找出一最佳適應值,取出與具有該最佳適應值的染色體相距在一指定範圍內的染色體,將具有該最佳適應值的染色體以及在該指定範圍內的染色體分類至一篩選樣本集; 一選擇模組,自該篩選樣本集中獲得一母代集合; 一交配模組,對該母代集合執行一交配以產生一子代集合;以及 一突變模組,基於該子代集合來執行一突變,以更新該初始化群體, 其中,在未滿足一終止條件的情況下,該處理器重複執行該適應值計算模組、該適應度分享模組、該選擇模組、該交配模組以及該突變模組,直到滿足該終止條件,而獲得一最佳解。 An electronic device for providing multi-objective optimal solutions based on a genetic algorithm, comprising: a storage device including a plurality of modules; and A processor, coupled to the storage device, and configured to access and execute the modules, wherein the modules include: An initialization module that generates an initialization population, the initialization population includes a plurality of chromosomes; An fitness value calculation module, which calculates multiple fitness values of the chromosomes; A fitness sharing module, which finds an optimal fitness value among the fitness values, takes out the chromosomes that are within a specified range from the chromosome with the best fitness value, and divides the chromosomes with the best fitness value and Chromosomes within the specified range are classified into a screening sample set; a selection module to obtain a parent generation set from the screening sample set; a mating module that performs a mating on the set of parents to produce a set of offspring; and a mutation module that performs a mutation based on the set of children to update the initialization population, Wherein, if a termination condition is not satisfied, the processor repeatedly executes the fitness value calculation module, the fitness sharing module, the selection module, the mating module and the mutation module until the termination condition is met. conditions to obtain an optimal solution. 如請求項1所述的電子裝置,其中該選擇模組採用一等級輪盤式選擇,自該篩選樣本集中獲得該母代集合。The electronic device as claimed in claim 1, wherein the selection module adopts a level roulette selection to obtain the parent set from the screening sample set. 如請求項1所述的電子裝置,其中該些模組更包括: 一終止判斷模組,判斷是否滿足該終止條件。 The electronic device as described in claim 1, wherein the modules further include: A termination judging module, judging whether the termination condition is satisfied. 如請求項1所述的電子裝置,其中該些模組更包括: 一設定模組,設定多個參數,其中該些參數包括該初始化群體所包括的一染色體數量、一染色體長度、一交配機率、一突變機率以及該終止條件。 The electronic device as described in claim 1, wherein the modules further include: A setting module sets a plurality of parameters, wherein the parameters include a number of chromosomes included in the initialization population, a chromosome length, a mating probability, a mutation probability and the termination condition. 如請求項1所述的電子裝置,其中每一該些染色體包括多個基因,該些基因分別代表不同商家指派給不同銀行分行的可行解。The electronic device as claimed in claim 1, wherein each of the chromosomes includes a plurality of genes, and the genes respectively represent feasible solutions assigned by different merchants to different bank branches. 如請求項1所述的電子裝置,其中該交配模組採用單點交配、雙點交配、多點交配以及均勻交配其中一個。The electronic device according to claim 1, wherein the mating module adopts one of single-point mating, double-point mating, multi-point mating and uniform mating. 如請求項1所述的電子裝置,其中該突變模組採用單點突變、雙點突變、移動突變以及均勻突變其中一個。The electronic device according to claim 1, wherein the mutation module adopts one of single-point mutation, double-point mutation, mobile mutation and uniform mutation.
TW111207583U 2022-07-14 2022-07-14 Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm TWM633222U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111207583U TWM633222U (en) 2022-07-14 2022-07-14 Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111207583U TWM633222U (en) 2022-07-14 2022-07-14 Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm

Publications (1)

Publication Number Publication Date
TWM633222U true TWM633222U (en) 2022-10-11

Family

ID=85461315

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111207583U TWM633222U (en) 2022-07-14 2022-07-14 Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm

Country Status (1)

Country Link
TW (1) TWM633222U (en)

Similar Documents

Publication Publication Date Title
Santiago et al. A novel multi-objective evolutionary algorithm with fuzzy logic based adaptive selection of operators: FAME
Nebro et al. SMPSO: A new PSO-based metaheuristic for multi-objective optimization
CN108287666B (en) Data storage method and device for cloud storage environment
US8825573B2 (en) Controlling quarantining and biasing in cataclysms for optimization simulations
WO2023217290A1 (en) Genophenotypic prediction based on graph neural network
EP1836656A2 (en) Optimization processing method using a distributed genetic algorithm
Valsalam et al. Using symmetry and evolutionary search to minimize sorting networks
CN115798598B (en) Hypergraph-based miRNA-disease association prediction model and method
CN112436992A (en) Virtual network mapping method and device based on graph convolution network
CN112183001B (en) Hypergraph-based multistage clustering method for integrated circuits
CN114722482A (en) Method for predicting deformation of plateau tunnel and plateau tunnel health detection system
CN111260062A (en) Rectangular piece optimization layout method based on adaptive genetic algorithm
TWM633222U (en) Electronic apparatus for providing multi-objective optimal solution based on genetic algorithm
CN109245948B (en) Security-aware virtual network mapping method and device
CN113780419A (en) Synthetic oversampling method and system for processing unbalanced data
TWM617701U (en) Electronic device of assigning service bank branch for store
Yoshida et al. Multimodal genetic programming by using tree structure similarity clustering
Ajith et al. Parallel particle swarm optimization algorithms with adaptive simulated annealing
Su et al. Efficient GA approach combined with Taguchi method for mixed constrained circuit design
TW202242771A (en) Electronic device and method of assigning service bank branch for store
CN116056158B (en) Frequency allocation method and device, electronic equipment and storage medium
Hancock et al. L-dominance: An approximate-domination mechanism for adaptive resolution of Pareto frontiers
CN111464343B (en) Maximum-strain greedy expansion community discovery method and system based on average mutual information
CN109753986A (en) A kind of clustering method and device of the index information based on data block
Ando et al. Identifying the Gene Regulatory Network by Real-Coded, Variable Length and Multiple-Stage GA

Legal Events

Date Code Title Description
GD4K Issue of patent certificate for granted utility model filed before june 30, 2004