DEVELOPMENT OF A GENETIC ALGORITHM FOR PLACING POWER SUPPLY SOURCES IN A DISTRIBUTED ELECTRIC NETWORK

The problem of integration of distributed generation (DG) sources has recently become increasingly urgent. Presence of DG sources in Ukrainian electric power system will make it possible to improve quality of electricity, reduce loading of electrical networks, improve mode of operation of the distribution system, in particular, reduce power losses. Decentralization of energy supply through DG will enable diversification of energy sources. As shown by analysis of the current state of electric networks [1], there is an objective necessity of optimizing modes of their operation, improvement of principles of network construction according to voltage levels and types of operation and complex automation. There is a need to improve reliability, quality and efficiency of network operation taking into account regional features. Introduction of DG will ensure efficient management, modernization and innovative development of electric power nets. In order to maximize effect of DG introduction into the net, particular attention should be paid to its location and power output [1]. Current electric power systems (including power supply systems) are complex and territorially extended systems having a heterogeneous structure of electric power nets. Because of complexity and multidimensionality of present-day systems and multivariant possible solutions, the problem of substantiating development of power supply systems in a form of a general problem of operations research is cumbersome and insurmountable from a practical point of view. CONTROL PROCESSES


Introduction
The problem of integration of distributed generation (DG) sources has recently become increasingly urgent. Presence of DG sources in Ukrainian electric power system will make it possible to improve quality of electricity, reduce loading of electrical networks, improve mode of operation of the distribution system, in particular, reduce power losses. Decentralization of energy supply through DG will enable diversification of energy sources.
As shown by analysis of the current state of electric networks [1], there is an objective necessity of optimizing modes of their operation, improvement of principles of network construction according to voltage levels and types of operation and complex automation. There is a need to improve reliability, quality and efficiency of network operation taking into account regional features. Introduction of DG will ensure efficient management, modernization and innovative development of electric power nets.
In order to maximize effect of DG introduction into the net, particular attention should be paid to its location and power output [1].
Current electric power systems (including power supply systems) are complex and territorially extended systems having a heterogeneous structure of electric power nets. Because of complexity and multidimensionality of present-day systems and multivariant possible solutions, the problem of substantiating development of power supply systems in a form of a general problem of operations research is cumbersome and insurmountable from a practical point of view.
Given complexity of the problem, it is advisable to consider its solution as a system of problems gradually refining and detailing solution concerning development of electrical power nets [1].
When designing power supply systems for various purposes, there are always restrictions imposed by the general plan of the designed object, production technology, etc. A need appears to develop new mathematical models and methods for solving problems taking into account restrictions imposed by uneven distribution of electrical loads and arbitrary configuration of the territory for which the power supply system is designed.
Because of complexity of the problems set to substantiate rational configuration of electric power systems, many problems have not been considered in details and solved. They include a problem of optimal placement of a single power source (PS) taking into account arbitrary terrain restrictions in the case of radial electrical nets and a problem of optimal assigning consumers to several PSs. Also, there is a problem of optimal placement of several PSs of different standard sizes and simultaneous assigning consumers to these PSs and a problem of connecting several transformer substations (TS) to a loop-structured circuit.
What follows is consideration and solution of the actual problem of optimizing placement of power sources, choice in the first approximation of rational configuration of electrical networks using genetic programming methods and simultaneous assigning consumers to selected TSs [1].

Literature review and problem statement
Methods and algorithms for solution of the problem of placement of power sources in a distributed electrical power net are being developed for many years but the problem is still urgent. First of all, this is because of the fact that this problem is NP-complete and it is difficult to develop a universal algorithm that would make it possible to find an exact optimal solution in an acceptable time. Emergence of more sophisticated computing facilities providing powerful computing resources on the one hand and toughening requirements to the designed devices on the other hand induce engineers to develop new algorithms for solving the problem of placement of power supply sources.
A hybrid version of a modified algorithm is proposed in [2] to solve a discrete problem of power supply source placement. The algorithm combines implementation of the branch and bound method which includes a procedure of the Gomori method designed to form a solution graph and a table of records for every iteration of the computation cycle. The alpha-beta pruning mechanism included in the algorithm serves to speed up its operation by preventing redundant computations at the graph nodes with similar restrictions.
Advantage of this algorithm consists in that it allows one to get solution in a form of a global extremum while reducing number of steps, branches and bounds of the algorithm.
However, an issue remains concerning the need to completely solve problems of linear programming. For largescale problems, this algorithm requires considerable and to some extent unjustified in practical terms computer time. This is caused by the fact that the closer initial value of the record (from below) and assessment of the problem criterion (from the top) to the sought optimal value of the criterion the fewer points the solution tree will have.
A tabu search algorithm for constructing a multi-purpose fuzzy model of optimal panning of distribution systems is presented in [3]. Modifications of probabilistic algorithms of tabu search were elaborated. They are based on introduction and removal of some artificial restrictions of the problem in the course of search for solution. In order to avoid a "stop" in the local optimum during the search, it was forbidden for the algorithm to reconsider solutions from the ban list. Basic idea of the approach consists in that operations that change configuration of the system and can return to previous local optimum are added to the list of banned solutions but not concrete past solutions.
Essence of the modified algorithm consists in as follows: only two operations are involved to obtain a new solution (delete the base state and change type for a more acceptable one). Only a part of interval is reconsidered and transition to the new solution is performed by the principle of "first improvement" and the algorithm of search for the best solution is started several times.
Advantage of this algorithm consists in that it allows one to solve the problem in an acceptable time, many orders of magnitude faster than the full enumeration method.
Main disadvantage of the algorithm consists in its stoppage when reaching the local optimum. Obviously, there are global and local optima as well, so there must be a transition from one local optimum to another for successful solution search which makes inappropriate the studies in question.
Publication [4] describes development and study of a combined algorithm of genetic search and simulated annealing to solve the problem of placement of power sources in an electrical network. Problem-oriented components of genetic search, such as random-directed formation of initial population and modified operators of directional mutation have been developed to improve solution quality through the use of knowledge of the problem being solved. A mechanism for controlling the process of search for GA based on the annealing simulation method was developed. It makes it possible to come off local optima.
Advantage of the developed algorithm consisted in that it properly combined the annealing simulation method and the genetic search algorithm by eliminating inherent disadvantages while preserving advantages, namely, the algorithm has a high ability to come off local pits and converge to a global minimum.
Disadvantage of the combined algorithm used to solve the problem of placement of power sources consists in that it insufficiently takes into account the problem specifics leading to excessive requirements to memory capacity and the algorithm running time.
Paper [5] describes a set of algorithms developed for solving the problem of placement with account of connections based on the methods of genetic search and fuzzy logic. Modified procedures of executing the genetic operator of crossing over to improve quality of obtained solutions as well as ensure stability of the genetic search.
Search strategies were proposed: a minimum gap between generations and generalization of generations. It enables improvement of selection of the solutions to be made. An algorithm of forming the initial population of solutions for the placement problem is presented. It is based on the method of sequential placement from the point of view of connectedness which makes it possible to improve average quality of the initial population of solutions due to the presence of optimum fragments in solutions.
Advantage of the proposed algorithm in comparison with other approaches to solving the problems of placement of power sources in a distributed electrical network consists in that it begins to work with several initial solutions. The presented algorithm allows one to avoid getting to a local optimum while combining and inheriting elements of the most high-quality solutions.
Disadvantage of this algorithm consists in that it is relatively high resource-demanding which results in rejection of many solutions as unpromising during modeling.
Paper [6] proposes a heuristic algorithm of optimizing operation modes of distributed generation of a power system on an example of a local segment of an actively adaptive network consisting of four electric power generators and six consumers. Conditions of distributing power from generators to consumers in a local actively adaptive network were determined and the problem of optimizing the total power distribution was set and solved using a genetic algorithm. Random values of parameters of power transmission from generators to consumers that form a population, that is a set of individuals characterized by chromosomes representing a numerical vector that corresponds to power parameters were set. Each individual represents a separate solution of the optimization problem. Next, the generation values are changed according to the algorithm and reach the maximum rate of the function growth. To prevent the algorithm from stopping when the local maximum is reached, mutation is made at each step, that is a random change of the chromosome component.
Advantage of this genetic algorithm consists in that it provides a fairly accurate solution of power optimization. Besides, the algorithm potentially provides multi-criterion optimization and functionally complex restrictions.
Disadvantage of the algorithm consists in complexity of its use. If one needs to find power distribution for multiple electric power users, then several methods must be preliminarily applied to each of them (each method permits use of only its inherent properties).
Paper [7] presents solution to the problem of optimal placement of power sources and connection of consumers to them based on the genetic algorithm and the enumerative technique. The proposed technique makes it possible to determine optimal number of consumers in a given area taking into account not only distances between potential centers of the consumer groups but also the demand that determines consumption of each sub-region. Model parameters are represented as fuzzy intervals corresponding to a more complete formalization in contrast to setting parameters in a deterministic formulation. Representing values as fuzzy intervals allows one to determine scope of data variation in the zone of best solutions. Advantage of the theory of fuzzy sets which determines feasibility of its practical application to study of the systems operating under uncertainty is based on the possibility of adequate representation of variables.
Advantage of this algorithm consists in that it provides minimal calculation time for small-and medium-size problems.
However, the method may occur unsuitable in practice for branched networks because the number of possible solutions will increase with increase in the network size, so complexity of solution will increase dramatically.
The problem of optimal placement of alternative power sources is considered in [8] with the help of the model of local segment under conditions of specified restrictions on the number and characteristics of generators as well as parameters of power transmission lines. An implementation method based on the evolutionary algorithm of searching for optimal distribution of voltage drops depending on magnitude of currents in the lines, the specific active resistances of the lines and power flows in various locations of generators was proposed. The objective function is the amount of power losses in lines from the energy sources with variability of distance to consumers whose location is fixed. Application of the genetic algorithm as a tool for implementing the evolutionary model has made it possible to find optimal positioning of alternative energy sources using the model and thus minimize losses of active power in sections of the power transmission lines.
Advantage of this algorithm consists in that it provides minimal loss of voltage and power in lines taking into account the complex objective function which features nonlinearity and a large number of restrictions in practice.
Disadvantage of the proposed algorithm consists in that it produces good, close to optimal results just with a low computational complexity and does not provide an optimal solution.
The problem of placement of power sources in an electrical power net is considered in [9] as a problem of conditional optimization. Relative extremum of the objective function is determined, that is, extremum of this function in the presence of binding restrictions and boundary conditions on its variables. The paper proposes solution of the problem of optimal placement of power sources and connection of consumers to them based on the Lagrange method of undetermined multipliers.
Advantage of this algorithm with the use of the Lagrange method of undetermined multipliers to solve the problem of optimization of power source placement has shown a rather high efficiency and a high energy-saving effect by reducing power losses in electric nets and will help to increase their power efficiency.
Disadvantage of the proposed method of solving the problem consists in introduction of additional variables which should be excluded with the help of additional equations.
Thus, the considered methods have significant disadvantages in solving the problem in question. To increase speed and accuracy of the problem solution, a genetic algorithm was chosen. Genetic algorithms are a powerful search means based on the mechanics of natural selection and natural genetics that are successfully used in solving optimization problems.
An arbitrary optimization problem (not just a combinatorial one) can generally be represented by a tuple [9]: where f: x→R 1 is the specified objective function of the problem; R 1 is a numeric scale; X is the space of the problem solutions (the search space); П is the predicate defining the D⊆X subset of variants of feasible solution according to the available limiting conditions; ext∈{min, max} is the direction of optimization. The optimization problem in these notations can be rewritten as follows: find ∈D⊆X such that: arg .
x D X x f x ext We mean the space is an X set in which certain relations between elements (metrics, topology, neighborhood, etc.) are entered and the predicate П(x) determines the set of feasible solutions [10]: In optimization problems, where it is necessary to find proper extreme value of the target function, the problem takes the form: Expressions (2) and (4) are different problems but expression (4) can mean solving the problem of search, namely for the argument of extremum (2) and not just the corresponding value of the objective function [11].
The following can also be used to describe the optimization problem: Restrictive conditions are presented in a form of systems of equalities and inequalities.
The objective function is determined by an analytical (or other) method of setting and a concrete set of numerical data f(x)=f(x|c) where c is the data set of the problem (the problem entry) [12][13][14].
In general, the problem of decision in construction of a rational configuration of the distributing electrical network includes the following sub-problems [15][16][17][18]: -optimal location of substations; -optimization of laying the lines taking into account terrain restrictions; -optimum assigning consumers to substations; -optimum choice of substation power; -selection of an optimum number of transformers at substations.
At this stage, of interest is the problem of optimal placement of several power sources of the same standard size in a distributing electrical network using methods of genetic programming and simultaneous assigning consumers to selected power sources [19]. Suppose that a system of points with coordinates is set in the Cartesian coordinate system (in a plane) which will be further referred to as the points of power consumption. The set I={1, 2,..., n} is the set of power consumption points.
Each consumer is compared with some weight S i equal to the power consumed by that consumer. The { } 1 n i i S = set clearly determines volume of consumption. Thus, total power S calc consumed by all consumers in the considered problem is also set: In addition, let a system of points with coordinates (possible locations of power sources) be given in the Cartesian coordinate system where m is the number of these possible locations. It is assumed that the number m is consciously greater than the practically necessary number of locations of power supply sources [20]. Let us specify a typical series of electric power sources (power sources, generators) used to solve the problem. Use the following agreement: assume that the power source itself produces electricity and is provisionally considered a generator. Assume in this statement that powers of all PS are the same and equal to S z . Obviously, the following inequality shall be met for the total power sum z S : Taking into account all the above, the following optimization problem [21][22][23][24][25] is obtained: it is necessary to choose the most economical option of PS placement taking into account cost of electricity delivery to consumers while the following parameters should be optimally selected: -locations of the power sources from the proposed m possible locations; -determine for each consumer which power source the consumer will be assigned to.
Analysis of the studies [2][3][4][5][6][7][8][9] in this field allows us to draw the following conclusions: -in [2][3][4][5], the joint problem of optimizing placement of several power sources and simultaneous assignment of consumers to them is not solved as a set of separate subproblems; -real terrain restrictions are not taken into account when solving the total formulated problem; -in a classical statement, the total problem and its individual components are formulated as combinatorial problems and their solution by methods of mathematical programming with several power sources is a significant problem that has not been solved.

The aim and objectives of the study
The study objective was to develop a mathematical model for solving the problem of optimal placement of multiple power sources and assigning consumers to them in the power supply system based on evolutionary algorithms.
To achieve the study objective, it was necessary to perform the following: -solve the problem of optimizing placement of power sources and choose in the first approximation a rational configuration of the electrical power network; -present analysis of the mathematical model taking into account requirements to electricity quality and the electric network reliability; -present analysis of functioning of the constructed mathematical model by calculating various system operation modes.

Development of an algorithm for determining locations for placement of power sources in a distributed electric network
The objective function whose minimum will be found can be represented as: ' min .
It is assumed here that the function of power transmission costs depends on the magnitude of transmitted power S and distances l ij from the power sources to consumers; ' ij C are specific costs of transmitting a unit of power per unit of distance. At the same time, assume that the existing electric network does not limit power transmission from PSs to consumers.
Distance from a PS to a consumer can be calculated by one of two possible metrics [13][14][15]: is Euclid's metrics.
Here, (x i , y i ) are coordinates of the point of consumption in both cases; ( ) , x y ′ ′ are coordinates of the possible source location.
It will be further assumed that there is a radial electrical network and specific reduced costs ' 1, ij C = that is, objective function (3) takes the following form: The problem in this formulation can be interpreted as a problem of discrete optimization. In the classical case, this problem is solved by methods of combinatorial analysis [11]. In English language literature [16,17], the concept of combinatorial problem or the problem of combinatorial search is commonly used but it is difficult to find a sufficiently general definition that would cover all the variety of problems of this kind. A combinatorial problem of a fixed dimensionality will be considered [26].
Let there be n finite sets U 1 , U 2 ,…, U m (sets of values of variables) and sets of values of parameters P. Also, function of restrictions G(X, p)=G(x 1 , x 2 ,…x n , p)→(0, 1) is specified. This function describes the range of admissible values of variables x 1 , x 2 ,…, x n for the value of the parameter p∈P.
It is necessary to construct for the given initial data p∈P and then one of three problem formulations is possible: 1) any set of values x 1 , x 2 ,…, x n such that G(X, p)=1 (search problem); 2) all sets of values x 1 , x 2 ,…, x n such that G(X, p)=1 (recalculation problem); 3) a set of values x 1 , x 2 ,…, x n such that G(X, p)=1 and the given objective function F(X, p)=1 takes a minimum value (optimization problem).
The above problem belongs to the third formulation of the combinatorial search problem.
Any combinatorial calculations require a preliminary analysis of laboriousness of solving the original problem and the algorithms used to solve it. Problems are usually evaluated in terms of size, that is, the total number of different options among which the best solution has to be found and algorithms are evaluated in terms of complexity. Proceeding from the above concept, it is possible to solve the problem belonging to the class of problems of high dimensionality. For example, when considering several tens of possible power supply options and about 60-70 possible locations of generators, tens of billions of possible problem solution options may be formed [27].
The second feature of this problem consists in that there is a need to solve the optimization problem by optimizing several parameters simultaneously, that is, this problem belongs to the class of multi-parameter optimization problems.
The third feature of this problem which significantly complicates solution consists in that the objective function cannot be represented analytically. For each possible solution of the problem, it has to be calculated using a rather complicated algorithm, that is the objective function is set algorithmically.
All combinatorial optimization methods can be roughly divided into exact and approximate ones. Exact methods include a method of full enumeration, a method of implicit enumeration, a method of branches and bounds, a method of dynamic programming, etc. To understand all the "beauty" of exact methods of solving combinatorial optimization problems, let us consider characteristic of the method of full enumeration [13].
Full enumeration of all plans allows one to solve the problem for sure. Another thing is that it may take unacceptably long time. That is why there is a ramified theory of combinatorial problems whose main purpose is to develop and analyze efficient, that is, rather fast algorithms for different individual cases of combinatorial problems. However, enumeration of plans remains the most versatile solution. While full enumeration is not always suitable for practical purposes, it is useful for research problems, for comparison with approximate algorithms, etc.
A concrete algorithm is considered to perform exhaustive enumeration if it is sure that no plan that could affect the result is missed.
Most often, a scheme called enumeration with return is used to organize plan enumeration. Enumeration of the problem plans can be represented as traversal of an enumeration tree. Size of the enumeration tree can be very large. Quite often, the following effect is possible in this case: the combinatorial problem for a small dimensionality is solved quite simply but it quickly becomes practically insoluble with increase in dimensionality. This effect was named combinatorial explosion.
It is logical to conclude that a full enumeration of plans is a rather undesirable way to solve combinatorial problems, a kind of last resort in absence of more practical algorithms. Any opportunity should be used that makes it possible to materially reduce enumeration taking into account specific nature of the concrete problem, or in general, if possible, abandon enumeration and use other solution methods.
Enumeration methods and all their refinements have one but very serious drawback: their run time exponentially increases with an increase in dimensionality of the problem. In most cases, this is inacceptable for practical purposes. There are no other approaches immediately applicable to all combinatorial search problems. So one can only rely on algorithms that take into account specificity of concrete problems.
Optimization algorithms for which there are nontrivial estimates of the possible deviation of solution from optimum are called approximate or suboptimal algorithms [28][29][30].
However, it is not always possible to estimate the method error. Quite a typical situation is possible when the algorithm used gives quite decent solutions but there is no guarantee that these solutions are close to the optimum ones. Algorithms based on non-strict common sense judgements and have no guarantee of closeness to optimum solutions are called heuristic algorithms.
One of the varieties of heuristic algorithms is the recently popular genetic algorithm (GA). Essentially, the genetic algorithm is a genuine sort of algorithms of random search with consecutive refinement. Studies have shown that introduction of deterministic elements into such methods gives a significant improvement of indicators. The deterministic nature of these methods consists in modeling natural processes of selection, reproduction and inheritance that occur under strictly defined rules with the basic law of evolution: "the fittest survives" which provides improved solutions. Another important factor of effectiveness of evolutionary computations is modeling of reproduction and inheritance. The options considered may, by some rule, give rise to new solutions that will inherit the best features of their "ancestors" [31].
There are four main stages for any genetic algorithm: 1) formation of an initial population; 2) synthesis of new chromosomes (operators of crossing and mutation); 3) purposeful change of newly obtained chromosomes (inversion operators); 4) selection of a current population. The first stage of constructing a genetic algorithm for solving this problem consists in selection of a possible solution encoding, that is, construction of a chromosome of a certain length in which each gene occupies a certain position and has a certain length. Length of each gene as well as length of the entire chromosome will directly depend on the J and I sets. Let us consider one variant of power supply, that is, the number of identical PSs which will fully satisfy demands of power consumers. Let the L1 number be the number of identical PSs involved in power supply to the area under consideration. Also, assign standard size to the PSs.
Any chromosome can be geometrically represented as a thread with genes strung on it [32].
Initial population is formed first with the help of chromosomes.
Algorithm for forming initial population. For successful run of genetic algorithms, it is important to determine rules by which a population will be formed in an initial epoch of its existence, that is, at time t=0. The basic paradigm underlying in these rules consists in that the initial population must necessarily have entire genetic material of the problem. That is, in our case, all points of the J={1, 2,…, m} set must necessarily be present in the initial population as possible locations for the PSs.
Here is a general view of the chromosome used to solve this problem (Table 1). Table 1 General view of the chromosome The number of ones in the first row must be equal to the L1 number. One indicates the fact that a PS can be placed in this point and zero means that there is no PS in this point. The second row indicates in which of the possible points the given PS is placed.
The objective function does not depend on the PS cost as this component will be the same. Physically, chromosome is an allowable solution of this problem. The objective function value calculated for a given chromosome is cost of the given variant of power supply.
To solve a concrete problem, it is necessary to unambiguously represent a finite set of variants on a set of rows of an appropriate length. Genetic algorithm processes some chromosome population in a single step. The G(t) population is a finite set of rows in the step t: where PR is the number of individuals (chromosomes) in the population and chromosomes in the population should not recur. Algorithm of the crossing over operation. Existence of an effective crossing over operation is deciding for running the genetic algorithms. There is initial population consisting of PR chromosomes as the initial data. Choose the variant of sexual reproduction in the population, that is, the case when two chromosomes are always involved in the creation of a new daughter chromosome. Choose tournament selection as a variant of selection of parental chromosomes [33].
A modified crossing over operator which makes it possible to take into account specifics of this problem will be used. Let us show work of this operator on the following example: there are 10 possible locations of PSs in the problem and 5 PSs are required to satisfy total power demand of consumers. Let two parents be selected as a result of tournament selection (Tables 2, 3). Table 2 Chromosome A, first parent The number of ones in the chromosome values is the same (the first rows of chromosomes) and is equal to 5, by the number of PSs to be placed.
Find the points of coincidence in parental chromosomes (identical genes). As a result, points 1 and 6 are obtained. These points are inherited by heir chromosomes with no changes. Genetic information contained in chromosomes of both parents is much more likely to be passed on to heirs. Let us assume that this information is passed on with a 100 % likelihood.
Compress parental chromosomes to non-zero elements in the "value" row without taking into account the coinciding genes (Table 4). Choose randomly the point of break, for example, let this point be the point between the first and second genes. Further, obtain the following heir chromosomes using classical algorithm of the crossing over operation ( Table 5).
Transmission of identical genes to heirs results in transmission of stronger genes. Compression of chromosomes before the crossing over operation greatly simplifies this process. Table 5 Heir chromosomes Procedure of mutation. The mutation operator serves also for natural selection. However, instead of combining parental qualities, mutation introduces random changes to one of the chromosomes. After each crossing, form a "mutation character": generate a random number from 0 to 1 for each of the newly obtained chromosomes. If this number is less than the mutation coefficient, then start the mutation procedure for this chromosome. This procedure is as follows [34]: 1) randomly determine the non-zero gene that has to mutate; 2) replace this gene with any other non-zero gene randomly selected from the set J={1, 2,…, m}.
Operator of inversion. The operator of inversion changes nature of links between the chromosome components. It takes a chromosome, randomly selects two breakpoints in it and obtains the elements that got between the breakpoints in a reverse order Operator of selection. The operator of selection forms a new generation of chromosomes with better values of the target function, Z. It destroys most of the population and refreshes the genetic material by replenishing the population with a large number of new members. As a result of action of the selection operator, size of population of next generation becomes again equal to PR.
When the genetic algorithm is implemented in this formulation, one has to repeatedly implement the heuristic algorithm of optimal assigning consumers to PSs . Before calculating value of the objective function for the given solution, it is necessary to assign a PS to each consumer [35].
Another important point of the genetic algorithm is definition of the stop criteria. Usually, restrictions on the maximum number of epochs of algorithm run are used as the stop criteria. Otherwise, its convergence is determined by comparing the population fitness across multiple epochs and stopping the process of finding the optimal solution while stabilizing this parameter.

The results of running the genetic algorithm of optimal placement of PSs in a distributed electrical network
Let us consider an example of a problem of placing three two-transformer substations in a district territory.
Initial data: 1) locations of electric power consumers; 2) consumers' loads; 3) standard size of power sources; 4) possible locations of power sources. Let us formulate the problem in such a way that the points of optimal placement of PSs were purposely included in the initial data of the problem. For this purpose, divide all power consumers into three groups equal to the total power and find conditional centers of electrical loads (CEL) for each of the groups by the following formulas [24]: Data for calculation of corresponding centers of electrical loads are presented in Tables 6-8. Table 6 Calculation of centers of electrical loads for TS-1 No.
( ) The following is obtained:  Table 7 Calculation of centers of electrical loads for TS-2 The following is obtained:  The following is obtained: The considered possible TSs locations are presented in Table 9. As can be seen, Table 9 contains conventional centers of electrical loads found for each group of consumers according to formulas (11) as possible locations for transformer substations.
Let us perform calculations according to the initial data using the MATLAB system by the help of which the above genetic algorithm was implemented. Set the following parameters of the algorithm: the number of individuals in the initial population NumberOfChromo=50, the number of iterations of the genetic algorithm NumberOfPovtorenii=100. The performed calculations show that accuracy of the proposed algorithm does not practically differ from the exact value. In addition, analysis of the above MATLAB results shows that optimal solution is reached in the first few epochs of the population existence.

Fig. 1. Optimum assigning of consumers
During visualization of the program run, points of placement of generators and assigning consumers to them are issued in a form of a radial network. As can be seen from Fig. 1, the TS locations exactly match locations of respective centers of electrical loads.
Here is a protocol of work of the subprogram of optimal assigning consumers to TS (Table 10).
In Table 10, X, Y are coordinates of consumer locations, S is installed power of the consumer, K is the TS number to which the consumer is assigned, L is the distance from the TS to the consumer.
The protocol shows that assigning of consumers is similar to the optimal assigning of consumers performed analytically. For example, if values of K=3, S=314, X=690, Y=180 in Table 10 are compared with the data in Table 8 (since K=3), it can be seen that when S=314, values of X, Y are the same as in Table 10. Data from Tables 6, 7 can be compared in the same way. When testing the heuristic algorithm of optimal assigning consumers to the PSs, the following tendency was observed: it is impossible to choose value of the total power of the PSs as close as possible to the total power consumed by consumers. In a general case, because of discreteness of the values of power consumption, such assignment may not exist at all. It is always advisable to choose total power of the PSs 5-10 % higher than the total power consumed by the consumers.
Let us carry out comparative analysis of the time spent for calculations during solution of the problem of placement by the method of full enumeration and the developed algorithm for various numbers of consumers (Table 11). The analysis results show that the time of calculation by the method of full enumeration is significantly dependent on the number of consumers. Unlike the method of full enumeration for small-size problems, the computation time using genetic algorithms is very small and practically independent of the initial data. Therefore, advantage of the developed algorithm consists in that it makes it possible to find solution of the problem in an acceptable time, significantly faster compared to the method of full enumeration.
6. Discussion of results obtained in the development of a genetic algorithm for placing electric power sources in a distributed electric network When analyzing visualization of the program presented in Fig. 1, it can be seen that locations of the TSs coincide with locations of respective centers of electrical loads. This assigning of consumers calculated by the genetic algorithm provides a minimum of reduced costs for all three TSs equal to Z  =283,245.875 conv. un. Relative error of the found value of the objective function is 0.0015 % which is a good indicator of the algorithm. Therefore, the developed GA is adaptable to solution of the problem of optimal placement of several PSs and assigning electric power consumers to them in systems electric power supply. All main components of the genetic algorithm (coding a possible solution of the problem, creating an initial population, crossing over, calculating the target function, interpreting the results obtained) take into account specifics of the problem being solved. They also provide the opportunity of fast and accurate obtaining of an optimal solution. As can be seen from Fig. 1, and Tables 6-11, locations of the TSs are exactly the same as those of the respective centers of electrical loads.
Thus, the developed genetic method makes it possible to solve the problem of optimal placement of power sources in distributed electrical networks as a set of separate subproblems: -optimal positioning of substations; -optimization of laying lines with an account of terrain restrictions; -optimal assigning consumers to substations; -optimum choice of power of substations; -selection of an optimum number of transformers at substations.
Due to this approach, the problem described in Section 2 is solved: the joint optimization problem is not solved as a set of individual subproblems.
When making comparative analysis of the time spent for calculations in solution of the problem of placement by the method of full enumeration and the developed algorithm, it was established that the developed genetic method unlike the method of full enumeration for the problems of placement of power sources, provides minimum calculation time. It means that the problem of resource use described in Section 2 is solved. The developed algorithm does not require very powerful computational resource.
The algorithm of placement of power sources in a power supply system in the implemented variant is based on unambiguously specified values of loads at the centers of consumption. Therefore, it is necessary to take into account the restriction that the real load indicators are different at different moments during the day, week, season and year. Given these differences, optimal solutions for each of the time points considered will be different. In these circumstances, it can be recommended to apply an approach that considers characteristic points of the load graphs, for example, annual maximum of the working day, night minimum of loading during the period of annual maximum, etc. Choice of coordinates of optimal location of power sources can be made by an expert taking into account additional considerations that are not reflected in the algorithms.
Uncertainty of consumer load rates in the long term is much more serious problem. The well-known common approach which would consider several scenarios of power consumption in a zone of uncertainty moves solution of the problem with final choice of solutions to the expert level. However, formalized accounting of uncertainty of loads at consumption centers remains an urgent problem to be further studied.

Conclusions
1. It was proposed to solve the problem of choosing configuration of the electrical network by genetic programming methods and at the same time assign consumers to the selected TSs. A genetic algorithm of distribution of power sources in a distributed electrical network has been developed. It consists in solution of the multicriteria problem of optimizing the choice of location of the electric power sources among the territorial set of consumers. The developed algorithm makes it possible to obtain optimum route of transmission lines connecting consumers to the power sources taking into account terrain restrictions.
2. Experimental studies of the mathematical model were carried out taking into account requirements to quality of electric power and reliability of the electric network. It was established that it is impossible to choose magnitude of total power of PSs as close as possible to the total power consumed by consumers. Because of discreteness of the power consumption values, such assignment may not exist in a general case at all. It is always advisable to choose total power of PSs 5-10 % higher than the total power consumed by consumers.
3. Analysis of functioning of the developed genetic algorithm by means of calculation of different modes of operation has shown the following: -locations of TSs obtained during run of the developed genetic algorithm (X1=133.3909, Y1=137.8364, X2= =478.4182, Y2=416.2909, X3=681, Y3=190.1455) completely match placement of respective centers of electrical loads; -assignment of consumers (for example: X=690, Y=180) is similar to effective assignment of consumers established analytically; -minimum value of the reduced cost function is 99,679.99 for TS-1, 96,157.57 for TS-2, and 87408.19 for TS-3. Therefore, total cost for all three TSs is 283,245,8 and relative error of the found value of the objective function is 0.0015 % which is a good indicator of the algorithm; -optimal solution is reached in the first few epochs of population existence.
Calculation time was estimated depending on the problem parameters. It was established that the developed algorithm provides acceptable time of calculation for problems of small and medium dimensionality. Results of solving the problem for a concrete case demonstrate advantage of the genetic approach over the full enumeration method. Thus, the genetic method was modified to optimize choice of location of the power supply sources among the territorial set of consumers. The use of evolutionary algorithms of optimization in solving this problem has shown their high computational efficiency. They provide an effective tool for solving this problem confirming the results of testing these algorithms given in the paper.
Therefore, the results obtained suggest that the proposed genetic algorithm is appropriate and effective in solving the problem of optimizing placement of power sources in a distributed electrical network.