type test19 function S=test(x) % Papageorgiou, 1996 % % x0 = 2 % goals: S* = [0.5 0.5]' % weights: w = [0.5 0.5]' % xo = 0.1429 % S(xo) = [1.0102 1.0102]' w=0.5; S=w*(1+0.5*x.^2)+(1-w)*(4*(x-0.5).^2+0.5); % [x,S,ns]=bfgs('test19',2) [x,S,ns]=bfgs('test19',2) Directional Iteration Func-count f(x) Step-size derivative 1 1 6.25 0.255102 -49 2 6 0.805556 0.222222 0 Optimization terminated successfully: Search direction less than 2*options.TolX x = 0.4444 S = 0.8056 ns = 7 edit test19 disp(sprintf('%d',feature('SessionTool'))) 0 ; dbstatus dbstack dbstack ; disp(which('test19')); v:\cursos\pos\otimiza\aulas\test19.m mdbstatus 'v:\cursos\pos\otimiza\aulas\test19.m' disp(which('test19')); v:\cursos\pos\otimiza\aulas\test19.m clear 'v:\cursos\pos\otimiza\aulas\test19.m' eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('pareto19')); disp(char(which('pareto19','-all'))); eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.4444 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.4444 eval( 'if exist(''goals'',''var''), mauifunc(goals), end', ''); eval( 'if exist(''bfgs'',''var''), mauifunc(bfgs), end', ''); eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 7 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.4444 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 0.8056 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.4444 eval( 'if exist(''bfgs'',''var''), mauifunc(bfgs), end', ''); eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''goals'',''var''), mauifunc(goals), end', ''); disp(which('pareto19')); disp(char(which('pareto19','-all'))); pareto19 ??? Undefined function or variable 'pareto19'. cd(cd) pareto19 Directional Iteration Func-count f(x) Step-size derivative 1 1 9.5 0.131944 -144 2 6 0.5 0.125 -6.66e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.85 0.146281 -121 2 6 0.562329 0.136986 2.44e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.2 0.164 -100 2 6 0.624242 0.151515 1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.55 0.18642 -81 2 6 0.685593 0.169492 -9.99e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.9 0.215625 -64 2 6 0.746154 0.192308 1.78e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.25 0.255102 -49 2 6 0.805556 0.222222 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.6 0.311111 -36 2 6 0.863158 0.263158 -2e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.95 0.396 -25 2 6 0.917742 0.322581 -1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.3 0.5375 -16 2 6 0.966667 0.416667 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.65 0.811111 -9 2 6 1.00294 0.588235 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3 1 -4 2 6 1 1 0 Optimization terminated successfully: Search direction less than 2*options.TolX xo xo = Columns 1 through 7 0.5000 0.4932 0.4848 0.4746 0.4615 0.4444 0.4211 Columns 8 through 11 0.3871 0.3333 0.2353 -0.0000 plot(w,xo) eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 plot(xo,S) plot(xo,So) eval( 'if exist(''test19'',''var''), mauifunc(test19), end', ''); eval( 'if exist(''global'',''var''), mauifunc(global), end', ''); eval( 'if exist(''goals'',''var''), mauifunc(goals), end', ''); eval( 'if exist(''x0'',''var''), mauifunc(x0), end', ''); dbstack ; disp(which('test19')); v:\cursos\pos\otimiza\aulas\test19.m mdbstatus 'v:\cursos\pos\otimiza\aulas\test19.m' eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''bfgs'',''var''), mauifunc(bfgs), end', ''); eval( 'if exist(''test19'',''var''), mauifunc(test19), end', ''); eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); Columns 1 through 7 0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 Columns 8 through 11 0.7000 0.8000 0.9000 1.0000 eval( 'if exist(''F1'',''var''), mauifunc(F1), end', ''); eval( 'if exist(''So'',''var''), mauifunc(So), end', ''); Columns 1 through 7 0.5000 0.5623 0.6242 0.6856 0.7462 0.8056 0.8632 Columns 8 through 11 0.9177 0.9667 1.0029 1.0000 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''F1'',''var''), mauifunc(F1), end', ''); eval( 'if exist(''F2'',''var''), mauifunc(F2), end', ''); eval( 'if exist(''F2'',''var''), mauifunc(F2), end', ''); eval( 'if exist(''F1'',''var''), mauifunc(F1), end', ''); eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 disp(which('pareto19')); v:\cursos\pos\otimiza\aulas\pareto19.m clear 'v:\cursos\pos\otimiza\aulas\pareto19.m' eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.5000 0.4932 0.4848 0.4746 0.4615 0.4444 0.4211 Columns 8 through 11 0.3871 0.3333 0.2353 -0.0000 eval( 'if exist(''bfgs'',''var''), mauifunc(bfgs), end', ''); clear functions pareto19 Directional Iteration Func-count f(x) Step-size derivative 1 1 9.5 0.131944 -144 2 6 0.5 0.125 -6.66e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.85 0.146281 -121 2 6 0.562329 0.136986 2.44e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.2 0.164 -100 2 6 0.624242 0.151515 1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.55 0.18642 -81 2 6 0.685593 0.169492 -9.99e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.9 0.215625 -64 2 6 0.746154 0.192308 1.78e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.25 0.255102 -49 2 6 0.805556 0.222222 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.6 0.311111 -36 2 6 0.863158 0.263158 -2e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.95 0.396 -25 2 6 0.917742 0.322581 -1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.3 0.5375 -16 2 6 0.966667 0.416667 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.65 0.811111 -9 2 6 1.00294 0.588235 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3 1 -4 2 6 1 1 0 Optimization terminated successfully: Search direction less than 2*options.TolX plot(F1,F2) type pareto19 % Papageorgiou, 1996 % % x0 = 2 % goals: S* = [0.5 0.5]' % weights: w = [0.5 0.5]' % xo = 0.1429 % S(xo) = [1.0102 1.0102]' %w=0.5; global w xo=[]; So=[]; F1=[]; F2=[]; for w=0:0.1:1 [x,S,ns]=bfgs('test19',2); xo=[xo x]; So=[So S]; F1=[F1 1+0.5*x.^2]; F2=[F2 4*(x-0.5).^2+0.5]; end w=[0:0.1:1]; type test20 function S=test(x) % Papageorgiou, 1996 % % x0 = 2 % xo = 0.1429 % S(xo) = [1.0102 1.0102]' S=4*(x-0.5).^2+0.5; % [x,S,nS,lambda]=sqp('test20','restr20',2) type restr20 function [g,h]=restr(x) % Papageorgiou, 1996 % % x0 = 2 % goals: S* = [0.5 0.5]' % weights: w = [0.5 0.5]' % xo = 0.1429 % S(xo) = [1.0102 1.0102]' e=1.1; g(1)=1+0.5*x.^2-e; g(2)=-x; h=[]; % [x,S,ns,lambda]=sqp('test20','restr20',2) edit restr20 dbstack ; disp(which('restr20')); v:\cursos\pos\otimiza\aulas\restr20.m mdbstatus 'v:\cursos\pos\otimiza\aulas\restr20.m' eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('restr20')); v:\cursos\pos\otimiza\aulas\restr20.m clear 'v:\cursos\pos\otimiza\aulas\restr20.m' eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 7 eval( 'if exist(''global'',''var''), mauifunc(global), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.5000 0.4932 0.4848 0.4746 0.4615 0.4444 0.4211 Columns 8 through 11 0.3871 0.3333 0.2353 -0.0000 disp(which('pareto20')); disp(char(which('pareto20','-all'))); eval( 'if exist(''sqp'',''var''), mauifunc(sqp), end', ''); eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 7 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 7 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 7 eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); Columns 1 through 7 0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 Columns 8 through 11 0.7000 0.8000 0.9000 1.0000 eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 7 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -4.1444e-009 eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); Columns 1 through 7 0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 Columns 8 through 11 0.7000 0.8000 0.9000 1.0000 disp(which('pareto20')); disp(char(which('pareto20','-all'))); cd(cd) pareto20 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 2 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.125 1 -2.22e-008 4 11 0.75 0.03125 1 0.375 5 14 1.16016 0.004395 1 0.152 6 17 1.32129 0.001099 1 0.085 7 20 1.40845 0.0002747 1 0.0447 8 23 1.45367 6.866e-005 1 0.0229 9 26 1.4767 1.717e-005 1 0.0116 10 29 1.48832 4.292e-006 1 0.00583 11 32 1.49415 1.073e-006 1 0.00292 12 35 1.49707 2.682e-007 1 0.00146 13 38 1.49854 6.706e-008 1 0.000732 Hessian modified 14 41 1.49927 1.676e-008 1 0.000366 Hessian modified 15 44 1.49963 4.192e-009 1 0.000183 Hessian modified 16 47 1.49982 1.048e-009 1 9.16e-005 Hessian modified 17 50 1.49991 2.62e-010 1 4.58e-005 Hessian modified 18 53 1.49995 6.551e-011 1 2.29e-005 Hessian modified 19 56 1.49998 1.641e-011 1 1.15e-005 Hessian modified 20 59 1.49999 4.102e-012 1 5.73e-006 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.99 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.115 1 -2.04e-008 4 11 0.7116 0.02645 1 0.269 5 14 0.990637 0.001216 1 0.0227 6 17 1.01365 3.296e-005 1 0.000667 7 20 1.01431 2.707e-008 1 5.49e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.98 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.105 1 -1.87e-008 4 11 0.6764 0.02205 1 0.191 5 14 0.864514 -0.0003732 1 -0.00455 6 17 0.859979 1.774e-006 1 2.13e-005 Hessian modified 7 20 0.86 3.923e-011 1 4.71e-010 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.97 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.095 1 -1.69e-008 4 11 0.6444 0.01805 1 0.133 5 14 0.769201 -0.001061 1 -0.00916 6 17 0.760123 9.732e-006 1 8.1e-005 Hessian modified 7 20 0.760204 7.884e-010 1 6.57e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.96 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.085 1 -1.51e-008 4 11 0.6156 0.01445 1 0.0908 5 14 0.696439 -0.001249 1 -0.00795 6 17 0.688567 1.006e-005 1 6.18e-005 Hessian modified 7 20 0.688629 6.324e-010 1 3.88e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.95 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.075 1 -1.33e-008 4 11 0.59 0.01125 1 0.06 5 14 0.640625 -0.001172 1 -0.00562 Hessian modified twice 6 17 0.635056 7.031e-006 1 3.27e-005 Hessian modified 7 20 0.635089 2.47e-010 1 1.15e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.94 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.065 1 -1.15e-008 4 11 0.5676 0.00845 1 0.038 5 14 0.597852 -0.0009717 1 -0.00354 Hessian modified twice 6 17 0.594345 3.999e-006 1 1.42e-005 Hessian modified 7 20 0.594359 6.642e-011 1 2.36e-010 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.93 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.055 1 -9.77e-009 4 11 0.5484 0.00605 1 0.0228 5 14 0.565325 -0.0007314 1 -0.00201 Hessian modified twice 6 17 0.563332 1.931e-006 1 5.19e-006 Hessian modified 7 20 0.563337 1.322e-011 1 3.56e-011 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.92 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.045 1 -7.99e-009 4 11 0.5324 0.00405 1 0.0126 5 14 0.541006 -0.0004992 1 -0.00101 Hessian modified twice 6 17 0.539998 7.837e-007 1 1.57e-006 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.91 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.035 1 -6.22e-009 4 11 0.5196 0.00245 1 0.00619 5 14 0.523377 -0.0003016 1 -0.000435 Hessian modified twice 6 17 0.522943 2.535e-007 1 3.62e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.9 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.025 1 -4.44e-009 4 11 0.51 0.00125 1 0.0025 5 14 0.511289 -0.0001514 1 -0.000144 Hessian modified twice 6 17 0.511146 5.736e-008 1 5.42e-008 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.89 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.015 1 -2.66e-009 4 11 0.5036 0.00045 1 0.000686 5 14 0.503862 -5.3e-005 1 -2.81e-005 Hessian modified twice 6 17 0.503834 6.385e-009 1 3.37e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.88 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.005 1 -8.88e-010 4 11 0.5004 5e-005 1 5.45e-005 5 14 0.500409 -5.675e-006 1 -9.37e-007 Hessian modified twice Optimization terminated successfully: Magnitude of directional derivative in search direction less than 2*options.TolFun and maximum constraint violation is less than options.TolCon Active Constraints: 1 plot(F1,F2) F1e=F1; F2e=F2; xe=xo; pareto19 Directional Iteration Func-count f(x) Step-size derivative 1 1 9.5 0.131944 -144 2 6 0.5 0.125 -6.66e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.85 0.146281 -121 2 6 0.562329 0.136986 2.44e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.2 0.164 -100 2 6 0.624242 0.151515 1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.55 0.18642 -81 2 6 0.685593 0.169492 -9.99e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.9 0.215625 -64 2 6 0.746154 0.192308 1.78e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.25 0.255102 -49 2 6 0.805556 0.222222 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.6 0.311111 -36 2 6 0.863158 0.263158 -2e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.95 0.396 -25 2 6 0.917742 0.322581 -1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.3 0.5375 -16 2 6 0.966667 0.416667 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.65 0.811111 -9 2 6 1.00294 0.588235 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3 1 -4 2 6 1 1 0 Optimization terminated successfully: Search direction less than 2*options.TolX plot(F1,F2,F1e,F2e,'r') eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''global'',''var''), mauifunc(global), end', ''); eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.5000 0.4932 0.4848 0.4746 0.4615 0.4444 0.4211 Columns 8 through 11 0.3871 0.3333 0.2353 -0.0000 dbstack ; disp(which('pareto19')); v:\cursos\pos\otimiza\aulas\pareto19.m mdbstatus 'v:\cursos\pos\otimiza\aulas\pareto19.m' eval( 'if exist(''test19'',''var''), mauifunc(test19), end', ''); eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1 eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.5000 0.4932 0.4848 0.4746 0.4615 0.4444 0.4211 Columns 8 through 11 0.3871 0.3333 0.2353 -0.0000 disp(which('pareto19')); v:\cursos\pos\otimiza\aulas\pareto19.m clear 'v:\cursos\pos\otimiza\aulas\pareto19.m' clear functions pareto19 Directional Iteration Func-count f(x) Step-size derivative 1 1 9.5 0.131944 -144 2 6 0.5 0.125 -6.66e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.435 0.133253 -142 2 6 0.506248 0.126103 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.37 0.134588 -139 2 6 0.512494 0.127226 -3.93e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.305 0.135949 -137 2 6 0.518736 0.12837 -1.3e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.24 0.137337 -135 2 6 0.524974 0.129534 -6.44e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.175 0.138752 -132 2 6 0.531209 0.130719 1.28e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.11 0.140197 -130 2 6 0.537441 0.131926 1.27e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 9.045 0.141671 -128 2 6 0.543668 0.133156 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.98 0.143176 -125 2 6 0.549892 0.134409 -8.7e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.915 0.144712 -123 2 6 0.556113 0.135685 2.46e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.85 0.146281 -121 2 6 0.562329 0.136986 2.44e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.785 0.147883 -119 2 6 0.568541 0.138313 -4.84e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.72 0.14952 -117 2 6 0.574749 0.139665 8.39e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.655 0.151192 -114 2 6 0.580952 0.141044 2.38e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.59 0.152901 -112 2 6 0.587151 0.14245 -1.77e-006 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.525 0.154649 -110 2 6 0.593345 0.143885 -1.05e-006 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.46 0.156435 -108 2 6 0.599535 0.145349 -6.93e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.395 0.158262 -106 2 6 0.60572 0.146843 -1.14e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.33 0.160131 -104 2 6 0.611899 0.148368 4.53e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.265 0.162043 -102 2 6 0.618073 0.149925 -5.61e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.2 0.164 -100 2 6 0.624242 0.151515 1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.135 0.166003 -98 2 6 0.630406 0.153139 5.5e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.07 0.168055 -96 2 6 0.636563 0.154799 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 8.005 0.170156 -94.1 2 6 0.642715 0.156495 1.08e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.94 0.172309 -92.2 2 6 0.648861 0.158228 3.2e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.875 0.174515 -90.2 2 6 0.655 0.16 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.81 0.176777 -88.4 2 6 0.661133 0.161812 1.04e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.745 0.179096 -86.5 2 6 0.667259 0.163666 -3.1e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.68 0.181474 -84.6 2 6 0.673377 0.165563 -4.09e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.615 0.183915 -82.8 2 6 0.679489 0.167504 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.55 0.18642 -81 2 6 0.685593 0.169492 -2e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.485 0.188991 -79.2 2 6 0.69169 0.171527 -9.88e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.42 0.191632 -77.4 2 6 0.697778 0.173611 -2.93e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.355 0.194345 -75.7 2 6 0.703858 0.175747 -9.66e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.29 0.197134 -74 2 6 0.709929 0.177936 -6.4e-006 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.225 0.2 -72.2 2 6 0.715991 0.18018 -1.89e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.16 0.202948 -70.6 2 6 0.722044 0.182482 9.33e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.095 0.205981 -68.9 2 6 0.728087 0.184843 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 7.03 0.209102 -67.2 2 6 0.73412 0.187266 5.46e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.965 0.212315 -65.6 2 6 0.740142 0.189753 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.9 0.215625 -64 2 6 0.746154 0.192308 1.78e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.835 0.219035 -62.4 2 6 0.752154 0.194932 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.77 0.222551 -60.8 2 6 0.758142 0.197628 -2.6e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.705 0.226176 -59.3 2 6 0.764118 0.200401 2.56e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.64 0.229917 -57.8 2 6 0.770081 0.203252 1.1e-006 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.575 0.233778 -56.2 2 6 0.776031 0.206186 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.51 0.237765 -54.8 2 6 0.781967 0.209205 1.64e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.445 0.241884 -53.3 2 6 0.787887 0.212314 1.62e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.38 0.246142 -51.8 2 6 0.793793 0.215517 1.6e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.315 0.250546 -50.4 2 6 0.799683 0.218818 -3.15e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.25 0.255102 -49 2 6 0.805556 0.222222 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.185 0.259819 -47.6 2 6 0.811411 0.225734 7.66e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.12 0.264706 -46.2 2 6 0.817248 0.229358 -5.28e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 6.055 0.269771 -44.9 2 6 0.823065 0.2331 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.99 0.275023 -43.6 2 6 0.828863 0.236967 -2.2e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.925 0.280473 -42.3 2 6 0.834639 0.240964 -1.52e-006 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.86 0.286133 -41 2 6 0.840392 0.245098 2.13e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.795 0.292013 -39.7 2 6 0.846122 0.249377 -3.5e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.73 0.298127 -38.4 2 6 0.851827 0.253807 -2.07e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.665 0.304488 -37.2 2 6 0.857506 0.258398 2.71e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.6 0.311111 -36 2 6 0.863158 0.263158 -1.33e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.535 0.318012 -34.8 2 6 0.86878 0.268097 -2.62e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.47 0.325208 -33.6 2 6 0.874372 0.273224 -2.58e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.405 0.332718 -32.5 2 6 0.87993 0.278552 1.27e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.34 0.340561 -31.4 2 6 0.885455 0.284091 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.275 0.34876 -30.2 2 6 0.890942 0.289855 1.83e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.21 0.357339 -29.2 2 6 0.896391 0.295858 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.145 0.366323 -28.1 2 6 0.901798 0.302115 5.88e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.08 0.37574 -27 2 6 0.90716 0.308642 1.73e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 5.015 0.385621 -26 2 6 0.912476 0.315457 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.95 0.396 -25 2 6 0.917742 0.322581 -1.11e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.885 0.406914 -24 2 6 0.922954 0.330033 -2.18e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.82 0.418403 -23 2 6 0.928108 0.337838 -5.33e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.755 0.430512 -22.1 2 6 0.933201 0.346021 2.09e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.69 0.443289 -21.2 2 6 0.938227 0.35461 -1.02e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.625 0.45679 -20.3 2 6 0.943182 0.363636 -2.5e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.56 0.471074 -19.4 2 6 0.94806 0.373134 2.44e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.495 0.486209 -18.5 2 6 0.952854 0.383142 2.67e-006 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.43 0.502268 -17.6 2 6 0.957559 0.393701 -2.33e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.365 0.519334 -16.8 2 6 0.962166 0.404858 4.55e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.3 0.5375 -16 2 6 0.966667 0.416667 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.235 0.55687 -15.2 2 6 0.971052 0.429185 -8.66e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.17 0.577562 -14.4 2 6 0.97531 0.442478 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.105 0.599708 -13.7 2 6 0.979429 0.456621 -4.11e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 4.04 0.623457 -13 2 6 0.983396 0.471698 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.975 0.64898 -12.2 2 6 0.987195 0.487805 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.91 0.676471 -11.6 2 6 0.990808 0.505051 -7.55e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.845 0.706152 -10.9 2 6 0.994215 0.52356 -7.33e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.78 0.738281 -10.2 2 6 0.997391 0.543478 1.07e-007 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.715 0.773153 -9.61 2 6 1.00031 0.564972 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.65 0.811111 -9 2 6 1.00294 0.588235 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.585 0.852556 -8.41 2 6 1.00525 0.613497 6.44e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.52 0.897959 -7.84 2 6 1.00718 0.641026 -6.22e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.455 0.947874 -7.29 2 6 1.00869 0.671141 6e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.39 1 -6.76 2 6 1.00972 0.704225 5.77e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.325 1 -6.25 2 6 1.01019 0.740741 5.55e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.26 1 -5.76 2 6 1.01 0.78125 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.195 1 -5.29 2 6 1.00905 0.826446 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.13 1 -4.84 2 6 1.00719 0.877193 0 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3.065 1 -4.41 2 6 1.00425 0.934579 -9.33e-008 Optimization terminated successfully: Search direction less than 2*options.TolX Directional Iteration Func-count f(x) Step-size derivative 1 1 3 1 -4 2 6 1 1 0 Optimization terminated successfully: Search direction less than 2*options.TolX plot(F1,F2,F1e,F2e,'r') e=0.5 e = 0.5000 eval( 'if exist(''restr20'',''var''), mauifunc(restr20), end', ''); [x,S,ns,lambda]=sqp('test20','restr20',2); max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 2.5 1 -24 2 5 1.5 0.5 1 -9.01e+007 3 59 1.5 0.5 4.44e-016 0 infeasible Optimization terminated: No feasible solution found. Search direction less than 2*options.TolX but constraints are not satisfied. x x = -2.1549e-009 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); -2.1549e-009 eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''test20'',''var''), mauifunc(test20), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.5000 0.4994 0.4987 0.4981 0.4974 0.4967 0.4960 Columns 8 through 14 0.4953 0.4946 0.4939 0.4932 0.4924 0.4916 0.4908 Columns 15 through 21 0.4900 0.4892 0.4884 0.4875 0.4866 0.4858 0.4848 Columns 22 through 28 0.4839 0.4830 0.4820 0.4810 0.4800 0.4790 0.4779 Columns 29 through 35 0.4768 0.4757 0.4746 0.4734 0.4722 0.4710 0.4698 Columns 36 through 42 0.4685 0.4672 0.4658 0.4644 0.4630 0.4615 0.4600 Columns 43 through 49 0.4585 0.4569 0.4553 0.4536 0.4519 0.4501 0.4483 Columns 50 through 56 0.4464 0.4444 0.4424 0.4404 0.4382 0.4360 0.4337 Columns 57 through 63 0.4314 0.4289 0.4264 0.4238 0.4211 0.4182 0.4153 Columns 64 through 70 0.4123 0.4091 0.4058 0.4024 0.3988 0.3951 0.3912 Columns 71 through 77 0.3871 0.3828 0.3784 0.3737 0.3688 0.3636 0.3582 Columns 78 through 84 0.3525 0.3465 0.3401 0.3333 0.3262 0.3186 0.3105 Columns 85 through 91 0.3019 0.2927 0.2828 0.2723 0.2609 0.2486 0.2353 Columns 92 through 98 0.2209 0.2051 0.1879 0.1690 0.1481 0.1250 0.0992 Columns 99 through 101 0.0702 0.0374 -0.0000 disp(which('pareto20')); v:\cursos\pos\otimiza\aulas\pareto20.m clear 'v:\cursos\pos\otimiza\aulas\pareto20.m' eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''test20'',''var''), mauifunc(test20), end', ''); clear functions pareto20 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 2 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.125 1 -2.22e-008 4 11 0.75 0.03125 1 0.375 5 14 1.16016 0.004395 1 0.152 6 17 1.32129 0.001099 1 0.085 7 20 1.40845 0.0002747 1 0.0447 8 23 1.45367 6.866e-005 1 0.0229 9 26 1.4767 1.717e-005 1 0.0116 10 29 1.48832 4.292e-006 1 0.00583 11 32 1.49415 1.073e-006 1 0.00292 12 35 1.49707 2.682e-007 1 0.00146 13 38 1.49854 6.706e-008 1 0.000732 Hessian modified 14 41 1.49927 1.676e-008 1 0.000366 Hessian modified 15 44 1.49963 4.192e-009 1 0.000183 Hessian modified 16 47 1.49982 1.048e-009 1 9.16e-005 Hessian modified 17 50 1.49991 2.62e-010 1 4.58e-005 Hessian modified 18 53 1.49995 6.551e-011 1 2.29e-005 Hessian modified 19 56 1.49998 1.641e-011 1 1.15e-005 Hessian modified 20 59 1.49999 4.102e-012 1 5.73e-006 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.99 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.115 1 -2.04e-008 4 11 0.7116 0.02645 1 0.269 5 14 0.990637 0.001216 1 0.0227 6 17 1.01365 3.296e-005 1 0.000667 7 20 1.01431 2.707e-008 1 5.49e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.98 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.105 1 -1.87e-008 4 11 0.6764 0.02205 1 0.191 5 14 0.864514 -0.0003732 1 -0.00455 6 17 0.859979 1.774e-006 1 2.13e-005 Hessian modified 7 20 0.86 3.923e-011 1 4.71e-010 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.97 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.095 1 -1.69e-008 4 11 0.6444 0.01805 1 0.133 5 14 0.769201 -0.001061 1 -0.00916 6 17 0.760123 9.732e-006 1 8.1e-005 Hessian modified 7 20 0.760204 7.884e-010 1 6.57e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.96 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.085 1 -1.51e-008 4 11 0.6156 0.01445 1 0.0908 5 14 0.696439 -0.001249 1 -0.00795 6 17 0.688567 1.006e-005 1 6.18e-005 Hessian modified 7 20 0.688629 6.324e-010 1 3.88e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.95 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.075 1 -1.33e-008 4 11 0.59 0.01125 1 0.06 5 14 0.640625 -0.001172 1 -0.00562 Hessian modified twice 6 17 0.635056 7.031e-006 1 3.27e-005 Hessian modified 7 20 0.635089 2.47e-010 1 1.15e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.94 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.065 1 -1.15e-008 4 11 0.5676 0.00845 1 0.038 5 14 0.597852 -0.0009717 1 -0.00354 Hessian modified twice 6 17 0.594345 3.999e-006 1 1.42e-005 Hessian modified 7 20 0.594359 6.642e-011 1 2.36e-010 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.93 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.055 1 -9.77e-009 4 11 0.5484 0.00605 1 0.0228 5 14 0.565325 -0.0007314 1 -0.00201 Hessian modified twice 6 17 0.563332 1.931e-006 1 5.19e-006 Hessian modified 7 20 0.563337 1.322e-011 1 3.56e-011 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.92 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.045 1 -7.99e-009 4 11 0.5324 0.00405 1 0.0126 5 14 0.541006 -0.0004992 1 -0.00101 Hessian modified twice 6 17 0.539998 7.837e-007 1 1.57e-006 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.91 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.035 1 -6.22e-009 4 11 0.5196 0.00245 1 0.00619 5 14 0.523377 -0.0003016 1 -0.000435 Hessian modified twice 6 17 0.522943 2.535e-007 1 3.62e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.9 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.025 1 -4.44e-009 4 11 0.51 0.00125 1 0.0025 5 14 0.511289 -0.0001514 1 -0.000144 Hessian modified twice 6 17 0.511146 5.736e-008 1 5.42e-008 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.89 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.015 1 -2.66e-009 4 11 0.5036 0.00045 1 0.000686 5 14 0.503862 -5.3e-005 1 -2.81e-005 Hessian modified twice 6 17 0.503834 6.385e-009 1 3.37e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.88 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 0.005 1 -8.88e-010 4 11 0.5004 5e-005 1 5.45e-005 5 14 0.500409 -5.675e-006 1 -9.37e-007 Hessian modified twice Optimization terminated successfully: Magnitude of directional derivative in search direction less than 2*options.TolFun and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.87 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.005 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.86 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.015 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.85 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.025 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.84 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.035 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.83 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.045 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.82 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.055 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.81 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.065 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.8 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.075 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.79 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.085 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.78 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.095 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.77 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.105 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.76 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.115 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.75 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.125 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.74 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.135 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.73 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.145 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.72 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.155 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.71 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.165 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.7 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.175 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.69 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.185 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.68 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.195 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.67 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.205 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.66 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.215 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.65 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.225 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.64 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.235 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.63 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.245 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.62 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.255 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.61 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.265 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.6 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.275 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.59 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.285 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.58 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.295 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.57 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.305 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.56 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.315 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.55 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.325 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.54 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.335 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.53 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.345 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.52 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.355 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.51 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.365 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.5 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.375 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.49 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.385 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.48 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.395 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.47 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.405 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.46 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.415 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.45 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.425 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.44 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.435 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.43 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.445 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.42 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.455 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.41 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.465 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.4 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.475 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.39 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.485 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.38 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.495 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.37 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.36 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.35 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.34 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.33 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.32 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.31 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.3 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.29 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.28 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.27 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.26 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.25 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.24 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.23 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.22 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.21 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.2 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.19 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.18 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.17 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.16 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.15 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.14 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.13 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.12 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.11 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.1 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.09 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.08 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.07 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.06 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.05 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.04 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.03 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.02 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1.01 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 2 9.5 1 1 -24 2 5 1.5 1.215e-008 1 -2 3 8 0.5 -0.5 1 -9.86e-016 Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon No Active Constraints plot(F1,F2) plot(F1,F2,F1e,F2e,'r') xo xo = Columns 1 through 7 0.0000 0.1414 0.2000 0.2449 0.2828 0.3162 0.3464 Columns 8 through 14 0.3742 0.4000 0.4243 0.4472 0.4690 0.4899 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); disp(which('pareto20')); v:\cursos\pos\otimiza\aulas\pareto20.m clear 'v:\cursos\pos\otimiza\aulas\pareto20.m' eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 0.5000 eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.0000 0.1414 0.2000 0.2449 0.2828 0.3162 0.3464 Columns 8 through 14 0.3742 0.4000 0.4243 0.4472 0.4690 0.4899 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''goals'',''var''), mauifunc(goals), end', ''); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('restr21')); disp(char(which('restr21','-all'))); eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.5000 eval( 'if exist(''F2'',''var''), mauifunc(F2), end', ''); Columns 1 through 7 1.5000 1.0143 0.8600 0.7602 0.6886 0.6351 0.5944 Columns 8 through 14 0.5633 0.5400 0.5229 0.5111 0.5038 0.5004 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.5000 eval( 'if exist(''restr20'',''var''), mauifunc(restr20), end', ''); eval( 'if exist(''test20'',''var''), mauifunc(test20), end', ''); eval( 'if exist(''test20'',''var''), mauifunc(test20), end', ''); eval( 'if exist(''F1s'',''var''), mauifunc(F1s), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.0000 0.1414 0.2000 0.2449 0.2828 0.3162 0.3464 Columns 8 through 14 0.3742 0.4000 0.4243 0.4472 0.4690 0.4899 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('restr21')); disp(char(which('restr21','-all'))); eval( 'if exist(''F1s'',''var''), mauifunc(F1s), end', ''); eval( 'if exist(''test20'',''var''), mauifunc(test20), end', ''); eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 0.5000 disp(which('restr21')); disp(char(which('restr21','-all'))); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''x0'',''var''), mauifunc(x0), end', ''); eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.0000 0.1414 0.2000 0.2449 0.2828 0.3162 0.3464 Columns 8 through 14 0.3742 0.4000 0.4243 0.4472 0.4690 0.4899 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.5000 eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''ns'',''var''), mauifunc(ns), end', ''); 10 eval( 'if exist(''w1'',''var''), mauifunc(w1), end', ''); eval( 'if exist(''F2s'',''var''), mauifunc(F2s), end', ''); eval( 'if exist(''F1s'',''var''), mauifunc(F1s), end', ''); eval( 'if exist(''w1'',''var''), mauifunc(w1), end', ''); eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''goals'',''var''), mauifunc(goals), end', ''); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('test21')); disp(char(which('test21','-all'))); eval( 'if exist(''test19'',''var''), mauifunc(test19), end', ''); eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [2x1 double] eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('test21')); disp(char(which('test21','-all'))); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''restr21'',''var''), mauifunc(restr21), end', ''); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''function'',''var''), mauifunc(function), end', ''); disp(which('test21')); disp(char(which('test21','-all'))); eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''restr21'',''var''), mauifunc(restr21), end', ''); eval( 'if exist(''F2s'',''var''), mauifunc(F2s), end', ''); eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); Columns 1 through 7 0 0.0100 0.0200 0.0300 0.0400 0.0500 0.0600 Columns 8 through 14 0.0700 0.0800 0.0900 0.1000 0.1100 0.1200 0.1300 Columns 15 through 21 0.1400 0.1500 0.1600 0.1700 0.1800 0.1900 0.2000 Columns 22 through 28 0.2100 0.2200 0.2300 0.2400 0.2500 0.2600 0.2700 Columns 29 through 35 0.2800 0.2900 0.3000 0.3100 0.3200 0.3300 0.3400 Columns 36 through 42 0.3500 0.3600 0.3700 0.3800 0.3900 0.4000 0.4100 Columns 43 through 49 0.4200 0.4300 0.4400 0.4500 0.4600 0.4700 0.4800 Columns 50 through 56 0.4900 0.5000 0.5100 0.5200 0.5300 0.5400 0.5500 Columns 57 through 63 0.5600 0.5700 0.5800 0.5900 0.6000 0.6100 0.6200 Columns 64 through 70 0.6300 0.6400 0.6500 0.6600 0.6700 0.6800 0.6900 Columns 71 through 77 0.7000 0.7100 0.7200 0.7300 0.7400 0.7500 0.7600 Columns 78 through 84 0.7700 0.7800 0.7900 0.8000 0.8100 0.8200 0.8300 Columns 85 through 91 0.8400 0.8500 0.8600 0.8700 0.8800 0.8900 0.9000 Columns 92 through 98 0.9100 0.9200 0.9300 0.9400 0.9500 0.9600 0.9700 Columns 99 through 101 0.9800 0.9900 1.0000 eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); disp(which('restr21')); disp(char(which('restr21','-all'))); cd(cd) [x,S,ns,lambda]=sqp('test21','restr21',[2 0]) max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.647 2 7 -0.647059 0.9965 1 1.3 3 11 0.653979 0.673 1 0.346 4 15 1 0.0625 1 0.02 5 19 1.02 0.001225 1 0.000408 Hessian modified 6 23 1.02041 5.097e-007 1 1.7e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.1429 1.0204 S = 1.0204 ns = 25 lambda = lower: [2x1 double] upper: [2x1 double] eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [3x1 double] eval( 'if exist(''restr21'',''var''), mauifunc(restr21), end', ''); eval( 'if exist(''x'',''var''), mauifunc(x), end', ''); 0.1429 1.0204 1+0.5*x(1).^2 ans = 1.0102 (ans-0.5)/0.5 ans = 1.0204 disp(which('restr21')); v:\cursos\pos\otimiza\aulas\restr21.m clear 'v:\cursos\pos\otimiza\aulas\restr21.m' eval( 'if exist(''Papageorgiou'',''var''), mauifunc(Papageorgiou), end', ''); eval( 'if exist(''goals'',''var''), mauifunc(goals), end', ''); eval( 'if exist(''restr21'',''var''), mauifunc(restr21), end', ''); eval( 'if exist(''F2'',''var''), mauifunc(F2), end', ''); Columns 1 through 7 1.5000 1.0143 0.8600 0.7602 0.6886 0.6351 0.5944 Columns 8 through 14 0.5633 0.5400 0.5229 0.5111 0.5038 0.5004 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''F1'',''var''), mauifunc(F1), end', ''); Columns 1 through 7 1.0000 1.0100 1.0200 1.0300 1.0400 1.0500 1.0600 Columns 8 through 14 1.0700 1.0800 1.0900 1.1000 1.1100 1.1200 1.1250 Columns 15 through 21 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 22 through 28 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 29 through 35 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 36 through 42 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 43 through 49 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 50 through 56 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 57 through 63 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 64 through 70 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 71 through 77 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 78 through 84 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 85 through 91 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 92 through 98 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 1.1250 Columns 99 through 101 1.1250 1.1250 1.1250 eval( 'if exist(''So'',''var''), mauifunc(So), end', ''); Columns 1 through 7 1.5000 1.0143 0.8600 0.7602 0.6886 0.6351 0.5944 Columns 8 through 14 0.5633 0.5400 0.5229 0.5111 0.5038 0.5004 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1.0204 eval( 'if exist(''bfgs'',''var''), mauifunc(bfgs), end', ''); eval( 'if exist(''bfgs'',''var''), mauifunc(bfgs), end', ''); eval( 'if exist(''global'',''var''), mauifunc(global), end', ''); eval( 'if exist(''S'',''var''), mauifunc(S), end', ''); 1.0204 eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 0.0000 0.1414 0.2000 0.2449 0.2828 0.3162 0.3464 Columns 8 through 14 0.3742 0.4000 0.4243 0.4472 0.4690 0.4899 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 disp(which('pareto21')); disp(char(which('pareto21','-all'))); eval( 'if exist(''test20'',''var''), mauifunc(test20), end', ''); eval( 'if exist(''test21'',''var''), mauifunc(test21), end', ''); eval( 'if exist(''sqp'',''var''), mauifunc(sqp), end', ''); eval( 'if exist(''lambda'',''var''), mauifunc(lambda), end', ''); lower: [2x1 double] upper: [2x1 double] eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [3x1 double] eval( 'if exist(''e'',''var''), mauifunc(e), end', ''); Columns 1 through 7 1.0000 1.0100 1.0200 1.0300 1.0400 1.0500 1.0600 Columns 8 through 13 1.0700 1.0800 1.0900 1.1000 1.1100 1.1200 eval( 'if exist(''So'',''var''), mauifunc(So), end', ''); Columns 1 through 7 1.5000 1.0143 0.8600 0.7602 0.6886 0.6351 0.5944 Columns 8 through 14 0.5633 0.5400 0.5229 0.5111 0.5038 0.5004 0.5000 Columns 15 through 21 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 22 through 28 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 29 through 35 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 36 through 42 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 43 through 49 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 50 through 56 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 57 through 63 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 64 through 70 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 71 through 77 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 78 through 84 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 85 through 91 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 92 through 98 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 Columns 99 through 101 0.5000 0.5000 0.5000 disp(which('pareto21')); disp(char(which('pareto21','-all'))); eval( 'if exist(''sqp'',''var''), mauifunc(sqp), end', ''); cd(cd) pareto21 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -1 2 7 -1 1.25 1 0 infeasible Optimization terminated: No feasible solution found. Magnitude of directional derivative in search direction less than 2*options.TolFun but constraints are not satisfied. max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.935 2 7 -0.935162 1.007 1 3.46 3 11 2.52725 0.2473 1 2.47 4 15 5 0 1 -1.07e-007 Hessian modified twice Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.866 2 7 -0.866337 0.8933 1 2.27 3 11 1.39986 0.22 1 1.1 4 15 2.5 0 1 -3.66e-008 Hessian modified twice Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.795 2 7 -0.794621 0.9373 1 1.8 3 11 1.00347 0.2976 1 0.663 4 15 1.66667 3.309e-024 1 -8.27e-009 Hessian modified twice Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.721 2 7 -0.721154 0.9719 1 1.51 3 11 0.791305 0.5252 1 0.459 4 15 1.25 0.01563 1 0.00543 5 19 1.25543 4.992e-005 1 1.75e-005 Hessian modified 6 23 1.25545 5.143e-010 1 1.8e-010 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.647 2 7 -0.647059 0.9965 1 1.3 3 11 0.653979 0.673 1 0.346 4 15 1 0.0625 1 0.02 5 19 1.02 0.001225 1 0.000408 Hessian modified 6 23 1.02041 5.097e-007 1 1.7e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.573 2 7 -0.573394 1.011 1 1.13 3 11 0.554948 0.778 1 0.278 4 15 0.833333 0.1111 1 0.0333 5 19 0.866667 0.005378 1 0.00179 6 23 0.868453 1.544e-005 1 5.16e-006 Hessian modified 7 27 0.868458 1.169e-010 1 3.91e-011 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.501 2 7 -0.501114 1.016 1 0.98 3 11 0.478445 0.8565 1 0.236 4 15 0.714286 0.1543 1 0.0439 5 19 0.758158 0.01352 1 0.00466 6 23 0.762816 0.0001524 1 5.37e-005 Hessian modified 7 27 0.76287 1.997e-008 1 7.04e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.431 2 7 -0.431034 1.012 1 0.848 3 11 0.416496 0.9167 1 0.209 4 15 0.625 0.1914 1 0.0519 5 19 0.676907 0.02589 1 0.00963 6 23 0.686533 0.0008904 1 0.000355 Hessian modified 7 27 0.686888 1.216e-006 1 4.87e-007 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.364 2 7 -0.363825 0.9993 1 0.728 3 11 0.364599 0.9635 1 0.191 4 15 0.555556 0.223 1 0.058 5 19 0.613518 0.04234 1 0.0177 6 23 0.631261 0.003967 1 0.00205 7 27 0.633307 5.276e-005 1 2.8e-005 Hessian modified 8 31 0.633335 9.917e-009 1 5.26e-009 Hessian modified Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 max Directional Iter F-count f(x) constraint Step-size derivative Procedure 1 3 0 9 1 -0.3 2 7 -0.3 0.98 1 0.62 3 11 0.32 1 1 0.18 4 15 0.5 0.25 1 0.0625 5 19 0.5625 0.0625 1 0.0313 6 23 0.593756 0.01562 1 0.0156 7 27 0.609378 0.003905 1 0.00781 8 31 0.617189 0.0009762 1 0.00391 9 35 0.621094 0.0002441 1 0.00195 10 39 0.623047 6.101e-005 1 0.000976 11 43 0.624024 1.525e-005 1 0.000488 Hessian modified 12 47 0.624512 3.814e-006 1 0.000244 Hessian modified 13 51 0.624756 9.534e-007 1 0.000122 Hessian modified 14 55 0.624878 2.384e-007 1 6.1e-005 Hessian modified 15 59 0.624939 5.961e-008 1 3.05e-005 Hessian modified 16 63 0.624969 1.491e-008 1 1.53e-005 Hessian modified 17 67 0.624985 3.731e-009 1 7.63e-006 Hessian modified 18 71 0.624992 9.347e-010 1 3.81e-006 Hessian modified 19 75 0.624996 2.346e-010 1 1.91e-006 Hessian modified Optimization terminated successfully: Magnitude of directional derivative in search direction less than 2*options.TolFun and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 plot(F1,F2,F1e,F2e,'r') type test18 function S=test(x) % Papageorgiou, 1996 % % x0 = 2 % goals: S* = [0.5 0.5]' % weights: w = [0.5 0.5]' % xo = 0.1429 % S(xo) = [1.0102 1.0102]' S(1)=1+0.5*x.^2; S(2)=4*(x-0.5).^2+0.5; % goal = [0.5; 0.5]; % w = abs(goal); % [x,S,gama,ex,out,lambda]=fgoalattain('test18',2,goal,w) [x,S,gama,ex,out,lambda]=fgoalattain('test18',2,goal,w) ??? Undefined function or variable 'goal'. goal = [0.5; 0.5]; w = abs(goal); [x,S,gama,ex,out,lambda]=fgoalattain('test18',2,goal,w) Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.1429 S = 1.0102 1.0102 gama = 1.0204 ex = 1 out = iterations: 5 funcCount: 22 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] eval( 'if exist(''F1'',''var''), mauifunc(F1), end', ''); Columns 1 through 7 1.0106 1.0000 1.0000 1.0000 1.0022 1.0102 1.0211 Columns 8 through 11 1.0340 1.0495 1.0700 1.1250 eval( 'if exist(''So'',''var''), mauifunc(So), end', ''); Columns 1 through 7 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.7629 0.6869 0.6333 0.6250 eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); 0.5000 0.5000 eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); disp(which('pareto18')); disp(char(which('pareto18','-all'))); eval( 'if exist(''global'',''var''), mauifunc(global), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 -0.1458 0.0000 0.0000 0.0000 0.0660 0.1429 0.2053 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.2608 0.3147 0.3742 0.5000 0.7629 0.6869 0.6333 0.6250 eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); dbstack ; disp(which('test18')); v:\cursos\pos\otimiza\aulas\test18.m mdbstatus 'v:\cursos\pos\otimiza\aulas\test18.m' eval( 'if exist(''fgoalattain'',''var''), mauifunc(fgoalattain), end', ''); eval( 'if exist(''goal'',''var''), mauifunc(goal), end', ''); 0.5000 0.5000 eval( 'if exist(''goal'',''var''), mauifunc(goal), end', ''); 0.5000 0.5000 eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); 0.5000 0.5000 eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); 0.5000 0.5000 eval( 'if exist(''w'',''var''), mauifunc(w), end', ''); 0.5000 0.5000 eval( 'if exist(''w1'',''var''), mauifunc(w1), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 -0.1458 0.0000 0.0000 0.0000 0.0660 0.1429 0.2053 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.2608 0.3147 0.3742 0.5000 0.7629 0.6869 0.6333 0.6250 disp(which('pareto18')); disp(char(which('pareto18','-all'))); eval( 'if exist(''weights'',''var''), mauifunc(weights), end', ''); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 -0.1458 0.0000 0.0000 0.0000 0.0660 0.1429 0.2053 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.2608 0.3147 0.3742 0.5000 0.7629 0.6869 0.6333 0.6250 eval( 'if exist(''So'',''var''), mauifunc(So), end', ''); Columns 1 through 7 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.7629 0.6869 0.6333 0.6250 eval( 'if exist(''So'',''var''), mauifunc(So), end', ''); Columns 1 through 7 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.7629 0.6869 0.6333 0.6250 disp(which('pareto18')); disp(char(which('pareto18','-all'))); eval( 'if exist(''xo'',''var''), mauifunc(xo), end', ''); Columns 1 through 7 -0.1458 0.0000 0.0000 0.0000 0.0660 0.1429 0.2053 -1.0000 5.0000 2.5000 1.6667 1.2555 1.0204 0.8685 Columns 8 through 11 0.2608 0.3147 0.3742 0.5000 0.7629 0.6869 0.6333 0.6250 cd(cd) pareto18 Maximum number of function evaluations exceeded; increase OPTIONS.MaxFunEvals x = 0.0770 S = 1.0030 1.2157 gama = -0.3797 ex = 0 out = iterations: 41 funcCount: 202 stepsize: 2 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Magnitude of directional derivative in search direction less than 2*options.TolFun and maximum constraint violation is less than options.TolCon Active Constraints: 1 x = -1.4523e-008 S = 1.0000 1.5000 gama = 5.0000 ex = 1 out = iterations: 6 funcCount: 38 stepsize: 0.0020 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 x = -1.4624e-008 S = 1.0000 1.5000 gama = 2.5000 ex = 1 out = iterations: 6 funcCount: 38 stepsize: 9.7656e-004 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 x = -6.1019e-009 S = 1.0000 1.5000 gama = 1.6667 ex = 1 out = iterations: 5 funcCount: 25 stepsize: 0.1250 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.0660 S = 1.0022 1.2533 gama = 1.2555 ex = 1 out = iterations: 7 funcCount: 30 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.1429 S = 1.0102 1.0102 gama = 1.0204 ex = 1 out = iterations: 5 funcCount: 22 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.2053 S = 1.0211 0.8474 gama = 0.8685 ex = 1 out = iterations: 7 funcCount: 29 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.2608 S = 1.0340 0.7289 gama = 0.7629 ex = 1 out = iterations: 7 funcCount: 29 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Search direction less than 2*options.TolX and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.3147 S = 1.0495 0.6374 gama = 0.6869 ex = 1 out = iterations: 8 funcCount: 33 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Magnitude of directional derivative in search direction less than 2*options.TolFun and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.3742 S = 1.0700 0.5633 gama = 0.6333 ex = 1 out = iterations: 7 funcCount: 29 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] Optimization terminated successfully: Magnitude of directional derivative in search direction less than 2*options.TolFun and maximum constraint violation is less than options.TolCon Active Constraints: 1 2 x = 0.5000 S = 1.1250 0.5000 gama = 0.6250 ex = 1 out = iterations: 20 funcCount: 84 stepsize: 1 algorithm: 'goal attainment SQP, Quasi-Newton, line_search' firstorderopt: [] cgiterations: [] lambda = lower: 0 upper: 0 eqlin: [0x1 double] eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double] plot(F1,F2,F1e,F2e,'r') plot(xo,gamao) quit c=[2 -3 -2 -3]' c = 2 -3 -2 -3 A=[-1 -1 -1 -1; 10 5 3 4] A = -1 -1 -1 -1 10 5 3 4 b=[-2;10] b = -2 10 lb=[0;0;0;0]; ub=[inf;1;1;1]; help linprog LINPROG Linear programming. X=LINPROG(f,A,b) solves the linear programming problem: min f'*x subject to: A*x <= b x X=LINPROG(f,A,b,Aeq,beq) solves the problem above while additionally satisfying the equality constraints Aeq*x = beq. X=LINPROG(f,A,b,Aeq,beq,LB,UB) defines a set of lower and upper bounds on the design variables, X, so that the solution is in the range LB <= X <= UB. Use empty matrices for LB and UB if no bounds exist. Set LB(i) = -Inf if X(i) is unbounded below; set UB(i) = Inf if X(i) is unbounded above. X=LINPROG(f,A,b,Aeq,beq,LB,UB,X0) sets the starting point to X0. This option is only available with the active-set algorithm. The default interior point algorithm will ignore any non-empty starting point. X=LINPROG(f,A,b,Aeq,Beq,LB,UB,X0,OPTIONS) minimizes with the default optimization parameters replaced by values in the structure OPTIONS, an argument created with the OPTIMSET function. See OPTIMSET for details. Use options are Display, Diagnostics, TolFun, LargeScale, MaxIter. Currently, only 'final' and 'off' are valid values for the parameter Display when LargeScale is 'off' ('iter' is valid when LargeScale is 'on'). [X,FVAL]=LINPROG(f,A,b) returns the value of the objective function at X: FVAL = f'*X. [X,FVAL,EXITFLAG] = LINPROG(f,A,b) returns EXITFLAG that describes the exit condition of LINPROG. If EXITFLAG is: > 0 then LINPROG converged with a solution X. 0 then LINPROG reached the maximum number of iterations without converging. < 0 then the problem was infeasible or LINPROG failed. [X,FVAL,EXITFLAG,OUTPUT] = LINPROG(f,A,b) returns a structure OUTPUT with the number of iterations taken in OUTPUT.iterations, the type of algorithm used in OUTPUT.algorithm, the number of conjugate gradient iterations (if used) in OUTPUT.cgiterations. [X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=LINPROG(f,A,b) returns the set of Lagrangian multipliers LAMBDA, at the solution: LAMBDA.ineqlin for the linear inequalities A, LAMBDA.eqlin for the linear equalities Aeq, LAMBDA.lower for LB, and LAMBDA.upper for UB. NOTE: the LargeScale (the default) version of LINPROG uses a primal-dual method. Both the primal problem and the dual problem must be feasible for convergence. Infeasibility messages of either the primal or dual, or both, are given as appropriate. The primal problem in standard form is min f'*x such that A*x = b, x >= 0. The dual problem is max b'*y such that A'*y + s = f, s >= 0. [X,S]=LINPROG(c,A,b,[],[],lb,ub) Optimization terminated successfully. X = 0.0000 0.6000 1.0000 1.0000 S = -6.8000 lb=[0;0;0;0]; ub=[inf;0;1;1]; [X,S]=LINPROG(c,A,b,[],[],lb,ub) Optimization terminated successfully. X = 0.0000 0 1.0000 1.0000 S = -5.0000 lb=[0;1;0;0]; ub=[inf;1;1;1]; [X,S]=LINPROG(c,A,b,[],[],lb,ub) Optimization terminated successfully. X = 0.0000 1.0000 0.3333 1.0000 S = -6.6667 lb=[0;1;0;0]; ub=[inf;1;0;1]; [X,S]=LINPROG(c,A,b,[],[],lb,ub) Optimization terminated successfully. X = 0.0000 1.0000 0 1.0000 S = -6.0000 lb=[0;1;1;0]; ub=[inf;1;1;1]; [X,S]=LINPROG(c,A,b,[],[],lb,ub) Optimization terminated successfully. X = 0.0000 1.0000 1.0000 0.5000 S = -6.5000 lb=[0;1;1;0]; ub=[inf;1;1;0]; [X,S]=LINPROG(c,A,b,[],[],lb,ub) Optimization terminated successfully. X = 0.0000 1.0000 1.0000 0 S = -5.0000 lb=[0;1;1;1]; ub=[inf;1;1;1]; [X,S]=LINPROG(c,A,b,[],[],lb,ub) Exiting: One or more of the residuals, duality gap, or total relative error has grown 100000 times greater than its minimum value so far: the primal appears to be infeasible (and the dual unbounded). (The dual residual < TolFun=1.00e-008.) X = 0.0000 1.0000 1.0000 1.0000 S = -8.0000 help milp MILP Mixed-integer linear programming. Branch Bound Algorithm. [x,TC,nevals,XFlg] = milp(c,A,b,vlb,vub,N,R,opt) % % min c'*X subject to: A*X <= | = b % x real % y integer % X=[y;x] % Last R variables not integer. % VLB & VUB defines a set of lower and upper % bounds on the design variables, X, so that the solution is in % the range VLB <= X <= VUB. Use empty matrices for VLB and VUB % if no bounds exist. Set LB(i) = -Inf if X(i) is unbounded below; % set VUB(i) = Inf if X(i) is unbounded above. N = First N constraints equality constraints (=0, default) R = Last R variables not integer constrained (=0, default) varargin define a options vector. Options: opt = options structure, with fields: .Display =-1, no warning messages = 0, initial LP message (default) = 1, show steps of B&B evalutation = 2, also show TolFun changes .Martin = 0, don't use Martin cuts = 1, use Martin cuts if possible (default) .SOS = Special Ordered Sets of type one (SOS1) = 0, don't use (default) = 1, use if possible (and don't use Martin cuts) .RCthresh = reduced cost threshold percent of obj for Martin cuts = 0.05 (default) .TolInt = integer tolerance for ISINT = [1e-8], default .ExTolFun = opt.LPopt.TolFun expansion factor for LINPROG feasible = 10 (default) .LPopt = option structure for LINPROG, with MCNF default: .Display = 'none' = 'Field1',value1,'Field2',value2, ..., where multiple input arguments or single cell array can be used instead of the full options structure to change only selected fields opt = MILP('defaults'), to get defaults values for option structure type ex2milp ??? Error using ==> type ex2milp.m: File not found. what M-files in the current directory v:\cursos\pos\otimiza\aulas CATALIS ex_qp2 gtest2 pareto19 test15 EXTRATOR ex_qp3 gtest9 pareto20 test16 LUCRO ex_swarm hkjeeves pareto21 test17 MINQUA exmilp htest1 powell test18 MODELO exmilp2 htest2 qpsub test19 Minqua44 exmilprog interior refino test1m Modelo44 exmilprog2 karmarkar restr test2 OPT_RES extrat lmarqua restr1 test20 PLANOS fmincon1 lp_nlp restr14 test21 READ2 fminunc1 milp restr15 test22 SEMIDEF fminusub milp1 restr16 test23 SMODELO fun milprog restr17 test3 aurea func44 minlp restr20 test4 bandem1 gmilp1 minlp1 restr21 test5 bfgs gminlp1 minlp2 rosembr test6 bracket gminlp2 minlp3 set1 test7 buscarnd gminlp3 minlp4 setoptim test8 cgrad gminlp4 minlp5 sol_extrat test9 checkbounds gminlp5 minlp6 sqp univar coggins gminlp6 minlpn steepdes varmetr compdir gmodelagem modelagem swarm visual complex gmurray naturais test0 writearq dados_ex6_44 grad newton test1 xplot dfp grg newton_h test10 dual gtest1 newtont test11 ex2_karm gtest10 nlconst test12 ex_karma gtest12 nlp_internal test13 ex_qp1 gtest13 pareto18 test14 type exmilp2 echo on %Exenplo teste para a rotina MILP: %Funçao Objetivo: c=[-3 -2 -3 2] ; %Inequaçoes e Equaçoes: A=[-1 -1 -1 -1 ; 5 3 4 10]; b=[-2;10]; %limites: vlb=[0 0 0 0]; vub=[1 1 1 Inf]; %Numero de equaçoes: N=0; %Numero de ultimas variaveis reais: R=1; %vetor de opçoes opt = MILP('defaults'); opt.Display=1; [x,xr,TC,nevals,XFlg] = milp(c,A,b,vlb,vub,N,R,opt) echo off exmilp2 %Exenplo teste para a rotina MILP: %Funçao Objetivo: c=[-3 -2 -3 2] ; %Inequaçoes e Equaçoes: A=[-1 -1 -1 -1 ; 5 3 4 10]; b=[-2;10]; %limites: vlb=[0 0 0 0]; vub=[1 1 1 Inf]; %Numero de equaçoes: N=0; %Numero de ultimas variaveis reais: R=1; %vetor de opçoes opt = MILP('defaults'); opt.Display=1; [x,xr,TC,nevals,XFlg] = milp(c,A,b,vlb,vub,N,R,opt) NODE PRNT OBJ BND VAR 0 -6.8000 1 0 -5.0000 0 UB of 1 Incumbent 2 0 -6.6667 1 LB of 1 3 2 -6.0000 0 UB of 2 Incumbent 4 2 -6.5000 1 LB of 2 5 4 -5.0000 0 UB of 3 Fathomed: value dominance 6 4 -8.0000 1 LB of 3 Fathomed: infeasible Optimization terminated successfully. x = 1 0 1 xr = 0 TC = -6 nevals = 7 XFlg = 1 echo off help minlp * * * Solution of MINLP * * * Z = min(y,x) F(x,y) = C'y + f(x) s.t. G(x,y) = By + g(x) <= 0 x in X in R^n y in Y = {0,1}^m usage: [wo,St,x0,y0] = minlp(NLP,GRAD,n,m,rx,fig,x0,y0,xlb,xub,M,epsR,epsI,epsC,epsZ) wo : best solution found [x,y,u,Z] where u is the maximum constraint violation St : matrix = (number of constraints, number of LPs) for each NLP NLP : M file describing the NLP: [F,G] = nlp(x,y) with the first line: if size(x,2) > n, y = x(n+1:n+m); end GRAD : M file for gradients: [Fx,Gx,C,B] = grad(x,y) with the first line: if size(x,2) > n, y = x(n+1:n+m); end and last lines: if size(x,2) > n, Fx = [Fx C]; Gx = [Gx B]; end Gx = Gx'; rx : = 1 : relaxed initial NLP. = 0 : unrelaxed initial NLP (default) fig : = 1 : plot constraints surfaces. = 0 : no plots (default). x0 : initial guess for x (default = zeros(1,n)). Returns first solution. y0 : initial guess for y (default = round(rand(1,m))) xlb : lower bound for x (default = zeros(1,n)) xub : upper bound for x (default = inf * ones(1,n)) M > 0 : constraint violation penalization (default = 1e3) epsR : real variable tolerance (default = 1e-4) epsI : integer variable tolerance (default = 1e-4) epsC : constraint violation tolerance (default = 1e-6) epsZ : objective function tolerance (default = 1e-4) what M-files in the current directory v:\cursos\pos\otimiza\aulas CATALIS ex_qp2 gtest2 pareto19 test15 EXTRATOR ex_qp3 gtest9 pareto20 test16 LUCRO ex_swarm hkjeeves pareto21 test17 MINQUA exmilp htest1 powell test18 MODELO exmilp2 htest2 qpsub test19 Minqua44 exmilprog interior refino test1m Modelo44 exmilprog2 karmarkar restr test2 OPT_RES extrat lmarqua restr1 test20 PLANOS fmincon1 lp_nlp restr14 test21 READ2 fminunc1 milp restr15 test22 SEMIDEF fminusub milp1 restr16 test23 SMODELO fun milprog restr17 test3 aurea func44 minlp restr20 test4 bandem1 gmilp1 minlp1 restr21 test5 bfgs gminlp1 minlp2 rosembr test6 bracket gminlp2 minlp3 set1 test7 buscarnd gminlp3 minlp4 setoptim test8 cgrad gminlp4 minlp5 sol_extrat test9 checkbounds gminlp5 minlp6 sqp univar coggins gminlp6 minlpn steepdes varmetr compdir gmodelagem modelagem swarm visual complex gmurray naturais test0 writearq dados_ex6_44 grad newton test1 xplot dfp grg newton_h test10 dual gtest1 newtont test11 ex2_karm gtest10 nlconst test12 ex_karma gtest12 nlp_internal test13 ex_qp1 gtest13 pareto18 test14 type milp1 function [f_nlp,g_nlp] = nlp(x,y) if size(x,2) > 1 y = x(2:4); % NLP com integralidade relaxada end % * * * exemplo 1 (MILP) solved as MINLP - Floudas (1995) * * * f_nlp = 2*x(1)-3*y(1)-2*y(2)-3*y(3); g_nlp(1) = 2-x(1)-y(1)-y(2)-y(3); g_nlp(2) = 10*x(1)+5*y(1)+3*y(2)+4*y(3)-10; % [wo,St,x0,y0] = minlp('milp1','gmilp1',1,3,1,0,0,[0 0 0],0) type gmilp1 function [gf_nlp,gg_nlp,C,B] = grad (x,y) if size(x,2) > 1 y = x(2:4); % NLP com integralidade relaxada end % * * * exemplo 1 (MILP) solved as MINLP - Floudas (1995) * * * gf_nlp(1)=2; gg_nlp(1,1)=-1; gg_nlp(2,1)=10; if nargout > 2 | size(x,2) > 1 C = [-3, -2, -3]; B = [-1, -1, -1; 5, 3, 4]; end if size(x,2) > 1 % NLP com integralidade relaxada gf_nlp = [gf_nlp C]; gg_nlp = [gg_nlp B]; end gg_nlp=gg_nlp'; type milp1 function [f_nlp,g_nlp] = nlp(x,y) if size(x,2) > 1 y = x(2:4); % NLP com integralidade relaxada end % * * * exemplo 1 (MILP) solved as MINLP - Floudas (1995) * * * f_nlp = 2*x(1)-3*y(1)-2*y(2)-3*y(3); g_nlp(1) = 2-x(1)-y(1)-y(2)-y(3); g_nlp(2) = 10*x(1)+5*y(1)+3*y(2)+4*y(3)-10; % [wo,St,x0,y0] = minlp('milp1','gmilp1',1,3,1,0,0,[0 0 0],0) [wo,St,x0,y0] = minlp('milp1','gmilp1',1,3,1,0,0,[0 0 0],0) f-COUNT FUNCTION MAX{g} STEP Procedures 1 0 2 1 2 -6.73529 -3.55271e-015 1 Hessian modified twice 3 -6.76512 0 1 Hessian modified twice 4 -6.8 0 1 Hessian modified twice 5 -6.8 0 1 Hessian modified twice Optimization Converged Successfully Active Constraints: 2 f-COUNT FUNCTION MAX{g} STEP Procedures 1 -8 2 1 infeasible 2 -8.2 1 1 Hessian modified twice; infeasible 3 -8.2 1 1 Hessian modified twice; infeasible Warning: No feasible solution found. f-COUNT FUNCTION MAX{g} STEP Procedures 1 -5 0 1 2 -5 0 1 Optimization Converged Successfully Active Constraints: 1 f-COUNT FUNCTION MAX{g} STEP Procedures 1 -6 0 1 2 -6 0 1 Optimization Converged Successfully Active Constraints: 1 wo = 0.0000 1.0000 0 1.0000 0 -6.0000 St = 3 2 4 3 5 4 x0 = -0.1000 y0 = 1 1 1 help milprog %MILPROG Linear programming by exaustive search. % X=MILPROG(f,n,m,A,b) solves the mixed integer linear programming problem: % % min f'*X subject to: A*X <= b % x,y % x real % y integer % X=[x;y] % n=number of real variables % m=number of integer variables % X=MILPPROG(f,n,m,A,b,Aeq,beq) solves the problem above while additionally % satisfying the equality constraints Aeq*[x;y] = beq. % % X=MILPROG(f,n,m,A,b,Aeq,beq,LB,UB) defines a set of lower and upper % bounds on the design variables, X, so that the solution is in % the range LB <= X <= UB. Use empty matrices for LB and UB % if no bounds exist. Set LB(i) = -Inf if X(i) is unbounded below; % set UB(i) = Inf if X(i) is unbounded above. % % X=MILPROG(f,n,m,A,b,Aeq,beq,LB,UB,X0) sets the starting point to X0. This % option is only available with the active-set algorithm. The default % interior point algorithm will ignore any non-empty starting point. % % X=MILPROG(f,n,m,A,b,Aeq,Beq,LB,UB,X0,OPTIONS) minimizes with the default % optimization parameters replaced by values in the structure OPTIONS, an % argument created with the OPTIMSET function. See OPTIMSET for details. % Use options are Display, Diagnostics, TolFun, LargeScale, MaxIter. % Currently, only 'final' and 'off' are valid values for the parameter % Display when LargeScale is 'off' ('iter' is valid when LargeScale is 'on'). % % [X,FVAL]=MILPROG(f,n,m,A,b) returns the value of the objective function at X: % FVAL = f'*X. % % [X,FVAL,EXITFLAG] = MILPROG(f,A,b) returns EXITFLAG that % describes the exit condition of LINPROG. % If EXITFLAG is: % > 0 then LINPROG converged with a solution X. % 0 then LINPROG reached the maximum number of iterations without converging. % < 0 then the problem was infeasible or LINPROG failed. % % [X,FVAL,EXITFLAG,OUTPUT] = MILPROG(f,n,m,A,b) returns a structure % OUTPUT with the number of iterations taken in OUTPUT.iterations, the type % of algorithm used in OUTPUT.algorithm, the number of conjugate gradient % iterations (if used) in OUTPUT.cgiterations. % % [X,FVAL,EXITFLAG,OUTPUT,LAMBDA,NLP,POS]=MILPROG(f,n,m,A,b) returns the set of % Lagrangian multipliers LAMBDA, at the solution: LAMBDA.ineqlin for the % linear inequalities A, LAMBDA.eqlin for the linear equalities Aeq, % LAMBDA.lower for LB, and LAMBDA.upper for UB.NLP returns the number of % LINPTOG evaluations.POs returns the position of the the solution, use to % analize the results. % % NOTE: the LargeScale (the default) version of MILPROG uses LINPROG that use a primal-dual % method. Both the primal problem and the dual problem must be feasible % for convergence. Infeasibility messages of either the primal or dual, % or both, are given as appropriate. The primal problem in standard % form is % min f'*x such that A*x = b, x >= 0. % The dual problem is % max b'*y such that A'*y + s = f, s >= 0. % Authors: Argimiro R. Secchi & % Marcelo Escobar % Chemical Engineering Department % Applied Math Department % Universidade Federal do Rio Grande do Sul, Brasil % arge@enq.ufrgs.br | escobar@enq.ufrgs.br % % version 1.0: 15/agosto/2004 If just 'defaults' passed in, return the default options in X type exmilprog2 %Apostila de Otimizacao Argimiro pag.130 f=[2 -3 -2 -3] A=[-1 -1 -1 -1;10 5 3 4] B=[-2;10] lb=[0 0 0 0] ub=[Inf 1 1 1] n=4; %numero de variaveis m=3; %numero de varuavies binarias x0=[]; options=[]; Aeq=[0 1 0 1] Beq=[2] [X,FVAL,EXITFLAG,OUTPUT,LAMBDA,NLP,POS]=MILPROG(f,n,m,A,B,[],[],lb,ub,x0,options) %[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,NLP,POS]=MILPROG(f,n,m,A,B,Aeq,Beq,lb,ub,x0,options) exmilprog2 f = 2 -3 -2 -3 A = -1 -1 -1 -1 10 5 3 4 B = -2 10 lb = 0 0 0 0 ub = Inf 1 1 1 Aeq = 0 1 0 1 Beq = 2 Exiting: One or more of the residuals, duality gap, or total relative error has stalled: the primal appears to be infeasible (and the dual unbounded). (The dual residual < TolFun=1.00e-008.) Optimization terminated successfully. Optimization terminated successfully. Optimization terminated successfully. Optimization terminated successfully. Optimization terminated successfully. Optimization terminated successfully. Optimization terminated successfully. ==================================== ==================================== RESULTADOS OBTIDOS: X = 0.0000 1.0000 0 1.0000 FVAL = -6.0000 EXITFLAG = [-1] [1] [1] [1] [1] [1] [1] [1] OUTPUT = Columns 1 through 4 [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] Columns 5 through 8 [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] LAMBDA = Columns 1 through 4 [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] Columns 5 through 8 [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] NLP = 7 POS = 6 quit