• Keine Ergebnisse gefunden

4.3 Multi-objective optimization

4.3.3 The NSGA-II

NSGA-II introduced by Deb et al. (2002) is a new variant of the original non-dominated sorting genetic algorithm (NSGA) which was first proposed by Srinivas and Deb (1995). It is a multi-objective optimization algorithm, and by its name, belongs to the family of genetic algorithm (and larger, evolutionary algorithm family). Compared to the original version, in NSGA-II, three new developed features were presented:

- The ―crowding distance‖ for measuring the density of the individuals in a population. In the old version NSGA, the sharing parameter is used instead.

- The elitism for making sure that all the best solutions which have been so far evaluated will be kept for the evolution in the next step.

The algorithm and it variants (e.g. -NSGA-II) have been applied in many studies in the water resource sector (Gupta et al., 1998; Kollat and Reed, 2007; Tang et al., 2007; Shafii and De Smedt, 2009).

In genetic algorithms, an element 𝑥 in 𝐷 is often called an individual, whose components𝑥𝑖, 𝑖 = 1. . |𝐷| are called single ―genes‖ (parameters). Those genes form a ―chromosome‖ (parameter set). Therefore, it may be said that ―chromosome‖ is an intrinsic property of an individual because it defines the individual (―chromosome to individual‖ is the same as ―coordinates to point‖). In a specific context, when the individual 𝑥 is mentioned, it may refer to its chromosome 𝑥! That‘s because genetic operators are actually applied on the chromosome of individuals. A group of individuals, 𝑃 (a subset of 𝐷) is called a population. 𝐹(𝑥) is called the fitness vector (or fitness) of the individual 𝑥. One may say that 𝑥 has an extrinsic property 𝐹 𝑥 .

In Chapter 5, the descriptions of the core of NSGA-II are introduced. Below are the main features mentioned above and covered by NSGA-II.

4.3.3.1 Fast non-dominated sorting algorithm

Fast non-dominated sorting algorithm is a way to implement the Pareto ranking proposed by Deb et al. (2002). This algorithm helps decrease significantly the complexity of the sorting algorithm which was introduced in the older version NSGA. The algorithm is presented in Table 4.3-2.

Table 4.3-2: The fast non-dominated sorting algorithm in NSGA-II

Step Descriptions

Input: A population 𝑃 with size of 𝑛, each individual 𝑝 ∈ 𝑃 are given fitness

Goal: implement a fast non-dominated sorting over a given population P of the size forming the several Pareto sets at different ranking.

1 For every individual 𝑝 ∈ 𝑃, initialize:

- A set containing all individuals dominated 𝑝: 𝑆𝑝 = ∅ (or 𝑝. 𝑆) (*) - A counter for the number of individuals dominating 𝑝: 𝑁𝐷𝑝 = 0 (𝑝. 𝑁𝐷) - The Pareto set of 𝑃: 𝐹1= ∅

2 For every 𝑝 ∈ 𝑃 For every 𝑞 ∈ 𝑃

If 𝑝 dominates 𝑞 then 𝑆𝑝 = 𝑆𝑝∪ {𝑞}

else if 𝑞 dominates 𝑝 then 𝑁𝐷𝑝 = 𝑁𝐷𝑝+ 1 If 𝑁𝐷𝑝 = 0, 𝐹1 = 𝐹1∪ {𝑝}

Output step 2: 𝐹1≠ ∅, 𝑆𝑝, 𝑁𝐷𝑝, ∀𝑝 ∈ 𝑃 3 Initialize counter 𝑖 = 1

Do until 𝐹𝑖 = ∅ 𝐻 = ∅

For every 𝑝 ∈ 𝐹𝑖 For every 𝑞 ∈ 𝑆𝑝

𝑁𝐷𝑞= 𝑁𝐷𝑞− 1 If 𝑁𝐷𝑝 = 0, 𝐻 = 𝐻 ∪ 𝑞 𝑖 = 𝑖 + 1

𝐹𝑖 = 𝐻

Output step 3: 𝐹𝑘, 𝑖−1𝑘=1𝐹𝑘 = 𝑃. (each individual has another property which is its rank in the considered population.)

(*) Note:

- Both notations 𝑆𝑝 and 𝑝. 𝑆 have the same meaning the ―property‖ or ―attribute‖ 𝑆 of an

―object‖ 𝑝. (𝑝. 𝑆 is more common used in object-oriented programming languages) - Analogous rule is applied to notation 𝑝. 𝑁𝐷 and 𝑁𝐷𝑝.

4.3.3.2 Density estimation

Crowding distance approaches aim at obtaining a uniform spread of solutions along the best known Pareto front without using a fitness sharing parameter. NSGA-II uses a crowding distance method as follows (Table 4.3-3):

Table 4.3-3: The algorithm for ―crowding distance‖ assignment in NSGA-II

Step Descriptions

Input: a Non-dominated set 𝑁𝑆 containing 𝑛 individuals

Goal: Compute ―crowding distance‖ of all the elements. This algorithm stays the same for both maximization of minimization problem.

1 Assign zero to the ―crowding distance‖ of all the element of 𝑁𝑆:

o 𝑁𝑆 𝑖 . 𝑐𝑑 = 0, 𝑖 = 1. . 𝑛 2 Set 𝑘 = 1.

3 Sort PS based on the objective 𝑘 o 𝑁𝑆 = 𝑠𝑜𝑟𝑡(𝑁𝑆)

Assign ―crowding distance‖  to both the first and last element of the PS as:

o 𝑁𝑆 1 . 𝑐𝑑 = ∞; 𝑁𝑆 𝑛 . 𝑐𝑑 = ∞

And assign the ―crowding distance‖ to other elements of PS as:

for 𝑖 =2 to 𝑛 − 1 compute:

o 𝐴 = |𝑁𝑆 𝑖 + 1 . 𝑓𝑘− 𝑁𝑆 𝑖 − 1 . 𝑓𝑘| o 𝐵 = |𝑁𝑆 1 . 𝑓𝑘− 𝑁𝑆 𝑛 . 𝑓𝑘|

o 𝑁𝑆 𝑖 . 𝑐𝑑 = 𝑁𝑆 𝑖 . 𝑐𝑑 + 𝐴/𝐵 1

4 Increase 𝑘 by 1, back to Step 2 until 𝑘 exceeds the number of objectives Note:

- 𝑁𝑆 𝑖 . 𝑐𝑑 denotes crowding distance value (―attribute‖) of the individual number 𝑖𝑡𝑕 in 𝑁𝑆 (―object‖ 𝑁𝑆 𝑖 ). (see also Table 4.3-2)

- 𝑁𝑆 𝑖 . 𝑓𝑘 denotes the 𝑘𝑡𝑕-objective value of the individual number 𝑖𝑡𝑕 in 𝑁𝑆.

4.3.3.3 Genetic operator

Tournament selection

In GAs, selection is the stage of choosing ―appropriate‖ individuals in a population to form a mating pool for later breeding. Many different selection schemes for GAs are available. Among them, tournament selection has gained more preference because it satisfies various criteria such as simplicity, efficiency for parallel and non-parallel architectures, and flexibility in changing the selection pressure to be adaptive in different problems. Table 4.3-4 illustrates the tournament selection adopted in the NSGA-II.

1 Normalization step (not introduced in the original version of NSGA II)

Table 4.3-4: Tournament selection algorithm in NSGA-II

Step Descriptions

Input: A population 𝑃 of size 𝑛 of which all individuals are given fitness and ―density‖

Goal: A mating pool 𝑀𝑃 with a predefined size of 𝑚 < 𝑛 1 Predefine the selection pressure factor: 𝑘 (*)

Initialize 𝑀𝑃 = ∅

2 Pick 𝑘 individuals of 𝑃 forming a temporary set 𝑅: (with or without replacement) Set 𝑏𝑒𝑠𝑡𝑅 = {𝑝 ∈ 𝑅, 𝑝 has smallest rank value} (𝑏𝑒𝑠𝑡𝑅 will never be empty) If 𝑏𝑒𝑠𝑡𝑅 contains only one individual

add that individual to 𝑀𝑃 else

set 𝑏𝑒𝑠𝑡𝐶𝐷 = {p ∈ 𝑏𝑒𝑠𝑡𝑅, 𝑝 has largest "density" value}

if 𝑏𝑒𝑠𝑡𝐶𝐷 contains only one individual add that individual to 𝑀𝑃

else

select randomly an individual in 𝑏𝑒𝑠𝑡𝐶𝐷 and add it to 𝑀𝑃 3 Back to step 2 until the size of 𝑀𝑃 equals 𝑚

(*) Notes: the selection of the pressure factor 𝑘 is dependent on the specific application.

Simulated Binary Crossover

In genetic algorithms, the crossover operator is a very important operator. It is a binary operation (because two individuals are needed for the mapping). Simulated binary crossover (SBX) was proposed by Deb and Agrawal (1995). It was designed with respect to the one-point crossover properties in binary-code GA. In this operator, the search power is defined by ―similarity‖

probability of a pair of parent solutions to their offspring. This is illustrated in Table 4.3.5.

Table 4.3-5: Binary Simulated Crossover (SBX) operator

Step Descriptions

Input: Two individuals 𝑥1, 𝑥2 (parents) in 𝐷 Goal: Their offspring 𝑐1, 𝑐2 (children)

1 Predefine: the ―Spread factor‖ (defining the ―gene similarity‖ probability of the offspring to their parents): 𝛽 ≥ 0 (*)

2 Compute:

𝑥 = 𝑥1+ 𝑥2

𝑐1,2 = 𝑥 ± 0.5𝛽(𝑥1− 𝑥2)

(*) Note:

- If 𝛽 > 1 then the crossover is expanding.

- If 𝛽 = 1 then the crossover is stationary.

- If 𝛽 < 1 then the crossover is contracting.

- The probability density distribution of 𝛽 is illustrated in Figure 4.3-3. (Probability of occurrence 𝛽 ≈ 1 is higher than any other 𝛽 value.)

Figure 4.3-3: Probability distribution of the ―Spread factor‖ 𝛽 Polynomial Mutation

In GA, mutation used to maintain genetic diversity from one generation of a population to the next. It is analogous to biological mutation. Because it needs one individual to implement the operation, it is a unary operation.

Table 4.3-6: Polynomial Mutation operator

Step Descriptions

Input: An individual 𝑥 in 𝐷

(assuming that 𝑥𝑖𝐿 ≤ 𝑥𝑖≤ 𝑥𝑖𝑈, ∆𝑖= 𝑥𝑖𝑈− 𝑥𝑖𝐿, 𝑖 = 1. . |𝐷|)

Goal: A new mutated individual 𝑐 in 𝐷 1 Predefine the factor 𝛿 ∈ (−1,1) (*)

2 Compute:

𝑐𝑖= 𝑥𝑖+ 𝛿∆𝑖, 𝑖 = 1. . |𝐷|

(*) Note:

- The probability density distribution of 𝛿 is illustrated in Figure 4.3-4.

Figure 4.3-4: Probability distribution of the factor 𝛿 4.3.3.4 Elitism

In evolutionary algorithms, the concept of ―elitism‖ is often used. It means that the best solutions found hitherto during the search of the current generation survive to the next generation. In the context of multi-objective optimization problem, the best solutions mean the non-dominated solutions in the generation under consideration. Not all GAs algorithms use this property, especially in the early versions. For example, the vector evaluated genetic algorithm (VEGA,

Schaffer, 1985), being considered as the first multi-objective GA, did not use this concept.

Particularly, NSGA (the early version of NSGA-II) did not use this concept either. Elitism is important for the convergence properties of evolutionary algorithms.

Recent GAs, for example NSGA-II, often use elitism concept. NSGA-II uses a fixed population size (N). When the current population is coupled with its offspring having the same size (N), it doubles the size of this temporary population of which each individual will be ranked and assigned the density again. After this step, the best N solutions will be selected to form the new population (see chapter 5).