GA optimization with multiple variables and constraints

조회 수: 7 (최근 30일)
Yaser Khojah
Yaser Khojah 2018년 4월 19일
편집: Yaser Khojah 2018년 4월 19일

I have a function named (Kings) that I would like to optimize using GA. So far, I was able to put this problem. However, I'm struggling to construct the linear constraints A·x ≤ b.

Below is what I have done so far to maximize my objective if true % code

nvars = 168;

upbond = [5000 3000 1100 4000 2900 1100 800 2700];

lowbond = [2000 1000 500 1000 1000 300 300 700];

ub = [repmat(upbond, 1,20) 19* ones(1,8)];

lb = [repmat(lowbond,1,20) zeros(1,8)];

[xGA,fvalGA] = ga(@kings,nvars,[],[],[],[],lb,ub);

Kings Function is:

NetPV = kings(xxxx)

Rates = xxxx(1:160);

Rates = vec2mat(Rates,8);

time = floor(xxxx(161:end)); The first 160 variables are the rate of each field at different years and the last 8 defines the time to start these fields. A photo below explains the definitions of these variables. I need help to define the linear constraints; the sum of all rates at a given year should equal the demand year. The lower and upper bonds are the rates each field can run at.

end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by