Optimizing the strategy of a hydro power station in the electricity market.

Problems with modeling
Post Reply
Richy46_
User
User
Posts: 1
Joined: 6 years ago

Optimizing the strategy of a hydro power station in the electricity market.

Post by Richy46_ »

I have tried with no sucess to modelate this problem:

OPTIMIZATION MODELING PROJECTS

5 13/09/2017

II Optimizing the strategy of a hydro power station in the electricity market. A utility that owns hydro power stations is willing to optimize its daily strategy in the electricity market for the upcoming month. This is the representation of the system of dams that it owns:

where:

- I1, I2: Natural Inflows - T1, T2: Hydro power stations - S1, S2: Hydro spillages. - Maximum capacity of R1: 100 GWh - Maximum capacity of R2: 40 GWh - Maximum daily production for T1: 20 GWh - Maximum daily production for T2: 30 GWh - Initial level of R1: 50 GWh - Initial level of R2: 10 GWh - Final desired level of R1: 75 GWh - Final desired level of R2: 10 GWh
And these are both the daily inflows and prices that they are expecting:

  INFLOWS 1   (MWh) 
INFLOWS 2   (MWh) 
PRICES   (€/MWh) 
INFLOWS 1  (MWh) 
INFLOWS 2  (MWh) 
PRICES  (€/MWh)
INFLOWS 1   (MWh) 
INFLOWS 2  (MWh) 
PRICES  (€/MWh) d1  6400  1000  50  d11 10100  1900  10  d21  7400  1200  10  d2  5700  900  50  d12 8100  1700  10  d22  7100  1100  70  d3  5400  900  20  d13 12200  1700  40  d23  5600  1000  40  d4  8800  1100  10  d14 21900  2200  50  d24  6100  1100  50  d5  10700  1600  10  d15 18200  2200  80  d25  5200  1100  60  d6  15000  2100  0  d16 12100  1800  90  d26  5400  1100  10  d7  13000  2100  0  d17 9100  1500  50  d27  4600  1000  0  d8  21200  2500  10  d18 8800  1300  20  d28  5200  1000  0  d9  12400  2600  40  d19 7500  1400  30  d29  8800  1200  0  d10  11900  2400  40  d20 7300  1200  40  d30  14300  1400  10 


a) Which should be the optimal daily production pattern that the company should carry out in order to obtain the maximum benefit?
OPTIMIZATION MODELING PROJECTS

b) How much more money would the company earn if the maximum daily production of the hydro power plant 2 rose in 10 GWh?

c) Due to environmental constraints, the total generating outcome of the hydro power station 2 must be lower or equal to 250 GWh in the whole month. How does the strategy change in that case?

And this is my code for GAMS:

SETS
i natural inflows /I1,I2/
j hydro power stations /T1,T2/
k hydro spillages /S1,S2/
l tanks /R1,R2/
m days /D1,D2,D3,D4,D5,D6,D7,D8,D9,D10,D11,D12,D13,D14,D15,D16,D17,D18,D19,D20,D21,D22,D23,D24,D25,D26,D27,D28,D29,D30/

PARAMETERS
c(l) maximun capacity of tank l
/R1 100000, R2 40000/
a(j) maximun daily production for j
/T1 20000, T2 30000/
b(l) initial level of tank l
/R1 50000, R2 10000/
d(l) desired final desired level of tank l
/R1 75000, R2 10000/
p(m) price of MWh in day m
/D1 50, D2 50, D3 20, D4 10, D5 10, D6 0, D7 0, D8 10, D9 40, D10 40, D11 10, D12 10, D13 40, D14 50, D15 80, D16 90, D17 50, D18 20, D19 30, D20 40, D21 10, D22 70, D23 40, D24 50, D25 60, D26 10, D27 0, D28 0, D29 0, D30 10/

TABLE w(m,i) daily inflow of day m of i
I1 I2
D1 6400 1000
D2 5700 900
D3 5400 900
D4 8800 1100
D5 10700 1600
D6 15000 2100
D7 13000 2100
D8 21200 2500
D9 12400 2600
D10 11900 2400
D11 10100 1900
D12 8100 1700
D13 12200 1700
D14 21900 2200
D15 18200 2200
D16 12100 1800
D17 9100 1500
D18 8800 1300
D19 7500 1400
D20 7300 1200
D21 7400 1200
D22 7100 1100
D23 5600 1000
D24 6100 1100
D25 5200 1100
D26 5400 1100
D27 4600 1000
D28 5200 1000
D29 8800 1200
D30 14300 1400

VARIABLES
VFO value of the objective function: maximize the benefit by carrying out the optimal daily production pattern
X(j,m) MWh produced by the hydro power station j in day m
Y(m) spillages in MWh in S1 in day m
Z(m) spillages in MWh in S2 in day m
E(m,l) level of tank l at beggining of day m
F(m,l) level of tank l at the end of day m
POSITIVE VARIABLES X,Y,Z,E,F

EQUATIONS
OF objective function: maximizing the benefits
RESTRICTION1(m,l) the capacity of the tank l at day m can't be overpassed
LEV1(m) level of R1 in the end of day m
LEV2(m) level of R2 in the end of day m
CONDITION(m,l) the level of l at the end of day m equals to the level of l at the beggining of day m+1
LEVIN(l) initial level of l
LEVFIN(l) final level of l
PRODMAX1(m) maximun production of T1
PRODMAX2(m) maximun production of T2
;
OF .. VFO =E= SUM((j,m),X(j,m)*p(m));
CONDITION(m,l) .. E(m+1,l) =E= F(m,l);
LEVIN(l) .. E('D1', l) =E= b(l);
LEVFIN(l) .. F('D30', l) =E= d(l);
RESTRICTION1(m,l) .. E(m,l) =L= c(l);
PRODMAX1(m) .. X('T1',m) =L= a('T1');
PRODMAX2(m) .. X('T2',m) =L= a('T2');
LEV1(m) .. F(m,'R1') =E= E(m,'R1')+w(m,'I1')-X('T1',m)-Y(m);
LEV2(m) .. F(m,'R2') =E= E(m,'R2')+w(m,'I2')+X('T1',m)+Y(m)-X('T2',m)-Z(m);
;

MODEL SECTION_A /ALL/

SOLVE SECTION_A USING LP MAXIMIZING VFO


Can anybody please help me?? Thanks soo much :)
Post Reply