###### Abstract  
Nowadays, optimizing wind farm configurations is one of the biggest concerns for energy communities. The ongoing investigations have so far helped increasing power generation and reducing corresponding costs. The primary objective of this study is to optimize a wind farm layout in Manjil, Iran. The optimization procedure aims to find the optimal arrangement of this wind farm and the best values for the hubs of its wind turbines. By considering wind regimes and geographic data of the considered area, and using the Jensen's method, the wind turbine wake effect of the proposed configuration is simulated. The objective function in the optimization problem is set in such a way to find the optimal arrangement of the wind turbines as well as electricity generation costs, based on the Monsetti cost function, by implementing the particle swarm optimization (PSO) algorithm. The results reveal that optimizing the given wind farm leads to a 10.75% increase in power generation capacity and a 9.42% reduction in its corresponding cost. wind farm; optimization; particle swarm optimization; wind farm layout optimization 40000-0000-0000-0000-00000-00000-00000-00000-00000-00000-00000-00000-00000-00000-00000-00000-000000-000000-000000-000000-000000-000000-0000000-0000000-000000000000000000000  
the wind speed reaching downstream turbines is reduced in magnitude, causing a sharp drop in power generation of those turbines (as they are being under the wake effect of upstream turbines). Therefore, the layout of wind turbines should be arranged in a way to minimize the impact of the wake effect. This procedure is known as wind farm layout optimization (WFLO) [22; 23; 24; 25; 26]. By doing so, the generated power from each turbine can reach a maximum value with lower associated costs. The first priority in constructing a wind farm is to find a proper location [27; 28; 29; 25]. This is due to the scarcity of lands and shortage of capital [30; 31; 32]. Consequently, wind turbine positioning comes next. As a result, to harness the highest possible power from a certain power plant, a comprehensive assessment on the placement of wind turbines should be taken into account. Wind farm layout optimization is a crucial subject in wind energy literature [33; 34; 35]. At this point, numerous researchers have been concentrated on the WFLO problem [16; 36; 37; 38]. [PERSON] [39] stated that in designing a wind farm layout, appropriate distances between wind turbines should be estimated. According to [PERSON]'s study, the optimal arrangement is in rows of 8-12 rotor diameters separately along the wind direction and 1.5-3 rotor diameters apart along the crosswind direction. One of the first research attempts for optimizing a wind farm layout was made by [PERSON] et al. [40]. By using the genetic algorithm, they minimized the objective function value, which was the unit cost per power production. They implemented a simple, empirical cost model. In 2013, [PERSON] et al. [41] underlined the importance of the optimization of wind farm configurations involving optimally placement of wind turbines to diminish the wake effect. This problem has drawn the attention of the scientific community. However, existing approaches are not fully responding to the needs of wind farm developers, mainly since they do not usually address the challenges associated with construction and logistics. [PERSON] et al. [42] used a particle filtering approach to achieve an optimal layout of a specific wind farm. The boundary of the wind farm and distances between turbines were regarded as two main constraints. The results indicated that the particle filtering approach can compete with the ant colony and evolutionary strategy algorithms. [PERSON] et al. [43] investigated the effect of using wind turbines with different hub heights on the overall output power. The nested genetic algorithm was used to analyze three different wind conditions.