**3. DE**

**return** Best\_Vector

Similar to other evolutionary computation methods, DE starts with an initial population that is initialized randomly. After determining the population, a new candidate individual is generated by applying mutation and crossover operators. This candidate then becomes the input of the selection operator, and through a hard selection mechanism between the candidate and the current member of the population, if the candidate is better than the current member, it will enter the next generation; otherwise, the current member remains in the population. Algorithm 2 is the pseudo-code of the standard DE. In the algorithm, NP denotes the population size, D is the dimension size, F is the scaling factor, Cr is the crossover rate, randint (1, D) is the random integer [1, D], and rand is the random real number in [0, 1]. The main operator in DE is the mutation operator. These mutations take advantage of diverse mechanisms and strategies for generating the *donor* vector. In order to distinguish between DE variants, the notation DE/X/Y/Z is proposed by Storn and Price, where DE denotes differential evolution, X denotes the base vector, Y denotes number of difference vectors, and finally Z determines the type of crossover.

The pseudo-code and flowchart (see Figure 3) of the procedure is as follows.

**Algorithm 2** Pseudo-code for classic differential evolution

**Inputs:** Fitness function: f; lb: lower bound; ub: upper bound: Np: population size; T: termination criteria; F: scaling factor/mutation rate; Pc/Cr: crossover probability; D: dimension size. **Output:** Best\_Vector Population = Initialize Population (Np,D,ub,lb) **while** (T = True) **do** Best\_Vector = Evaluate\_Population (Population) Vx = Select\_Random\_Vector (Population) Index = Find\_Index\_of\_Vector(Vx) //Specify row number of a vector Select\_Random\_Vector (Population, v1,v2,v3)//where v1 = v2 = v3 = vx Vy = v1 + F (v2 – v3)// donor vector **for** (*i* = 0;*i* + +;I < D – 1)//Loop for starting Crossover operation **if** (rand*j* [0,1] < Cr) **then** u[*i*]=vx[*i*] **else** u[*i*]=vy[*i*] **end for** //end crossover operation **if** (f(u) ≤ f(vx)) **then** Update Population (u, Index, Population) **end**//While loop

**Figure 3.** Flowchart of classic differential evolution.
