A multi-agent-based symbiotic organism search algorithm for DG coordination in electrical distribution networks

Metaheuristic algorithms have become popular in solving engineering optimization problems due to their advantages of simple implementation and the ability to find near-optimal solutions for complex and large-scale problems. However, most applications of metaheuristic algorithms consider centralized design, assuming that all possible solutions are available in one machine or controller. In some applications, such as power systems, especially DG coordination, centralized design may not be efficient. This work integrates a multi-agent system (MAS) into a metaheuristic algorithm for enhanced performance. In a proposed multi-agent framework, the agent implements a metaheuristic algorithm and uses shared information with neighbours as input to optimize the solutions. In this study, a new distributed Symbiotic Organism Search (SOS) algorithm has been proposed and tested in the proposed multi-agent framework. The proposed algorithm is termed a multi-agent-based symbiotic organism search algorithm (MASOS). The MASOS has been tested and compared with other proficient algorithms through statistical analysis using benchmark functions. The results show that the proposed MASOS solves the considered benchmark functions efficiently. Then MASOS was tested for DGs coordination considering load variations in the Tanzanian electrical distribution network. The results show that the coordination of DG using the proposed algorithm reduces power loss and improves the voltage profiles of the power system.


Introduction
In power distribution systems, emerging technologies such as active distribution networks, group microgrid control, DG units, controllable loads and electric vehicles enable power distribution networks to present more stochastic operation conditions rather than deterministic one [1]. The increasing usage of sophisticated electronic equipment in industrial, residential and commercial sectors introduces stochastic behaviour that cannot readily be eliminated from utility systems. However, the inclusion of the DG in the electrical distribution systems can mitigate many problems associated with the stochastic nature of the load. Such advantages of DGs have increased the attention of many researchers in proposing methods for integrating the DGs in the distribution networks [2][3][4]. Bokhari, et al. [5] found that a small percentage of DGs installed in the distribution network can alleviate voltage violation and allow electric utilities to use deeper voltage reduction during critical conditions. Despite the advantages, the DGs are associated with an uncertainty nature which also introduces stochastic behaviour in the distribution network [6].
Resource coordination can achieve efficient system performance in such dynamic operating conditions. DGs coordination in the distribution system is a large-scale dynamic optimization problem with fast-varying system conditions [1]. In power systems, centralized and distributed techniques have been applied in coordinating resources such as DG, loads, electric vehicles, microgrids, and overcurrent relays [7][8][9]. Several researchers have reported the coordination of DGs, such as solar photovoltaic and electric vehicle chargers, in the distribution networks [2,10,11]. Kotsalos, et al. [2] proposed a framework for coordinating multiple DGs in low voltage networks to mitigate overvoltage and minimize active power curtailment. Cheng et al. [11] proposed a distributed coordination strategy of solar photovoltaic in low voltage to deal with voltage fluctuation issues. Wang, et al. [10] proposed a bi-level voltage control scheme for coordinating electric vehicle chargers in low voltage networks using a higher-level consensus algorithm and a localized power allocator at the lower level. However, most of these studies involve bi-level control in which the upper level is centralized. The centralized control approaches may encounter computation and communication bottlenecks in handling such a large-scale optimization problem in the electrical distribution network.
Distributed control algorithms have many advantages over centralized algorithms due to their ability to handle large-scale complex optimization problems [12]. Multi-agent System (MAS) is one of the popular techniques for implementing distributed control algorithms. In MAS, multiple agents interact, and use the shared information and defined algorithm to solve a common problem cooperatively. Several techniques based on distributed optimization methods have been proposed for coordinating power system operations, such as consensus-based, decomposition based and metaheuristic based [13]. In consensus-based algorithms, control agents share variables of interest and try to synchronize to reach a common agreement [14,15]. The consensus algorithms are very popular and have been used many times in coordinating power systems operations [16][17][18][19]. The decomposition-based control involves breaking the complex problems into simpler subproblems and applying the alternating direction method of multipliers (ADMM) [13]. The applications of decomposition methods in power systems have been presented [20,21]. Due to its simple implementation, the consensus-based approach is more popular than its counterpart ADMM approach. In the metaheuristic approach, agents cooperate with neighbours to implement a specific metaheuristic algorithm that optimizes a given problem [22,23].
Metaheuristic algorithms are among efficient techniques for solving complex and large optimization problems, including power system problems [24,25]. Most of the metaheuristic algorithms are designed to operate in a centralized control framework, limiting their use in some applications that need distributed frameworks. In order to design metaheuristic algorithms that operate in distributed systems, studies which integrate multi-agent systems (MAS) and metaheuristic algorithms have emerged and applied to solve different real-world optimization problems. Multi-Agent Genetic Algorithm (MAGA), which integrates MAS and genetic algorithms for optimizing linear systems, was presented by Zhong et al. [22]. A multi-agent quantum evolutionary algorithm for solving global numerical problems was proposed [26]. A Multi-Agent-based Particle swarm optimization (MAPSO) for solving reactive power dispatch problems in transmission systems was proposed by Bokhari, et al. [27]. Acharya and Mishra [23] proposed a multi-agent-based Symbiotic organism Search algorithm for tuning fractional order PID Controller. The studies for metaheuristic algorithms integrated with MAS, reported by authors in [22,23,26,27] involves a lattice-like neighbourhood whereby an agent interacts with only directly connected neighbours. The studies assume a centralized program that initializes and controls interaction among agents. The centralized program assumes a shared memory which enables agents to access the states of neighbours. In such settings, algorithm operations for one agent may directly modify the state of neighbours, which is not the case for real-life systems. In distributed control paradigm and real-life multi-agent systems, each agent operates independently and interacts with neighbours through messaging. In such cases, the reviewed studies for multi-agentbased solutions may not be efficient.
Therefore, this study proposes a distributed multi-agent-based framework to enable the implementation of a metaheuristic algorithm in solving optimization problems in a distributed manner. The proposed multi-agent framework can accommodate many metaheuristic algorithms, including symbiotic organism search (SOS) [28], particle swarm optimization (PSO) [29], teaching learning-based optimization (TLBO) [30], and whale optimization algorithm (WOA) [31], just to mention few. In this work, the SOS algorithm reported by Cheng and Prayogo [28] has been implemented in the proposed framework to form a newly proposed algorithm termed Multi-Agent-based Symbiotic Organism Search (MASOS). The SOS is one of the algorithms with good features such as simple implementation, simple computational, good convergence and parameter independence. A study by authors in [32] found SOS to have the best average CPU time for different problem dimensions. SOS and its variants have been used for several engineering applications, including DG placements in radial distribution networks [33][34][35][36][37]. Also, SOS has been used for solving network reconfiguration with DGs and capacitor placement [38][39][40]. It should be noted that the differences between the proposed MASOS in this study and that proposed by Acharya and Mishra [23] lie in the design, agent interactions and implementations of the algorithm.
The performance of the proposed MASOS algorithm in solving optimization problems has been tested through statistical analysis using ten benchmark functions. In all tested functions, the proposed algorithm has been compared with the original SOS and other algorithms. The comparative results have proved the superiority of the proposed MASOS in solving such benchmark functions. In testing the performance of the proposed algorithm in solving engineering optimization problems, the MASOS has been applied in coordinating DG in the electrical distribution networks considering load variations. The results show that the proposed MASOS algorithm has provided competitive performances with the added advantage of running in a distributed framework.
The major contribution of this paper can be summarised as (i) A generalized multi-agentbased framework for implementing metaheuristic algorithms has been proposed (ii) The DG coordination framework that involves multi-agent and metaheuristic algorithms for solving power loss optimization problems considering load variations has been proposed.
(iii) Integration of MAS and SOS algorithm exploits the good features of distributed control systems and the ability of SOS algorithms to solve complex problems resulting in a robust control systems (iv) Unlike other versions of SOS and other versions of distributed multi-agent-based metaheuristic algorithms which involves memory sharing the proposed MASOS is purely distributed such that each agent runs independently. The rest of this paper is organized as follows. The "Mathematical Problem Formulation" section presents objective functions and constraints. The "Methods" section describes the theoretical background of the multi-agent system, metaheuristic algorithm, proposed multi-agent framework, and proposed MASOS algorithm. The "Results and discussion" section presents results and discussion for considered benchmark functions and compares the performance of the MASOS and other algorithms. It also presents the performance of the proposed MASOS in coordinating the DGs in the electrical distribution networks. The "Conclusion" section concludes this paper and highlights the areas for future work.

Mathematical problem formulation
Load variations in the electrical system change operation variables such as power loss, voltage profile, voltage deviation and operation costs. Studies indicated that optimizing real power loss as an objective function reduces real power loss and improves the entire power system performance parameters [41]. Therefore, in this study, active power loss and voltage deviations have been considered as the objective function to be minimized.

Objective functions
In a radial distribution system, the active power loss is more influential than reactive power loss. The optimization methods aim to minimize the power loss and voltage deviation from the rated voltage values of the power systems [42]. The objective function for power loss and voltage deviations is presented in (1) and (2), respectively. In evaluating the efficacy of the possible solutions, power flow is run to get power system variables. In this study, the Direct Load Flow (DLF) [43] method was used due to its high computational efficiency.
where P loss is the total power loss I i is the current through the branch i , and R i the resistance of branch i and nb is the number of buses. V k is the voltage magnitude of the k th bus, expressed in p.u and V rated is the rated voltage of the network, which is 1 p.u. and V d is the overall voltage deviation of the network.

Constraints
The node voltage for each bus and for each possible solution is given in (3) (1) where V i is the voltage magnitude of k th bus, V max is the upper voltage limit and V min is lower voltage limit. In this work, the minimum and maximum voltage limits are 0.9 p.u and 1.1 p.u, respectively. The values of voltage limits are according to the Tanzania electrical power system.

Basic structure of metaheuristic algorithms
The basic structure of most metaheuristic algorithms consists of an outer loop and an inner loop, as shown in Algorithm 1 of Appendix. The outer loop usually represents the number of times the algorithm repeats itself before satisfying termination criteria. The number of times the algorithm uses to achieve a solution for a given problem is among many other criteria for metaheuristic algorithms evaluation. The fewer number of times, the better the algorithm. The inner loop represents the execution of the mathematical and logical formulation of a particular metaheuristic algorithm for each member of the population. The number of times the inner loop executes is equal to the size of the population. The mathematical formulation of the inner loop is the core part which defines the interaction between members in the population/swarm. The inner loop determines the characteristics and performance parameters of metaheuristic algorithms, such as convergence, complexity, accuracy, and exploration. In a metaheuristic algorithm, each member of the population can find its solution in consensus with others. Most of the algorithm's applications involve the implementation of centralized cooperation among members of the population. In such implementations, a centralized application implements the properties of members, and in most cases, members exchange information through shared memory or a central controller. In some applications involving distributed control, such implementation technique may not be feasible, limiting the applicability of algorithms in solving complex problems. Although most algorithm designs follow the structure presented in Algorithm 1 of Appendix, the interaction among members and quality of solutions are different for different metaheuristic algorithms. Therefore, this work proposes the framework to enable distributed implementation of metaheuristic algorithms and implement the Symbiotic organism search algorithm in multi-agent.

Proposed multi-agent-based metaheuristic algorithms framework
In Multi-Agent System (MAS) agents achieve their goals through cooperation and competition with or without sharing their knowledge [44]. The agent can sense, communicate and interact with neighbour agents to take actions in response to changes occurring in the environment without external intervention from other agents or humans [23]. Therefore, this work proposes a framework for implementing metaheuristic algorithms in a Multi-agent system following the structure presented in Algorithm 1. In the proposed framework, each member of the population/swarm in the metaheuristic algorithm is implemented as a MAS agent. Each agent shares its current states with neighbours and runs a metaheuristic algorithm to update its current state. Unlike the centralized implementation of metaheuristic algorithms, which involves memory sharing, and the central controller that can access the information of the current global solution at each stage, in a distributed framework, agents only share their states, and the current global solution is not known. This fact may bring about the diversity among different algorithms implemented using this framework since there are some algorithms whose convergence characteristics and solution quality are highly dependent on global value. The generalized execution steps for each agent are presented in Fig. 1.

Initialization
Agent initialize its states using (4) and evaluate its initial fitness

Local neighbourhood identification
Each agent identifies local neighbours who can be socializing with. The local neighbourhood definition depends on the structure of the problem and influences the performance of the algorithms.

Socialization
Socialization involves sharing the states between neighbouring agents. Socialization involves two stages, sending own states and receiving states from neighbours. Upon receiving the states of all its neighbours, agents formulate the population.

Solution state updates
From the population formulated in the socialization stage, the agent updates its states using the inner loop of the corresponding metaheuristic algorithm.
Considering the generalized structure of the Metaheuristic algorithm presented in Algorithm 1 of Appendix, in the proposed framework, the outer loop is presented as the number of times agents exchange information and the inner loop is presented as the steps performed by agents to run the inner loop of the corresponding metaheuristic algorithm as presented in Fig. 1. Based on this framework and assumptions made, implementation of the centrally designed metaheuristic algorithm may change and may be different for different algorithms. In order to test the validity of the proposed framework, the multi-agent-based SOS has been designed and implemented.

The symbiotic organism search algorithm
The Symbiotic Organism Search algorithm is a metaheuristic algorithm inspired by the biological relationship among organisms in the ecosystem. The conventional SOS involves three major phases: mutualism, commensalism, and parasitism. The basic structure of SOS is presented in Algorithm 2 of Appendix, and more details of convention SOS can be found in [28].

Mutualism
In the mutualism phase, the two interacting organisms benefit and enhance their chance of survival. If X i and X j are two interacting organisms, the new candidate solutions X inew and X jnew is generated using (5) and (6). The mutualism phase determines the exploitation capability and ensures convergence of the algorithms to the global optimal.
where MV = X i + X j 2 and R = rand(0, 1) The BF i and BF j are randomly selected as 1 or 2 which represents the benefit level for organism X i and X j , respectively. The MV is mutual vector which represents the relationship between organism X i and X j . The X best represents the organism with the best objective function in the solution space.

Commensalism
In the commensalism phase, two organisms X i and X j interact such that one organism benefits while the other organism neither benefits nor suffers. That is X i increases its chance of survival in the ecosystem by benefiting from X j . The new candidate solution for X i is given in (7). The commensalism phase determines the direction of search space and balances exploration and exploitation ability of the algorithm.

Parasitism
In the parasitism phase, two organisms X i and X j interact such that one organism benefits while another organism suffers. The parasite for the randomly selected organism X j called X jpar is formed from a randomly selected organism X i using (8). The parasitism The X jpar is the new organism want to invade the ecosystem. This is a battle of survival for organism X j . If X jpar is better than X j , then X j is replaced by X jpar otherwise X j hold on as shown in (9) for function minimization problems. The Obj(X j ) and Obj(X jpar ) are the value of objective function for organism X j and X jpar , respectively.

The proposed multi-agent-based symbiotic organism search
The structure of the basic SOS presented in Algorithm 2 involves the main program, which has access to organism status and memory and controls the organism's execution and the final solution. The implementation of basic SOS assumes that all organisms can interact directly and can access the optimal global solution in each iteration. In the proposed distributed SOS, each organism takes the property of the agent; therefore, it runs independently and autonomously. The proposed algorithm is purely distributed; agents only communicate through message passing. Upon receiving the states from neighbours, agents consider that information the ecosystem. Hence, at each iteration agent has no information about the global best; only it has information about the current states of neighbours, its state, and its local best. The best available state in the neighbourhood is used as the global best. In the distributed environment, the size of the agent's neighbourhood may be limited by the structure of the problem and the definition of neighbourhood. This fact may affect convergency and lead to the algorithm which is prone to local trapping. In order to improve the exploration and exploitation of the algorithm, modifications of SOS at the mutualism and parasitism phase have been made. The flowchart and pseudocode of the proposed multi-agent-based SOS are presented in Fig. 2 and Algorithm 3 of Appendix, respectively

Modification at the mutualism phase
At the mutualism phase, agents generate two new possible states using (5) and (6). It should be stated that in centralized SOS, organisms share a memory; that is, on the execution of organism i, two states can be updated, i.e. state X inew and X jnew according to (5) and (6). In the proposed distributed SOS, agents do not share a memory; they only exchange messages. Although two solutions are produced by agent i , an agent can only update its state.
Comparing the centralized and proposed distributed SOS, in centralized SOS at the mutualism phase, it is possible to have two updates of the organisms in the population, while in a proposed distributed SOS, only one organism state can be updated. This aspect can make the convergence of the proposed algorithm inferior relative to the centralized SOS. In order to improve convergence at the mutualism phase, a simple approach that does not involve any additional function evaluation has been proposed. In the proposed MASOS, the best (8) solution between, X i , X inew and X jnew is preserved, unlike the centralized SOS, which takes the best between X i and X inew for updating the state of organism i.

Modification at parasitism phase
In the conventional SOS, the purpose of the parasitism phase is to increase exploration capability by trying to introduce new organisms into the ecosystem. This phase focuses much on improving the ecosystem and not necessarily improving agent i . In distributed SOS, the improvement in the population may have a small effect on the improvement in the state of the organism i , since, in distributed SOS, the focus of the agent is to update its own state. In order to improve the exploration capability of the algorithm, the agent X i generates a parasite vector X jpar as per (8). If X jpar is better than X i , the X i update itself with new values X jpar as given in (10).

Results and discussion
The proposed algorithm was first implemented on benchmark functions for validation and then was applied for solving DG Coordination problems in the radial distribution network.

Validation of the proposed algorithm on benchmark functions
To validate the effectiveness of the proposed MASOS algorithm, an experimental study was performed using sets of benchmark functions. The proposed MASOS are compared with those offered by the original SOS and other algorithms through statistical analysis. Statistical analysis includes mean, standard deviation, and Wilcoxon ranks sum test.

Benchmark functions description
In this study, ten benchmark functions classified according to the characteristics, such as separable, non-separable, multimodal, and unimodal, obtained from [23] and listed in Table 1, are used. Functions f 1 to f 4 are two-dimensional problems and f 5 to f 10 are thirty-dimensional problems. f 10 is unimodal, separable function, f 2 , f 3 and f 5 are unimodal, non-separable functions, f 1 , f 4 and f 8 are multimodal, separable functions, f 6 , f 7 and f 9 are multimodal, non-separable functions. It should be mentioned that difficulty of the problems differs depending on their type and dimension.

Parameter settings
The designed algorithm in this study is tested against other metaheuristic algorithms including original SOS [28], Particle Swarm Optimization (PSO) [29], Teaching Learning-Based Optimization (TLBO) [45] and Whale Optimization Algorithm (WOA) [31]. The authors implemented all the algorithms, and results were obtained from simulation  experiments. For all algorithms size of the ecosystem/population was 30, and the maximum number of iterations per single run was 1000. In order to simplify the analysis, any value less than 1E −12 is considered as 0. All algorithms were implemented in the Java programming language, and MASOS was implemented in the Java Agent DEvelopment (JADE) multi-agent simulation framework. For MASOS, the structure of the neighbourhood has effects on the performance of the algorithm; in this work, all agents are considered as neighbours. All simulations were carried out using IntelliJ IDEA on 3.80GHz 4 Cores core i7 computer with 16GB RAM. The parameter settings for each algorithm are listed in Table 2.

Statistical analysis
Experiments were conducted to test the performance of proposed MASOS against SOS and other algorithms through statistical parameters such as mean, standard deviations (SD), and Wilcoxon ranks sum test. Mean and standard deviation results for all functions obtained after running the algorithms for 40 independent runs are presented in Table 3.
The results for Wilcoxon's rank-sum statistical test performed at 5 % significant level are presented in Table 4. This significant level means that if the results show h=1 and p-values less than 0.05 points, it implies that the MASOS is better. If h=0 and p-values greater than 0.05 points, it implies that the MASOS is inferior. If h=0 and p-values are N/A, it implies that there is no significant difference between the two solution sets of compared algorithms.
It is observed from the results for two-dimensional functions f 1 − f 4 in Table 3 that all algorithms, including MASOS, were able to find a global minimum for all four functions except WOA, which could not find a global minimum for f 1 . For f 5 the TLBO, SOS and MASOS were able to find a global minimum and outperformed PSO and WOA. For f 6 only SOS and MASOS were able to find the global minimum. For f 7 none of the algorithms found a global minimum, but WOA displays the best performance. WOA, SOS and MASOS were able to find a global solution for f 8 . None of the algorithms found optimal global solutions for f 9 , but the TLBO obtained the best mean value while WOA obtained the best standard deviation. As for f 10 all algorithms were able to find a global solution except PSO.
The results for Wilcoxon's rank sum test for all functions f 1 − f 10 presented in Table 4 shows that when compared with PSO, the MASOS has achieved better results for six functions inferior for one function and for the rest functions, there was no significant difference. When compared with WOA, the MASOS has achieved better results for nine out of ten functions. When compared with TLBO, the MASOS has achieved better Table 2 Parameter settings Note: n = population/colony/ecosystem size; w = inertia weight; v = limit of velocity; a= distance control parameter Considering all functions, the results of the proposed MASOS have been at par with SOS for most functions. Considering the mean values of the algorithms, both SOS and MASOS were able to obtain the best results for eight functions, followed by TLBO, which obtained the best mean values for seven functions. The Wilcoxon rank sum test    results show that the proposed MASOS has produced the same or better results than other considered algorithms for most functions. It can be stated that the proposed MASOS has been able to compete and outperform other proficient algorithms such as PSO, WOA and TLBO for most functions. The MASOS has shown better or similar results for most functions than its counterpart SOS algorithm. However, the MASOS has added the advantage that it has been designed for a distributed environment.

Testing electrical distribution network
Tanzania Electric Supply Company (TANESCO) Limited is the only company that deals with the generation, transmission and distribution of electricity in Tanzania [46]. Due to the rapid expansion of the distribution network, the efficiency and reliable power supply are among challenges facing the Tanzania utility company. The improvements can be achieved through effective use of information and communication technologies (ICT). Therefore, this study proposes MASOS algorithm for coordinating DG in the Tanzanian electrical distribution network. The single-line diagram for a small power system section taken from the Tanzania secondary distribution network is shown in Fig. 3. The secondary distribution network comprises a three or a single-phase network with a neutral conductor. Single distribution transformers save loads in the secondary distribution networks; thus, a radial power flow analysis is used for identifying power system variables.
More information about the line and load data of the network in Fig. 1 can be found in [47]. The network has 79 nodes numbered arbitrarily. The secondary distribution network is not static as it grows as new customers are connected to the network. According to authors in [47], from January 2015 to September 2019, Tanzania utility companies have a growth rate of 32% per year. This growth rate is significant for the distribution network as it is associated with changes in the topology and increases load demand, impacting system performances. Therefore, to ensure power system efficiency in such a dynamic system, DG can be used. The advantages of DG inclusion can be reaped through their coordination. DG coordination here means changing DG outputs based on changing network parameters. In this study, load variations have been considered. The load data from 2012 to 2019 were obtained from TANESCO's Automatic Meter Reader (AMR). Data from meters were captured every 20 minutes and included voltage readings, current readings, and power readings. In this study, only current and voltage values were considered. The AMR data were converted from 20 minutes to hourly resolution for simplifying analysis. The sample Load Profile from the study area for three days is presented in Fig. 4.
In testing the efficacy of the proposed algorithm in coordinating DGs in the Tanzanian power system, the following assumptions and settings were considered:i. The DGs are controllable; that is, the power output can be changed ii. Four DGs were considered and placed at buses 90, 111, 125 and 145, as shown in Fig. 3. Finding optimal DG places was not part of this study iii. On each DG, there is a DG controller which can communicate with the neighbouring controller and run the MASOS algorithm iv. The controller is responsible for changing the DG settings v. Each hour is considered an individual control cycle, meaning that the settings of the DGs are maintained throughout the hour until the next hour when the load changes vi. The available DG settings at any time are applied to the system, meaning there is no need to wait for the final converged value of the algorithm. This assumption ensures near real-time control of the DGs

Results for DGs coordination considering load variations
The proposed algorithm was applied to propose optimal DG settings in response to the changing load based on the stated assumptions. The system power loss and voltage deviation were considered using average hourly load data from 2012 to 2019. Experiments were conducted considering three cases. Firstly, hourly power loss and voltage deviations without any DG were calculated. Secondly, the DGs were placed, and the fixed DGs settings were maintained throughout all considered hours. Thirdly, the proposed  MASOS algorithm was applied to coordinate the operations of DGs by suggesting the optimal DG sizes for each loading condition accordingly. The power loss and voltage deviation results are presented in Figs. 5 and 6, respectively. The proposed DG settings for each hour are shown in Fig. 7. It is observed in Fig. 5 that throughout the considered time, the power losses without DGs are higher than when DGs are involved. A similar observation is shown in Fig. 7, where the voltage deviation is large without DGs than with the involvement of DGs. Also, with a fixed size of DGs, though it can significantly improve power loss and voltage profile management, its muted response to changing load is a disadvantage. When the proposed   MASOS algorithm is employed, the power loss and voltage deviation are the minimum best. The total power loss per day without DGs is 276.1 kW, with fixed DG sizes is 49.5 kW, and with optimal DG sizes is 38.5 kW, which implies that the proposed DG coordination algorithm improves power system efficiency. The proposed DG locations were bus 90, bus 111, bus 125 and bus 143. The proposed DG settings on each DG bus for each hour are presented in Fig. 7. For example, from Fig. 7

Conclusion and future work
The designs of many metaheuristic algorithms are based on centralized programs for solving optimization problems which limit their use in distributed control. In this paper, a framework for integrating metaheuristic algorithms and MAS has been proposed. Based on the proposed framework, a new algorithm called MASOS derived from conventional SOS has been presented. The proposed MASOS was implemented in JADE, a distributed control framework for MAS. Standard mathematical benchmark functions of different types and different dimensions have been used to validate the proposed MASOS against other proficient algorithms such as PSO, WOA, TLBO and SOS. The results show that the proposed MASOS has been efficient in solving considered benchmark functions in a distributed manner. Subsequently, the proposed MASOS was applied for DGs coordination to enhance distribution network operations services using the electrical Distribution network segment from Tanzania's Electrical distribution network. Therefore, it can be concluded that the proposed MASOS is a good choice for solving engineering optimization problems in a distributed manner.
It should be mentioned that the proposed MASOS has been designed to handle changes in the power distribution systems. The future work to extend the proposed study could be to test the performance of the proposed algorithms considering other sources of uncertainty in power systems such as network reconfiguration, load shedding, and DG intermittency. In this study power loss have been considered main function, the proposed algorithm can also be tested for multi-objective functions. Regarding the proposed frameworks for MAS, the authors of this paper suggest that new MAS-integrated algorithms based on other metaheuristic algorithms apart from SOS can also be designed and tested. In MAS, agent neighbourhood structure plays an important role in determining the algorithm's performance. Therefore, studies to test the performance of algorithms for different types of neighbourhoods can contribute to improving the algorithm. Also, since the implementation of the proposed algorithm was based on MAS, which is near real-life simulation, the authors of this paper intend to implement the proposed MASOS algorithm in real-life application in a pilot site.