SchafferMO1

Problem definition

Objective function
f = @(x) [sum(x.^2,2), sum((x-2).^2,2)]
Optimization settings
o = struct	

% initializing struct

o.d = 3

% dimension of decision variable

o.lb = -1000

% lower bounds

o.ub = 1000

% upper bounds

Problem properties

dimension objectives smoothness
3 2 -

Optimization example with nsga2

Algorithm options
o.maxit = 100	

% number of iterations

o.pop = 60

% number of population

Optimization
rng(0)	

% for tractability

[popPos,popFront,popCost,popInfo,traceIt] = nsga2(f,o)

% running minimization

Animation
rng(0)
[~,~,~,~,~,info] = nsga2(f,o)
info.plot = 'pareto'
info.animate = true	

% plot animation

info.animfreq = 4

% frame frequency

info.animstart = 20

% iteration to start animation

optimview('nsga2',info)

Related functions

nsga2 | plot | scatter