How to optimize this equation using GA tool?

조회 수: 6 (최근 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 CenterFile Exchange에서 Solver 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