%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % MIDACO solves Multi-Objective Mixed-Integer Non-Linear Problems: % % % Minimize F_1(X),... F_O(X) where X(1,...N-NI) is CONTINUOUS % and X(N-NI+1,...N) is DISCRETE % % subject to G_j(X) = 0 (j=1,...ME) equality constraints % G_j(X) >= 0 (j=ME+1,...M) inequality constraints % % and bounds XL <= X <= XU % % % The problem statement of this example is given below. You can use % this example as template to run your own problem. To do so: Replace % the objective functions 'F' (and in case the constraints 'G') given % here with your own problem and follow the below instruction steps. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function ex2_1_8_surrogate key = '************************************************************'; problem.func = @problem_function; problem.o = 1; % Number of objectives problem.n = 24; % Number of variables (in total) problem.ni = 0; % Number of integer variables (0 <= ni <= n) problem.m = 10; % Number of constraints (in total) problem.me = 10; % Number of equality constraints (0 <= me <= m) problem.xl = [0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0]; problem.xu = [100 100 100 100 100 100 100 100 100 100 100 100 ... 100 100 100 100 100 100 100 100 100 100 100 100]; problem.x = problem.xl; % Starting point: lower bounds option.maxeval = 1000; option.maxtime = 60*60*24; option.printeval = 1; option.save2file = 1; option.resumable = 0; option.param( 1) = 0; % ACCURACY option.param( 2) = 2; % SEED option.param( 3) = 15639 + 15639*1e-4; % FSTOP option.param( 4) = 0; % ALGOSTOP option.param( 5) = 0; % EVALSTOP option.param( 6) = 0; % FOCUS option.param( 7) = 0; % ANTS option.param( 8) = 0; % KERNEL option.param( 9) = 0; % ORACLE option.param(10) = 0; % PARETOMAX option.param(11) = 0; % EPSILON option.param(12) = 0; % BALANCE option.param(13) = 0; % CHARACTER option.param(14) = 4; % SURROGATE option.param(15) = 0; % PMISQP option.parallel = 0; % Serial: 0 or 1, Parallel: 2,3,4,5,6,7,8... option.paradigm = 0; % Parallel mode: 0 = parfor, 1 = vectorized [F,G] = func(X) [ solution ] = midaco( problem, option, key ); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [ f, g ] = problem_function( x ) t = 300*x(1)-7*x(1)*x(1)-4*x(2)*x(2)+270*x(2) ... -6*x(3)*x(3)+460*x(3)-8*x(4)*x(4)+800*x(4)-12*x(5)*x(5)+740*x(5); t = t-9*x(6)*x(6)+600*x(6)-14*x(7)*x(7)+540*x(7) ... -7*x(8)*x(8)+380*x(8)-13*x(9)*x(9)+300*x(9)-12*x(10)*x(10)+490*x(10); t = t-8*x(11)*x(11)+380*x(11)-4*x(12)*x(12)+760*x(12) ... -7*x(13)*x(13)+430*x(13)-9*x(14)*x(14)+250*x(14)-16*x(15)*x(15)+390*x(15); t = t-8*x(16)*x(16)+600*x(16)-4*x(17)*x(17)+210*x(17) ... -10*x(18)*x(18)+830*x(18)-21*x(19)*x(19)+470*x(19)-13*x(20)*x(20)+680*x(20); t = t-17*x(21)*x(21)+360*x(21)-9*x(22)*x(22)+290*x(22) ... -8*x(23)*x(23)+400*x(23)-4*x(24)*x(24)+310*x(24); f(1) = t; g(1) = x(1)+x(2)+x(3)+x(4)-8; g(2) = x(5)+x(6)+x(7)+x(8)-24; g(3) = x(9)+x(10)+x(11)+x(12)-20; g(4) = x(13)+x(14)+x(15)+x(16)-24; g(5) = x(17)+x(18)+x(19)+x(20)-16; g(6) = x(21)+x(22)+x(23)+x(24)-12; g(7) = x(1)+x(5)+x(9)+x(13)+x(17)+x(21)-29; g(8) = x(2)+x(6)+x(10)+x(14)+x(18)+x(22)-41; g(9) = x(3)+x(7)+x(11)+x(15)+x(19)+x(23)-13; g(10) = x(4)+x(8)+x(12)+x(16)+x(20)+x(24)-21; end