Reputation: 317
I know there are several topics regarding this, but none of them answers my question. My question is the following. If i use this multi-objective function:
function y = GAMultiobjectiveFunction(x)
q=x(1);
d=x(2);
y(1) = -(rev(q) - cost(q, d)); %by minimizing we will make -(profit) to be minimum,
%meaning that +(profit) will be the maximum
y(2) = 3*(power(q, 1.4))*((log(power(q,3)*d))/(d+10))+(rand*30);
end
in the optimization toolbox and I want to solve it by the genetic algorithm method, do I have to use the "gamultiobj" option? I want the parameters that minimize both equations. How do i know that it will look for the parameters that make those equations reach the minimum? I cannot specify it anywhere.
Thank you very much, Jan
Upvotes: 0
Views: 799
Reputation: 26
Yes, if you want to minimize both you need the gamultobj function.
http://www.mathworks.com/help/gads/gamultiobj.html
h = @(X)GAMultiobjectiveFunction(X);
[x,f,exitflag] = gamultiobj(h,2,[],[],[],[],... lb,ub,options);
Upvotes: 1