Viennet
Problem definition
Objective function
f = @(x) [ 0.5*sum(x.^2,2) + sin(sum(x.^2,2)), ... (3*x(:,1)-2*x(:,2)+4).^2/8 + (x(:,1)-x(:,2)+1).^2/27 + 15, ... 1./(sum(x.^2,2)+1) - 1.1*exp(-sum(x.^2,2)) ]
Optimization settings
o = struct% initializing struct
o.d = 2% dimension of decision variable
o.lb = -5% lower bounds
o.ub = 5% upper bounds
Problem properties
dimension | objectives | smoothness |
2 | 3 | - |
Optimization example with nsga2
Algorithm options
o.maxit = 100% number of iterations
o.pop = 40% 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 = 5% frame frequency
optimview('nsga2',info)