## 1 Introduction
### Literature Review  
Several articles have been presented in these fields [6; 7; 8; 9]. In general, traditional methods refer to models used before discussing the electricity market and the economic justification of each project. New methods are called models that consider the impact of creating a competitive environment in the power system. Additionally, they try to upgrade the network according to the economic criteria of each project. The issue of production investing in both traditional and competitive environments has its own characteristics. In the traditional environment, characteristics including centralized decisions, price stability, access to complete information, and low uncertainty can be mentioned. However, in the new methods, in the form of a competitive environment, there are characteristics such as decentralized decision making, different prices, limited access to information, and high uncertainty [9]. In [10], a dynamic model is proposed to plan the development of distribution networks. In this model, to disturb the system to be responsive to load growth, DG integration with post-development (installation of new transformers) and modernization of feeders are considered, and these methods are compared. Investment, maintenance, operating, and loss costs are the goals of optimization, and optimal load distribution (OPF) was used to minimize them [11]. To reduce losses and increase the system's reliability, the proposed DG values for a node are considered instead of comparing the load value of that node with the sum of loads of several nodes when disconnected from the network. The faces of the island are compared so that this action optimizes the value obtained. In [12], scattered production sources are also used to reduce the share of losses in addition to capacitors. First, the optimal locations of these sources are determined using voltage index analysis, and the amount of these sources is obtained using the proposed algorithm. In recent years, the focus on a concept, microgrids, has increased. Microgrid planning aimed to determine the output power of energy units is scattered; however, renewable sources' uncertainty makes this planning difficult. In [13], the problem of the optimal utilization of microgrids has been solved by focusing on energy storage. However, it does not examine the fluctuations of renewable units. In [14], a new method based on optimal power flow in a wind farm is presented. Researchers in [15] presented a method in which the total cost of power generation in a micro-wind grid is optimized by considering its environmental variables. In [16], planning the production of distributed energy sources in the microgrid, with the aim of providing the required energy for electrical and thermal loads, is completed with the lowest possible cost and pollution in compliance with operating rules. In this work, a two-step solution for planning the economical production of microgrids is presented. Uncertainty modeling of wind and solar power generation is completed using the point estimation method. The results are sent to the second stage. The second stage is the program of optimal production of distributed microgrid energy resources to reduce the cost of environmental pollution by using an evolutionary algorithm. Additionally, some authorities have used possible planning methods and solved them in different ways. Researchers in [17] presented a possible method for managing energy in the microgrid, which also includes producing renewable resources. The problem of mixed linear programming with integers was solved by Bandar analysis. Researchers in [18] suggested a possible microgrid energy planning in which different distributed generation technologies, renewable resources, and storage are considered. In this study, the problem of possible planning was solved with the help of intelligent methods.