필터 지우기
필터 지우기

Genetic algorithm optimization

조회 수: 4 (최근 30일)
Mario
Mario 2011년 8월 13일
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개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by