Electric power transportation network Topology Structure Design method based on multi-Agent Genetic Algorithm
Technical field
The present invention is to belong to physical technology field, is related to a kind of electric power transportation network Topology Structure Design method, specifically relates to
And a kind of electric power transportation network Topology Structure Design method based on multi-Agent Genetic Algorithm, it can be used for designing electric power transport network
Network topological structure, convenient for that the function of electric power transportation network can be made farthest to keep when its is under attack or disturbance
Completely, while the attack being subject to or disturbance can also be reasonably resistant to.
Background technique
In power transporting system, power station, substation etc. can be abstracted into complex network node, power transmission line is regarded as
Side is connected, then power transporting system can be abstracted into a complex network model, referred to as electric power transportation network.Electric power transport
Design of network topology structure is exactly, and in the case where keeping the distribution of electric power transportation network degree constant, adjustment electric power transportation network is opened up
Structure is flutterred, makes it when by attack or disturbance, network function is kept completely as far as possible, i.e., maximumlly improves electric power fortune
The robustness of defeated network.Network robustness (Network robustness) is an important attribute of network, it refers to network
In the case where perhaps disturbing by attack, destruction, can it continue keep perfect in shape and function or work on one
A important measurement index.
Universal electric power networks design method obtains electric power networks by operators such as design alternative, intersection, variations and opens up structure,
But operator design is simple in method, causes deep search ability weak and is easily trapped into locally optimal solution.For example, application publication number
For CN104102956A, the patent of entitled " a kind of distribution network planning method evolved based on tactful adaptive differential "
Application discloses a kind of distribution network planning method of differential evolution adaptive based on strategy, this method design process
In there are problems that deep search ability is weak, be easily trapped into locally optimal solution, the high electric power transport network of robustness cannot be designed
Network topological structure makes the electric power transportation network when by attack or disturbance, does not have good electric power transportation network Shandong
Stick.
C.M.Schneider et al. has delivered entitled " Mitigation of malicious attacks on
Networks " (Proceedings of the National Academy of Sciences.USA | 108,3838-3841
(2011)) paper, in paper in propose the robustness measurement standard based on largest connected subcomponent, and devise one kind
Design of network topology structure method based on heuritic approach.Heuritic approach is used in paper to design electric power networks topology knot
Structure, key step include: firstly, executing random adjustment structure operation to electric power transportation network obtains a casual network;Its
It is secondary, calculate the robustness of casual network;Then, judge whether robustness improves, if improving, replace electric power to transport with casual network
Defeated network, otherwise, electric power transportation network are constant;Subsequently, judge whether the number of iterations meets maximum number of iterations, if satisfied,
Final electric power transportation network is obtained, otherwise, starting is returned and re-executes;Finally, output power transportation network.The spy of this method
It is easy to use for putting, and still, the deficiency that this method still has is that ability of searching optimum is weak in optimization process, search process
Similar to exhaustive search, with the increase of network size, time growth is too fast, and search efficiency will be greatly reduced, to affect
The effect of electric power transportation network Topology Structure Design.
Summary of the invention
It is an object of the invention to overcome above-mentioned the shortcomings of the prior art, propose a kind of based on multiple agent heredity
The electric power transportation network Topology Structure Design method of algorithm, for solving in existing electric power transportation network Topology Structure Design method
Existing deep search ability is weak and is easily trapped into locally optimal solution, causes electric power transportation network when resisting attack or disturbance
The technical issues of poor robustness.
The thinking that the present invention realizes is, using multiple agent heredity during electric power transportation network topologies adjusting
Algorithm designs effective population recruitment operation operator, makes full use of multi-Agent Genetic Algorithm to the function of thousands of dimensions, all
The advantages of solution of high quality can be quickly found out, and using the quality of new robustness evaluation criterion evaluation individual, it is complete to carry out population
The optimal update of office, finally obtains the electric power transportation network topological structure with high robust.
According to above-mentioned technical thought, realizes the technical solution that the object of the invention is taken, include the following steps:
A kind of electric power transportation network Topology Structure Design method based on multi-Agent Genetic Algorithm, includes the following steps:
(1) multi-Agent Genetic Algorithm parameter is set, and the population that multi-Agent Genetic Algorithm is obtained is as to be designed
Electric power transportation network topological structure, wherein the parameter set includes the Population Size Ω of multi-Agent Genetic Algorithm, neighborhood competition
Probability P0, neighborhood intersect probability Pc, mutation probability Pm, local search probability PlWith maximum number of iterations N;
(2) population of multi-Agent Genetic Algorithm is initialized, obtains initialization population, and calculate the initialization kind
The robust value of each individual in group, realizes step are as follows:
(2a) sets the initial size of multi-Agent Genetic Algorithm population as 1, randomly chooses node from the population at individual
Connection side e between l, klkWith node m, connection side e between nmn, and this selected two sides are deleted, between node k, m
Re-establish connection side ekm, connection side e is re-established between node l, nln, population among multi-Agent Genetic Algorithm is obtained,
The intermediate population is denoted as temporary electrical power transportation network topological structure;
(2b) judges whether temporary electrical power transportation network topological structure is connected to, if so, the temporary electrical power transportation network is opened up
Structure is flutterred as new population, and adds 1 to the size of new population, is executed step (2c);Otherwise, it is newly established between deletion of node k, m
Connection side ekmWith node l, newly-established connection side e between nln, and between reduction step (2a) randomly selected node l, k
Connection side elkWith node m, connection side e between nmn, execute step (2a);
(2c) judges whether new population size is equal to the Population Size Ω of multi-Agent Genetic Algorithm, if so, by new population
As the initialization population of multi-Agent Genetic Algorithm, and fitness function formula is used, calculated in initialization population per each and every one
The robust value of body executes step (3);Otherwise, step (2a) is executed;
(3) neighborhood competition is carried out to the initialization population of multi-Agent Genetic Algorithm, and calculated every in neighborhood competition population
The robust value of individual realizes step are as follows:
(3a) generates a random number u according to being uniformly distributed probability between 0-1;
(3b) judges whether random number u is less than neighborhood competition probability P0, if so, step (3c) is executed, it is no to then follow the steps
(3a);
(3c) traverses the initialization population of multi-Agent Genetic Algorithm, every from multi-Agent Genetic Algorithm initialization population
A secondary selection individual, and judge whether the robust value of selected individual is better than the Shandong of robust value preferably individual in the individual neighborhood
Stick value, if so, selected individual can continue to survive, with the individual replacement multi-Agent Genetic Algorithm initialization survived
Corresponding individual in population obtains neighborhood competition population, and executes step (3d), otherwise, with best of robust value in neighborhood
The individual selected in body replacement multi-Agent Genetic Algorithm initialization population obtains neighborhood competition population, and executes step (3d);
(3d) uses fitness function formula, calculates the robust value of each individual in neighborhood competition population;
(4) neighborhood intersection is carried out to neighborhood competition population, obtains neighborhood cross-species, realizes step are as follows:
(4a) generates a random number v according to being uniformly distributed probability between 0-1;
(4b) judges whether random number v is less than neighborhood and intersects probability Pc;If so, executing step (4c);Otherwise, step is executed
(4a);
(4c) traverse neighborhood compete population, from neighborhood competition population in select an individual every time, by it is selected individual with
The best individual of robust value carries out neighborhood intersection in its neighborhood, obtains multiple neighborhoods and intersects individual, and intersects individual with neighborhood and replace
The corresponding individual selected from neighborhood competition population is changed, neighborhood cross-species are obtained;
(5) it makes a variation to neighborhood cross-species, obtains variation population, realize step are as follows:
(5a) generates a random number i according to being uniformly distributed probability between 0-1;
(5b) judges whether random number i is less than mutation probability Pm;If so, executing step (5c), otherwise, step is executed
(5a);
(5c) traverses neighborhood cross-species, selects an individual every time from neighborhood cross-species, calculates selected individual
In total number of edges;
Whether total number of edges is even number in the selected individual of (5d) judgement, if so, selecting a certain number of sides in total number of edges, is selected
1/2 opposite side for selecting certain amount side in total number of edges swaps, and obtains multiple variation individuals, and executes step (5e);Otherwise, it selects
A certain number of sides in total number of edges out take the maximum even number close to certain amount side in total number of edges, choose a fixed number in total number of edges
1/2 opposite side on amount side swaps, and obtains multiple variation individuals, and execute step (5e);
(5e) replaces the corresponding individual in neighborhood cross-species with multiple variation individuals, obtains variation population;
(6) local search is carried out to variation population, obtains local search population, realize step are as follows:
(6a) traversal variation population, chooses an individual from variation population every time, calculates selected individual interior joint number,
And it is 1 that initial local search iteration number, which is arranged,;
(6b) generates a random number j according to being uniformly distributed probability between 0-1;
Whether (6c) judges random number j than population local search probability PlIt is small, if so, executing step (6d), otherwise, execute
Step (6b);
(6d) uses fitness function formula, calculates the robust value R of each individual in selected variation populationinitial;
(6e) judgment expression | da-dc|+|db-dd| < α × (| da-db|+|dc-dd|) whether true, if so, from variation
Node a, the connection side e between b are randomly choosed in the individual selected in populationabWith node c, connection side e between dcd, delete
Two selected side eabAnd ecd, new connection side e is established between node a, cac, new connection side is established between node b, d
ebd, multiple local search individuals are obtained, are executed step (6f), otherwise, are executed step (6d), wherein daIt is the degree of node a, db
It is the degree of node b, dcIt is the degree of node c, ddIt is the degree of node d, α is regulatory factor, and value range is [0,1];
(6f) uses fitness function formula, calculates the robust value R of each individual after local searchnew, judge robust value
RnewWhether robust value R is greater thaninitial, if so, it is corresponding individual from what is selected in population after variation with the replacement of local search individual,
Local search population is obtained, and executes step (6g), otherwise, is executed step (6d);
(6g) local search number of iterations adds 1, judges whether local search number of iterations has reached selected variation population
The number of nodes of middle individual otherwise, executes step (6d) if so, executing step (6h);
(6h) judges whether current iteration number is equal to the maximum number of iterations N of setting, if so, local search population is made
It for the electric power networks topological structure to be designed, and exports, otherwise, executes step (3).
Compared with the prior art, the invention has the following advantages:
First, the present invention is during carrying out electric power transportation network Topology Structure Design, using network robustness as meter
The fitness function formula for calculating population at individual fitness, evaluates the superiority and inferiority of population at individual, overcomes the electric power of prior art design
Transportation network may cause electric power transportation network and paralyse rapidly when being attacked or being disturbed, and will cause in large area
The shortcomings that area's power supply is interrupted, substantially increases the robustness of electric power transportation network, so that electric power transportation network be enable more to have
Resist the attack or disturbance being subject in effect ground.
Second, the present invention devises neighborhood competition operator, neighborhood intersects calculation when optimizing electric power transportation network topological structure
Son, mutation operator and local searching operator, and the strong advantage of multi-Agent Genetic Algorithm ability of searching optimum is taken full advantage of,
Electric power transportation network topological structure is designed using multi-Agent Genetic Algorithm, the prior art is overcome and is designing extensive electric power fortune
When defeated network topology structure, the shortcomings that being easily trapped into local optimum state, the present invention is allowed effectively to jump out local optimum,
Obtain the electric power transportation network with more high robust.
Third, the present invention devise neighborhood competition, Neighborhood Intersection during designing electric power transportation network topological structure
Fork, variation and four kinds of operators of local search execute these four operations to global optimum's individual and generate new kind in an iterative process
Group, improves the local search ability of multi-Agent Genetic Algorithm, further overcomes the electric power transportation network that the prior art obtains
Robustness the shortcomings that stagnating when reaching a certain level, greatly reinforced the deep search ability of multi-Agent Genetic Algorithm, from
And further improve the ability that electric power transportation network resists attack or disturbance.
Detailed description of the invention
Fig. 1 is implementation flow chart of the invention;
Fig. 2 is neighborhood competition population personal relationship figure of the invention.
Specific embodiment
In the following with reference to the drawings and specific embodiments, the present invention is described in further detail.
Referring to Fig.1, a kind of electric power transportation network Topology Structure Design method based on multi-Agent Genetic Algorithm, including such as
Lower step:
Step 1, multi-Agent Genetic Algorithm parameter is set, and the population that multi-Agent Genetic Algorithm is obtained is as wait set
Electric power transportation network topological structure is counted, wherein the Population Size Ω that the parameter set includes multi-Agent Genetic Algorithm is equal to 9, neighbour
Domain competes probability P0Intersect probability P equal to 0.5, neighborhoodcEqual to 0.5, mutation probability PmEqual to 0.6, local search probability PlIt is equal to
0.8 and maximum number of iterations N is equal to 30000.
Step 2, the population of multi-Agent Genetic Algorithm is initialized, obtains initialization population, and it is initial to calculate this
Change the robust value of each individual in population, realize step are as follows:
Step 2a sets the initial size of Agent Genetic Algorithm population as 1, randomly chooses node from the population at individual
Connection side e between l, klkWith node m, connection side e between nmn, and this selected two sides are deleted, between node k, m
Re-establish connection side ekm, connection side e is re-established between node l, nln, population among multi-Agent Genetic Algorithm is obtained,
The intermediate population is denoted as temporary electrical power transportation network topological structure;
Step 2b, judges whether temporary electrical power transportation network topological structure is connected to, if so, by the temporary electrical power transportation network
Topological structure adds 1 as new population, and to the size of new population, executes step (2c);Otherwise, it is created between deletion of node k, m
Vertical connection side ekmWith node l, newly-established connection side e between nln, and reduction step (2a) randomly selected node l, k it
Between connection side elkWith node m, connection side e between nmn, execute step (2a);
Step 2c, judges whether new population size is equal to the Population Size Ω of multi-Agent Genetic Algorithm, if so, by novel species
Initialization population of the group as multi-Agent Genetic Algorithm, and fitness function formula is used, it calculates each in initialization population
The robust value of individual executes step (3);Otherwise, step (2a) is executed;Fitness function formula is as follows:
Wherein, R indicates that network robustness, N indicate that the number of nodes of network, s (q) indicate the remaining net after deleting q node
The largest connected subcomponent of network and the ratio of number of network node N, q indicate the number of deletion of node, and ∑ indicates sum operation;
Step 3, neighborhood competition is carried out to the initialization population of multi-Agent Genetic Algorithm, and calculates population after neighborhood competition
In each individual robust value, realize step are as follows:
Step 3a generates a random number u according to probability is uniformly distributed between 0-1;
Step 3b, judges whether random number u is less than neighborhood competition probability P0, if so, step 3c is executed, it is no to then follow the steps
3a;
Step 3c traverses the initialization population of multi-Agent Genetic Algorithm, from multi-Agent Genetic Algorithm initialization population
In select an individual every time, and it is preferably individual to judge whether the robust value of selected individual is better than robust value in the individual neighborhood
G1Robust value, if so, selected individual can continue to survive, at the beginning of the individual replacement Agent Genetic Algorithm survived
Corresponding individual in beginningization population obtains neighborhood competition population, and executes step (3d), otherwise, best with robust value in neighborhood
Individual replacement multi-Agent Genetic Algorithm initialization population in the individual that selects, obtain neighborhood competition population, and execute step
(3d);
Step 3d calculates the robust value of each individual in neighborhood competition population using fitness function formula.
Step 4, neighborhood intersection is carried out to neighborhood competition population, obtains neighborhood cross-species, realizes step are as follows:
Step 4a generates a random number v according to probability is uniformly distributed between 0-1;
Step 4b, judges whether random number v is less than neighborhood and intersects probability Pc;If so, executing step (4c), otherwise, execute
Step (4a);
Step 4c, traversal neighborhood compete population, an individual are selected every time from neighborhood competition population, by selected individual
The individual progress neighborhood best with robust value in its neighborhood intersects, and obtains multiple neighborhoods and intersects individual, and intersects individual with neighborhood
The corresponding individual selected from neighborhood competition population is replaced, neighborhood cross-species are obtained;Wherein neighborhood competes population personal relationship
It is as shown in Figure 2: to choose individual G in domain competition population0, with individual G0Adjacent individual has individual G1, individual G2, individual G3And individual
G6;Assuming that individual G0Best individual is G with robust value in neighborhood1, willAs individual G0In all be connected with node o
Node set, willAs individual G1In all node sets being connected with node o;Set of computationsAnd set's
Intersection setSet of computations againMiddle removing setIn node residue node setAnd set of computationsMiddle removingThe set of the remaining node of node in setNext, fromOne node of middle random selection
X, fromOne node y of middle random selection;In individual G0With individual G1It is middle to delete side e respectivelyoxAnd eoy.Then it adds respectively again
eoyAnd eoxTo G0And G1;In order to guarantee that the degree of network is distributed and the degree of each node is constant, in G0In random selection it is another
The side e that item is connect with node xpx, then delete epxAnd increase epyIn G1In also similarly operated.
Step 5, it makes a variation to neighborhood cross-species, obtains variation population, realize step are as follows:
Step 5a generates a random number i according to probability is uniformly distributed between 0-1;
Step 5b, judge random number i whether than population mutation probability PmIt is small;It is otherwise held if so, executing step (5c)
Row step (5a);
Step 5c traverses neighborhood cross-species, selects an individual every time from neighborhood cross-species, calculates selected
Total number of edges in body;
Step 5d judges whether total number of edges is even number in selected individual, if so, selecting a certain number of in total number of edges
Side selects 1/2 opposite side on certain amount side in total number of edges to swap, obtains multiple variation individuals, and executes step (5e);It is no
Then, a certain number of sides in total number of edges are selected, the maximum even number close to certain amount side in total number of edges is taken, chooses one in total number of edges
1/2 opposite side on fixed number amount side swaps, and obtains multiple variation individuals, and executes step (5e);
Step 5e obtains variation population with the corresponding individual in multiple variation individuals replacement neighborhood cross-species;
Step 6, local search is carried out to variation population, obtains local search population, realize step are as follows:
Step 6a, traversal variation population, chooses an individual from variation population every time, calculates selected individual interior joint
Number, and it is 1 that initial local search iteration number, which is arranged,;
Step 6b generates a random number j according to probability is uniformly distributed between 0-1;
Whether step 6c judges random number j than population local search probability PlIt is small, if so, step (6d) is executed, otherwise,
It executes step (6b);
Step 6d calculates the robust value R of each individual in selected variation population using fitness function formulainitial;
Step 6e, in order to which the equal node of degree of promotion is connected, judgment expression | da-dc|+|db-dd| < α × (| da-db
|+|dc-dd|) whether true, if so, node a is randomly choosed from the individual selected in variation population, the connection side e between bab
With node c, connection side e between dcd, delete two selected side eabAnd ecd, new connection side is established between node a, c
eac, new connection side e is established between node b, dbd, multiple local search individuals are obtained, are executed step (6f), otherwise, are executed
Step (6a), wherein daIt is the degree of node a, dbIt is the degree of node b, dcIt is the degree of node c, ddIt is the degree of node d, α is to adjust
The factor, value range are [0,1];
Step 6f calculates the robust value R of each individual after local search using fitness function formulanew, judge robust
Value RnewWhether robust value R is greater thaninitial, if so, a from the correspondence selected in population after variation with the replacement of local search individual
Body obtains local search population, and executes step (6g), otherwise, executes step (6d);
(6g) local search number of iterations adds 1, judges whether local search number of iterations has reached selected variation population
The number of nodes of middle individual otherwise, executes step (6d) if so, executing step (6h);
(6h) judges whether current iteration number is equal to the maximum number of iterations N of setting, if so, local search population is made
It for the electric power networks topological structure to be designed, and exports, otherwise, executes step (3).
Effect of the invention can be described further by following emulation experiment
1, emulation experiment running environment:
The processor that emulation experiment of the invention selects is Intel (R) Core (TM) i7-6500U CPU@2.5GHz, interior
4.00GB, hard disk 500G are saved as, operating system is 10 family's Chinese edition of Microsoft windows, and programmed environment is
Visual studio 2015。
2, experiment condition is arranged:
Two actual electric power transportation network data sets, (west WU-PowerGrid are tested in emulation experiment of the invention
Europe electric power transportation network) data set and EU-PowerGrid (European Union's electric power transportation network) data set.(the West Europe WU-PowerGrid
Electric power transportation network) data set has 217 nodes, 320 sides;EU-PowerGrid (European Union's electric power transportation network) data set
Data scale is 1494 nodes, 2156 sides, for testing method of the invention to the performance of large scale network.It is more in experiment
The Population Size Ω of Agent Genetic Algorithm is set as 9, and neighborhood competes probability P0It is set as 0.5, neighborhood intersects probability PcIt is set as
0.5, mutation probability PmIt is set as 0.6, local search probability PlIt is set as 0.8, the maximum number of iterations of multi-Agent Genetic Algorithm
It is set as 30000;
3, experiment content and interpretation of result:
Emulation experiment of the invention uses the electric power transportation network Topology Structure Design side based on multi-Agent Genetic Algorithm
Method has carried out emulation experiment to WU-PowerGrid data set and EU-PowerGrid data set, it is contemplated that the randomness of algorithm,
When solving the electric power transportation network topological structure with higher robustness, reruns 10 times and average, test result is such as
Shown in table 1.
Table 1
It can be seen that method proposed by the present invention from the experimental result of table 1 to be very effective, either small scale network
Or large-scale real network, the method that the present invention designs can be designed under conditions of maintaining internet pricing distribution constant
Electric power transportation network topological structure effectively.Due to the growth with network size, the search space of optimal solution can exponentially
Increase, speed of experiment can be slow, so in an experiment, it is 30000 times that iterative algebra, which is still arranged, in we.If expecting more preferable
As a result, by suitably improving the number of iterations, so that it may obtain the electric power transportation network with more high robust.
Apparently, the present invention is a kind of effective electric power transportation network Topology Structure Design method to synthesis, such as real network
Shown in the simulation experiment result, method of the invention is stable, effective.The present invention uses multi-Agent Genetic Algorithm, design
Neighborhood competition operator, neighborhood crossover operator, mutation operator and local searching operator out, to design the electric power transportation network of robust,
This is an innovative point.At the same time, the present invention can also have to other dispersed problems are solved using multi-Agent Genetic Algorithm
Good directive function.