Borrar filtros
Borrar filtros

Genetic algorithm optimization

4 visualizaciones (últimos 30 días)
Mario
Mario el 13 de Ag. de 2011
Hi everybody, I want to make an optimization that with discrete variables. I found that I have to use the genetic algorithm, but before that I want to understand if I can realize what I have in mind. I want to do somenthing like this:
function to minimize:
Cost = c1*x(1) + c2*x(2) + c3*x(3) + c4*x(4);
x(i) are the variables
constrains:
LPSP < 0.05
tank(t,1) > 0
1) first constrain
where t is the time every 10 minutes in one year (total = 52560)
Pgen(t) = x(1)*P1(t) + x(2)*P2(t) + x(3)*P3(t) + x(4)*P4(t) - Pload(t);
totalTime = 52560;
time = 0;
for t = 1:totalTime
if (Pgen(t) < 0)
time = time + 1;
end
end
LPSP = time/totalTime;
2) second constrain
for t = 1:totalTime
if (Pgen(t) > 0)
tank(t,1) = tank(t-1,1) + Prod;
else
tank(t,1) = tank(t-1,1) - Consume;
end
end
Prod and Consume are quantities that is found resolving a non linear equation that depence on the Pgen
Prod = function(Pgen)
Consume = function(Pgen)
Thanks

Respuestas (0)

Categorías

Más información sobre Genetic Algorithm 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