%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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 osyczka %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%% MAIN PROGRAM %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% key = 'MIDACO_LIMITED_VERSION___________________ALL_RIGHTS_RESERVED'; problem.func = @problem_function; % Call is [f,g] = problem_function(x) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Step 1: Problem definition %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 1.A: Problem dimensions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% problem.o = 2; % Number of objectives problem.n = 6; % Number of variables (in total) problem.ni = 0; % Number of integer variables (0 <= ni <= n) problem.m = 6; % Number of constraints (in total) problem.me = 0; % Number of equality constraints (0 <= me <= m) % STEP 1.B: Lower and upper bounds 'xl' & 'xu' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% problem.xl = [ 0.0, 0.0, 1.0, 0.0, 1.0, 0.0 ]; problem.xu = [ 10.0, 10.0, 5.0, 6.0, 5.0, 10.0 ]; % STEP 1.C: Starting point 'x' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% problem.x = problem.xl; % Here for example: starting point = lower bounds %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Step 2: Choose stopping criteria and printing options %%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 2.A: Stopping criteria %%%%%%%%%%%%%%%%%%%%%%%%%%%%% option.maxeval = 1000000; % Maximum evaluation budget (e.g. 1000000) option.maxtime = 60*60*24; % Maximum time limit (e.g. 60*60*24 = 1 Day) % STEP 2.B: Printing options %%%%%%%%%%%%%%%%%%%%%%%%%%%% option.printeval = 100000; % Print-Frequency for current best solution (e.g. 1000) option.save2file = 100000; % Save TXT-files, history of up to 100000 points option.resumable = 0; % Resumable mode [0=NO/1=YES] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Step 3: Choose MIDACO parameters (FOR ADVANCED USERS) %%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% option.param( 1) = 0; % ACCURACY option.param( 2) = 0; % SEED option.param( 3) = 0; % FSTOP option.param( 4) = 0; % ALGOSTOP option.param( 5) = 0; % EVALSTOP option.param( 6) = -10; % FOCUS option.param( 7) = 0; % ANTS option.param( 8) = 0; % KERNEL option.param( 9) = 0; % ORACLE option.param(10) = 3000; % PARETOMAX option.param(11) = 0.0001; % EPSILON option.param(12) = 100; % BALANCE option.param(13) = 0; % CHARACTER option.param(14) = 0; % SURROGATE option.param(15) = 0; % PMISQP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Step 4: Choose Parallelization Factor %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Call MIDACO solver %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [ solution ] = midaco( problem, option, key ); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % disp(solution.f) % disp(solution.g) % disp(solution.x) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF MAIN %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% OPTIMIZATION PROBLEM %%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [ f, g ] = problem_function( x ) % Objective functions F(X) f(1) = -( 25.0*(x(1)-2.0)^2 + (x(2)-2.0)^2 + (x(3)-1.0)^2 ... + (x(4)-4.0)^2 + (x(5)-1.0)^2 ); f(2) = x(1)^2 + x(2)^2 + x(3)^2 + x(4)^2 + x(5)^2 + x(6)^2; % Inequality constraints G(X) >= 0 g(1) = x(1) + x(2) - 2.0; g(2) = 6.0 - x(1) - x(2); g(3) = 2.0 - x(2) + x(1); g(4) = 2.0 - x(1) + 3.0*x(2); g(5) = 4.0 - (x(3)-3.0)^2 - x(4); g(6) = (x(5)-3.0)^2 + x(6) - 4.0; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%