Multiobjective optimization with constraints
Show older comments
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')
Accepted Answer
More Answers (0)
Categories
Find more on Multiobjective Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!