I have a problem with bounds in ga

2 visualizaciones (últimos 30 días)
Don Alexander
Don Alexander el 25 de Mayo de 2015
Comentada: Don Alexander el 26 de Mayo de 2015
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....

Respuesta aceptada

Alan Weiss
Alan Weiss el 26 de Mayo de 2015
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

Más respuestas (0)

Categorías

Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by