tnk

Problem definition

Objective function
f = @(x) [x(:,1) x(:,2)] 
Optimization settings
o = struct	

% initializing struct

g1 = @(x) sum(x.^2,2) - 1 - 0.1*cos(16*atan(x(:,1)./x(:,2))) g2 = @(x) 0.5 - sum((x-0.5).^2,2) o.g = @(x) g1(x).*(g1(x)<0) + g2(x).*(g2(x)<0)

% constraints

o.d = 2

% dimension of decision variable

o.lb = 0

% lower bounds

o.ub = pi

% upper bounds

Problem properties

dimension objectives smoothness
2 2 -

Optimization example with nsga2

Algorithm options
o.maxit = 200	

% number of iterations

o.pop = 100

% 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 = 10

% frame frequency

optimview('nsga2',info)

References

[1] M. Tanaka, "GA-based decision support system for multi-criteria opimization", Proceeding of the International Conference on Systems, Man and Cybernetics-2, pp. 1556-1561, 1995

Related functions

nsga2 | plot | scatter