Swarm Intelligence Technique For Electricity Distribution Network Configuration Problem A Dissertation submitted to the University of Hyderabad in partial fulfillment of the degree of Master of Technology By Prateek Srivastava 19MCMT38 Supervisor: Prof. Alok Singh School of Computer and Information Sciences University of Hyderabad Prof. C R Rao Road, Gachibowli, Hyderabad - 500 046 Telangana, India This thesis is dedicated to my family and friends. CERTIFICATE School of Computer Science and Information Science University of Hyderabad This is to certify that the dissertation entitled ”Swarm Intelligence Technique For Electricity Distribution Network Configuration Problem” submitted by Prateek Srivastava, bearing Reg. No. 19MCMT38 , in partial fulfillment of the requirements for the award of Master of Technology in Computer Science, is a bonafide work carried out by him under my supervision and guidance. This dissertation has not been submitted previously in part or in full to this or any other University or Institution for the award of any degree or diploma. Dr. Alok Singh Professor Supervisor School of CIS University of Hyderabad Dr. Chakravarthy Bhagvati Professor and Dean School of CIS University of Hyderabad Declaration I Prateek Srivastava hereby declare that this dissertation entitled ”Swarm Intelligence Technique For Electricity Distribution And Network Configuration Problem” submitted by me under the guidance and supervision of Prof. Alok Singh is a bonafide work. I also declare that it has not been submitted previously in part or in full to this University or other University or Institution for the award of any degree or diploma. A report of plagiarism statistics from the University Librarian is enclosed. Date: Prateek Srivastava Place: (19MCMT38) // Counter Signed // Date: Prof. Alok Singh Place: Supervisor ii Acknowledgement Firstly, I would like to thank my supportive and patient supervisor, Prof. Alok Singh, who has supported and guided me throughout this project. He shared his knowledge liberally. He is very helping, cool, and never puts pressure on students. He always encouraged me to do this project well. I am extremely grateful to work under his guidance. I am extremely grateful to our dean, Prof. Chakravarthy Bhagvati for providing excellent computing facilities and a nice atmosphere for doing my project and for always supporting us. My sincere gratitude to my lovely and friendly parents for their continuous love, prayers, and support, and my sister for always being there for me as a friend. Last but not least, I thank god for his goodness in my project to complete it successfully. Prateek Srivastava University of Hyderabad iii Abstract With the rising Consumption of Electricity throughout the world which is leading to operating electricity network closer to their physical limits and increasing the risk of blackouts. The need for an adaptable distribution network is paramount.This problem is called Electricity Distribution Network Configuration Problem (EDNCP). In this we will try to take into account the causes and approaches to tackle EDNCP and make ENDCP feasible by implementing Heuristic Adaptable Distribution Network. Given a graph G(V, E) and a distance constraint Dmax we are required to find a configuration for the interconnected electricity distribution network, so as to maximise the minimum power margin over the feeders. In addition to the limitation of feeder power capacity, the dmax (as hop count) between any customer and its allocated feeder for preventing power losses and voltage drops. The EDNCP problem is an NP-Hard problem and is hard to get feasible or optimized solution without compromising on voltage drop and power losses. So, Heuristic Algorithm is used for optimized solution. In this thesis, we propose an O(n3 ) algorithm using Artif icial Bee Colony Algorithm which helps in generating optimized solution for EDNCP. iv List of Figures 1.1 Graph G(V, E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Solution 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Solution 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Solution 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1 Initial Population of Swarm Size 20 . . . . . . . . . . . . . . . . . . . . . . 11 3.2 BFS Traversal from Feeder 0 with Dmax =2 . . . . . . . . . . . . . . . . . . 11 3.3 Initial population from source 10 . . . . . . . . . . . . . . . . . . . . . . . 12 3.4 Initial Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.5 Distance between ith and j th vertex . . . . . . . . . . . . . . . . . . . . . . 13 3.6 Source-Destination distance via vertex z in Matrix A1 . . . . . . . . . . . . 14 3.7 Source-Destination distance via vertex 2 in Matrix A2 . . . . . . . . . . . . 14 3.8 Source-Destination distance via vertex 3 in Matrix A3 . . . . . . . . . . . . 15 3.9 Source-Destination distance via vertex 4 in Matrix A4 . . . . . . . . . . . . 15 4.1 Components for the dimension . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 One Component of a solution . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.3 Final Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.1 Aoki, mimetic, square instances. . . . . . . . . . . . . . . . . . . . . . . . . 37 5.2 Aoki instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 5.3 Square instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.4 Square instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 v 5.5 Square instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 5.6 Square instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 5.7 Square instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.8 Mimetic instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.9 Mimetic instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.10 Mimetic instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.11 Mimetic instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.12 Mimetic instances results. . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 vi List of Tables 1.1 Examples Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii 3 Contents 1 Introduction 1 1.1 EDNCP Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Swarm Intelligence Technique . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.1 Swarm Intelligence properties . . . . . . . . . . . . . . . . . . . . . 4 Chapters Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 2 Related Work 6 2.1 Solution Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 Proposed EDNCP Approach 9 3.1 EDNCP Feasibility Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 EDNCP condition formulas . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.3 BFS Traversal for ABC Algorithm . . . . . . . . . . . . . . . . . . . . . . . 10 3.4 Floyd Warshall Algorithm for ABC Algorithm . . . . . . . . . . . . . . . . 12 3.4.1 Floyd Warshall Algorithm Complexity . . . . . . . . . . . . . . . . 15 3.4.2 Floyd Warshall Algorithm Applications . . . . . . . . . . . . . . . . 15 EDNCP as a Input Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.5.1 Vertices in EDNCP . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.5.2 Edges in EDNCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 EDNCP as a Output Graph . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.5 3.6 viii 3.7 ABC Algorithm Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.7.1 Employed Bee Phase . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.7.2 Onlooker Bee Phase . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.7.3 Determination of Probability Value(P.V) . . . . . . . . . . . . . . . 17 3.7.4 Scout Bee Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.8 Fitness of a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.9 Generation of Neighbouring Solutions 19 . . . . . . . . . . . . . . . . . . . . 4 Components of ABC Algorithm 21 4.1 Functions in our ABC Algorithm . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 Implementation Walk-Through . . . . . . . . . . . . . . . . . . . . . . . . 33 5 Experimentation and Results 5.1 5.2 36 Computing Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.1.1 Given instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.1.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6 Conclusion and Future Work 50 ix Chapter 1 Introduction 1.1 EDNCP Problem In the current scenario of rising Gross Consumption of Electricity in the European markets and without proper regulation of electricity in the European markets, the structural design as well as configuration of electricity network has become a very challenging problem worldwide. This has eventually led operating of electric networks closer to their physical capacity and consequently increased the risk/chances of blackouts and voltage drops. Fortunately, the blueprint of networks provide flexibility and an adaptive electricity configuration should be implemented as shown in Aubry et al. [1]. Electric networks in any residential/factories consists of two things one is the transportation network where high voltage is transported from power grids and the second is the distribution network where low voltage is transported from grids to houses/industries. . Configuring the network consists of opening/closing of network switches which results in effects on ABC variables like voltage drops, power failures, high feeders load. In Nara et al [10], gives a deep insight that the problem of minimization of power losses is crucial, which can be dealt with using heuristic methods and mimicking nature. Our work is to prevent power losses and voltage drops, by finding spreading network configurations which does not rely on physical parameters, where the feeder and customer distance should 1 1.1. EDNCP PROBLEM 2 2 5 8 3 6 9 4 7 10 Vf :Feeder 0 1 Vc :Customer Figure 1.1: Graph G(V, E) 0 2 5 8 3 6 9 4 7 10 1 Figure 1.2: Solution 1 be less than a given parameter Dmax . Then we use heuristic algorithm which is Artificial Bee Colony Algorithm to give a feasible and optimized solution. In the present problem, it is assumed that Dmax is given and voltage drops are undesirable feature of EDNCP and are often not a controlled feature. Our aim is to make EDN CP feasible, which can be done by taking the power margin which is there at all feeder vertex and maximize it, so that sudden increase in demand can be taken care of or provided without voltage drops or power failures. Let EDN CP be an undirected G(V, E) as shown in figure: 1.1 where Vf has weight: powf and Vc has weight: demc . powf : Available power at Feeder f . demc : Power demand of Customer c. Our aim is to maximize Mj which is margin of feeder. Mj = pow-loadj (∀)j ϵ Vf In the figures shown in 1.2, 1.3, 1.4 we can see some solutions of the graph in figure: 1.1. So in these solutions we have to choose that solution which gives us maximum margin Mj over the feeders so that voltage drop and power loss can be minimized which in return will decrease the chances of blackouts and electricity networks running at their physical limits. Since EDN CP is N P − Hard problem some Meta-Heuristic Algorithm is required to solve 2 1.1. EDNCP PROBLEM 3 0 2 5 8 3 6 9 4 7 10 1 Figure 1.3: Solution 2 0 2 5 8 3 6 9 4 7 10 1 Figure 1.4: Solution 3 Graph Solution1 (Vf )0 (Vf )1 {3,4,6,7} {2,5,8,9,10} Solution2 {2,3,4,5,6} Solution3 {2,4,5,7} {7,8,9,10} {3,6,8,9,10} Table 1.1: Examples Results 3 1.2. SWARM INTELLIGENCE TECHNIQUE 4 it feasibly as it has the same objective as of Travelling Salesman Problem shown in Gutin et al [3]. ABC(Artificial Bee Colony) is such an algorithm. The ABC algorithm is inspired by the foraging behaviour of the bees to provide function optimization. Using ABC the exponential time complexity of EDN CP is reduced. 1.2 Swarm Intelligence Technique Swarm intelligence basically mimics nature and is based on the behavioral models of social insects such as bees, ants, flocks of birds, schools of fish etc. It is used for optimization problems. Examples of such species are: • Ants as individual agents in ant colony. • Bees swarming near bee hives. • Flock of birds as swarms. 1.2.1 Swarm Intelligence properties • Self-organization 1. Where interaction among insects are carried based on local information. 2. Feedback are passed either positive or negative. • Labour Division 1. Specialized individuals performs simultaneous tasks. 4 1.3. CHAPTERS OVERVIEW 1.3 5 Chapters Overview There are 6 chapters which are described as follows: chapter 2, entails all the challenges faced in EDN CP where parameters which can influence voltage drops are addressed aswell as previous solution approach and challenges faced in solving EDN CP . In chapter 3, we discuss the approach to solve EDN CP problem using ABC algorithm while describing ABC algorithm phases and generation of neighbouring solution. In chapter 4, we implement our modified ABC algorithm for EDN CP with all the components used in the algorithm and pseudo-code of the components/functions as well. In chapter 5, we discuss the computing results based on the given various problems instances while keeping in mind the feasibility and time complexity of each problem instances. In final chapter 6, we summarize our algorithm performance on given instances as-well as future work for further improvement of the algorithm. 5 Chapter 2 Related Work Rossi et al [12]. were the first to take voltage drop into consideration. They stated undesirable/unwarranted phenomenon that will continue to happen if not controlled, as the demand for electricity increase. Moreover, the need to maximize the minimum margin over feeders is our main objective to tackle uncertain voltage drops and manage the distribution network from increase in demand. The basic outline approach can be seen in Singh et al. [13] and [14] for minimum cost spanning tree using ABC heuristic. Since, EDN CP is an N P -HARD problem, resulting in exponential time complexity so some meta-heuristic technique as proposed by Singh et al [15]. can give optimized and feasible solution taking with better time complexity. As ABC algorithm can be used for both minimization and maximization problem. Since EDN CP will not be feasible as a minimization problem as it is a maximization problem. MAXIMIZATION PROBLEM: Input: An electric network configuration using an undirected graph with a given Dmax G : V → F , where each vertex is associated with a powf value Problem: Finding a set of connected components called feeder set F with C vertices as customers that maximize F margins. 6 2.1. SOLUTION APPROACH 7 The meta-heuristic technique used is ABC Algorithm given by Karaboga et al [4] with others Karaboga et al [7], [5] which we have used to solve N P − Hard problem optimally. Since, voltage drops and power losses were not taken into account while configuring an electrical network, the configuration tends to lean towards minimization problem which will increase the chances of networks to run at there physical limits. Moreover, the need to maximize the minimum margin over feeders is our main objective to tackle uncertain voltage drops and manage the distribution network from increase in demand. Such a property in the context of electricity distribution is desirable. As, EDN CP is a N P -HARD problem, ABC algorithm plays a pivotal role for generating a solution which is both feasible and optimal. ABC algorithm was given by Karoboga et al [4]. It is inspired by the foraging behaviour of bees for the function optimization of a problem which is population based by nature. 2 2.1 Solution Approach The solution given by Rossi et al [12] of EDNCP is converted into coded form using Picciotto et al [11] in two different ways which are vertex-oriented and the other is edge-oriented aswell as configurations of feeders by et al [9] with optimization functions in et al [2]. • Edge-oriented form has been created with the concept of switches state, which is famous in explaining network design problems. In this we suppose, (x,y) is an edge in E for Graph G(V, E). A possible solution for EDN CP to be feasible would be seen as a forest of graph G(V, E), where every connected component of G(V, E) as a forest contains only one feeder. Furthermore, solution would be given as closed switches which is a group of nc edges . Every other switches would be open. To be exact, each and every edge (x,y) in G(V, E), their decision variable Qx,y would be 1 for closed switches and 0 otherwise. • Vertex-oriented form has been created with the concept of assignment of feeders with 7 2.2. CHALLENGES 8 customers. Here, every customer’s vertex will be attached along only one feeder. Subsequently, an EDNCP solution would become an allocation problem. Where, for each customer x ∈ Vc , whereas for each feeders y ∈ Vf binary variable value Xx, y is 1 only when customer x will be fueled by feeder y and 0 otherwise. 2.2 Challenges We are given with 2 exact approaches along-with a proposed heuristic approach for EDN CP design configuration. Vertex-oriented form is feasible when the network is not a dense graph but a sparse one, which they and we are using. Where the connectivity cuts is solely pointed towards customers present in each connected component. Here, the approaches perform badly for dense and very large graphs as shown in Wong et al. [16], and the heuristic method gives results closer to optimal solution if a repairing function is used to converge the solution for better and faster convergence of the problem which is proposed by us using ABC. 8 Chapter 3 Proposed EDNCP Approach In this chapter, we give a brief introduction to the feasibility conditions for EDN CP , as well as Breadth F irst Search(BF S) T raversal on graph to generate initial population for ABC Algorithm. We also discuss few standard graph properties which we later use in the thesis. 3.1 EDNCP Feasibility Conditions Feasible configurations are subset of vertices which are checked under the following constraints. 1. Demand constraint: power of individual feeders should satisfy the need of every customers connected to them following the configuration. 2. Connectivity constraint: Each connected components should have only one feeder to meet the customers demand i.e. no two feeders nor customers connected to multiple feeders. It should be a acyclic sub-graph of GV, E. 3. Distance constraint: all customers connected to the feeder should have a minimum distance less than or equal to Dmax to control voltage drop. 9 3.2. EDNCP CONDITION FORMULAS 3.2 10 EDNCP condition formulas This section will give us the underlying requirements so that EDN CP can be feasible. After the necessary feasibility conditions are met, then we know if EDN CP checks the feasibility criteria or not(NP-Hard problem). • The total demand of customers should be covered by the total capacity of feeders. – nf · pow ≥ P iϵVc demi Result. This condition when not met will result in no solution as the customers demand were not met. • The minimum distance between the feeders and it’s customer in the configuration should be less than Dmax . – minjϵVf dij ≤ Dmax ∀i ϵVc Result. This condition needs to be satisfied using distance between feeders and customer, if not satisfied then EDN CP is not feasible. • If both of the above conditions are satisfied, then EDN CP is sufficient to be satisfied which states : ’The total demand os customer’s in a component should be covered by it’s feeder in G(V, E)’. Result. Assuming the above conditions are met, only after that our algorithm will give feasible solution. 3.3 BFS Traversal for ABC Algorithm To generate an initial population for ABC algorithm we can use BFS Traversal as we can get levels/distance between feeder vertices and customer vertices so that feasibility conditions for EDN CP can be checked. For graph in figure: 1.1 the initial population for swarm size 20 will be 10. 10 3.3. BFS TRAVERSAL FOR ABC ALGORITHM 0 2 3 4 5 6 11 7 8 9 10 1 1 8 9 10 5 6 7 2 3 4 2 0 3 5 4 6 8 7 9 1 10 3 0 2 4 6 5 7 9 8 10 4 0 3 7 2 6 10 5 9 1 5 2 6 8 0 3 7 9 1 4 10 6 3 5 7 9 0 2 4 8 10 1 7 4 6 10 0 3 5 9 1 2 8 8 1 5 9 10 2 6 7 0 3 4 9 1 6 8 10 3 5 7 0 2 4 9 6 5 0 3 2 10 1 7 8 4 0 1 8 Figure 3.1: Initial Population of Swarm Size 20 v6,2 v5,2 v4,1 v3,1 v2,1 v0,0 v7,2 v8,3 v9,3 v10,3 v1,4 Figure 3.2: BFS Traversal from Feeder 0 with Dmax =2 11 3.4. FLOYD WARSHALL ALGORITHM FOR ABC ALGORITHM 12 Here, with the help of BF S T raversal we can also compute the distance between feeders and customers which can help to check the EDN CP feasibility conditions of distance constraint. And it will also generate an initial population for ABC Algorithm to execute. In ABC algorithm an initial solution is generated to initiate the algorithm, which then tries to find better solution among the initial solutions. We can use BF S T raversal to generate an initial solution. The Swarm Size refers to the population/number of bees which will be allocated to solve and converge the initial solution. No. of food solution= SwarmSize . 2 Since, here number of food source are 10 from (0 to 9), so swarm size is 20. Here, for example initial solution/population from source 10 is: 1 7 9 8 4 6 5 0 3 2 Figure 3.3: Initial population from source 10 which can also be an optimal solution if it’s fitness value and objective function value is best among the rest of the solution. Fig.‘3.1 shows the initial population for all vertices of fig.‘1.1. In fig.‘3.2, the BF S traversal shows the path traversal where (v0,0) is v0: Starting vertex, 0: Distance between (v0,v0), (v2,1) show v2: Path traversal from v0 to v2 is 1. 3.4 Floyd Warshall Algorithm for ABC Algorithm Dynamic Programming is a type of programming in which a problem is broken down to smaller sub-problems, then combine those sub-problem to solve the initial, bigger problem. Floyd Warshall Algorithm is used for solving All Pairs Shortest Path problem using 12 3.4. FLOYD WARSHALL ALGORITHM FOR ABC ALGORITHM 13 dynamic programming. Our problem is to find the minimum distance between each and every pair of vertices given in a directed/undirected GV, E . We are using Floyd Warshall Algorithm to check both the feasibility conditions of EDN CP . In Rossi et al. [12] the use of Floyd Warshall Algorithm takes into consideration Dmax which is maximum permissible distance between a connected feeder, customer. Dmax has a direct impact on the voltage drop and margins of feeders which we are trying to maximize. Let’s show it with an example as shown in figure‘3.4. Following steps will generate all pairs shortest path using Floyd-Warshall algorithm. 1 4 2 3 Figure 3.4: Initial Graph 1. Create a n × n 2-D array A0 . The indexing of rows and columns are x and y respectively where x and y are the vertices of G(V, E). Each block A[x][y] is filled with the distance from the xth vertex to the y th vertex. If there is no path from xth vertex to yth vertex, the block is left as infinity. As shown in Figure.‘3.5 0 3 ∞ 5 2 0 ∞ 4 ∞ 1 0 ∞ ∞ ∞ 2 0 Figure 3.5: Distance between ith and j th vertex 13 3.4. FLOYD WARSHALL ALGORITHM FOR ABC ALGORITHM 14 2. Subsequently, create a n × n 2-D array A1 using A0 . The first row and column elements are left blank whereas remaining blocks are filled in tthe following way. Let z is the intermediate vertex in the shortest path from source to destination. In this step, z is the first vertex. A[x][y] is filled with (A[x][z] + A[z][y]) if (A[x][y] > A[x][z] + A[z][y]). So, if the distance through vertex z happens to be less than the direct minimum distance between source and destination, then the block is filled with distance through vertex z i.e. A[x][z] + A[z][y]. So, the distance between source vertex and destination vertex through z is calculated in this step. As shown in Figure.‘3.6 0 3 ∞ 5 0 3 ∞ 5 2 0 9 4 2 0 => 0 ∞ 1 0 8 ∞ ∞ ∞ 2 0 ∞ ∞ Figure 3.6: Source-Destination distance via vertex z in Matrix A1 3. Subsequently, A2 is generated using A2 .The first row and column elements are left blank. Here, since Z is the second vertex. The following steps are same as in step 2. As shown in Figure.‘3.7 0 2 9 5 0 9 4 2 0 9 4 => 1 0 3 1 0 5 ∞ 0 ∞ ∞ 2 0 3 0 3 Figure 3.7: Source-Destination distance via vertex 2 in Matrix A2 14 3.4. FLOYD WARSHALL ALGORITHM FOR ABC ALGORITHM 0 0 ∞ 1 ∞ 9 0 2 0 2 => 8 3 0 5 15 3 9 5 0 9 4 1 0 5 3 2 0 Figure 3.8: Source-Destination distance via vertex 3 in Matrix A3 0 5 0 0 2 4 => 0 5 3 5 3 2 0 5 3 7 0 6 1 0 3 2 5 4 5 0 Figure 3.9: Source-Destination distance via vertex 4 in Matrix A4 4. Subsequently, A3 , A4 are also generated. As shown in Figure.‘3.8 5. A4 will provide the shortest path among every pair of vertices.As shown in Figure.‘3.9 3.4.1 Floyd Warshall Algorithm Complexity • Time Complexity: The time complexity is O(n3 ). • Space Complexity: Space complexity is O(n2 ). 3.4.2 Floyd Warshall Algorithm Applications • To find the shortest distance path in an undirected/directed graph. • To test and find whether an undirected graph is bipartite or not. 15 3.5. EDNCP AS A INPUT GRAPH 16 • To discover the Inversion of real matrices. 3.5 EDNCP as a Input Graph EDNCP is represented in a adjacency matrix form as it is more convenient to use while performing various operation on the matrix. 3.5.1 Vertices in EDNCP The vertices in the Graph G(V, E) are of two types. 1. Feeder Vertices: Denoted as Vf . It’s weight powf gives the power of each feeders. 2. Customer Vertices: Denoted as Vc .. It’s weight demc gives the demand of each customer which needs to be met. 3.5.2 Edges in EDNCP The edges in EDN CP represents a power line with its switch which can be on/off to get optimal radial configuration. 3.6 EDNCP as a Output Graph EDNCP solution as an output will be Sub-Graph of G(V, E) where each sub-graph will be equal to the number of feeders and each sub-graph will be a connected component and the sub-graph will be a-cyclic and undirected. 16 3.7. ABC ALGORITHM PHASES 3.7 17 ABC Algorithm Phases 3.7.1 Employed Bee Phase • Employed Bees are always trying to find better quality food source/solution than the one they currently hold. • They create/generate better, new solution using a partner solution self inclusive. • Selection: They accept the new solution only when it is better than the current solution which is done greedily i.e. Greedy Selection. 3.7.2 Onlooker Bee Phase • Onlooker Bees chooses a food source on the basis of the probability of the nectar amount or quality of food source. • They create/generate better, new solution using a partner solution self inclusive. • Selection: They accept the new solution only when it is better than the current solution which is done greedily i.e. Greedy Selection. • A condition needs to be met for the bees to exploit a particular food source. So for each food source we calculate it’s probability. 3.7.3 Determination of Probability Value(P.V) f iti • probi = 0.9. max(f +0.1 it) probi : Probability of ith solution f iti : Fitness of ith solution. max(f it): Maximum fitness among solutions. 17 3.8. FITNESS OF A SOLUTION 3.7.4 18 Scout Bee Phase • In this phase the food source which are exhausted are abandoned. • Remove and generate a new solution. • Solutions with trial greater than limit are candidates to be discarded. • One solution with its trial greater than the limit is replaced with new solution. • Trial counter of newly included solution is reset to zero. • In one Iteration, Scout Phase 1. Occurs only when the trial counter of at least one solution is greater than limit. 2. Performed only one on one solution with trial counter greater than limit. 3. Can eliminate the best solution from the population due to the limit. 4. Memorize the discarded solution before performing scout phase 3.8 Fitness of a Solution f it = 1 1+f if f ≥ 0 1 + |f | if f < 0 Notations: X : Current solution. Xnew : Newly generated solution. f : Objective function value. fnew : Objective function value of new solution. f it : fitness of a solution. f itnew : fitness of new solution. 18 3.9. GENERATION OF NEIGHBOURING SOLUTIONS 19 Greedy Selection to update the solutions in maximization problem: X = Xnew , f = fnew if f itnew < f it Calculate the values of fitness(f itnew ) and objective function value(fnew ) of newly generated solution. After generation we use greedy selection to update the current solution i.e. if the fitness value and objective function value are better than the current solution is updated. The trial counter is used here to find the number of unsuccessful attempts taken to generate a better solution by increasing the trial counter by 1, else if a better solution is generated then reset the trial counter to zero. 3.9 Generation of Neighbouring Solutions Neighbouring solutions in our proposed ABC algorithm for EDN CP is generated using mutation where each solution is self-improved using the optimization functions of ABC. We do that by checking each feeder’s possible vertices which are adjacent to the respective feeder but attached to some other feeder with distance more than 1. This is done for each feeder where respective customer vertex are reshuffled keeping in mind the maximization of feeder margin. In the Employed Bee phase and Onlooker Bee phase this optimization are done using mutatedFunction() in our ABC algorithm. Now, we will enquire about the use of neighbouring solution to generate new solution in the two phases of ABC Algorithm i.e employed and onlooker bee phase. • Each solution is selected from food source iteratively. • New solution is generated by mutating present solution with optimization function for self-improvement of solution. • Current solution and new solution if generated must be different. 19 3.9. GENERATION OF NEIGHBOURING SOLUTIONS 20 In each solution, the connected component of solution with maximum load present is selected and mutated with the help of mutatedSolution() function to check if better solution is generated or not. If generated the solution and new solution will be different which is further described in ‘10. 20 Chapter 4 Components of ABC Algorithm Here, we give a ABC algorithm for EDN CP problem. Rossi et al [12] presented a heuristic approach which works good for sparse graphs but connectivity cuts poses a challenge in dense graphs as they are focused on each customer vertex in each component which is time consuming in case for dense graphs, also the structure of the instances also matters. Instances where the customer are close to real distribution networks the solution is fast and optimal. We also have tried the same approach which gave good results for sparse graphs but not feasible for dense graphs. We have used Floyd Warshall Algorithm for checking Dmax which gives all pairs shortest path between customers and feeders. We could have also used BF S traversal as it gives the shortest path for an unweighted, undirected graph. The result in execution time between Floyd Warshall and BFS when executing will be close to same. But since Rossi et al [12] have used floyd warshall we will also. The comprehensive performance for ABC is given by Karaboga et al [6]. Notations: V : vertices of the graph G(V, E). Vf : feeder vertices of the graph G(V, E). E : edges of the graph G(V, E). Graph[][]: Input graph as matrix representation. initialP op[][]: Generate initial population/food source. 21 4.1. FUNCTIONS IN OUR ABC ALGORITHM 22 res[]: A resource array for the requirements of vertices. Dmax : Maximum distance constraint between feeder and customer. colonySize : The swarm size . maxIterations : The number of iteration for ABC Algorithm. trial: Number of times better solution was not generated. trialLimit: Trial limit to generate new solution. probM axM in : Probability of maximization or minimization of problem. f oodN umber: Number of solution or food source. objectiveF unction: Objective function to get fitness of solution. f itnessF unction: Fitness function of solution. vert: total vertices in Graph G(V, E) including feeders. index: selected foodsource whose solution is taken for further use. 4.1 Functions in our ABC Algorithm There are multiple function used in our ABC Algorithm out of which some are instrinsic as given by Karaboga et al. others are customized for the problem definition. Functions are as follows: 1. void floydWarshall(int [][]); In this function, we take-in initial graph co-ordinates and pass it here. We use floyd warshall algorithm as it finds the shortest path among every pair of vertices in this case between feeders and customers, so that feasibility condition of Dmax can be checked. condition 1 and condition 2 are also checked. Here, function’s time complexity is O(n3 ) where vert : number of vertices in G(V, E). Space complexity is O(n2 ). 22 4.1. FUNCTIONS IN OUR ABC ALGORITHM 23 Algorithm 1 Pseudo-Code Of Floyd-Warshall Algorithm(p) Input: vert: Total vertices. G(V, E): vert ∗ vert 2-D matrix. OUTPUT: All Pairs shortest Path between feeders and consumers . 1: for z = 0 to vert do 2: 3: for x = 0 to vert do for y = 0 to vert do Gz [x, y] = min(Gz−1 [x, y], Gz−1 [x, z] + Gz−1 [z, y]) 4: 5: 6: end for end for 7: end for 8: return G 2. void insertsolution(int [],int); In this function, we initialize an initial population initialpop[][] using BFS Traversal on all vertices as source of G(V, E). Since, BFS is a Breadth First Search it can be used to find levels of vertices from source vertices which can also be used to check condition 1 and condition 2 as discussed above but we are using Floyd-Warshall as stated in Rossi et al [12]. Here, function’s complexity is O(n2 ) where vert: The number of vertices in G(V, E). 3. int checkConstraints(struct foodsSource *randi,int); In this function, we check connectivity constraint and Distance constraint which are necessary condition to check for EDN CP to be feasible. This is done by creating connected components of the graph which is same as the number of feeders. These components are checked, to see whether all the conditions are satisfied : Some arguments passed are vert : total vertices in G(V, E). f eeders : is the number of feeders in the graphG(V, E). There are vertices(customers) which are in a connected component with feeder but the Dmax conditions fails as this customer’s distance is greater than Dmax so in this case we reallocate all the customers to the feeders with distance between the customers and the corresponding feeder ≤Dmax . The time complexity of this function is O(n3 ) 23 4.1. FUNCTIONS IN OUR ABC ALGORITHM 24 where n: vertices in G(V, E). 4. int objFuncValue(struct foodsSource *rand1); In this function, we find/calculate objective value for every food source based on the requirements of feeders(Vf ) as powf and customers(Vc ) as demc . The objective function is Mj where Mj =pow-loadj (∀)j ϵ Vf Here, margin[] is a 1-D array to store margin of each feeder, load[] is a 1-D array to store load on the feeder after satisfying attached to them. The time complexity is O(n2 ) where n: vertices in G(V, E). 24 4.1. FUNCTIONS IN OUR ABC ALGORITHM Algorithm 2 Pseudo-Code Of objFuncValue(p) Input: rand1: Pointer to the structure variable of all the foodsource OUTPUT: Margins of feeders for each solution. 1: maxMargin=0,demand,all=0 2: load[feeders], margin[feeders] 3: for i=0 to feeders do 4: load[i]=0 5: margin[i]=0 6: end for 7: for i=0 to feeders do 8: demand=0 9: load[i]=resources[rand1→connectedcomponent[all+1]] 10: for j=all+1 to (all+rand1→connectedcomponent[all]) do 11: if rand1→connectedcomponent[j] >= feeders then 12: 13: demand+=resources[rand1→connectedcomponent[j]] end if 14: end for 15: margin[i]=load[i]-demand 16: all+=rand1→connectedcomponent[all] 17: all++ 18: end for 19: maxMargin=margin[0] 20: for i=0 to feeders do 21: 22: 23: if margin[i]>maxMargin then maxMargin=margin[i] end if 24: end for 25: return maxMargin 25 25 4.1. FUNCTIONS IN OUR ABC ALGORITHM 26 5. double calcFitness(double); In this function, we calculate the fitness of each solution as given in section 3.8. This helps us to navigate through maximization problem. Since, EDN CP is a maximization problem whose objective function is directly proportional to fitness function we select maximum fitness value as better at giving solution. The time complexity of this function is O(1). Algorithm 3 Pseudo-Code Of calcFitness(p) Input: value: Objective Function Value of solution OUTPUT: Fitness Value of solution. 1: fitnessValue=0 2: if probMaxMin == 0 then 3: if (value ≥ 0) then 4: 5: fitnessValue = 1 + (value) else 6: 7: ▷ For Maximization Problem fitnessValue = 1 / (1 + fabs(value)) end if 8: end if 6. void memorizeBestFoodSource(); In this function, we memorize the best food source so that it can be checked after each ABC Algorithm iteration . So that the problem slowly starts to converge optimally. The time complexity is O(n) where n: vertices in G(V, E). Algorithm 4 Pseudo-Code Of memorizeBestFoodSource(p) Input: vert: no. of vertices foods[]: structure of solution which all structure variables n ∗ n OUTPUT: Global best food source compared to the objective function value. 1: for count=0 to vert do 2: 3: 4: if (foods[count].objFxValue) > (globalBest→objFxValue) then globalBest = foods[count] end if 5: end for 26 4.1. FUNCTIONS IN OUR ABC ALGORITHM 27 7. void sendEmployees(); In this function, each solution tries to create a better solution by passing through Algorithm 5 Pseudo-Code Of Employed Bee Phase(p) Input: Objective F unction, f oodN umber, initialP op[][], f itnessV alue, trial OUTPUT: Better food source as compared to the present food source. 1: for i = 1 to f oodN umber do 2: The solution is passed to mutatedSolution() for new solution 3: Evaluate the checkConstraints function, objective function and fitness function 4: if f itnew > f iti then 5: 6: 7: 8: X=Xnew , triali = 0 else triali ++ end if 9: end for the mutatedSolution() function, and selected using greedy selection . The time complexity is O(n2 ) where n: vertices in G(V, E). 8. void sendOnlookers(); In this function, a criteria is met before solution is exploited by a bee for new solution generation. So for each food Source we calculate it’s probability as shown in 3.7.3. After a new food source is generated greedy selection is applied to check whether to accept or reject the solution. The time complexity is O(n2 ) where n: vertices in G(V, E). 27 4.1. FUNCTIONS IN OUR ABC ALGORITHM Algorithm 6 Pseudo-Code Of Onlooker Bee Phase(p) Input: Objective F unction, f oodN umber, initialP op, f itnessV alue, trial,prob OUTPUT: Better food sources as compared to their previous food sources. 1: Set m = 0 and n = 1 2: while m ≤ f oodN umber do 3: Generate a random number r 4: if r < f oodN umberm then 5: The solution is passed to mutatedSolution() for new solution 6: Evaluate the checkConstraints function, objective function and fitness function 7: if f itnew > f itm then 8: 9: X=Xnew , triali = 0 else 10: triali ++ 11: end if 12: m=m+1 13: end if 14: n=n+1 15: if n > f oodN umber then 16: 17: n=1 end if 18: end while 28 28 4.1. FUNCTIONS IN OUR ABC ALGORITHM 29 9. void sendScouts(); In this function, solutions with trial counter greater than trialLimit are to be discarded. But sometimes the solution which are to be discarded as there trial counter is greater than trialLimit can also happen to be a good or best solution which was not able to generate a better solution. So the discarded solutions are backed-up for future comparison and new solutions are generated. Here, function complexity is O(n4 ) where vert: number of vertices in G(V, E). Algorithm 7 Pseudo-Code Of Scout Bee Phase(p) Input: Objective F unction, f oodN umber, f itnessV alue, trial, trialLimit OUTPUT: Finding solution that will be discarded as it reached its trialLimit. 1: Identify the food Source(k) whose trial is greater thantrialLimit 2: Function call initFood1() 10. int mutatedSolution(struct foodsSource *rand1,int index) In this section, we generate better neighbouring solution by trying to improve the solution by itself. This process is done keeping in mind the properties created while performing EDN CP solution generation. Here at both phases i.e. employee bee phase and onlooker bee phase, mutatedSolution() is used. As shown in 4.1 here for each solution and for ABC phases i.e. employee bee phase and onlooker bee phase mutationSolution() is called wherein for each iteration and for each component of solution as shown in 4.2 it is used. Here, sizeOrderFeeder[] is an 1-D array to store the descending order load among or minMargin feeder as the feeder with most load needs to be improved for better solution generation and a 2-Dimensional randomM atrix[][] array is used wherein for each feeder i i.e (∀)i ϵVf , customer vertex which are connected to feeders other than feeder i with Dmax > 1 i.e (∀)j ϵVf and i̸= j are stored in randomMatrix[][]. 29 4.1. FUNCTIONS IN OUR ABC ALGORITHM 30 For each feeder i, all the respective sub-component customer vertex alongwith their children vertex are stored in randomMatrix[][]. Where the first index corresponds to feeders j i.e. randomMatrix[j][], the second index corresponds to customer vertices alongwith there customer count, and total load which is sorted in descending order for each feeder i. The sub-components are inserted to the final component of feeder i, only after checking the preliminary conditions of EDN CP . Once each and every sub-components of feeders i are stored, they are arranged in descending order of their load and the sub-component is attached to feeder i. There may occur multiple cases like if all the feeder’s x component which do not overlap with other customer’s y vertex i.e. (∀)x ϵVf and (∀)y ϵVf , where each Vx , Vy is a vertex set such that Vx ∩ Vy = ∅ then all those feeders are inserted directly not iteratively regardless of maximum load among them. Here, every sub-component present for feeder i, the count of it is stored in randomMatrix[i][0] Multiple cases arises that are checked which are described as follows: • Case 1: If the feederCheck2 variable value is 0 which means their are no sub-component for feeder i resulting in no better solution. In that case mutatedSolution() returns 0 and trial counter is increased by 1. • Case 2: If the feederCheck2 variable value is 1 which means their is only 1 sub-component for feeder i resulting in a better solution. In that case mutatedSolution() returns 1 and the trial counter is reset to 0 after checking preliminary condition in checkConstraint() function. • Case 3: If the feederCheck2 variable is > 2 and <Vf i.e. total number of feeders-1, then the sub-component with maximum load is added to feeder i while checking preliminary conditions. • Case 4: If the feederCheck2 variable is = Vf - 1, which means their are Vf - 1 sub-component which will be inserted in feeder i iteratively based on descending 30 4.1. FUNCTIONS IN OUR ABC ALGORITHM 31 order of the maximum load after checking the preliminary conditions. • Case 5: This is a special case which is checked if their are sub-components > 1 and their is no overlapping of customer vertex then all the sub-component are inserted directly into the feeder i. Algorithm 8 Pseudo-Code Of mutatedSolution() Input: Pointer to solution structure, index Number. Output: Return whether mutated solution generation was successful or not. 1: for i = 1 to f eeders do 2: The connected component is passed from rand1 structure pointer to initialpop2[i][] array 3: end for 4: for step = 0 to f eeders - 1 do 5: for i = step + 1 to f eeders do 6: minIndex=i 7: Find minMargin feeder and arrange in descending order 8: end for 9: swap(sizeOrderFeeder[minIndex], sizeOrderFeeder[step]) 10: end for 11: f eedCheck2 = 0 12: for i = 0 to f eeders -1 do 13: f eedCheck = 0 14: if (sizeOrderFeeder[0] != i) then 15: for j = 2 to initialpop2[sizeOrderFeeder[i]][0] do 16: if (Sub-component for feeder i is found in feeder j with Dmax > 1) then 17: Store them in randomMatrix[i][] 18: f eedCheck + + 19: end if 20: end for 21: if (feedCheck>0) then 22: f eedCheck2 + + 23: 24: end if end if 25: end for 26: Check f eederCheck2 value and return solution. 31 4.1. FUNCTIONS IN OUR ABC ALGORITHM 32 11. void initFood1(int); In this section, we take the discarded food source from index and save it as it can be the best solution for future comparison to get the optimal best. We try to generate a new solution bfs([][],int,int) function which generates a new solution. We reset the trial for this solution to 0 so that we can converge to the optimal solution. The new solution is then checked for all the preliminary conditions. Here, function complexity is O(n3 ) where vert: number of vertices in G(V, E). Algorithm 9 Pseudo-Code Of initfood1() function(p) Input: Objective F unction, f oodN umber, f itnessV alue, trial, trialLimit OUTPUT: Discarding solutions as well as saving best solutions. 1: Store the discarded solution for future checking 2: Replace Xk from population using BFS() function as seen in other phases 3: Evaluate checkConstraints, objectiveFunction, fitness Algorithm 10 ABC Algorithm For EDNCP INPUT: A Graph G(V, E) with Dmax , res[], colonySize, maxIteration, probM axM in OUTPUT: Connected Components Of G(V, E) as EDN CP configuration 1: Initialize a random population 2: for u ∈ V in BFS Traversal on all vertices of G(V, E) do 3: 4: 5: for u ∈ V initialize Initial Population using BFS with source u do initialP op[u][] = BF S(u); end for 6: end for 7: Evaluate ConstraintsCondition of Dmax , objectiveF unction, f itnessF unction 8: Set the trialLimit for all food sources equal to zero. 9: for i = 1 to maxIterations do 10: Employee Bee Phase function on every food sourc 11: Calculate the probability of every food source 12: Onlooker Bee Phase function to create new food sources based on probability 13: Memorize the best food source 14: if trial > trialLimit 15: Scout Bee Phase Function 16: end for 32 4.2. IMPLEMENTATION WALK-THROUGH 4.2 33 Implementation Walk-Through In this section, we will do a walk through of our algorithm and give all the highlights of how the algorithm works. Suppose we consider the examples from the data set classes like Square Instance Variable with dataset squaren025m003i01.dat. After initializing all the initial solution which is equal to the double the size of number of feeders. These solutions are passed to checkConstraints() function, where solution is an array like [0,1,2...2*E1][0,1,2...2*E-1]. After getting this, the solution will be checked for parameters. Inside, the checkConstraints() function, the condition for Dmax will be checked, alongwith the connectivity of each feeder’s components as well as negative load on the feeder’s i.e. demand greater then power. In doing so, when we consider this example, each feeder will have vertices less than distance of Dmax in most cases, and in other’s certain test cases will take care of it. The given G(V, E) is (0 16),(0 17),(1 4),(1 9),(1 10),(2 19),(2 20),(2 24),(3 4),(8 9),(13 14),(18 19),(23 24),(4 5),(9 10),(14 15),(19 20),(24 25),(5 6),(10 11),(15 16),(20 21),(25 26),(6 7),(11 12),(16 17),(21 22),(26 27),(3 8),(8 13),(13 18),(18 23),(4 9),(9 14),(14 19),(19 24),(5 10),(10 15),(15 20),(20 25),(6 11),(11 16),(16 21),(21 26),(7 12),(12 17),(17 22),(22 27) to which we will apply and generate connected component for EDN CP to be feasible. Figure 4.1: Components for the dimension Here, the component is an array shown in 4.2 , where [0][0] index: array size of feeder 0 component [0][1] index: it is the feeder 0 . [0][2] index: Customers connected to feeder 0 . 33 4.2. IMPLEMENTATION WALK-THROUGH 34 1 10 9 4 Figure 4.2: One Component of a solution [1][0] index: array size of feeder 1 component. [1][1] index: it is the feeder 1 . [1][2] index: Customers connected to feeder 1. [2][0] index: array size of feeder 2 component. [2][1] index: it is the feeder 2 . [2][2] index: Customers connected to feeder 2. So, the solution in fig:‘4.1 index[0][1-19] will be assigned to feeder 0, index[1][1-4] will be assigned to feeder 1 and index[2][1-4] will be assigned to feeder 2. Now, we will check 0 16 1 17 4 11 15 21 12 22 6 14 26 7 27 5 13 25 8 18 3 23 9 2 10 19 20 24 Figure 4.3: Final Graph whether in each component does the feeder to customer distancei,j ≤ Dmax for which we have used Floyd Warshal Algorithm to find shortest distance between all pairs of vertices, this could also be done using BF S traversal which finds minimum levels/distance between two vertices. Since in this example, each vertices satisfy distancei,j ≤ Dmax no new cases 34 4.2. IMPLEMENTATION WALK-THROUGH 35 arises so it will continue to pass the partial solution and component array to objFuncValue() to calculate the objective function value using load on each feeder and then finding its margin, then to calcFitness() to calculate fitness of the solution. Then after this, the solutions probability and trial counter value will be assigned. After all of the solution, and its components are addressed, then ABC Algorithm will be applied and each new solution will be generated using the mutatedSolution() function in section 4 will undergo this same procedure. There are multiple new cases which have arisen where sometimes the allotment of customers to feeders is left which are the remanining nodes/customer which needs to be assigned which are addressed in checkConstraints() aswell as mutatedSolution() functions. In fig.‘4.1 and example fig:‘1.1, the Dmax condition is satisfied for each solution so no new cases arises, and while executing aoki, random, square instances new cases arose, where if in initial population, the customer in any component doesn’t meet the condition i.e distancei,j ̸≤ Dmax with it’s feeder, then those customer will be removed from that component and will be reshuffled to with the new feeder where distancei,j ≤ Dmax is satisfied. Those cases are also addressed in checkConstraints() function. But there could be some cases, which did not came into existence while solving in the given instances, which could give unsuccessful execution and no result. After the program execution, the result is shown in fig:‘4.1, Where V0 =[0 16 17 11 15 21 12 22 6 14 26 7 27 5 13 25 8 3 18 23],V1 =[1,10,9,4] and V2 =[2,20,19,24] with maximum margin based on my resource allocations to vertices among feeder is: 3. This is the general idea to solve EDN CP using ABC algorithm. 35 Chapter 5 Experimentation and Results 5.1 Computing Result 5.1.1 Given instances Problem instances examined and used in Rossi et al ‘[12] are of 3 types: • Aoki instance: In this class, we generate ten instances as shown in Krishnan et al‘[8]. In this a random integer demand for each customer is generated between 1, 2, 3, . . . 100 , and where each customer’s demand can be covered by each feeders. Ensuring that the solution will be feasible for above class. • Mimetic instances: here, we generate ninety instances as follows. In this, a circle of area 100 × 100 in which feeders are equally spaced and customer’s coordinates are randomly built. This graphs are created so that graphs have features closer to real network distribution. • Square instances: here, we generate ninety instances as follows. square and mimetic are same apart from their structure. They have a square grid of shape: nc =n × n which are equally spaced for every customer and connected to all feeder’s or customer whose distance is less than 100 . n+1 36 5.1. COMPUTING RESULT 37 Fig.‘5.1 gives a pictorial layout of the classes used to solve this problem. Figure 5.1: Aoki, mimetic, square instances. 5.1.2 Results In this, Electricity Distribution Network Configuration Problem(EDNCP) implementation using Artificial Bee Colony(ABC) algorithm are compared against aoki, mimetic and square. The machine is an Intel Core i5 Processor at 1.4Ghz with 4 GByte RAM running Ubuntu. Each row in ‘5.2, ‘5.12, ‘5.7 gives solution of each instance of each class. Columns 1-3 under instances characteristics shows feeder quantity, customer quantity and maximum permissible distance between feeders and customer. Column 4-7 under ABC parameters shows the size of colony, maximum iterations for ABC, trial limit for ABC to generate new solution, probability of max/min deciding for maximization or minimization of problem. Column 8-9 maximum margin of all the feeders after meeting the demands of customers, average max. margin of each instance type in the three classes given.. The results are components of graphs G(V, E) equal to number of feeders where each feeders have customers connected to them. The aim of maximizing margin on feeders while meeting the demands of customers is given by the connected components. 37 5.1. COMPUTING RESULT 38 Figure 5.2: Aoki instances results. 38 5.1. COMPUTING RESULT 39 Figure 5.3: Square instances results. 39 5.1. COMPUTING RESULT 40 Figure 5.4: Square instances results. 40 5.1. COMPUTING RESULT 41 Figure 5.5: Square instances results. 41 5.1. COMPUTING RESULT 42 Figure 5.6: Square instances results. 42 5.1. COMPUTING RESULT 43 Figure 5.7: Square instances results. 43 5.1. COMPUTING RESULT 44 Figure 5.8: Mimetic instances results. 44 5.1. COMPUTING RESULT 45 Figure 5.9: Mimetic instances results. 45 5.1. COMPUTING RESULT 46 Figure 5.10: Mimetic instances results. 46 5.1. COMPUTING RESULT 47 Figure 5.11: Mimetic instances results. 47 5.1. COMPUTING RESULT 48 Figure 5.12: Mimetic instances results. Here, fig:‘5.2, fig:‘5.12 and fig:‘5.7 shows the components of solutions of all the three instances with different set of feeders and customers. 48 5.2. DISCUSSION 5.2 49 Discussion For Aoki instances, the instances where each customer demands are generated randomly and ABC algorithm does not works fine under aoki instances even though feeder can complete the demand of all the customers(Vc ) and number of vertices are low It is not giving best optimized result as it is giving partial result . For mimetic instances, the instances runs fine, following the EDN CP conditions and gave suitable , optimal solutions For square instances, the instances works fine for sparse graphs and dense graphs. In case of Square instances it worked optimally with results in most of the cases. 49 Chapter 6 Conclusion and Future Work Here, the analysis of Electricity Distribution Network Configuration Problem shows that the challenges shown in Rossi et al [12] regarding the execution time for sparse and dense graphs is exponential along-with challenges of rate of convergence of solution to optimal is slow and identification of radial configuration of network for feasibility of EDN CP is N P − Hard. Which when applied on adaptable network configuration might result in delayed optimal configuration when sudden increase in demands of customer’s or number of customer’s increases in real time for dense graphs or both. This poses a critical challenge when dealing with real-time increase/decrease in number of customer over the feeders aswell as maximum margin over feeders as we require a fast, polynomial time algorithm for faster configuration with solution closer to optimal solution if not best optimal solution. We discussed a polynomial time algorithm for EDN CP using ABC algorithm for weighted, undirected graph. Our approach works fine for both sparse and dense graphs with result close to optimal solutions at times but with polynomial time complexity for all the instances of the problems apart from Aoki instances of problem where the solution gives partial results. ABC Algorithm using K-neighbourhood search method which when put simply tries to find and identify the k closest neighbours for the solution. This can be used to give ABC Algorithm a predictive approach where it can analyse the vertices based on the 50 51 neighour vertex consensus. The advantage of using K-neighbourhood search method is to get set of customer vertices connected to a particular feeder with a sense of approach to distinguish between better neighbourhood vertices for effective and fast convergence to optimal solutions as it will be able to keep track of degree of maximization of minimum margin over feeder’s among other K-neighbourhood solutions. Thus, giving us even better results closer to optimal solution or in some cases optimal solutions with much less time complexity subsequently providing us with adaptable network configuration. 51 References [1] Alexis Aubry, Marie-Laure Espinouse, and Mireille Jacomino. A max-min approach to delay load shedding in power distribution networks despite source-capacity uncertainties. In Proceedings of the International Network Optimization Conference, 2007. [2] Bahriye Basturk. An artificial bee colony (abc) algorithm for numeric function optimization. In IEEE Swarm Intelligence Symposium, Indianapolis, IN, USA, 2006, 2006. [3] Gregory Gutin and Abraham P Punnen. The traveling salesman problem and its variations, volume 12. Springer Science & Business Media, 2006. [4] D. Karaboga. Artificial bee colony algorithm. Scholarpedia, 5(3):6915, 2010. revision #91003. [5] Dervis Karaboga and Bahriye Basturk. Artificial bee colony (abc) optimization algorithm for solving constrained optimization problems. In International fuzzy systems association world congress, pages 789–798. Springer, 2007. [6] Dervis Karaboga and Bahriye Basturk. On the performance of artificial bee colony (abc) algorithm. Applied soft computing, 8(1):687–697, 2008. [7] Dervis Karaboga et al. An idea based on honey bee swarm for numerical optimization. Technical report, Technical report-tr06, Erciyes university, engineering faculty, computer . . . , 2005. 52 REFERENCES 53 [8] SK Krishnan. Graph algorithms for loss minimization through feeder reconfiguration. 1998. [9] Roberto Montemanni and Luca Maria Gambardella. Exact algorithms for the minimum power symmetric connectivity problem in wireless networks. Computers & Operations Research, 32(11):2891–2904, 2005. [10] K Nara and YH Song. Modern heuristics application to distribution system optimization. 2:826–832, 2002. [11] Sally Picciotto. How to encode a tree. University of California, San Diego, 1999. [12] André Rossi, Alexis Aubry, and Mireille Jacomino. Connectivity-and-hop-constrained design of electricity distribution networks. European Journal of Operational Research, 218(1):48–57, 2012. [13] Alok Singh. A new heuristic for the minimum routing cost spanning tree problem. In 2008 International Conference on Information Technology, pages 9–13. IEEE, 2008. [14] Alok Singh. An artificial bee colony algorithm for the leaf-constrained minimum spanning tree problem. Applied Soft Computing, 9(2):625–631, 2009. [15] Alok Singh and Shyam Sundar. An artificial bee colony algorithm for the minimum routing cost spanning tree problem. Soft Computing, 15(12):2489–2499, 2011. [16] Richard T Wong. Worst-case analysis of network design problem heuristics. SIAM Journal on Algebraic Discrete Methods, 1(1):51–63, 1980. 53