How to optimize this equation using GA tool?

5 ビュー (過去 30 日間)
Raja
Raja 2013 年 7 月 25 日
Hi all, I have polynomial equation: y =89.81+1.96*x(1)-3.02*x(2)-1.46*x(1)^2-1*x(2)^2-4.45*x(3)^2-1.57*x(1)*x(3)-2.74*x(2)*x(3) and I am looking for optimization of the above equation with Lower bounds [-1.68 -1.68 -1.68] and Upper bounds [1.68 1.68 1.68]. When I feed this equation in GA tool and run....I get an output of
"Objective function value: 56.37940293199839 Optimization terminated: average change in the fitness value less than options.TolFun."
But for the same equation, by polynomial regression I get an output of 94.73! can anybody help?

採用された回答

Alan Weiss
Alan Weiss 2013 年 7 月 25 日
I don't understand what you think the problem is. The objective function that ga found is better than the one you get by "polynomial regression." So is your problem that ga got a better answer? Or that you think the answer is wrong?
I just ran your problem, and here is what I got:
fun = @(x)89.81+1.96*x(1)-3.02*x(2)-1.46*x(1)^2-1*x(2)^2-4.45*x(3)^2-1.57*x(1)*x(3)-2.74*x(2)*x(3);
lb = -1.68*ones(3,1);
ub = -lb;
[x,fval] = ga(fun, 3,[],[],[],[],lb,ub)
Optimization terminated: average change in the fitness value less than options.TolFun.
x =
1.6789 1.6800 1.6800
fval =
56.3686
Checking with fmincon shows that this is a good answer.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 件のコメント
Raja
Raja 2013 年 7 月 26 日
thanx a lot sir, I got the answer!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by