% Gulf Research function L. LAURENT -- 16/11/2016 -- luc.laurent@lecnam.net
0001 %% Gulf Research function 0002 %L. LAURENT -- 16/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(x1,x2)=0 for (50,25,1.5) 0026 % 0027 %Design space: 0<xi<60 0028 0029 %similar to Weibull function 0030 0031 function [p,dp]=funGulfResearch(xx) 0032 0033 %constants 0034 a=99; 0035 b=25; 0036 c=-50; 0037 d=1/1.5; 0038 f=0.01; 0039 0040 %evaluation and derivatives 0041 x=xx(:,:,1); 0042 y=xx(:,:,2); 0043 z=xx(:,:,3); 0044 % 0045 listI=reshape(1:a,1,1,a); 0046 % 0047 zi=f*listI; 0048 yi=b+(c*log(1./zi)).^d; 0049 % 0050 pa=yi-z; 0051 pb=pa.^y./x; 0052 pc=exp(-pb); 0053 pd=pc-zi; 0054 % 0055 p=sum(pd.^2,3); 0056 0057 % 0058 if nargout==2 0059 % 0060 dp=zeros(size(xx)); 0061 % 0062 dp(:,:,1)=2*sum(pb./x.*pc.*pd,3); 0063 dp(:,:,2)=2*sum(-log(pa)./x.*pb.*pc.*pd,3); 0064 dp(:,:,3)=2*sum(pa.^(y-1)./x.*y.*pc.*pd,3); 0065 end 0066 end