# An Optimization Framework for Wind Farm Design in Complex Terrain
## 5 Comparison with Other Algorithms  
To better show the effectiveness of the RS algorithm for wind farm design in complex terrain, we compare its performance with two widely used algorithms: Particle Swarm Optimization (PSO) and Genetic Algorithm (GA) [33]. PSO is a population based meta-heuristic algorithm inspired by bird flocking, which maintains a population of solutions (called particles) and moves each particle in the design space according to the global best solution in the population and the local best solution found by each particle. In this study, the version of PSO used by [PERSON] et al. in [34] is implemented in Python with the algorithm parameters set as recommended in Table 4 of [34]. Details of this algorithm are referred to in the paper [34]. GA is also a nature inspired population based meta-heuristic algorithm for optimization problems. Various versions of GA have been applied to solve the wind farm layout optimization problem, most of which are binary coded [33]. As a binary-coded GA makes restrictions on where to place turbines and thus limits the design space, we choose to implement a real-coded GA (RCGA) recently proposed by [PERSON] et al. [35], which has no such restrictions. This version of RCGA was developed for constrained optimization based on three specially designed evolutionary operators, i.e., ranking selection, direction-based crossover, and dynamic random mutation, and showed a better performance than traditional versions of RCGA for a variety of benchmark constrained optimization problems [35]. A Python version of this algorithm is implemented in this study using the parameters recommended by the authors of [35]. Details of this algorithm can be found in [35]. For the sake of simplicity, we consider the design optimization problem for the same wind farm as in the case study with only bounds on the design variables, i.e., \(x\) and \(y\) coordinates of wind turbines. No constraints on wind resource, terrain parameters, and minimal distances are considered. The bounds are set as the boundary of the rectangle area shown in Figure 6, i.e., \(314,000\) m \(\leq x\leq 320,000\) m and \(4,152,000\) m \(\leq y\leq 4,156,000\) m. Following the recommendations in [34; 35], the size of the population is set as 250 for both PSO and RCGA. Two scenarios for setting the initial solution(s) are tested. In the random scenario, 250 initial layouts are generated randomly by putting 25 turbines randomly inside the bounds. These initial layouts are used in PSO and RCGA as the initial population, while the worst performing initial layout, i.e., the layout with lowest AEP, is used as the initial solution in RS. As the initial solution(s) has influences on the optimization results obtained by meta-heuristics, there has been an effort on seeding good initial solution(s) for meta-heuristics in the field of wind farm layout optimization [31]. We address this issue in the heuristic fill scenario. In this scenario, an initial layout is first obtained by using the Heuristic Fill algorithm described in Section 3 with the minimal distance requirement set as four times of the rotor diameter. Then, a group of 124 layouts are generated by running RS 124 times with \(E_{\max}=100\) and \(M_{\max}=5000\) m from the initial layout found by Heuristic Fill. Thus, these 124 initial layouts have a higher or the same AEP as the one found by the Heuristic Fill, as they are improved better ones found by RS. After this process, we have 125 good initial layouts, which are then seeded in the initial populations of PSO and GA, while the remaining halves of the initial populations are filled with random layouts. In this way, the initial populations for both PSO and GA have some good quality initial solutions and some random initial solutions, thus they have a good degree of randomness, which is essential for the diversification. For RS, the worst performing layout among the 125 good initial layouts is used as the initial solution.