%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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 ex5_3_3_distillation key = '************************************************************'; problem.func = @problem_function; problem.o = 1; % Number of objectives problem.n = 62; % Number of variables (in total) problem.ni = 0; % Number of integer variables (0 <= ni <= n) problem.m = 53; % Number of constraints (in total) problem.me = 53; % 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 ... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ... 0, 0, 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 = [600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600 ... 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600 ... 600, 600, 600, 600, 600, 600, 600, 600, 1, 1, 1, 1 ... 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ... 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ... 1, 1]; problem.x = problem.xl; % Starting point: lower bounds option.maxeval = 1000000; option.maxtime = 60*60*24; option.printeval = 200; option.save2file = 1; option.resumable = 0; option.param( 1) = 1e-08; % ACCURACY option.param( 2) = 0; % SEED option.param( 3) = 3.234018224 + 3.234018224*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) = 0; % SURROGATE option.param(15) = 2; % 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 ) g = zeros(1,53); f(1) = -(-((0.00132223 + 0.0016446*x(33) + 0.0018611*x(34) ... + 0.001262*x(35))*x(6) + (-9.40700000000017e-5 + 0.0015625*x(43) ... + 0.0091604*x(44) + 0.0076758*x(45))*x(15) + (0.00457315 ... - 0.001748*x(53) - 0.0002583*x(54) - 0.0004691*x(55))*x(24))) ... + 1.68776; g(1) = x(1) + x(2) + x(3) + x(4) + x(5) - 600; g(2) = -x(1) + x(6) - x(17) - x(26); g(3) = -x(2) - x(11) + x(15) - x(27); g(4) = -x(3) - x(12) - x(21) + x(24); g(5) = x(7) - x(8) - x(9); g(6) = x(10) - x(11) - x(12) - x(13) - x(14); g(7) = x(16) - x(17) - x(18) - x(19); g(8) = x(20) - x(21) - x(22) - x(23); g(9) = x(25) - x(26) - x(27) - x(28) - x(29); g(10) = x(30) - x(31) - x(32); g(11) = x(7)*x(37) - 0.85*x(6)*x(33); g(12) = x(16)*x(48) - 0.85*x(15)*x(44); g(13) = x(25)*x(59) - x(24)*x(55); g(14) = x(10)*x(40) - x(6)*x(34); g(15) = x(20)*x(51) - 0.85*x(15)*x(45); g(16) = x(30)*x(62) - 0.85*x(24)*x(56); g(17) = x(6)*x(33) - x(7)*x(37) - x(10)*x(39); g(18) = x(6)*x(34) - x(7)*x(38) - x(10)*x(40); g(19) = x(6)*x(35) - x(10)*x(41); g(20) = x(6)*x(36) - x(10)*x(42); g(21) = x(15)*x(43) - x(16)*x(47); g(22) = x(15)*x(44) - x(16)*x(48) - x(20)*x(50); g(23) = x(15)*x(45) - x(16)*x(49) - x(20)*x(51); g(24) = x(15)*x(46) - x(20)*x(52); g(25) = x(24)*x(53) - x(25)*x(57); g(26) = x(24)*x(54) - x(25)*x(58); g(27) = x(24)*x(55) - x(25)*x(59) - x(30)*x(61); g(28) = x(24)*x(56) - x(25)*x(60) - x(30)*x(62); g(29) = x(17)*x(47) + x(26)*x(57) - x(6)*x(33) + 0.25*x(1); g(30) = x(17)*x(48) + x(26)*x(58) - x(6)*x(34) + 0.333*x(1); g(31) = x(17)*x(49) + x(26)*x(59) - x(6)*x(35) + 0.167*x(1); g(32) = x(26)*x(60) - x(6)*x(36) + 0.25*x(1); g(33) = x(11)*x(39) + x(27)*x(57) - x(15)*x(43) + 0.25*x(2); g(34) = x(11)*x(40) + x(27)*x(58) - x(15)*x(44) + 0.333*x(2); g(35) = x(11)*x(41) + x(27)*x(59) - x(15)*x(45) + 0.167*x(2); g(36) = x(11)*x(42) + x(27)*x(60) - x(15)*x(46) + 0.25*x(2); g(37) = x(12)*x(39) - x(24)*x(53) + 0.25*x(3); g(38) = x(12)*x(40) + x(21)*x(50) - x(24)*x(54) + 0.333*x(3); g(39) = x(12)*x(41) + x(21)*x(51) - x(24)*x(55) + 0.167*x(3); g(40) = x(12)*x(42) + x(21)*x(52) - x(24)*x(56) + 0.25*x(3); g(41) = x(8)*x(37) + x(13)*x(39) + x(18)*x(47) + x(28)*x(57) + 0.25*x(4) ... - 50; g(42) = x(8)*x(38) + x(13)*x(40) + x(18)*x(48) + x(22)*x(50) + x(28)*x(58) ... + 0.222*x(4) - 100; g(43) = x(13)*x(41) + x(18)*x(49) + x(22)*x(51) + x(28)*x(59) + x(31)*x(61) ... + 0.167*x(4) - 40; g(44) = x(13)*x(42) + x(22)*x(52) + x(28)*x(60) + x(31)*x(62) + 0.25*x(4) ... - 100; g(45) = x(33) + x(34) + x(35) + x(36) - 1; g(46) = x(37) + x(38) - 1; g(47) = x(39) + x(40) + x(41) + x(42) - 1; g(48) = x(43) + x(44) + x(45) + x(46) - 1; g(49) = x(47) + x(48) + x(49) - 1; g(50) = x(50) + x(51) + x(52) - 1; g(51) = x(53) + x(54) + x(55) + x(56) - 1; g(52) = x(57) + x(58) + x(59) + x(60) - 1; g(53) = x(61) + x(62) - 1; end