## 1 Introduction
\(P_{km}\) represents the sum of real power loads of all the nodes beyond node-\(m\) plus the real power load on node-\(m\) itself plus the sum of the real power losses of all the branches beyond node-\(m\), \(Q_{km}\) denotes the sum of reactive power loads of all the nodes beyond node-\(m\) plus the reactive power load on node-\(m\) itself, plus the sum of the reactive power losses of all the branches beyond node-\(m\), \(r_{km}-jx_{km}\) represents the resistance and reactance of line-\(l\), represents the real and reactive power load at node-\(m\). where \(nbr\) is total number of line, \(R_{ij}\) is resistance of the line section between busses \(i\) and \(j\), and \(R_{i}\) is resistance at bus \(i\). The complementary between DG connection and the optimization methods in configuring the network system to achieve greater power loss reduction and best DG sizing are done by changing the power flow direction through the entire network. The objective function of this work is illustrated as below,  
\[L=4\Big{[}\Big{(}P_{leq}\times r_{eq}+Q_{leq}\times x_{eq}\Big{)}+\Big{(}P_{leq }\times x_{eq}-Q_{leq}\times r_{eq}\Big{)}^{2}\Big{]}, \tag{2}\]0  
In this research five constraints are taken into account for the optimization process to ensure all parameters in the distribution network are within allowable limits. The lists of constraints are shown as follows:  
1. Distributed generation operation constraint (continuous variable):  
Every DG unit must function in the range of the tolerable value where \(P_{DG,min}\) and \(P_{DG,max}\) which are minimum and maximum limit of DG output power respectively. It is imperative that DG size must not exceed this constraint as shown in Equation (10)  
\[L=4\Big{[}\Big{(}P_{leq}\times r_{eq}+Q_{leq}\times x_{eq}\Big{)}+\Big{(}P_{leq }\times x_{eq}-Q_{leq}\times r_{eq}\Big{)}^{2}\Big{]}, \tag{2}\]1
2. Bus voltage constraint:  
Every voltage value for each bus in the network must function in the range of the permissible bound where \(V_{n,min}\) and \(V_{n,max}\) are the minimum and maximum allowable voltage at bus \(n\) respectively as shown in the equation below,  
\[L=4\Big{[}\Big{(}P_{leq}\times r_{eq}+Q_{leq}\times x_{eq}\Big{)}+\Big{(}P_{leq }\times x_{eq}-Q_{leq}\times r_{eq}\Big{)}^{2}\Big{]}, \tag{2}\]2
3. Total power injection constraint:  
In order to avoid the power injection from the DG units to the main grid (substation), the total power output of DG must be less than the total load (\(P_{load}\)) on the network and total power losses (\(P_{losses}\)). Hence, it is possible to avoid the reverse power flow as shown below,  
\[L=4\Big{[}\Big{(}P_{leq}\times r_{eq}+Q_{leq}\times x_{eq}\Big{)}+\Big{(}P_{leq }\times x_{eq}-Q_{leq}\times r_{eq}\Big{)}^{2}\Big{]}, \tag{2}\]3  
where the \(tdg\) and \(tl\) denote the total number of DG units and the total number of loads respectively. \(P_{DG}\) denotes the size of the DG and \(P_{load}\) that represents the total number of loads consumed at bus \(n\). 4. Power balanced constraint:  
The total power injected into the system which is from the DG unit and main substation, \(P_{substation}\) must be equal with total load and the total power loss (power equilibrium concept) as illustrated in the following equation. \[L=4\Big{[}\Big{(}P_{leq}\times r_{eq}+Q_{leq}\times x_{eq}\Big{)}+\Big{(}P_{leq }\times x_{eq}-Q_{leq}\times r_{eq}\Big{)}^{2}\Big{]}, \tag{2}\]4
5. Radial configuration constraint:  
Finally, in order to eliminate the excessive of current flow in the system, this network configuration must be in radial. Hence, a range of constraints must be factored into account if the radial network is to be sustained in a consistent manner. Several standard rules have been adopted for selection of switches. Those switches that do not belong to any loop, connected to the sources and contributed to a meshed network have to be closed.