Genetic algorithm optimization
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!