MATLAB: Multiobjective optimization with constraints

multiobjective optimization

Hi All,
I am trying to solve a game theoretic scenario where I have two players that each have three decision variables. They each have their own individual utility functions with their payoffs depending on what the other one does. As a result, I have to optimize these two equations simulataneously. I've looked into using the gamultiobj tool, and I've tried to follow an example from the MATLAB website, but obviously my scenario is a little bit more complicated. They just had one variable, whereas I have six variables in total, with additional constraints of all variables being nonnegative, and x(5) and x(6) being <=24. I'm not exactly sure where I went wrong, especially since my situation differs quite a bit from the example, so i would greatly appreciate any and all help. I've included my code below (the example, then mine). Thanks in advance!
% Example version
fitnessfcn = @(x)[sin(x),cos(x)];
nvars = 1;
lb = 0;
ub = 2*pi;
rng default % for reproducibility

x = gamultiobj(fitnessfcn,nvars,[],[],[],[],lb,ub)
plot(sin(x),cos(x),'r*')
xlabel('sin(x)')
ylabel('cos(x)')
title('Pareto Front')
legend('Pareto front')
%My version
funx=-0.5*x(1)^2+100*log(x(1)+x(2)-14)-x(5)/2+0.9*(-0.5*(1-x(5)/40)*x(3)^2+100*log(x(3)+x(4)-14))
funy=-0.5*x(2)^2+100*log(x(1)+x(2)-14)-x(6)/2+0.9*(-0.5*(1-x(5)/40)*x(4)^2+100*log(x(3)+x(4)-14))
fitnessfcn = @(x)[funx,funy];
nvars = 2;
lb = [0,0,0,0,0,0];
ub = [Inf,Inf,Inf,Inf,24,24];
rng default % for reproducibility
x = gamultiobj(fitnessfcn,nvars,[],[],[],[],lb,ub)
plot(funx,funy,'r*')
xlabel('funx')
ylabel('funy')
title('Pareto Front')
legend('Pareto front')

Best Answer

Your input data is inconsistent:
nvars = 2;
lb = [0,0,0,0,0,0];
ub = [Inf,Inf,Inf,Inf,24,24];
Your bounds are on your decision variables, not your objective functions. The nvars argument refers to exactly this, so you should have nvars = 6.
Your other errors relate to how to call functions and use ther resulting data. Your fitness functions need initial @x arguments:
funx = @(x)-0.5*x(1)^2+100*log(x(1)+x(2)-14)-x(5)/2+0.9*(-0.5*(1-x(5)/40)*x(3)^2+100*log(x(3)+x(4)-14));
funy = @(x)-0.5*x(2)^2+100*log(x(1)+x(2)-14)-x(6)/2+0.9*(-0.5*(1-x(5)/40)*x(4)^2+100*log(x(3)+x(4)-14));
fitnessfcn = @(x)[funx(x),funy(x)];
Your plot needs to pass the data to the objective functions:
plot(funx(x),funy(x),'r*')
When I ran this code I got other errors relating to the function being complex-valued. You also need to include linear constraints that keep the function from having complex values. But this should get you started.
Alan Weiss
MATLAB mathematical toolbox documentation