1 Introduction

Growing energy demand and declining fossil fuel reserves together with dramatic climate change have posed tremendous challenges to modern societies. Power supply through the transportation system is a practical and sustainable solution to address this problem and reduce dependence on fossil energy reserves. The development and utilization of electrical vehicles (EVs) have increased significantly in recent years due to pollution and low operational cost [1, 2]. However, anticipating the proliferation of electrical vehicles will raise concerns related to unpredicted demand for charging and consequently their effects on the distribution network. The lack of any accurate plan for the charge and discharge for these vehicles may lead to adverse events such as overloading of transformers and distribution lines, elevated losses and operational costs in the distribution network. Therefore, the optimal strategy for charging and discharging of these vehicles, in addition to exploiting their capacity in the transport fleet, can exert positive effects on the network, including diminished losses, peak load and network voltage drop [3].

Distribution network reconfiguration (DNR) is an efficient method to expand the penetration of distributed generation (DG) units and EVs in distribution systems. In a distribution network, reconfiguration is conducted using controllable switch management (tie-sectionalizing). In reconfiguration operation, distribution network feeders are renewed for specific goals in the distribution network such as loss reduction, operational cost, or improved reliability through switch management. In the meanwhile, the distribution network operational constraints must be maintained without creating an insular state in a part of the network [4]. Also, considering electric vehicles and distributed generation sources in the network can also have positive effects on the network, including reducing losses, reducing peak load and reducing network voltage. Integrating the network reconfiguration process in the presence of distributed generation resources and electric vehicles can have greater benefits than the separate presence of these units or just the network reconfiguration. Therefore, considering the many advantages of this process in the presence of these units, the importance of the issue becomes clear. Therefore, many studies have explored the DNR considering DG units and EVs and energy storage (ES) systems.

Some studies have looked into the problem of reconfiguration in the presence of DG units in the static mode. A gravitational search algorithm (GSA) has been presented to deal with the problem of DNR considering DG units with the goal of enhancing reliability and reducing loss. [4]. Also, GSA has been used to increase the transient stability index and loss reduction by solving the DNR [5]. The hybrid evolutionary particle swarm optimization (PSO) and shuffled frog leaping algorithm (SFLA) has been presented to solve the DNR problem considering DG units to improve the voltage stability index and reducing operational cost [6]. Two evolutionary optimization algorithms based on the initial population have been proposed to tackle the issue of DNR and optimal location of DG sources in order to reduce loss and operational cost [7, 8]. The DNR approach has been adopted according to operational and protective constraints in order to diminish loss for the optimal utilization of the distribution network with DG units [9].

The focus of the above studies is to provide evolutionary methods to solve the problem of the network reconfiguration in the presence of DG units in a static state; These studies have considered various objective functions such as losses and operational costs to solve the optimization problem and achieved good results in solving the single-objective problem. But there is no strategy to solve the multi-objective problem. Moreover, given that daily demand and electricity prices in actual distribution systems change over time, previous studies have failed to account for alterations in electrical load and electricity prices over time for resolving the problem of DNR to evaluate objective functions. Finally, the values of objective functions for an actual distribution system are not optimal and acceptable.

Also, another group of studies on the network reconfiguration problem considering DG units and EVs have investigated energy storage systems in dynamic forms. A gray wolf optimization (GWO) algorithm has been introduced to address the problem of DNR considering DG units considering alterations in daily electrical demand to enhance reliability and decrease operational cost [10]. The dynamic reconfiguration approach has been adopted to provide an optimal program for the active generation of DG resources and ES systems (charge and discharge) in an unbalanced distribution network to optimize the voltage stability index and to reduce operational cost [11]. The hybrid PSO and SFLA have been used to address the problem of the DNR considering DG units and energy storage systems due to daily electrical load variations in an attempt to reduce operational cost and enhance voltage stability index [12].

The motivation of the above studies is to present newer evolutionary methods as well as hybrid algorithms to solve the problem of the network reconfiguration with the presence of DG units in a dynamic state. The predominant objective functions of these studies include operational costs and voltage stability index. Another point of these studies is to present different strategies such as Pareto front to solve multi-objective problem that can be seen the effect of multiple objective functions simultaneously in solving the optimization problem. In the above studies, the daily electricity price profile has not been precisely defined. For example, the electricity price is usually considered fixed or split into 2 or 3 periods of low demand, medium demand and peak demand over 24-h time intervals. Therefore, the optimal value may not be achieved to evaluate objective functions, especially operational costs.

In order to optimally exploit an intelligent distribution network considering capacitors and DG units, the dynamic approach of the DNR has been used to reduce network loss and operational costs and enhance stability [13]. A two-step method has been proposed to address the problem of the DNR considering changes in electrical charge over time [14]. To do so, first an optimal configuration is identified for each day using the harmonic search (HS) algorithm. Afterwards, to achieve the optimal configuration of feeders annually, the year is split into several smaller time periods, and the optimal design of feeders is obtained using the dynamic programming method, the goal is to reduce loss and switching cost. A genetic algorithm (GA) has been proposed to achieve optimal time intervals to deal with the problem of dynamic reconfiguration of the distribution network with DG units and to decrease network loss [15]. In this study, the period is split into several smaller time intervals in which network configuration is optimal in terms of network loss. Then, the process of network reconfiguration is applied to new time intervals created by the GA until the final response is reached. [16] presented a hybrid evolutionary method including exchange market and wild goat algorithms to resolve the DNR problem in a dynamic state, reduce loss and improve stability

The focus of the above studies is to provide a combination of evolutionary-analytical methods to solve the problem of network reconfiguration with the presence of distributed generation units in a dynamic state. The main objective function of these studies is power loss. The salient point of these studies is to provide long-term planning with demand and electricity price information. Also, these studies have not provided a strategy to solve the multi-objective optimization problem. In the above studies, the final configuration of feeders in the above studies depends on the initial configuration. In other words, if the initial configuration of the network is not optimal, the topology of final network will be far from the optimal solution. In these studies, the original configuration of the network is obtained for a short period of time. Then, using methods such as dynamic planning or evolutionary algorithms, the final configuration of the network is achieved in the long term using the results of the initial configuration.

Part of studies have considered the effect of distributed generation resources and electrical vehicles in solving the dynamic network reconfiguration. [17] proposed a randomized framework based on the dynamic reconfiguration approach of the distribution network for the optimal operation of the distribution network considering wind turbines and electrical vehicles to decrease loss. [18, 19] utilized the dynamic reconfiguration of the distribution network for the optimal performance of EVs in the distribution network in a randomized framework due to uncertainties pertained to the location of vehicles and battery charging mode. Moreover, to solve the randomized optimization problem, the spider evolution algorithm has been employed to reduce loss and network operation cost. [20] presented a randomized DNR approach based on GSA to reduce network loss and operational cost considering electrical vehicles in the distribution network. They used Monte Carlo method to model uncertainty associated with load demand. [21] proposed a randomized DNR approach to obtain the optimal charge and discharge scheme for electrical vehicles due to uncertainties associated with electricity demand and electricity prices. Furthermore, to solve the randomized problem, the evolutionary optimization algorithm called krill herd has been used to diminish network losses.

The purpose of these studies is to provide multi-objective probabilistic frameworks to solve the problem of the network reconfiguration in the presence of electrical vehicles in a dynamic state. Therefore, these studies have considered the uncertainty of parameters such as electricity price demand. In order to solve the optimization problem, evolutionary methods such as spider and gravity search have been used, and the intended objective functions include losses and operational costs. Moreover, In the above studies, electrical vehicles have classified in different fleets with each electrical vehicle being considered as a source of accumulated energy; however, some limitations of electrical vehicles including initial charging mode and battery capacity have not been considered in these studies.

Also, a small part of the studies has considered the effect of demand response programs in solving distribution network reconfiguration problem. [2, 22] considered the impact of demand response programs on resolving the reconfiguration problem for the purpose of enhancing the distribution system performance. One of the most common demand response programs used in the distribution system is the time of use mechanism. In this program, subscribers shift their usage from peak hours when electricity is more expensive to non-peak hours with cheaper electricity. [22] used the time of use mechanism related to the demand response program to overcome the problem of network reconfiguration due to daily variations of electrical load to reduce network loss and enhance network reliability. This mechanism has also been used by [2] to solve the problem of network reconfiguration considering DG units with the aim of reducing loss and network operational cost.

From a methodological perspective, the DNR in a dynamic state is a complex and non-convex problem. Also, considering the effect of DG sources and electrical vehicles simultaneously can increase this complexity. Thus, it is necessary to present an efficient method to overcome complexities of this problem. Therefore, mathematical algorithms are not suited for solving this complex optimization problem due to their limitations. Evolutionary methods are used for solving engineering optimization problems due to their features such as simple implementation and low computational volume [23, 24]. Most of the investigated studies have considered the problem as a single-objective problem and have not presented a strategy for solving the multi-objective problem. In the Multi-objective strategies, there are methods to satisfy all objective functions such as the weighting factor and Pareto fronts, because in the multi-objective optimization problems, we deal with a set of responses (Pareto front) rather than an optimal solution. For this purpose, a repository has been considered to store non-dominated solutions [25, 26].

The main presented ideas of the article to address the shortcomings of previous studies are as follows:

  • Presenting a dynamic multi-objective model for feeder reconfiguration of the distribution network by considering the changes in electricity demand and electricity price in the presence of DG unis and EVs, and the most important feature of the proposed model is independence of the final topology of feeders from the primary topology.

  • Applying the time of use mechanism as one of the demand response programs for dynamic distribution network reconfiguration to improve the performance of the distribution system.

  • Considering the energy not supplied (ENS) index as a function of the reliability objective and improving this index by solving the problem of the distribution network reconfiguration in the presence of DG units and EVs.

  • Presenting a hybrid IPSO-ABCO algorithm to address the complexity of the dynamic distribution network reconfiguration problem, as well as introducing a new mutation strategy to increase the search ability and population diversity of the proposed algorithm.

  • Presenting a multi-objective strategy based on dominance concept for obtaining non-dominated solutions, as well as, a fuzzy strategy is provided for having the same objective functions and recognizing the compromise solution.

This study is organized as follows: Section II discusses the problem definition including problem variables, problem constraints, objective functions, and multi-objective problem solving strategies. The simulation and conclusion results are presented in the Sections III and IV, respectively.

2 Problem formulation

Objective functions, problem constraints, and time of use mechanisms have been used in this section:

2.1 Objective functions

In this study, the objective functions include minimization of energy loss, energy not supplied and network operational cost.

2.1.1 Energy loss

Energy loss [12] is calculated from Equation (1).

$$f_{1} = \mathop \sum \limits_{t = 1}^{24} \,\mathop \sum \limits_{i = 1}^{{N_{brch} }} R_{i} \left| {I_{i,h} } \right|^{2}$$
(1)

where \(R_{i}\) and \(I_{i}^{t}\) are the impedance and actual current of ith line at time t. \(N_{brch}\) indicates the number of network lines.

2.1.2 Energy not supplied

The energy not supplied (ENS) is obtained from Equation (2):

$${\text{ENS}}_{i} = P_{i} \mathop \sum \limits_{i,j \in V, i \ne j} (U_{i,j} + U_{i,j}^{{}} )$$
(2)

where V is the set of buses fed by a feeder \(U_{i,j}\) and \(U_{i,j}\) are the repair time (hours per year) and the compensation time (hours per year) for the branches related to bus i \(\lambda_{i,j}\) and \(d_{i,j}\) are the failure rate and line length, respectively; \(t_{i,j}\) and \(t_{i,j}\) are the average repair time and the average line recovery time between the ith and jth buses, respectively.[27]. The final equation of the energy not supplied in the whole network is estimated without accounting for the reference node of Eq. (3):

$$f_{2} \left( x \right) = \mathop \sum \limits_{i = 2}^{{N_{Bus} }} {\text{ENS}}_{i}$$
(3)

2.1.3 Operational cost

The operational cost in this study was calculated from the following equation:

$$f_{3} \left( X \right) = \mathop {\sum \left( {\mathop \sum \limits_{j = 1}^{{N_{DG} }} {\text{Price}}_{{{\text{DG}},j}}^{t} P_{{{\text{DG}},j}}^{t} + \mathop \sum \limits_{s = 1}^{{N_{sub} }} {\text{Price}}_{{{\text{Sub}},s}}^{t} P_{{{\text{Sub}},s}}^{t} + \mathop \sum \limits_{k = 1}^{{N_{sw} }} {\text{Price}}_{Sw,k}^{t} \left| {S_{k}^{t} - S_{k}^{t0} } \right|} \right)}\limits_{t = 1}^{24}$$
(4)

where \(P_{{{\text{DG}},j}}^{t}\) and \(P_{{{\text{Sub}},s}}^{t}\) are the active power of jth distributed generator (DG) unit and sth sub-station at time t, respectively. \({\text{Price}}_{{{\text{DG,}}j}}^{t}\) and \({\text{Price}}_{Sub,s}^{t}\) are the purchase price of electricity from jth DG unit and sth sub-station at time t, respectively. \({\text{Price}}_{Sw,k}^{t}\) is switching cost at time t. \(N_{sw}\) and \(N_{sub}\) represent the number of switches and sub-stations, respectively. \(S_{k}^{t0}\) a and \(S_{k}^{t}\) represent the primary and secondary status of the kth switch at time t, respectively.

2.2 Problem constraints

2.2.1 Radiality constraint

The radiality constraint of network radius is calculated from Equation (5):

$${\text{N}}_{branch}^{t} = {\text{N}}_{Bus} - {\text{N}}_{source}$$
(5)

where \(N_{bus}\) and \(N_{source}\) represent the number of buses and network sub-stations, respectively.

2.2.2 Load flow equations

The constraints of load flow equations are calculated from Equations (6-7):

$${\text{P}}_{j}^{{\text{t}}} = \mathop \sum \limits_{{{\text{i}} = 1}}^{{{\text{N}}_{{{\text{Bus}}}} }} {\text{V}}_{i}^{{\text{t}}} {\text{V}}_{j}^{{\text{t}}} {\text{Y}}_{ij} \cos \left( {\theta_{ij} - {\updelta }_{i}^{{\text{t}}} + {\updelta }_{j}^{{\text{t}}} } \right)$$
(6)
$${\text{Q}}_{j}^{{\text{t}}} = \mathop \sum \limits_{{{\text{i}} = 1}}^{{{\mathbf{N}}_{{{\mathbf{Bus}}}} }} {\text{V}}_{i}^{{\text{t}}} {\text{V}}_{j}^{{\text{t}}} {\text{Y}}_{ij} {\text{sin}}\left( {\theta_{ij} - {\updelta }_{i}^{{\text{t}}} + {\updelta }_{j}^{{\text{t}}} } \right)$$
(7)

where \(P_{j}^{t}\) and \(Q_{j}^{t}\) are active and reactive powers injected by the network in the ith bus at time t, respectively. \(Y_{ij}\) is the amplitude and \(\theta_{ij}\) is the angle of ith voltage at time t. \(Y_{ij}\) and \(\theta_{ij}\) are the magnitude and branch admittance angle between buses i and j, respectively.

2.2.3 Buss voltage range

$$V_{{{\text{min}}}} \le V_{i}^{t} \le V_{{{\text{max}}}}$$
(8)

where \(V_{\min }\) and \(V_{\max }\) show the minimum and maximum allowable values of ith bus voltage at time t.

2.2.4 Feeder current

$$\begin{gathered} \left| {I_{f,i}^{t} } \right| \le I_{f,i}^{Max} \hfill \\ i = 1,2, \ldots ,N_{feeder} \hfill \\ \end{gathered}$$
(9)

where \(I_{f,i}^{t}\) and \(I_{f,i}^{{{\text{Max}}}}\) are current amplitude at time t and the maximum current of ith feeder, respectively.

2.2.5 Transformer constraint

$$\begin{gathered} \left| {I_{trns,i}^{t} } \right| \le I_{trns,i}^{Max} \hfill \\ i = 1,2, \ldots ,N_{transformer} \hfill \\ \end{gathered}$$
(10)

where \(I_{{{\text{trns}},i}}^{t}\) and \(I_{{{\text{trns}},i}}^{{{\text{Max}}}}\) are current amplitude at time t and the maximum allowable current of ith transformer, respectively.

2.2.6 Modeling related to DG units

$$P_{DG}^{\min } \le P_{DG,i}^{t} \le P_{DG}^{\max } ,\,i = 1,2, \ldots ,N_{DG}$$
(11)

where \({\text{P}}_{DG}^{min}\) and \({\text{P}}_{DG}^{max}\) are the minimum and maximum output power of ith DG unit at time t, respectively.

2.2.7 Electrical vehicles constraints

An electrical vehicle could be either charged or discharged in an hour. The constraints of electrical vehicles [1, 3] can be expressed as follows:

$$\begin{gathered} SOC_{l}^{t} = SOC_{l}^{t - 1} + \sigma_{ch,l} P_{ch,l}^{t} \times \Delta t - \frac{1}{{\sigma_{dis,l} }}P_{dis,l}^{t} \times \Delta t \hfill \\ \Delta t = 1\,hour,l = 1,2, \ldots ,N_{EVs} \hfill \\ \end{gathered}$$
(12)
$${\text{SOC}}_{l}^{{{\text{min}}}} \le {\text{SOC}}_{l}^{{\text{t}}} \le {\text{ SOC}}_{l}^{{{\text{max}}}}$$
(13)
$$P_{ch,l}^{t} \le P_{ch,l}^{\max }$$
(14)
$$P_{dis,l}^{t} \le P_{dis,l}^{\max }$$
(15)

where \(SOC_{l}^{t}\) is the charge status of the lth unit at time t. \(P_{ch,l}^{t}\) and \(P_{dis,l}^{t}\) are the charge and discharge of the lth unit at time t, respectively. \(SOC_{l}^{max}\) is the maximum charge status and \(SOC_{l}^{min}\) is the minimum charge status of lth unit at time t . \(P_{ch,l}^{\max }\) and \(P_{dis,l}^{\max }\) are the maximum charge and discharge of the lth unit at time t, respectively.

3 Time of use mechanism

Demand response refers to a set of measures taken to modify energy usage pattern in order to boost system stability and hamper price rise, particularly at peak network loads. Participants in the demand response program (DRP) are subscribers who, instead of reducing consumption, are responsible for modifying their energy usage patterns to diminish their costs, which ultimately results in lower electricity usage. In general, DRPs can be split into two sections: incentive programs and price-based programs [22, 28].

In this paper, one of the DRPs called time of use mechanism has been used to alter the consumers’ usage pattern to improve system performance. Mathematical modeling of the time of use mechanism is presented in (16)–(18). Based on this mechanism, the total modified energy cannot exceed a fixed value (assuming 15% of the base demand). In addition, a balance must be struck between the increase and drop of overall power over a particular period.

$$P_{t,i}^{{{\text{MDF}}}} = P_{t,i}^{{{\text{TOU}}}} + P_{t,i}^{{{\text{INI}}}}$$
(16)
$$\left| {P_{t,i}^{TOU} } \right| \le TOU^{\max } \times P_{t,i}^{INI}$$
(17)
$$\mathop \sum \limits_{t = 1}^{T} P_{t,i}^{TOU} = 0$$
(18)

where \(P_{t,i}^{MDF}\) is the modified demand of the ith feeder at time t after applying the time of use mechanism. \(P_{t,i}^{TOU}\) and \(P_{t,i}^{{{\text{INI}}}}\) represent surge or drop in the demand for this mechanism and the initial demand values in ith feeder at time t without the time of use mechanism, respectively. \(TOU ^{max}\) is the maximum speed of demand surge or drop in this mechanism.

4 Multi-objective problem strategy

In this section, the multi-objective optimization strategy is presented.

In a multi-objective problem [29, 30] where there are contradictory goals, the problem is formulated as follows:

$${\text{Minf}}\left( x \right) = \left[ {f_{1} \left( x \right),f_{2} \left( x \right), \ldots .f_{n} \left( x \right)} \right]^{T} ,G_{i} \left( X \right) \le 0,H_{i} \left( x \right) = 0$$
(19)

where \(G_{i} \left( X \right)\) and \(H_{j} \left( x \right)\) are equal and unequal constraints, respectively; \(n\) and \(x\) are the number of objective functions and the vector of the optimization variables, respectively. Pareto optimization method works for multi-objective problems based on domination. The vector \(X_{1}\) dominate \(X_{2}\) provided that the following conditions are satisfied [29, 30]:

$$\forall i \in \left\{ {1,2, \ldots N_{obj} } \right\}, f_{i} \left( {X_{1} } \right) \le f_{i} \left( {X_{2} } \right)$$
(20)
$$\exists j \in \left\{ {1,2, \ldots N_{obj} } \right\}, f_{j} \left( {X_{1} } \right) < f_{j} \left( {X_{2} } \right)$$
(21)

Given that the objective functions are in different ranges; fuzzy sets are implemented to substitute each objective function with a 0-1 value. Accordingly, the fuzzy membership function \(\mu_{i}\) for each objective function would be:

$$\mu_{i} \left( x \right) = \left\{ {\begin{array}{*{20}c} {1 f_{i} \left( X \right) \le f_{i}^{\min } } \\ {0 f_{i} \left( X \right) \ge f_{i}^{\max } } \\ {\frac{{f_{i}^{\max } - f_{i} \left( X \right)}}{{f_{i}^{\max } - f_{i}^{\min } }} f_{i}^{\min } \le f_{i} \left( X \right) \le f_{i}^{\max } } \\ \end{array} } \right.$$
(22)

where \(f_{i}^{\max }\) is the upper limit and \(f_{i}^{\min }\) is the limit of the objective function. These values are calculated separately by the optimization of each objective function. The value of the normalized membership function [12] for each member amongst responses is obtained from Equation (23):

$$N_{\mu j} = \frac{{\mathop \sum \nolimits_{k = 1}^{n} \beta_{k} \times \mu_{jk} \left( x \right)}}{{\mathop \sum \nolimits_{j = 1}^{m} \mathop \sum \nolimits_{k = 1}^{n} \beta_{k} \times \mu_{jk} \left( x \right)}}$$
(23)

where m and n are non-dominated solution numbers and objective functions, respectively. βk represents the kth weight of objective function and \(\beta_{k}\) value is chosen by the operator according to the degree of importance of each objective function [30].

5 Hybrid improved particle swarm optimization-artificial bee colony optimization algorithm

This section describes the IPSO, ABCO and hybrid IPSO-ABCO algorithm.

5.1 Improved particle swarm optimization method

The PSO is one of the evolutionary algorithms first used by Eberhart and Kennedy to optimize types of problems in the field of engineering [31]. In this algorithm, each particle is counted as a possible answer to the optimization problem in which the particles find the best place using prior experiences and the best particle in the whole population. The position and velocity of particles in each repetition is updated by Equations (24-25):

$${\text{V}}_{i}^{{{\text{k}} + 1}} = {\text{WV}}_{i}^{{\text{k}}} + {\text{c}}_{1} {\text{r}}_{1} \left( {{\text{pb}}_{i}^{{\text{k}}} - {\text{x}}_{i}^{{\text{k}}} } \right) + {\text{c}}_{2} {\text{r}}_{2} \left( {{\text{gb}}^{{\text{k}}} - {\text{x}}_{i}^{{\text{k}}} } \right)$$
(24)
$${\text{X}}_{i}^{{{\text{k}} + 1}} = {\text{X}}_{i}^{{\text{k}}} + {\text{V}}_{i}^{{{\text{k}} + 1}}$$
(25)

where \({\text{X}}_{i}^{{\text{k}}}\) , \({\text{V}}_{i}^{{\text{k}}}\) are the position and velocity of \(i{\text{th}}\) particle at \(k{\text{th}}\) iteration, \({\text{c}}_{1}\) and \({\text{c}}_{2}\) are positive constants, \({\text{r}}_{1}\) and \({\text{r}}_{2}\) are random numbers in [0, 1]. \(pb_{i}^{k}\) and \(gb^{k}\) represent personal fitness and the best value of all optimal personal fitness at \(k{\text{th}}\) iteration. Also, \({\text{W}}\) is the inertia weight, which drops from 1 to 0 according to Equation (26):

$${\text{W}} = {\text{W}}_{max} - \frac{{{\text{W}}_{max} - {\text{W}}_{min} }}{{{\text{iter}}_{max} }} \cdot {\text{iter}}$$
(26)

where \({\text{iter}}\) and \({\text{iter}}_{{{\text{max}}}}\) are current and maximum iteration number.\({\text{ Wmax}}\) and \({\text{Wmin}}\) are the minimum and maximum boundaries of W[32, 33].

Mutation is a process to improve the performance of an algorithm to increase the likelihood of achieving a global optimal solution. In PSO algorithm, this process can modify the velocity and position of each particle to avoid being trapped in the local optimum. In IPSO, a new mutation is as follows:

$$X_{i,new1}^{k + 1} = X_{i}^{k} + r_{1} \left( {gb^{k} - lM^{k} } \right), \ldots X_{i,new2}^{k + 1} = X_{i}^{k} + r_{2} \Delta X_{i}$$
(27)
$$\Delta X_{i} = \left\{ {\begin{array}{*{20}c} {r_{3} \cdot \left( {X_{i}^{k} - X_{j}^{k} } \right) if f\left( {X_{i}^{k} } \right) \ge f\left( {X_{j}^{k} } \right) } \\ {r_{4} \cdot \left( {X_{j}^{k} - X_{i}^{k} } \right) if f\left( {X_{j}^{k} } \right) \le f\left( {X_{i}^{k} } \right)} \\ \end{array} } \right.i \ne j$$
(28)
$$X_{i,new}^{k + 1} = \left\{ {\begin{array}{*{20}c} {X_{i,new1}^{k + 1} if f\left( {X_{i,new2}^{k + 1} } \right) \ge f\left( {X_{i,new1}^{k + 1} } \right) } \\ {X_{i,new2}^{k + 1} if f\left( {X_{i,new2}^{k + 1} } \right) \le f\left( {X_{i,new1}^{k + 1} } \right)} \\ \end{array} } \right.$$
(29)

where \({\text{r}}_{3}\) and \({\text{r}}_{4}\) are random numbers in [0,1], \(l\) can assume 1 or 2. \({\text{M}}^{{\text{k}}}\) mean value of the position relative to the total population in the previous iteration. If the new \(i{\text{th}}\) individual has a better position than \(i{\text{th}}\) individual in the current population, the new vector will replace it in the next population.

5.2 Artificial bee colony optimization method

ABCO is one of the population-based algorithms, which was first introduced by Karboga in 2005 [34]. This algorithm is inspired by the behavior of honey bees, the bees in ABCO consists of three groups: employed, onlooker and scout. Employed bees, regardless of the desirability of each food source, are merely responsible to look for food sources. In the first step, the initial population is randomly assigned according to Eq. (30):

$$X_{ij} = X_{j}^{\min } + {\text{rand}} \left( {X_{j}^{\max } - X_{j}^{\min } } \right)$$
(30)

where \(i = 1,2, \ldots ,SN\) (SN is the number of food sources),\(j = 1,2, \ldots ,D\) (D is the number of parameters) . \({\text{ X}}_{j}^{{{\text{min}}}}\) and \({\text{X}}_{j}^{{{\text{max}}}}\) are the minimum and maximum values of parameter \({\text{j}}\), respectively. Each employed bee goes to the new location (\({\text{V}}_{ij} )\) from its current location (\({\text{X}}_{ij} )\) according to Eq. (31):

$$V_{ij} = X_{ij} + \phi_{ij} \left( {X_{ij} - X_{kj} } \right)$$
(31)

The honey bees remain in the dance zone to make a decision regarding the selection of a food source are called onlooker bees. These bees are informed about the food sources by employed bees through a special dance. The value of a food source is calculated according to Equation (32):

$$P_{i} = \frac{{{\text{fit}}_{i} }}{{\mathop \sum \nolimits_{j = 1}^{SN} {\text{fit}}_{{\text{j}}} }}$$
(32)

where \({\text{fit}}_{i}\) is the fitness value of the food source searched by employed bees, which is expressed as Equation (33):

$${\text{fit}}_{i} = \left\{ {\begin{array}{*{20}c} {\frac{1}{{1 + {\text{f }}\left( {{\text{X}}_{i} } \right)}} f \left( {{\text{X}}_{i} } \right) \ge 0 } \\ {1 + \left| {{\text{f }}\left( {{\text{X}}_{i} } \right)} \right| f \left( {{\text{X}}_{i} } \right) < 0 } \\ \end{array} } \right.$$
(33)

where \({\text{f }}\left( {{\text{X}}_{i} } \right)\) is the cost function. After onlooker bees are dispersed in food sources, food sources are examined. As long as nectar is extracted from the food sources, the bees continue to examine the food source level, but when a food source ceases to reveal any improvement after certain rounds of monitoring, it will be considered as a depleted source. The goal of this process is to eliminate local minimums and to obtain a better response for the search space. The pseudo-codes of the IPSO and ABCO methods are shown in Figs. 1 and 2, respectively.

Fig. 1
figure 1

The pseudo-code of IPSO method

Fig. 2
figure 2

The pseudo-code of ABCO method

5.3 Hybrid optimization method

To overcome various defects of PSO and ABCO, a hybrid algorithm, which is combination of IPSO and ABCO is proposed. IPSO can greatly enhance search functionality and ABCO helps prevent any local optimal solution. In addition, the local ABCO search capability may even improve the accuracy of the IPSO, if the global solution is not far away. The flowchart of IPSO-ABCO algorithm is shown in Fig. 3.

Fig. 3
figure 3

Flowchart of the hybrid algorithm

6 Simulation results and analysis

In this section, first the validation of the proposed method in optimizing a sample objective function is performed and after providing the parameters of optimization methods and test network specifications, the proposed method is used to solve the problem of dynamic feeder reconfiguration in the absence and presence of DG units, EVs and demand response program.

6.1 Evaluation of the hybrid IPSO-ABCO to optimize the benchmark function

The standard objective function for optimization is used to validate the IPSO-ABCO and PSO methods. This section shows the function of the IPSO-ABCO to minimize the Lévi function (a complex function with several local Optima) with two decision variables. The simulation is done in MATLAB R2016b environment using a core-i7 processor laptop with 2.4 GHz clock frequency and 8.0 GB of RAM. The formulation of this function is as follows:

$$f\left( {x,y} \right) = \sin^{2} 3\pi x + \left( {x - 1} \right)^{2} \left( {1 + \sin^{2} 3\pi y} \right) + \left( {y - 1} \right)^{2} \left( {1 + \sin^{2} 2\pi y} \right)$$
(34)

The 3-D surface of Lévi function with two decision variables is shown in Fig. 4. It should be noted that both decision variables and are bounded in [−4, +4]. The results of the proposed IPSO-ABCO and PSO algorithms for solving the Lévi function in two-dimensional spaces are shown in the following Figs. 5 and 6, respectively. It is clear from Fig. 6b, that after the final iteration, all particles are focused on a global optimum. While in Fig. 5b, there are solutions that are away from the global optimal even in the final replication. The results show the capability of exploitation and the high exploration capability of the IPSO-ABCO algorithm, it is noteworthy that the iteration number and the population size of IPSO-ABCO and PSO algorithms are considered 30 and 10 to optimize the Lévi function.

Fig. 4
figure 4

3-D surface of Lévi function (a) After the first iteration, (b) After the final iteration

Fig. 5
figure 5

Results of PSO algorithm for optimizing the Lévi function, (a) After the first iteration, (b) After the final iteration

Fig. 6
figure 6

Results of IPSO-ABCO algorithm for optimizing the Lévi function

6.2 Test system (IEEE 95-node distribution network)

To solve the optimization problem for the reconfiguration of distribution network in a dynamic framework, the 95-bus test network [35, 36] is used which as shown in Fig. 7. The study period considered for solving the proposed problem is 24 h. In this section, a combination of IPSO and ABCO has been used for single- and multi-objective optimization. Moreover, the results are compared with PSO, GSA, and ABCO algorithms. In the 95-bus test system, five scattered generation units (diesel generators) with a capacity of 1000 kW have been used in buses 34, 25, 10, 6 and 45. Also, five electrical vehicles with 120 kW have been installed in buses 41, 88, 85, 63 and 33. The cost of purchasing electricity from DG units and the switching cost are $ 0.042 per kW and $ 0.041 per switching, respectively. Figs. 8 and 9 show the average load profile and electricity price over 24 h. The amount of energy loss, operational cost and ENS before the reconfiguration are 35.55869 kW, $145329.91 and 355.556 kWh per year, respectively. The optimization problem is resolved in two parts. In the first part, only dynamic reconfiguration is applied to the network, and in the second part, the network reconfiguration is implemented considering DGs units, electrical vehicles and demand response program. In order to shown the mechanism and ability of the proposed algorithms to solve the optimization problem, the values of the parameters related to these algorithms are depicted in Table 1.

Fig. 7
figure 7

Single-line diagram of 95-node test system

Fig. 8
figure 8

Average Electricity demand for the 24-hour interval

Fig. 9
figure 9

Average electricity price for the 24-hour interval

Fig. 10
figure 10

Convergence plot of energy loss optimization by different algorithms

Table 1 Parameters of the proposed algorithms

6.3 Solving the optimization problem in the absence of DG units and EVs

In this section, the problem of dynamic reconfiguration is resolved in the absence of scattered generation resources and electrical vehicles. One of the objectives of this section is to display the ability of the proposed algorithm in resolving the reconfiguration optimization problem (Fig. 10)

6.3.1 Results discussion

Table 2 lists the outcomes of optimization of the objective functions of this study along with the proposed hybrid algorithm. The best results obtained from the proposed IPSO-ABCO algorithm are highlighted in Tables 2, 3 and 4 and Tables 6, 7 and 8. Tables 3 and 4 display the outcomes of optimization of ENS and operational cost objective functions and with various algorithms in 20 separate experiments. The optimal topology of switches for the optimization ENS objective function is shown in Table 5.

Table 2 Best results of the IPSO-ABCO algorithm for different objective functions
Table 3 Results of different methods for ENS objective function for 20 trials
Table 4 Results of different methods for operational cost objective function for 20 trials
Table 5 List of switches for ENS optimization

As shown by the results of the Tables 3 and 4, the proposed IPSO-ABCO algorithm has yielded better responses compared to other algorithms. Also, the objective functions of energy loss, ENS and operational cost have dropped by 6, 10 and 4 percent compared to the initial values, respectively. The convergence curve of energy loss optimization by IPSO-ABCO, PSO, ESGA and ABCO algorithms is depicted in Fig .10, based on this figure, the proposed IPSO-ABCO converges on an optimal solution before other evolutionary methods.

6.4 Solving the optimization problem in the presence of DG units, EVs and demand response program

In this section, the problem of dynamic reconfiguration in the presence of DG units and EVs has been resolved as single and multi-objective problems. Also, the effect of the time of use mechanism on the demand response program has been considered in evaluating the dynamic reconfiguration optimization. This program is executed for all network buses.

6.4.1 Results discussion

Table 6 lists the results of optimizing the objective functions obtained from the proposed hybrid algorithm and other algorithms in the absence and presence of demand response program.

Table 6 Results of IPSO-ABCO and other algorithms for different objectives optimization without and with applying TOU

Tables 7 and 8 draw comparisons between the results of energy loss optimization and ENS objectives from the algorithm presented in this study and other algorithms. The optimization results are obtained from 20 separate experiments. The optimal topology of switches, the optimal generation of distributed generation sources and electrical vehicles for optimization of the objective function of energy losses are shown in Table 9 and Figs. 11 and 12.

Table 7 Results of different methods for energy loss objective function for 20 trials
Table 8 Results of different methods for ENS objective function for 20 trials
Table 9 List of switches for energy loss optimization
Fig. 11
figure 11

Active power of DGs for energy loss optimization

Fig. 12
figure 12

Active power of EVs during charging / discharging for energy loss optimization

According to the results of Tables 6, 7 and 8, it is evident that answers provided by the presented hybrid algorithm are superior to other algorithms. A comparison of the optimization results in the two simulation cases suggests that considering the effect of distributed generation sources and electrical vehicles has modified the objective functions of energy loss and ENS from 33359.36 kWh and 323.74 kWh /year to 31445 kWh and 294.46 kWh / year. Also, the demand response program along with the effect of distributed generation sources and electrical vehicles have decreased the objective functions of energy loss, ENS by 23, 35 percent compared to the initial values, respectively.

According to Figs. 11 and 12, the maximum and minimum power output of distributed generation units is related to 16 to 20 hours with 19862 kW and 21 to 24 hours with 7649 kW. In addition, the maximum charge and discharge of electrical vehicles belong to 16 to 20 hours with 185 kW and 11 to 15 hours with 205 kW. Also, the condition of network radiality per hour according to the dynamic configuration of the network has been satisfied in Table 9.

According to the results of Table 1, the objective functions are contradictory. In other words, all three functions have not improved at the same time. For example, the value of the ENS objective function in optimization of the ENS objective function is 323.74 kWh/ year while the objective functions of operational cost and energy loss in this optimization are $ 142845.45 and 38145.26 kWh, respectively.

Since the concept of single-objective optimization cannot optimize the problem of multiple objectives, the concept of Pareto optimization is used. Figs. 13 and 14 show the Pareto optimal fronts for two- and three-objective optimization. The compromise response is also shown in red in each Pareto-front.

Fig. 13
figure 13

Pareto-front for optimizing energy loss and operational cost

Fig. 14
figure 14

Pareto-front for optimizing ENS, energy loss and operational cost

According to Figs.13 and 14, the value of objective functions in response to the compromise response related of Figs. 13 and 14 corresponds to the optimal value of objective functions. This slight difference indicates the that the proposed method is capable of solving the multi-objective optimization problem. In addition, the value of the objective functions in compromise response of Fig. 14, including energy loss, ENS, and operational cost declined by 12, 16, and 4 percent of their initial values, respectively.

7 Conclusion

Increasing the high penetration rate of distributed generation (DG) units in distribution networks and also considering the simultaneous effect of these units with electrical vehicles (EVs) in order to improve the performance of the distribution system, has created challenges such as reliability and economic issues for system operator. For this purpose, the multi-objective problem of dynamic reconfiguration of distribution network in the presence of DG units and EVs is solved by considering the demand response program.

The objective functions in this study included ENS, energy loss and operational cost. The problem limitations include preservation of distribution network radial topology, buses voltage, lines current and transformers capacity. A new and powerful method, called IPSO-ABCO is provided to solve the dynamic network reconfiguration in the single and multi-objective frameworks, the proposed approach is applied on 95-node test system. Based on the simulation results, the presented method is superior to other evolutionary methods in single- and multi-objective optimization problems

The primary findings of the study are as follows:

• The proposed algorithm is able to resolve single and multi-objective problems without considering their complexities.

• The effect of DG units of EVs on solving the optimization problem reduces energy loss, ENS and operational cost.

• Considering ENS as an indicator of stability provides a safe and desirable condition for the network operation.

• Considering the time of use mechanism, in addition to changing the usage pattern of subscribers, enhance the performance of the distribution system due to the reduction of energy loss and operational cost.

Some suggestions for future studies of this research are as follows:

  • Protection constraints, reconfigure the feeder topology in the distribution network may challenge the distribution network protection system and cause changes in the status of the protection relays.

  • Distribution network security, with the advancement of technology and automation in smart distribution networks, some operational issues such as energy management may face challenges such as cyber threats. Therefore, considering this restriction in the distribution network application issues, such as reconfiguration the distribution network, will create safe conditions for the operation of the network.