Numerical Example:: Maximize + 5 + 200 5 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Numerical Example:

maximize 𝑓 𝑥 = −𝑥 2 + 5𝑥 + 200; −5 ≤ 𝑥 ≤ 5

Assume N=4, initial positions to be [4.7 2.1 − 4.3 3.4 ]𝑇 , initial


velocities to be zero, w=c1=c2=1.0, r1=0.33, r2=0.18.

Compute the positions of the particles after one iteration.


Solution:

Objective function values at these initial points (i.e. positions) are

and
Hence
x1 1 =x1  0   V1 1 =4.23
x 21  x2  0   V2 1  2.1
x 3 1 =x 3  0  +V3 (1)= -3.15
x 4 (1)=x 4  0  +V4 (1)=3.17
Objective function values at new positions are

Hence,

and

You might also like