I have a problem with bounds in ga
조회 수: 1 (최근 30일)
이전 댓글 표시
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....
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!