You are on page 1of 1

PETR-571D Problem Set #4: Meta-heuristic optimization algorithms

Data Assigned: April 1st, 2020; Due: May 1st, 2020


Program a particle swarm optimizer and used it find the maxima and minima for the following functions:
Problem 1 Find the minimas for the McCormick function as expressed below:

f ( x, y ) = sin( x + y ) + ( x − y ) − 1.5 x + 2.5 y + 1


2

Constrains imposed to the optimization is: −1.5  x  4; −3  y  4

(1) Specify the hyper parameters used in the PSO optimizer


(2) Plot the global found by the PSO algorithm as a function of PSO iteration level
(3) Repeat you PSO iterations for five times and observe the disparities of the results.

Problem 2 For Himmelblau's function as expressed below:

( ) ( )
2 2
f ( x, y ) = x 2 + y − 11 + x + y 2 − 7 , within the range of −5  x  5; −5  y  5

(1) Generate a three-dimenal heat map of the function within the range of x and y, you may use
surface plot of the z=f(x,y) as a function of x, y.
(2) How many minimas can you identify from the surface map generated by Question 2.1?
(3) Impose PSO optimizer to find the at least one of the minimas of Himmelblau's function.
(4) In order to find all the local minimas, what would you suggest to do?
Hint: there are four local minimas within the specified searching range.

You might also like