• Nem Talált Eredményt

5.2 Optimization algorithms

5.2.4 NSGA-II

The non-dominated sorting genetic algorithm, developed by Deb et al. in 2002, is one of the most commonly used multi-objective optimization (MOO) algorithms [219]. Unlike the single-objective optimization (SOO), MOO results in not only one optimal solution but a set of Pareto-optimal solutions that represent all possible tradeoffs between the different objectives [220].

A solution is Pareto-optimal if it is not dominated by any other solutions, i.e., there are no other solutions that have better values in terms of all objectives. The main issue of MOO is to find an effective method for the sorting of the individuals, as simply ordering based on the value of the objective function is ambiguous in case of more than one objective.

The core concept of the NSGA-II is the non-dominated sorting algorithm, which is based on the rank and crowding distance of the individuals. The rank of an individual refers to its non-domination level. The rank 1 individuals are not dominated by any other individuals (i.e., they are on the Pareto-front), the rank 2 individuals are only dominated by rank 1 individuals, and so on. The crowing distance is the average normalized distance of the given individual from the neighboring individuals with the same rank along each dimension of the objective space. The objective functions are normalized based on their minimum and maximum values in the whole population. The extreme solutions, i.e., the solutions with the lowest and highest values in each objective, are assigned an infinite crowding distance to reflect their importance in the population. The individuals are first sorted based on their rank (lower is better), then the individuals with the same rank are sorted based on their crowding distance (higher is better).

The higher priority of the individuals in the less crowded regions ensures the uniform spread of the solutions on the Pareto-front.

The NSGA-II algorithm starts with the random initialization of the population of NP individuals. In each generation, NP parent individuals are selected by a binary tournament selection method, where each parent is picked as the best of two randomly chosen individuals in terms of their non-dominated sorting order. The offsprings are created with the crossover and mutation of the selected parents. The crossover is performed by a simulated binary crossover with CXPB probability, and each offspring are mutated with a polynomial mutation method as implemented in the DEAP package [221]. The main parameter of these crossover and mutation methods is the ETA distribution index, where a higher value results in more similar, while a lower value in more different children compared to their parents. The next generation is selected

73

as the NP best individuals from the union of the current population and the offsprings. This elitist selection method is an essential feature of the NSGA-II algorithm. A more detailed description of the algorithm can be found in [219].

The stoping condition for NSGA-II is set similarly to the above-presented SOO algorithms, i.e., the optimization stops when the improvement of the results over the last 50 generations is lower than a TOL function tolerance value. However, while the improvement can be simply measured based on the objective function for the single-objective algorithms, MOO requires a more complex performance metric that takes the whole Pareto-front into account. One such metric is the extent of spread of the solutions, which is calculated from the mean and standard deviation of the crowding distance of all individuals and the change of the extreme points between the generations (the exact calculation method is described in [219]). A low spread indicates that the solutions are distributed evenly, and the extreme points are not improving anymore, which calls for the stop of the optimization. Another metric to measure the overall performance is the hypervolume dominated by the solutions. The hypervolume metric is the size of the region of the objective space that is dominated by the Pareto-optimal solutions but is better than a reference point in all objectives (i.e., the reference point if the upper boundary of this region). The selection of the reference point has a large effect on the hypervolume. The best candidate for the reference point is the nadir point, which is the point of the objective space whose coordinates are selected as the worst of each objective among all individuals of the Pareto-front [222] (see Fig. 5-3 for illustration). The nadir point can be easily calculated if the single-objective optima are known for each objective. If the results are available, the hypervolume is a better performance metric to use in the stop condition due to its better stability compared to the extent of spread.

The demonstration and meta-optimization of the NSGA-II multi-objective optimization algorithm are performed for the simultaneous optimization of the LCOE economic and the GWP (global warming potential) environmental objectives. In this case, only eight decision variables are optimized, while the Pmax and Ninv are set to 325 W and 100, respectively, as their effect cannot be properly accounted for in the environmental impact calculation [191]. The best LCOE and GWP, calculated by the single-objective DE, are 73.0025 €/MWh and 40.6553 kgCO2e/MWh, respectively. The coordinates of the nadir point, set as the reference point for the hypervolume calculation, are 79.8614 €/MWh and 42.4944 kgCO2e/MWh.

The four main parameters of NSGA-II are identified as the NP population size, CXPB crossover probability, ETA distribution index, and TOL function tolerance. The averaged results of the parameter tuning are shown in Table 5-10. The evaluation is based on three metrics, the hypervolume, where a higher value indicates that the Pareto-optimal solutions dominate a higher part of the objective space, i.e., a better representation of the real Pareto-front is found, and the minimum values of the two objective function, which show the accuracy of the extreme solutions. A higher population size results in a higher hypervolume and a better approximation of the single-objective optima, but the runtime of the algorithm is also proportional to the number of individuals. The highest hypervolume found with a population of 200 and 500 individuals are 11.0895 and 11.0633, respectively (technically, the dimension of this metric is

€kgCO2e/(MWh)2 as it is an area in the objective space, but this unit has no practical meaning or relevance). The tendencies of the other parameters show that a higher crossover probability and moderate to high distribution index contribute to slightly more accurate results with no significant increase in the calculation time. A more strict function tolerance largely increase the calculation time but also improves the results.

Table 5-11 lists the five best parameter combinations based on the weighted average of the relative difference of the hypervolume, and the minimum objectives at the two extremes from their absolute best values. The best results are achieved by a population size of 500, a crossover

probability of 0.8, a distribution index of 10, and a relative function tolerance of 10-4. However, the selection of CXPB and ETA from the presented values has only a minor effect on the performance. Lower values both parameters increase the diversity of the population; therefore, an inverse tendency can be observed between these two parameters. Among the four best combinations, the 𝐶𝑋𝑃𝐵 = 0.5 is paired with 10 to 20, while 𝐶𝑋𝑃𝐵 = 0.8 is paired with 5 to 10 distribution indexes. If only the runs with 200 individuals are considered, the best performance is achieved by the same parameter combination, i.e., 𝐶𝑋𝑃𝐵 = 0.8, 𝐸𝑇𝐴 = 10, and 𝑇𝑂𝐿 = 10−4, therefore, this parametrization can be considered universal for the given optimization problem regardless of the population size.

Table 5-10 General tendencies of the parameter selection of the NSGA-II algorithm

Parameter Value Hypervolume LCOE

€/MWh

GWP kgCO2e/MWh

Avg.

runtime mean std. mean std. mean std. s

NP 200 11.0527 0.0078 73.0139 0.0056 40.6611 0.0104 1992 500 11.0826 0.0070 73.0115 0.0046 40.6571 0.0051 5000 CXPB 0.5 11.0655 0.0175 73.0134 0.0054 40.6592 0.0086 3489 0.8 11.0698 0.0157 73.0119 0.0050 40.6590 0.0082 3504 ETA

5 11.0653 0.0172 73.0139 0.0054 40.6588 0.0075 3621 10 11.0691 0.0158 73.0129 0.0053 40.6577 0.0063 3598 20 11.0685 0.0173 73.0113 0.0048 40.6609 0.0106 3270 TOL 10-4 11.0704 0.0166 73.0113 0.0057 40.6585 0.0077 4353 10-3 11.0649 0.0165 73.0141 0.0044 40.6597 0.0090 2640 The NSGA-II is also effective in finding the two extreme points in the proximity of the single-objective global optima; however, it is still less accurate than the single-objective DE. If only the objectives are in the center of interest, it is better to use multiple runs of single-objective DE for the individual optimization of the different single-objectives due to the higher accuracy and shorter overall calculation times compared to one MOO optimization run. In case the single-objective optimums are available in advance of the multi-objective optimization (e.g., they are already calculated with a DE for better accuracy), then they should be included in the initial population of the NSGA-II to ensure that the exact positions of the extreme points are correctly located in the resulting Pareto-front. The results of such optimization are included in the last row of Table 5-11.

Table 5-11 Best parameter combinations of the NSGA-II algorithm

NP CXPB ETA TOL Hypervolume LCOE

€/MWh

GWP kgCO2e/MWh

Avg.

runtime s

mean std mean std mean std

1 500 0.8 10 10-4 11.0874 0.0008 73.0077 0.0030 40.6560 0.0004 6029 2 500 0.5 20 10-4 11.0873 0.0004 73.0086 0.0029 40.6561 0.0006 5773 3 500 0.8 5 10-4 11.0871 0.0010 73.0114 0.0055 40.6560 0.0003 6459 4 500 0.5 10 10-4 11.0861 0.0004 73.0090 0.0033 40.6558 0.0003 6614 5 500 0.8 20 10-4 11.0858 0.0071 73.0077 0.0026 40.6615 0.0122 6582 The two single-objective optimum individuals added to the initial population of the algorithm

500 0.8 10 10-4 11.0877 0.0016 73.0025 0.0000 40.6553 0.0000 6079 The size of the population directly affects the resolution of the resulting Pareto-front. Fig.

5-3 illustrates the best results calculated with 200 and 500 individuals, where it is clear that the

75

population of 500 individuals results in much better coverage for the whole Pareto-frontier. The discontinuities of the front are due to the change of the integer decision variables. Using an even higher number of individuals is advised in studies where the multi-objective results and the Pareto-front is an important basis of the conclusions [191,223].

Fig. 5-3 Pareto-front calculated by the NSGA-II algorithm for economic-environmental optimization for different population sizes

The calculation of the Pareto-front of multiple objectives is an effective and useful way to represent and assess the tradeoff between different goals properly. The implementation of this approach for ecodesign of hybrid renewable energy systems and ground-mounted PV plants can be found in [223] and [191], respectively.