funMishra09

PURPOSE ^

% Mishra 9 function

SYNOPSIS ^

function [p,dp]=funMishra09(xx)

DESCRIPTION ^

% Mishra 9 function
L. LAURENT -- 17/11/2016 -- luc.laurent@lecnam.net

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Mishra 9 function
0002 %L. LAURENT -- 17/11/2016 -- luc.laurent@lecnam.net
0003 
0004 % sources available here:
0005 % https://bitbucket.org/luclaurent/optigtest/
0006 % https://github.com/luclaurent/optigtest/
0007 
0008 % optiGTest - set of testing functions    A toolbox to easy manipulate functions.
0009 % Copyright (C) 2017  Luc LAURENT <luc.laurent@lecnam.net>
0010 %
0011 % This program is free software: you can redistribute it and/or modify
0012 % it under the terms of the GNU General Public License as published by
0013 % the Free Software Foundation, either version 3 of the License, or
0014 % (at your option) any later version.
0015 %
0016 % This program is distributed in the hope that it will be useful,
0017 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0019 % GNU General Public License for more details.
0020 %
0021 % You should have received a copy of the GNU General Public License
0022 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
0023 
0024 %
0025 %global minimum : f(x)=0 for x=(1,2,3)
0026 %
0027 %Design space: -10<xi<10
0028 
0029 
0030 function [p,dp]=funMishra09(xx)
0031 
0032 %constants
0033 d=[2,5,4,-2,-18];
0034 e=-22;
0035 f=[8,2,2,3,-52];
0036 
0037 %variables
0038 xxx=xx(:,:,1);
0039 yyy=xx(:,:,2);
0040 zzz=xx(:,:,3);
0041 
0042 %evaluation and derivatives
0043 a=d(1)*xxx.^3+d(2)*xxx.*yyy+d(3)*zzz+d(4)*xxx.^2.*zzz+d(5);
0044 b=xxx+yyy.^3+xxx.*yyy.^2+xxx.*zzz.^2+e;
0045 c=f(1)*xxx.^2+f(2)*yyy.*zzz+f(3)*yyy.^2+f(4)*yyy.^3+f(5);
0046 k=xxx+yyy-zzz;
0047 %
0048 pa=a.*b.^2.*c+a.*b.*c.^2+b.^2+k.^2;
0049 p=pa.^2;
0050 if nargout==2
0051     daX=3*d(1)*xxx.^2+d(2)*yyy+2*d(4)*xxx.*zzz;
0052     daY=d(2)*xxx;
0053     daZ=d(3)+d(4)*xxx.^2;
0054     dbX=1+zzz.^2+yyy.^2;
0055     dbY=3*yyy.^2+2*yyy.*xxx;
0056     dbZ=2*xxx.*zzz;
0057     dcX=2*f(1)*xxx;
0058     dcY=f(2)*zzz+2*f(3)*yyy+3*f(4)*yyy.^2;
0059     dcZ=f(2)*yyy;
0060     dkX=1;
0061     dkY=1;
0062     dkZ=-1;
0063     %
0064     dp(:,:,1)=2*pa.*(daX.*b.^2.*c+2*a.*dbX.*b.*c+a.*b.^2.*dcX...
0065         +daX.*b.*c.^2+a.*dbX.*c.^2+2*a.*b.*dcX.*c...
0066         +2*dbX+2*dkX.*k);
0067     dp(:,:,2)=2*pa.*(daY.*b.^2.*c+2*a.*dbY.*b.*c+a.*b.^2.*dcY...
0068         +daY.*b.*c.^2+a.*dbY.*c.^2+2*a.*b.*dcY.*c...
0069         +2*dbY+2*dkY.*k);
0070     dp(:,:,3)=2*pa.*(daZ.*b.^2.*c+2*a.*dbZ.*b.*c+a.*b.^2.*dcZ...
0071         +daZ.*b.*c.^2+a.*dbZ.*c.^2+2*a.*b.*dcZ.*c...
0072         +2*dbZ+2*dkZ.*k);
0073 end
0074 end

Generated on Tue 28-May-2019 16:00:34 by m2html © 2005