-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoldPrice.m
More file actions
16 lines (16 loc) · 648 Bytes
/
Copy pathGoldPrice.m
File metadata and controls
16 lines (16 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function obj = GoldPrice(x)
%----------------------------------------------------------
% Goldstein-Price Test Function for Nonlinear Optimization
% Taken from "Towards Global Optimisation 2",edited by L.C.W. Dixon and G.P.
% Szego, North-Holland Publishing Company, 1978. ISBN 0 444 85171 2
%
% -2 <= x1 <= 2
% -2 <= x2 <= 2
% fmin = 3
% xmin =[ 0, -1]
%
% http://www4.ncsu.edu/~definkel/research/index.html
%---------------------------------------------------------
x1 = x(:,1); x2 = x(:,2);
obj =(1+(x1+x2+1).^2.*(19-14.*x1+3.*x1.^2-14.*x2+6.*x1.*x2+3.*x2.^2))...
.*(30+(2.*x1-3.*x2).^2.*(18-32.*x1+12.*x1.^2+48.*x2-36.*x1.*x2+27.*x2.^2));