% % This calls a pareto genetic algorithm routine which is used to perform % multidimensional objective optimization (MOO) in the case where there are % *two* continious functions to minimize % % See EPage 117 of Haupt and Haupt for the example considered here % % Written by: % -- % John L. Weatherwax 2006-08-28 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear; %close all; clc; randn('seed',0); rand('seed',0); addpath('../Chapter3'); % Parameters used in the genetic algorithm % popsize = 300; % the population size selection = 0.5; % selection rate mutrate = 0.02; % the mutation rate maxit = 50; % a function to minimize (and its bounds) % bounds = [ 1, 2 ; 1, 2; 1, 2; 1, 2 ]; % the true functions domain % our function needs to be able to evaluate an entire population and produce two columns % for the evaluate of f_1 and f_2 % wfn = @(x) chap_5_prob_2_original_fns(x) ; [pop,pop_costs] = pareto_GA( wfn, bounds, popsize, selection, mutrate, maxit ); disp('top 5 solution x values'); pop(1:5,:) disp('top 5 f(x) values'); pop_costs(1:5,:) %saveas(gcf,'../../WriteUp/Graphics/Chapter5/chap_5_prob_3_pareto_front.eps','epsc');