Multi-strategy optimization X structure minimum tree construction method based on discrete differential evolution

文档序号:1378961 发布日期:2020-08-14 浏览:35次 中文

阅读说明:本技术 基于离散差分进化的多策略优化x结构最小树构建方法 (Multi-strategy optimization X structure minimum tree construction method based on discrete differential evolution ) 是由 刘耿耿 杨礼亮 郭文忠 陈国龙 于 2020-04-28 设计创作,主要内容包括:本发明涉及一种基于离散差分进化的多策略优化X结构最小树构建方法,包括以下步骤:步骤S1:读取待测试电路引脚信息;步骤S2:对种群进行初始化,并计算初始种群个体适应值,初始化自适应参数;步骤S3:判断算法迭代次数是否达到阈值;步骤S4:若未达到阈值,则从策略池随机选择一种变异策略,经过变异、交叉后得到儿子个体;若达到阈值,则根据传统的差分进化算法对种群进行变异、交叉操作;步骤S5:采用免疫克隆选择策略;步骤S6:判断迭代是否满足终止条件,如果满足,则迭代终止输出最终种群,否则返回步骤S3继续下一次迭代更新;步骤S7:采用精炼策略,得到布线树最优方案。本发明能够得到更大的搜索空间,更小的线长,优化布线树拓扑结构,减少冗余。(The invention relates to a multi-strategy optimization X structure minimum tree construction method based on discrete differential evolution, which comprises the following steps: step S1, reading the pin information of the circuit to be tested, step S2, initializing the population, calculating the individual adaptive value of the initial population and initializing the adaptive parameter; step S3, judging whether the iteration frequency of the algorithm reaches a threshold value or not, and step S4, if not, randomly selecting a variation strategy from the strategy pool, and obtaining son individuals after variation and intersection; if the threshold value is reached, performing variation and cross operation on the population according to a traditional differential evolution algorithm; step S5, adopting immune clone selection strategy; and S6, judging whether the iteration meets the termination condition, if so, terminating the iteration and outputting the final population, otherwise, returning to S3 to continue the next iteration updating, and S7, obtaining the optimal scheme of the wiring tree by adopting a refining strategy. The invention can obtain larger search space and smaller wire length, optimizes the topological structure of the wiring tree and reduces redundancy.)

1. A multi-strategy optimization X structure minimum tree construction method based on discrete differential evolution is characterized by comprising the following steps:

step S1, reading the pin information of the circuit to be tested, sorting the pins according to the ascending order of the x-axis coordinate and the ascending order of the y-axis coordinate, and setting the iteration times, the threshold value and the cross probability cr;

step S2, initializing the population, calculating the adaptive value of each individual of the initial population, and initializing adaptive parameters F;

step S3, judging whether the iteration number of the algorithm reaches a threshold value;

step S4, if the threshold value is not reached, a variation strategy is randomly selected from the strategy pool, and the son individuals are obtained after variation and intersection; if the threshold value is reached, performing variation and cross operation on the population according to a traditional differential evolution algorithm;

step S5, adopting an immune clone selection strategy, and adding individuals obtained through four steps of selection, cloning, mutation and extinction into a population;

step S6, judging whether the iteration meets the termination condition, if so, terminating the iteration and outputting the final population, otherwise, returning to the step S3 to continue the next iteration updating;

and step S7, searching each individual in the final population for the substructure with the maximum sharing degree by adopting a refining strategy to obtain the optimal scheme of the wiring tree.

2. The discrete differential evolution-based multi-strategy optimization X structure minimum tree construction method according to claim 1, wherein the adaptive value calculation is represented by the following formula:

fitness(Tx)=Length(Tx)

wherein

Wherein, length g (e)i) Edge e in XSMT's edge setiLength of (d).

3. The discrete differential evolution-based multi-strategy optimization X structure minimum tree construction method according to claim 1, wherein in the step S2, a Prim algorithm is adopted to initialize individuals in a population, T is a minimum spanning tree set, S is a starting pin point set, V is a pin point set, and S is a randomly selected starting point.

4. The discrete differential evolution-based multi-strategy optimization X structure minimum tree construction method according to claim 1, wherein the mutation strategies in the strategy pool comprise six strategies, each strategy is represented by DE/a/b, wherein DE represents differential evolution, a represents a selection mode of a basis vector, and b represents the number of differential vectors in an operator, and the method is represented by the following formula:

(1)、DE/rand/1:

Vi,g=Xr1,g+F*(Xr2,g-Xr3,g)

(2)、DE/rand/2:

Vi,g=Xr1,g+F*(Xr2,g-Xr3,g)+F*(Xr4,g-Xr5,g)

(3)、DE/best/1:

Vi,g=Xbest,g+F*(Xr1,g-Xr2,g)

(4)、DE/best/2:

Vi,g=Xbest,g+F*(Xr1,g-Xr2,g)+F*(Xr3,g-Xr4,g)

(5)、DE/current-to-best/1:

Vi,g=Xi,g+F*(Xbest,g-Xi,g)

(6)、DE/rand-to-best/1:

Vi,g=Xr0,g+F*(Xbest,g-Xr0,g)+F*(Xr1,g-Xr2,g)

wherein: r is0≠r1≠r2≠r3≠r4≠r5≠i∈{1,2,…,NP},Xr,gDenotes random individuals in the g-th iteration population, Xbest,gRepresents the global optimal solution at the g-th iteration, scaling factor F ∈ [0,2]。

5. The discrete differential evolution-based multi-strategy optimization X-structure minimum tree construction method according to claim 1, wherein the immune clone selection strategy is specifically:

(1) selecting: after the differential evolution algorithm is subjected to primary variation, intersection and selection, all individuals in the current population are sorted according to the size of the adaptive value, and excellent particles with the adaptive value ranked N are selected to form a temporary population, wherein the value of N is as follows:

N=k×NP

wherein k is 0.2, and NP is the population size;

(2) cloning: the temporary population of particles was amplified in the amount shown below to yield a temporary clonal population C ═ C1,C2,…,CNi}

Wherein Ni is the amplification number of the ith particle in the temporary population, N is the particle number of the temporary population, b is a constant 1, the amplification number is ensured to be more than or equal to 1, k is a random number between 0 and 1, and round () is rounded;

(3) variation, namely performing variation on each particle of the temporary clone population one by one, wherein the variation strategy adopts the variation of a wiring tree topological structure and a connection mode, and randomly selects e-side e ∈ [1,10 ] for each individual in the temporary clone population]Changing the connection mode of the edge, from four connection modes including 0 selection and 1Selecting one of selection, 2 selection and 3 selection, reselecting nodes at two ends of the edge, adopting a merging and searching concept in the process, ensuring that a legal tree is obtained after mutation, and obtaining a mutation population M ═ M1,M2,…,MNiThe value of t is given by

Wherein n is the number of pins;

(4) and (3) extinction: temporary population of individuals PiObtaining N after cloning and mutationiSet of individuals M ═ M1,M2,…,MNiSelecting individual M with optimal adaptation value in the setbestIf fitness (M)best)<fitness(Pi) Then the individual TbestAdding the obtained product into the current iteration population, and if the obtained product is fitness (T), all the other variant individuals in the variant set T diebest)≥fitness(Pi) All individuals in the variant set T die entirely.

6. The discrete differential evolution-based multi-strategy optimization X structure minimum tree construction method according to claim 1, wherein the refining strategy is specifically:

(1) for the final population, each individual in the population is refined, and each point p in each individual in the population is calculatediIn the definition of the tree, the degree of the node is the number of the edges connected by the node, and is marked as di

(2) There are 4 routing ways for one edge, if point piDegree of (d)iThen the point may have a substructure ofEnumerating each seed structure, recording the sharing degree of the edges as a measuring basis, sequencing the seed structures, selecting the seed structure with the maximum sharing degree each time, combining and searching the set method to continuously obtain the seed structures, thereby constructingAnd (6) a legal tree is obtained.

Technical Field

The invention belongs to the technical field of computer aided design of integrated circuits, and particularly relates to construction of an X-structure Steiner minimum tree in wiring of a very large scale integrated circuit.

Background

The SMT (Steiner minimum Tree) problem is to find a routing Tree with the minimum cost connecting pin sets by introducing extra points (Steiner points) on the basis of a given pin set. Therefore, the construction of SMT is one of the important links in Very Large Scale Integration (VLSI) wiring.

With the continuous progress and development of VLSI manufacturing processes, interconnect effects are becoming an important factor affecting chip performance. However, most of the research on the wiring algorithm is based on the manhattan structure, and the wiring model based on the manhattan structure requires that the wiring modes between the pins can only be in the horizontal direction and the vertical direction, so that the optimization of the wire length of the interconnection line in the chip is more difficult. The non-Manhattan structure has more wiring directions, so that the wiring resources can be more fully utilized, the wiring quality is improved, and the performance of the chip is improved.

In order to better develop the wiring work under the non-Manhattan structure, the construction of the Steiner minimum tree of the non-Manhattan structure is a key step. The X configuration is one of the non-manhattan configurations, and the traces between the pins can be oriented at 45 ° and 135 ° in addition to the horizontal and vertical directions. The existing X-architecture Steiner minimum tree (XSMT) construction algorithm is mainly divided into an accurate algorithm and a heuristic algorithm. As the problem scale is continuously enlarged, these algorithms either suffer from a sharp increase in time complexity or easily fall into local extreme values, and it is difficult to obtain a high-quality solution. Therefore, an efficient and feasible X-structure Steiner minimum tree construction method is urgently needed to improve VLSI wiring quality and finally optimize chip performance.

Disclosure of Invention

In view of this, the present invention provides a method for constructing a minimum tree of a multi-strategy optimized X structure based on discrete differential evolution, which can obtain a larger search space, a smaller wiring length of a wiring tree, optimize a topology structure of the wiring tree, and reduce redundancy of wiring resources.

In order to achieve the purpose, the invention adopts the following technical scheme:

a multi-strategy optimization X structure minimum tree construction method based on discrete differential evolution comprises the following steps:

step S1, reading the pin information of the circuit to be tested, sorting the pins according to the ascending order of the x-axis coordinate and the ascending order of the y-axis coordinate, and setting the iteration times, the threshold value and the cross probability cr;

step S2, initializing the population, calculating the adaptive value of each individual of the initial population, and initializing adaptive parameters F;

step S3, judging whether the iteration number of the algorithm reaches a threshold value;

step S4, if the threshold value is not reached, a variation strategy is randomly selected from the strategy pool, and the son individuals are obtained after variation and intersection; if the threshold value is reached, performing variation and cross operation on the population according to a traditional differential evolution algorithm;

step S5, adopting an immune clone selection strategy, and adding individuals obtained through four steps of selection, cloning, mutation and extinction into a population;

step S6, judging whether the iteration meets the termination condition, if so, terminating the iteration and outputting the final population, otherwise, returning to the step S3 to continue the next iteration updating;

and step S7, searching each individual in the final population for the substructure with the maximum sharing degree by adopting a refining strategy to obtain the optimal scheme of the wiring tree.

Further, the adaptive value calculation is represented by the following formula:

fitness(Tx)=Length(Tx)

wherein

Wherein, length(ei) Edge e in XSMT's edge setiLength of (d).

Further, in step S2, the Prim algorithm is used to initialize the individuals in the population, where T is a minimum spanning tree set, S is a starting pin point set, V is a pin point set, and S is a randomly selected starting point.

Furthermore, the variation strategies in the strategy pool comprise six strategies, each strategy is represented by DE/a/b, wherein DE represents differential evolution, a represents a selection mode of a base vector, and b represents the number of differential vectors in an operator, and the method is represented by the following formula:

(1)、DE/rand/1:

Vi,g=Xr1,g+F*(Xr2,g-Xr3,g)

(2)、DE/rand/2:

Vi,g=Xr1,g+F*(Xr2,g-Xr3,g)+F*(Xr4,g-Xr5,g)

(3)、DE/best/1:

Vi,g=Xbest,g+F*(Xr1,g-Xr2,g)

(4)、DE/best/2:

Vi,g=Xbest,g+F*(Xr1,g-Xr2,g)+F*(Xr3,g-Xr4,g)

(5)、DE/current-to-best/1:

Vi,g=Xi,g+F*(Xbest,g-Xi,g)

(6)、DE/rand-to-best/1:

Vi,g=Xr0,g+F*(Xbest,g-Xr0,g)+F*(Xr1,g-Xr2,g)

wherein: r is0≠r1≠r2≠r3≠r4≠r5≠i∈{1i2,…,NP},Xr,gDenotes random individuals in the g-th iteration population, Xbest,gRepresents the global optimal solution at the g-th iteration, scaling factor F ∈ [0,2]。

Further, the immune clone selection strategy is specifically as follows:

(1) selecting: after the differential evolution algorithm is subjected to primary variation, intersection and selection, all individuals in the current population are sorted according to the size of the adaptive value, and excellent particles with the adaptive value ranked N are selected to form a temporary population, wherein the value of N is as follows:

N=k×NP

wherein k is 0.2, and NP is the population size;

(2) cloning: the temporary population of particles was amplified in the amount shown below to yield a temporary clonal population C ═ C1,C2,…,CNi}

k∈(0,1)

Wherein Ni is the amplification number of the ith particle in the temporary population, N is the particle number of the temporary population, b is a constant 1, the amplification number is ensured to be more than or equal to 1, k is a random number between 0 and 1, and round () is rounded;

(3) variation, namely performing variation on each particle of the temporary clone population one by one, wherein the variation strategy adopts the variation of a wiring tree topological structure and a connection mode, and randomly selects e-side e ∈ [1,10 ] for each individual in the temporary clone population]Changing the connection mode of the edge, reselecting nodes at two ends of the edge from four connection modes including one of 0 selection, 1 selection, 2 selection and 3 selection, adopting and searching set idea in the process, ensuring that a legal tree is obtained after mutation, and obtaining a mutation population M ═ { M ═ M { (M } by using a legal tree obtained after mutation1,M2,…,MNiThe value of t is given by

k∈(0,1)

Wherein n is the number of pins;

(4) and (3) extinction: temporary population of individuals PiObtaining N after cloning and mutationiSet of individuals M ═ M1,M2,…,MNiSelecting individual M with optimal adaptation value in the setbestIf fitness (M)best)<fitness(Pi) Then the individual TbestAdding the obtained product into the current iteration population, and if the obtained product is fitness (T), all the other variant individuals in the variant set T diebest)≥fitness(Pi) All individuals in the variant set T die entirely.

Further, the refining strategy is specifically as follows:

(1) for the final population, each individual in the population is refined, and each point p in each individual in the population is calculatediIn the definition of the tree, the degree of the node is the number of the edges connected by the node, and is marked as di

(2) There are 4 routing ways for one edge, if point piDegree of (d)iThen the point may have a substructure ofEnumerating each seed structure, recording the sharing degree of the edges as a measuring basis, sequencing the seed structures, selecting the seed structure with the maximum sharing degree each time, and combining and searching the set to continuously obtain the seed structures so as to construct a legal tree.

Compared with the prior art, the invention has the following beneficial effects:

the invention can obtain larger search space and smaller wiring tree line length in the same population number and iteration times, optimizes the topological structure of the wiring tree and reduces the redundancy of wiring resources.

Drawings

FIG. 1 is an XSMT pin wiring diagram in accordance with an embodiment of the present invention;

FIG. 2 is a diagram of an X structural model in accordance with an embodiment of the present invention, wherein (a) is selected to be 0; (b) selecting as 1; (c) selecting as 2; (d) selecting as 3;

FIG. 3 is a diagram illustrating two novel methods of operation according to an embodiment of the present invention, wherein (a) is operation one; (b) operation two;

fig. 4 is a flow chart of the method of the present invention.

Detailed Description

The invention is further explained below with reference to the drawings and the embodiments.

In this embodiment, referring to fig. 1, the XSMT problem model is specifically:

different from the traditional Manhattan structure wiring, two wiring modes are designed and added in the XSMT problem, namely two wiring modes of 45 degrees and 135 degrees are added on the basis of the original horizontal wiring and vertical wiring. The XSMT problem introduces the concept of the Steiner point, which exists in two interconnected pins, and the fixation of the Steiner point determines the routing manner between the two pins.

An example of an XSMT problem model is as follows, where P is { P over a given set of pins1,P2,···,PnIn (f), PiRepresenting the ith pin to be connected, n representing the number of the pins, introducing a Cartesian coordinate system, and each pin point PiThe corresponding coordinate in the coordinate system is (x)i,yi) Now, 5 pins P ═ P is given1,P2,P3,P4,P5And coordinates corresponding to each pin are shown in table 1, and a corresponding pin distribution diagram is shown in fig. 1.

TABLE 1 Pin coordinate information

Pin P1 P2 P3 P4 P5
Coordinates of the object (1,22) (5,5) (12,10) (18,3) (22,16)

Some relevant definitions regarding the XSMT problem are as follows:

definitions 1.Pseudo-Steiner points the connection points other than the pin points are assumed to be Pseudo-Steiner points, denoted PS points.

Suppose pin a ═ x1,y1) Pin B ═ x2,y2) Is two end points of a connecting line AB and has x1<x2The following definitions are provided:

definition 2.0 the choice is to lead the vertical edge from a to point S and then the X structure edge from S to B as shown in fig. 2 (a).

Definition 3.1 the choice is to lead the X structure edge from a to point S and then the vertical edge from S to B as shown in fig. 2 (B).

Definition 4.2 the choice is to lead the vertical edge from a to S and then the horizontal edge from S to B as shown in fig. 2 (c).

Definition 5.3 options as shown in fig. 2 (d), draw horizontal side from a to S, and then draw vertical side from S to B.

Referring to fig. 4, the present embodiment provides a method for constructing a minimum tree of a multi-strategy optimization X structure based on discrete differential evolution, including the following steps:

and step S1, reading the pin information of the circuit to be tested, sorting the pins according to the ascending order of the x-axis coordinate and the ascending order of the y-axis coordinate, and setting the iteration times, the threshold value and the cross probability cr.

And step S2, initializing the population by using a prim algorithm, calculating the adaptive value of each individual of the initial population according to the adaptive value formula, and initializing the adaptive parameter F.

Step S3, carrying out iterative evolution operation according to the flow of the differential evolution algorithm, in each iteration of the first stage, adopting a PS + E mixed strategy, namely, changing the topological structure of the minimum tree and the routing mode of the edge by the mutation operation, selecting a mutation strategy (according to the formula 16 to the formula 20) from the strategy pool, and obtaining son individuals after mutation and intersection; and in the second stage, a PS strategy is adopted to only change the edge routing mode, the strategy pool is modified into a strategy one, the selection operator selects the son individual with the minimum adaptive value from the original individuals based on a greedy strategy, and the son individual and the original individual are reserved to the next generation.

And step S4, adopting an immune clone selection strategy at the end of each iteration, and adding the obtained individuals into the population through four steps of selection, cloning, mutation and extinction.

And S5, checking whether the iteration meets the termination condition, if so, terminating the iteration, otherwise, returning to S3 to continue updating the next iteration.

And S6, adopting a refining strategy at the end of the construction method, and searching each individual in the final population for the substructure with the maximum sharing degree.

In this embodiment, the basic idea of the differential evolution algorithm is as follows: randomly generating an initial population, summing the vector difference of any two individuals in the population with a third individual to generate a new individual, comparing the generated new individual with the corresponding individual in the current population, if the adaptive value of the newly generated individual is superior to that of the current individual, selecting the newly generated individual to replace the current individual by adopting a greedy strategy, otherwise, still storing the old individual.

The differential evolution algorithm update strategy is as follows:

initializing a population: randomly generating NP individuals, each individual having a vector dimension D, e.g., Xi,0Representing the initialization of the ith individual, XLIs the lower limit of D-dimensional individuals, XHIs the upper limit of the D-dimensional individual, the corresponding initialization mode is as follows:

Xi,0=XL+randam(0,1)*(XH-XL) (1)

mutation operator: in the g-th iteration processIn the population of the g generation by selecting three individuals Xa,g、Xb,g、Xc,gAnd the three individuals are different, and a new variant individual V is generated according to a variant formulai,gThe variation formula is as follows:

Vi,g=Xa,g+F*(Xb,g-Xc,g) (2)

where a ≠ b ≠ c ≠ i, F is the scaling factor chosen between [0,2 ].

And (3) a crossover operator: in the g-th generation crossing process, the differential evolution algorithm adopts the following crossing strategy:

where j represents the dimension, cr is the cross probability, and cr ∈ [0, 1 ].

Selecting an operator: the selection process adopts a greedy strategy, namely, the individual with the optimal adaptive value is selected, and the next generation of individuals are obtained according to the following formula:

wherein f (X)i,g) Indicates the fitness value of the ith individual in the g generation.

In this embodiment, an edge point pair coded representation is employed. Because the encoding of the edge point pairs can better maintain the optimal substructure of the population.

In a pin distribution diagram, there are n pin points in a routing tree network, there are n-1 edges in the spanning tree, and a Steiner point is introduced in each edge, so there are n-1 Steiner points and n-1 selection modes, each pin is numbered to obtain the numbers 1, 2, 3, …, n-1, n, an edge is determined by recording two end points of a connection line, and a bit is added to record the selection mode of the connection line, so in the actual coding, an individual can be represented by an array with the length of 3 × (n-1), and finally, a bit is added to represent the size of the adaptation value of the individual, that is, the final coding length is 3 × (n-1) +1, as the pin distribution diagram of fig. 1 can be represented by the following character strings:

1 3 0 2 3 0 4 5 0 3 4 3 46.284

where 130 represents the connection between pin points 1 and 3 in a 0-select manner, and the last digit 46.284 represents the adaptation size of the spanning tree, which is also the non-manhattan line length of the spanning tree.

In this embodiment, the adaptive value function is specifically:

the total length of XSMT routing is accumulated from the lengths of all edges of the spanning tree, as shown below:

wherein length (e)i) Edge e in XSMT's edge setiLength of (d).

In an XSMT edge set, all edges belong to one of four ways: horizontal, vertical, 45 ° diagonal and 135 ° diagonal, respectively. Rotating the 45-degree oblique line by 45 degrees in a counterclockwise direction can obtain a vertical line, rotating the 135-degree oblique line by 45 degrees in a counterclockwise direction can obtain a horizontal line, so that four sides can be converted into two sides, and then arranging all the horizontal lines and the vertical lines, wherein the total length of the XSMT can be obtained by adding all the horizontal lines and the vertical lines. The reason why the hypotenuse is rotated into the horizontal line and the vertical line is to remove the overlapped sides, and if the overlapped sides are not removed, the calculated total length may be larger than the actual total length. The excellence degree of an X-structure Steiner tree is determined by the total length of the wiring tree, the smaller the total length of a wiring tree is, the higher the excellence degree of the wiring tree is, therefore, the construction method measures the size of the adaptive value of a wiring tree, namely the size of the total length of the wiring tree, and the calculation of the adaptive value is shown by the following formula:

fitness(Tx)=Length(Tx) (6)

in this embodiment, Prim algorithm is used to initialize individuals in a population, where T is a minimum spanning tree set, S is an initial pin point set, V is a pin point set, and S is a randomly selected starting point. The pseudo code is shown in Algorithm 1:

in this example, the specific steps of the immune clonal selection strategy are as follows:

(1) selecting: after the differential evolution algorithm is subjected to primary variation, crossing and selection, all individuals in the current population are sorted according to the size of the adaptive value, and excellent particles with the adaptive value ranked N are selected to form a temporary population, wherein the value of N can be obtained according to a formula (7):

N=k×NP (7)

where k is 0.2 and NP is the population size.

(2) Cloning: the temporary population of particles was amplified in the amount shown in the following amplification formula (8) to generate a temporary clone population C ═ C1,C2,…,CNi}。

Wherein Ni is the amplification quantity of the ith particle in the temporary population, N is the particle number of the temporary population, b is a constant 1, the amplification quantity is ensured to be more than or equal to 1, k is a random number between 0 and 1, and round () is rounded.

(3) Variation, namely performing variation on each particle of the temporary clone population one by one, wherein the variation strategy adopts the variation of a wiring tree topological structure and a connection mode, and randomly selects e-side e ∈ [1,10 ] for each individual in the temporary clone population]Changing the connection mode of the edge, reselecting nodes at two ends of the edge from one of four connection modes (0 selection, 1 selection, 2 selection and 3 selection), adopting a merging and searching concept in the process, ensuring that a legal tree is obtained after mutation, and obtaining a mutation population M ═ M1,M2,…,MNiThe value of t is given by equation (9).

Where n is the number of pins.

(4) And (3) extinction: temporary population of individuals PiObtaining N after cloning and mutationiSet of individuals M ═ M1,M2,…,MNiSelecting individual M with optimal adaptation value in the setbestIf fitness (M)best)<fitness(Pi) Then the individual TbestAdding the obtained product into the current iteration population, and if the obtained product is fitness (T), all the other variant individuals in the variant set T diebest)≥fitness(Pi) All individuals in the variant set T die entirely.

The immune clonal selection strategy pseudocode is shown in algorithm 2.

In this embodiment, the policy pool specifically includes six variation policies, each policy is represented by "DE/a/b", where DE represents differential evolution, a represents a selection manner of a basis vector, and b represents the number of differential vectors in an operator, and is represented by the following formula:

(1)、DE/rand/1:

Vi,g=Xr1,g+F*(Xr2,g-Xr3,g) (10)

(2)、DE/rand/2:

Vi,g=Xr1,g+F*(Xr2,g-Xr3,g)+F*(Xr4,g-Xr5,g) (11)

(3)、DE/best/1:

Vi,g=Xbest,g+F*(Xr1,g-Xr2,g) (12)

(4)、DE/best/2:

Vi,g=Xbest,g+F*(Xr1,g-Xr2,g)+F*(Xr3,g-Xr4,g) (13)

(5)、DE/current-to-best/1:

Vi,g=Xi,g+F*(Xbest,g-Xi,g) (14)

(6)、DE/rand-to-best/1:

Vi,g=Xr0,g+F*(Xbest,g-Xr0,g)+F*(Xr1,g-Xr2,g) (15)

wherein: r is0≠r1≠r2≠r3≠r4≠r5≠i∈{1,2,…,NP},Xr,gDenotes random individuals in the g-th iteration population, Xbest,gRepresents the global optimal solution at the g-th iteration, scaling factor F ∈ [0,2]。

Before describing the variable strategy based on the XSMT problem, two definitions of operation signs need to be given.

Definition A is a particle X1B is a particle X2The complete set is A ∪ B, and the following two operators are defined:

Ab, the symmetric difference between A and B is obtained as (A ∪ B) - (A ∩ B), as shown in FIG. 3 (a).

A ≦ B: first, the set C is calculated as a-B, and then the edges in the set B are added to the set C until the edge set of the set C can form a legal tree, as shown in fig. 3 (B).

Given the above definitions, the following discussion addresses a strategy pool consisting of three new variant strategies proposed based on the XSMT problem:

mutation strategy 1: in the DE/current-to-best (gbest + pbest)/1, in the variation strategy, the base vector of the first part is the current individual, the difference vector is generated by the operation of the local optimal individual of the current individual and the current individual, the individual T is obtained by the operation of a formula (16), the base vector of the second part is the individual T, the difference vector is generated by the operation of the individual T and the global optimal individual, and the public optimal individual is generated by the operation of a public optimal individualObtaining the target variant individual V by the calculation of the formula (17)i,g

The mutation strategy can keep the common edges of the current individuals and the optimal individuals (including globally optimal individuals and locally optimal individuals), and the edges in the optimal individuals are replaced by the edges of the current particles with a probability of 50%, so that the similarity degree of the individuals of the current population and the optimal individuals is improved.

Mutation strategy 2: in the DE/rand-to-best (gbest + pbest)/1, in the variation strategy, the base vector of the first part is the current individual, the difference vector is generated by randomly selecting one individual from the current population and operating with the locally optimal individual, the individual T is obtained through the operation of a formula (18), the base vector of the second part is the individual T, the difference vector is generated by randomly selecting another individual from the current population and operating with the globally optimal individual, and the target variant individual V is obtained through the operation of a formula (19)i,gThe variation formula is as follows:

wherein r is1≠r2And not equal to i, the structure of the randomly selected particles in the population has a higher probability of being different from that of the current individual and the optimal individual, so that the direction of variation is not limited to the edge set in the optimal individual.

Mutation strategy 3: DE/current-to-rand/1. in the variation strategy, the base vector is the current individual, the difference vector is generated by the operation of the current particle and the randomly selected particle in the population, and the variant individual V is obtained by the operation of the formula (20)i,gThe variation formula is as follows:

the particles in the population have diversity, the variation direction of the variation strategy has high randomness, and the diversity of the particles is improved in the early search process.

In solving the XSMT problem, the whole iteration process is usually divided into two stages, a (PS + E) to PS hybrid strategy is adopted, a PS + E conversion strategy is adopted in the early stage of the iteration, that is, the topology structure and the routing mode of the edge of the minimum tree are changed, and only a simple PS conversion strategy is adopted in the later stage. In the multiple variation strategies, different schemes are adopted for the selection of the strategies before and after, three strategies are mixed and used in the early stage, each strategy is selected from the strategy pool with medium probability, and only the variation strategy 1 is used in the later stage.

The multi-mutation strategy pseudocode is shown in algorithm 3.

In this embodiment, the adaptive parameter F specifically includes:

for example for mutation operators

With Fi∈[1,2]Now define the operator:

if Fi<1, from the set of edgesRandomly eliminating n edges { e1,e2,…,enTherein ofAnd isThe value of n is calculated by equation (22):

wherein | Xbest,gL is the set Xbest,gThe size of (2).

If Fi>1, from the set of edgesRandomly eliminating n edges { e1,e2,…,enTherein ofAnd isThe value of n is calculated from equation (23):

if FiAnd if the number is 1, performing the operation according to the original operation strategy without changing any edge set.

Significance of the adaptive parameter F: current individual Xi,gAdapted value of fiSufficiently close to Xbest,gAdapted value of fbestThen part of the sub-structure of its spanning tree is already optimal, at which point F is reducediThe value of (A) to a greater extent preserves the self structure, whereas F should be increasediValues to increase the range of variation.

The adaptive policy pseudocode is shown in algorithm 4.

In this embodiment, there may be a space for each individual in the population to optimize for the final search result after all iterations are completed. In order to search for a better result of each individual, a refining strategy is added, and the specific steps are as follows:

(1) for the final population obtained after iteration evaluations, refining each individual in the population, and calculating each point p in each individual in the populationiIn the definition of the tree, the degree of the node is the number of the edges connected by the node, and is marked as di

(2) There are 4 routing ways for one edge, if point piDegree of (d)iThen the point may have a substructure ofEnumerating each seed structure, recording the sharing degree of the edges as a measuring basis, sequencing the seed structures, selecting the seed structure with the maximum sharing degree each time, and combining and searching the set to continuously obtain the seed structures so as to construct a legal tree.

The refining strategy pseudocode is shown in algorithm 5:

in this embodiment, the main parameters are: population size NP, iteration times evaluations, threshold value threshold, adaptive parameter F and cross probability cr.

In the comparative experiment, the parameters NP are 100, evaluations 500 and threshold 0.4, and the adaptive parameter F is described in detail above, and the cross probability cr also adopts the adaptive strategy, specifically as follows:

wherein crl=0.1,cru=0.6,fi,fmin,fmaxRespectively representing the adaptive value and species of the current individualThe minimum fitness value individual in the population, the maximum fitness value individual in the population and the average fitness value individual in the population.

The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种对组合逻辑电路等价验证的分级方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类