I have a problem with bounds in ga

2 ビュー (過去 30 日間)
Don Alexander
Don Alexander 2015 年 5 月 25 日
コメント済み: Don Alexander 2015 年 5 月 26 日
I am new to GA & Matlab. I have written a code to minimise an objective function in matlab. But every time i run it vaible X(2) & x(3) are always the upperbound values specified. f i change the ub the again X(2) & X(3) again becomes the ub values.. Please help................!!!!!!!!
I am attaching the codes...... Thanks in Advance....

採用された回答

Alan Weiss
Alan Weiss 2015 年 5 月 26 日
Your fitness function is
function y= simple_fitcat1(x)
y =(300*x(1)-(pi*x(2)*x(3)^2*0.25))*1000*0.05 + ((7.85*10^-6*x(2)*pi*x(3)^2*1000)*10);
and your lower bounds ensure that all variables are positive. So it is obvious that minimizing simple_fitcat1 entails making x(2) and x(3) as large as possible.
ga is just solving the problem that you gave it. Try using fmincon, you'll get the same answer, but more quickly and reliably.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 件のコメント
Don Alexander
Don Alexander 2015 年 5 月 26 日
Thanks......

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by