## 1 Introduction  
Electric power has become a critical measure of the structure of contemporary society, with most of today's everyday activities predicated on the assumption that this power is always available. Regulations require the appropriate allocation and sizing of two types of distributed generation (DG) units to be optimized with a maximum size restriction of one megawatt (MW). The grey wolf optimization algorithm (GWO) is an optimization method used to reduce active power losses. Simulations have been used to evaluate the performance of the approaches, with numerical results compared in terms of optimum values and convergence characteristics [1]. Active power losses in electrical power systems are problematic because they can impact the distribution of power flows along transmission lines as well as the energy mix throughout power networks. As a result, because large-scale renewable energy sources are often located far from load centers, losses can have a particularly severe influence on the utilization of potential energy generated by them. Active power losses in electrical power systems can cause problems such as overloaded transmission and distribution lines, loss of stable voltage, and too much power loss [2]. Electrical distribution systems (EDSs) are composed of several components, each of which is critical to the process of distributing electricity from the power production location to where it is used by customers. The distribution system is essential in delivering electrical energy from the point of production to the site of consumption, which is accomplished via the use of the transmission system. The R/X ratio in the distribution network is high, where R signifies resistance and X denotes impedance, so the losses in the distribution system are larger. The DG systems used are a combination of photovoltaic (PV) panels for active power adjustment and capacitors for reactive power compensation. The degree of compensation offered by capacitors in a system is controlled by the position, range, and type of capacitor employed in the system, among other factors. A load flow is utilized to determine the position and size of the DGs, and losses in the radial network are considered. On the IEEE 69-bus standard network, the backward-forward sweep load flow method is utilized to move the load from one point to another. With the increasing use of plug-in hybrid electric vehicles (PHEVs) as tiny mobile power plants, greater study into the energy management of these power plants is required to keep pace with the expanding trend [3]. The charging and discharging capabilities of PHEVs may be used in active distribution networks (ADNs). To keep the operational expenses of the system as low as possible, an optimum strategy has been proposed for the charging and discharging schedule of plug-in electric vehicles (PEVs) in ADNs. The effect of PEVs has been examined regarding operational costs and other technical aspects of the system, such as power losses and the voltage profile [4]. To provide a fast-charging solution for lithium-ion batteries, a universal algorithmic framework that combines a model-based state observer and a deep reinforcement learning (DRL)-based optimizer has been suggested for the very first time. This framework combines a model-based state observer (LIB) within the DRL framework, and a multi-objective optimization problem is made by linking costs to bad things that could happen, such as overheating and degradation [5; 6; 7]. It has been shown that the performance of a chaotic swarm optimization (CSSO) method for addressing optimum power flow (OPF) issues is superior to other algorithms. The CSSO-based method is applied to five different types of objective functions (OFs), which include cost minimization in power generation, reduction of environmental pollution and emissions in power transmission; minimization of active power losses during transmission, enhancement of the voltage profile, and the improvement of system stability [8; 9].