optimize four functions together
Afficher commentaires plus anciens
Hello,
I have four functions and I want to optimize them together by ga. I know that I can solve each function alone and I already got an answer about that, but if I have all of them. The values I want to get is F1=0.405, F2=24.736 ,F3=0.525, F4=14.97. I approciate any help.
F1=@(x) 0.25-4.27*x(1)+0.61*x(2)+13.34*x(1)*x(2)-4.69*x(2).^2;
F2 = @(x) 30.07+71.68*x(1)-21.83*x(2)-306.55*x(1)*x(2)+179*x(2)^2;
F3 = @(x) 0.54-18.32*x(3)-10.6*x(1)-3.22*x(2)+0.3*x(4)+273.71*x(3)*x(1)+60.28*x(1)*x(2)-19.81*x(2).^2;
F4 = @(x) 17.39+1246.36*x(3)+348.83*x(1)-88.27*x(2)-43.72*x(4)-24455.25*x(3)*x(1)-1164.66*x(1)*x(2)+347.38*x(2)*x(4);
FitnessFunction=[F1;F2;F3;F4];
% [ fn, fc, f0, ff] ; % the range like this
lb = [0.001,0.01,0.0002,0.1];
ub = [0.045,0.1,0.0045,0.2];
numberOfVariables = 4;
A = []; b = [];
Aeq = []; beq = [];
[x,fval] = ga(FitnessFunction, numberOfVariables, A, b, Aeq, beq, lb, ub)
Many thanks
Réponse acceptée
Plus de réponses (1)
Catégories
En savoir plus sur Nonlinear Least Squares (Curve Fitting) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!