Example_multiobjective

PURPOSE ^

% Multi-objective example (optiGTest class)

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% Multi-objective example (optiGTest class)
 L. LAURENT --  16/05/2018 -- luc.laurent@lecnam.net

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Multi-objective example (optiGTest class)
0002 % L. LAURENT --  16/05/2018 -- 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) 2018  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 %% load the function
0025 Fun=optiGTest('OsyczkaKundu');
0026 
0027 %% Demo mode
0028 Fun.demo
0029 
0030 %% available dimensions (Inf= function defined for any dimension)
0031 Fun.dimAvailable
0032 
0033 %% Change dimension
0034 Fun.dim=3;
0035 
0036 %% evaluation of the function (responses and gradients)
0037 X=[0 1 1 0 1 0;
0038     3 4 5 1 -1 2;
0039     6 7 8 9 1 -5];
0040 % Z=responses, GZ=gradients (in cell) GZr=gradients (in array)
0041 [Z,GZ,GZr]=Fun.evalObj(X);
0042 Z 
0043 GZ
0044 GZr
0045 
0046 %% evaluation of the constraint function(s) (responses and gradients)
0047 [Zc,GZc,GZrc]=Fun.evalCons(X);
0048 Zc
0049 GZc
0050 GZrc
0051 
0052 %% check constraint violation
0053 CV=Fun.checkCons(X);
0054 CV
0055 
0056 %% check the function
0057 Fun.checkPb
0058 
0059 %% list available problems
0060 dispAvailablePb

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