0% found this document useful (0 votes)
29 views21 pages

3

Uploaded by

mohamed9ahmed12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views21 pages

3

Uploaded by

mohamed9ahmed12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

‫بسم هللا الرحمن الرحيم‬

‫‪1‬‬
Lec 2

Differential Evolution (DE) Optimization Algorithm

DR. M. Arafa
Common Benchmark Functions

3
➢ Note that the mathematical symbol for the floor function is ⌊.⌋, and the

mathematical symbol for the ceil function is ⌈ .⌉,

➢ for example: ⌊2.2⌋ = 2 & ⌊2.9⌋ = 2 & ⌈2.2⌉ = 3 & ⌈2.9⌉ = 3


Global Minimum
Test Functions Minimizing Vector 𝑿*
𝒇(𝑿*)

𝑓1 , 𝑓3 , 𝑓 4 , 𝑓5 , 𝑓7 ,
[0 , 0 ,…..…, 0]
𝑓8, 𝑓9, 𝑓10, 𝑓11, 𝑓12,

𝑓2 [-0.5 , -0.5 ,..…, -0.5]


0
[420.96 , 420.96 , .…..…,
𝑓6
420.96 ]

𝑓13 [-1 , -1 ,…..…, -1]

𝑓14 [1, 1 ,…..…, 1]


➢ All these functions are single-objective, unconstrained and have an

optimal values 𝑓 ( 𝑋 ) = 0

➢ According to the modality property, functions 𝑓1, 𝑓2, 𝑓8, 𝑓9, and 𝑓10

are unimodal. The remaining functions are multimodal.

Note that: 𝑓4 is the Rosenbrock function which is unimodal for D < 4 and

multimodal for D ≥ 4 .

➢ According to the separability property, functions 𝑓1, 𝑓2, 𝑓5, 𝑓6, 𝑓8, and

𝑓10 are separable and the others are non-separable.


➢ For embedding more complexity in the benchmark functions, they can

be shifted and/or rotated to investigate the optimizer robustness.

➢ A functions 𝑓 (𝑋) can be rotated to a function 𝑓𝑟 (𝑍) by rotating the

original vector 𝑋 into a vector 𝑍 using a rotation matrix 𝑅 that is

calculated by Salomon's method as:


𝑅 𝑋 , 𝑖𝑓 𝑋 ∗ = [ 0 , 0 , 0 , … … … . , 0 ]
𝑧=൞
𝑅 𝑋 − 𝑋∗ + 𝑋∗ , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

where 𝑅 is an orthogonal square matrix (𝐷 x 𝐷 ).


Remember that:

➢ If the transpose of the matrix is equal to the original matrix, then the matrix is

called a symmetric matrix.

➢ But if the transpose of the matrix is equal to the inverse of the original matrix,

then it is called an orthogonal matrix.

➢ Thus, the orthogonal matrix has the following properties:

𝑅𝑇 = 𝑅 −1 ( or 𝑅 𝑅𝑇 = 𝐼 )
det(𝑅) = ±1

where 𝐼 is the identity matrix and det(𝑅) is the determinant of the matrix 𝑅.
Examples of orthogonal rotation matrices
2-D Rotation
cos 𝜃 − 𝑠𝑖𝑛𝜃
𝑅𝑥 =
sin 𝜃 cos 𝜃

➢ This matrix rotates points in the xy plane counterclockwise by an


angle θ about the x-axis of a two-dimensional Cartesian coordinate system.
3-D Rotation 1 0 0
𝑅𝑥 = 0 cos 𝜃 − 𝑠𝑖𝑛𝜃
0 sin 𝜃 cos 𝜃

cos 𝜃 0 sin 𝜃
𝑅𝑦 = 0 1 0
−sin 𝜃 0 cos 𝜃

cos 𝜃 −sin 𝜃 0
𝑅𝑧 = sin 𝜃 cos 𝜃 0
0 0 1
➢ For a three-dimensional Cartesian coordinate system, 𝑅𝑥 , 𝑅𝑦 , and 𝑅𝑧 rotate vectors

(or points) counterclockwise by an angle θ about the x-axis, y-axis and z-axis,
respectively.

➢ The rotation matrix 𝑅 = 𝑅𝑧 𝑅𝑦 𝑅𝑥 , rotates vectors counterclockwise by an


angle θ about axes x, y and z, respectively. (note that it is not necessary the
angles of 𝑅𝑥 , 𝑅𝑦 , and 𝑅𝑧 to be equal.
14
15
16
17
18
19
MATLAB Code to Draw 3-D Plots of Benchmark Functions

% Example : Draw the 3-D map for Ackley function

<< x=[-5:0.1:5];

<<[x1 , x2] = meshgrid(x);

<< f = 20+exp(1) -20*exp(-0.2*sqrt(0.5*(x1.^2+x2.^2)))-

exp(0.5*(cos(2*pi.*x1)+cos(2*pi.*x2)));

<< surfc(x1,x2,f) % Draw 3-D plot

<< colormap(hsv)

% control the color map , for more colors, replace hsv with

% one of these words: jet – hot – cool – spring – summer – autumn – winter –

% gray – bone – copper – pink - lines

You might also like