$OFFSYMLIST OFFSYMXREF OFFLISTING
** Non-dominated solutions (weighted approach) for the regions MGEP2
OPTIONS
LP=CPLEX,
NLP=MINOS5,
MIP=CPLEX,
SOLPRINT=Off,
LIMCOL=0,
LIMROW=0;
Sets
i nodes / n1*n26 /
q type of units / 1*8 /
k type of fossil fuel / 1*4 /
m objectives /1*4/
p periods /1*11/
r set of random samples /1*2000/
CONEX set of connections between nodes
/
n1.n2
n2.n3
n4.n3
n4.n7
n4.n12
n5.n1
n6.n5
n7.n6
n7.n9
n7.n14
n8.n6
n8.n9
n9.n11
n9.n14
n9.n10
n10.n18
n10.n14
n12.n14
n12.n15
n13.n12
n15.n14
n15.n17
n16.n12
n16.n15
n16.n17
n16.n19
n18.n17
n18.n20
n19.n17
n20.n17
n20.n21
n20.n22
n21.n22
n22.n23
n23.n24
n24.n26
n24.n25
/
MAPT(q,k) associate type of units with fossil-fuel types
/
1.1
2.2
3.2
4.3
5.4
/
;
Alias(i,j);
Table Ndem(i,p) nodes input data
2 3 4 5 6 7 8 9 10 11
* (MW) (MW) (MW) (MW) (MW) (MW) (MW) (MW) (MW) (MW)
n1 1277.36 1335.95 1396.40 1460.10 1532.18 1614.95 1697.25 1776.77 1845.59 1922.78
n2 469.74 491.28 513.51 536.94 563.45 593.88 624.15 653.39 678.70 707.09
n3 793.88 830.30 867.87 907.46 952.26 1003.70 1054.85 1104.27 1147.04 1195.02
n4 206.03 215.48 225.23 235.50 247.13 260.48 273.75 286.58 297.68 310.13
n5 897.39 948.72 992.68 1044.89 1099.17 1162.60 1228.09 1292.69 1359.07 1425.44
n6 982.57 1038.77 1086.90 1144.07 1203.50 1272.94 1344.65 1415.39 1488.06 1560.74
n7 1162.04 1228.51 1285.43 1353.04 1423.33 1505.46 1590.27 1673.92 1759.87 1845.82
n8 997.78 1040.99 1092.00 1148.63 1213.06 1293.71 1374.98 1458.91 1545.02 1639.72
n9 3869.58 4037.17 4235.00 4454.62 4704.48 5017.27 5332.47 5657.96 5991.92 6359.16
n10 677.98 707.34 742.00 780.48 824.26 879.06 934.28 991.31 1049.82 1114.17
n11 850.67 887.51 931.00 979.28 1034.21 1102.97 1172.26 1243.82 1317.23 1397.96
n12 1725.07 1845.59 1962.62 2067.20 2191.45 2326.66 2457.88 2595.33 2729.29 2861.76
n13 284.05 303.89 323.16 340.38 360.84 383.10 404.71 427.34 449.40 471.21
n14 1427.17 1526.87 1623.69 1710.21 1813.01 1924.86 2033.43 2147.14 2257.97 2367.56
n15 2743.49 2935.15 3121.27 3287.59 3485.20 3700.22 3908.92 4127.51 4340.56 4551.23
n16 748.22 800.50 851.26 896.62 950.51 1009.15 1066.07 1125.68 1183.79 1241.24
n17 8347.00 8762.00 9120.00 9453.00 9852.00 10298.00 10744.00 11196.00 11615.00 12069.00
n18 2668.27 2852.21 3011.71 3176.29 3367.61 3569.52 3766.83 3972.44 4175.28 4406.24
n19 503.56 538.27 568.37 599.43 635.54 673.64 710.88 749.68 787.96 831.55
n20 694.56 742.44 783.96 826.80 876.60 929.16 980.52 1034.04 1086.84 1146.96
n21 764.02 816.68 862.36 909.48 964.26 1022.08 1078.57 1137.44 1195.52 1261.66
n22 1157.60 1237.40 1306.60 1378.00 1461.00 1548.60 1634.20 1723.40 1811.40 1911.60
n23 226.20 239.66 255.06 271.25 290.94 312.78 333.26 354.12 377.91 404.04
n24 622.92 659.97 702.40 746.97 801.20 861.35 917.73 975.19 1040.71 1112.66
n25 100.92 106.92 113.80 121.02 129.80 139.55 148.68 157.99 168.61 180.26
n26 209.96 222.45 236.75 251.77 270.05 290.32 309.33 328.70 350.78 375.03
;
Table Adata(i,i,*) arcs input data
caparc ftrans vtrans lenght
* (MW) ($/MW) ($/MW) (km)
n1.n2 500 3.903 0.208 150
n2.n3 220 3.903 0.208 141
n4.n3 750 3.903 0.208 247
n4.n7 300 3.903 0.208 176
n4.n12 320 3.903 0.208 252
n5.n1 380 3.903 0.208 176
n6.n5 500 3.903 0.208 193
n7.n6 350 3.903 0.208 329
n7.n9 260 3.903 0.208 215
n7.n14 250 3.903 0.208 263
n8.n6 225 3.903 0.208 600
n8.n9 2100 3.903 0.208 203
n9.n11 1000 3.903 0.208 251
n9.n14 1000 3.903 0.208 410
n9.n10 1150 3.903 0.208 448
n10.n18 1000 3.903 0.208 231
n10.n14 1500 3.903 0.208 351
n12.n14 650 3.903 0.208 194
n12.n15 750 3.903 0.208 225
n13.n12 1700 3.903 0.208 211
n15.n14 850 3.903 0.208 99
n15.n17 1000 3.903 0.208 232
n16.n12 400 3.903 0.208 254
n16.n15 460 3.903 0.208 366
n16.n17 1900 3.903 0.208 254
n16.n19 200 3.903 0.208 215
n18.n17 3400 3.903 0.208 280
n18.n20 1300 3.903 0.208 229
n19.n17 400 3.903 0.208 142
n20.n17 2800 3.903 0.208 231
n20.n21 1550 3.903 0.208 231
n20.n22 2200 3.903 0.208 392
n21.n22 2200 3.903 0.208 147
n22.n23 435 3.903 0.208 296
n23.n24 435 3.903 0.208 281
n24.n26 435 3.903 0.208 170
n24.n25 150 3.903 0.208 291
;
Adata(i,i,'caparc') = Adata(i,i,'caparc')*0.9;
Adata(i,i,'ftrans') = Adata(i,i,'ftrans')*1000;
Adata(i,i,'vtrans') = Adata(i,i,'vtrans')*1000;
Table Tdata(q,*) technologies input data
capacity avail consume fueltype co2em invg omvg
* (MW) (units/MW) (T/MW) ($/MW) ($/MW)
1 350 0.90 1.54000 1 0.795 840430 12522.1
2 560 0.93 7.00893 2 0.359 473630 19706.3
3 184 0.90 10.43537 3 0.508 417510 12522.1
4 350 0.92 0.46587 3 0.957 1344000 22579.0
5 1506 0.95 2.68000 4 0.000 1910000 49300.0
6 230 0.91 0.00000 0.000 1800000 23000.0
7 100 0.40 0.00000 0.000 1200000 30000.0
8 200 0.99 0.00000 0.000 2000000 25000.0
;
Table Fdata(k,*) fossil fuel input data
capfuel fcost pricesd
* (units) ($/units) ($)
1 174227.460 36.98 0.29
2 4263045.704 6.11 0.40
3 16800000.000 30.47 0.05
4 100000.000 12.25 0.25
;
Table Edata(i,q) Existing capacity input data
1 2 3 4 5 6 7 8
*
n1 632 496
n2 484 135
n3 360 763
n4 616
n5 316 781
n6 399 554
n7 320 200
n8 2600 66
n9 465 697 968
n10 800 1531
n11 990 520
n12 1312
n13 1900
n14 700
n15 866 577 597 190 191
n16 2100 1280
n17 1989 1449 292
n18 2380 1930 1365 40 366
n19 600
n20 354
n21
n22 4800
n23 150 252
n24 498 277
n25
n26 295
;
Table Allowtec(i,q) allowed technologies in nodes
1 2 3 4 5 6 7 8
*
n1 1 1 0 0 0 0 1 0
n2 1 0 0 0 0 0 1 1
n3 1 0 0 0 0 0 1 1
n4 1 0 0 0 0 0 1 0
n5 1 1 0 0 0 0 0 0
n6 1 1 0 0 0 0 0 0
n7 1 1 0 0 0 0 0 0
n8 0 0 0 1 0 0 0 1
n9 1 1 1 0 0 0 0 0
n10 0 1 1 0 0 0 0 0
n11 1 1 0 0 0 0 0 0
n12 0 0 0 0 0 0 0 1
n13 1 0 0 0 0 0 0 0
n14 1 1 1 0 0 0 0 0
n15 1 1 1 0 0 1 0 1
n16 0 0 0 1 0 0 0 1
n17 0 1 1 0 0 0 0 1
n18 1 1 1 0 1 1 0 1
n19 0 0 0 1 0 0 0 1
n20 0 0 0 0 0 0 1 1
n21 0 0 0 0 0 0 0 0
n22 0 0 0 0 0 0 0 1
n23 1 1 1 0 0 0 0 0
n24 0 1 1 0 0 0 0 0
n25 0 1 0 0 0 0 0 0
n26 0 0 0 0 0 0 0 0
;
Scalars
ir discount rate
giir generation investment inflation rate
goir generation operation inflation rate
tir transmission inflation rate
fir fuel inflation rate
nper
;
Parameter
cinv(q,p) investment generation cost of type q in period p
comv(q,p) operation generation cost of type q in period p
ctransf(i,j,p) fixed transmission cost of arc ij in period p
ctransv(i,j,p) variable transmission cost of arc ij in period p
cimpf(k,p) fuel cost of type k in period p
cgiir(p)
cgoir(p)
ctir(p)
cfir(p)
;
ir = 0.10;
giir = 0.03;
goir = 0.05;
tir = 0.03;
fir = 0.04;
cgiir('1') = ((1+giir)**(1-1))*((1+ir)**(1-1));
cgiir('2') = ((1+giir)**(2-1))*((1+ir)**(1-2));
cgiir('3') = ((1+giir)**(3-1))*((1+ir)**(1-3));
cgiir('4') = ((1+giir)**(4-1))*((1+ir)**(1-4));
cgiir('5') = ((1+giir)**(5-1))*((1+ir)**(1-5));
cgiir('6') = ((1+giir)**(6-1))*((1+ir)**(1-6));
cgiir('7') = ((1+giir)**(7-1))*((1+ir)**(1-7));
cgiir('8') = ((1+giir)**(8-1))*((1+ir)**(1-8));
cgiir('9') = ((1+giir)**(9-1))*((1+ir)**(1-9));
cgiir('10') = ((1+giir)**(10-1))*((1+ir)**(1-10));
cgiir('11') = ((1+giir)**(11-1))*((1+ir)**(1-11));
cgoir('1') = power(1+goir,(1-1))*power(1+ir,(1-1));
cgoir('2') = power(1+goir,(2-1))*power(1+ir,(1-2));
cgoir('3') = power(1+goir,(3-1))*power(1+ir,(1-3));
cgoir('4') = power(1+goir,(4-1))*power(1+ir,(1-4));
cgoir('5') = power(1+goir,(5-1))*power(1+ir,(1-5));
cgoir('6') = power(1+goir,(6-1))*power(1+ir,(1-6));
cgiir('7') = ((1+giir)**(7-1))*((1+ir)**(1-7));
cgiir('8') = ((1+giir)**(8-1))*((1+ir)**(1-8));
cgiir('9') = ((1+giir)**(9-1))*((1+ir)**(1-9));
cgiir('10') = ((1+giir)**(10-1))*((1+ir)**(1-10));
cgiir('11') = ((1+giir)**(11-1))*((1+ir)**(1-11));
ctir('1') = power(1+tir,(1-1))*power(1+ir,(1-1));
ctir('2') = power(1+tir,(2-1))*power(1+ir,(1-2));
ctir('3') = power(1+tir,(3-1))*power(1+ir,(1-3));
ctir('4') = power(1+tir,(4-1))*power(1+ir,(1-4));
ctir('5') = power(1+tir,(5-1))*power(1+ir,(1-5));
ctir('6') = power(1+tir,(6-1))*power(1+ir,(1-6));
ctir('7') = power(1+tir,(7-1))*power(1+ir,(1-7));
ctir('8') = power(1+tir,(8-1))*power(1+ir,(1-8));
ctir('9') = power(1+tir,(9-1))*power(1+ir,(1-9));
ctir('10') = power(1+tir,(10-1))*power(1+ir,(1-10));
ctir('11') = power(1+tir,(11-1))*power(1+ir,(1-11));
cfir('1') = power(1+fir,(1-1))*power(1+ir,(1-1));
cfir('2') = power(1+fir,(2-1))*power(1+ir,(1-2));
cfir('3') = power(1+fir,(3-1))*power(1+ir,(1-3));
cfir('4') = power(1+fir,(4-1))*power(1+ir,(1-4));
cfir('5') = power(1+fir,(5-1))*power(1+ir,(1-5));
cfir('6') = power(1+fir,(6-1))*power(1+ir,(1-6));
cfir('7') = power(1+fir,(7-1))*power(1+ir,(1-7));
cfir('8') = power(1+fir,(8-1))*power(1+ir,(1-8));
cfir('9') = power(1+fir,(9-1))*power(1+ir,(1-9));
cfir('10') = power(1+fir,(10-1))*power(1+ir,(1-10));
cfir('11') = power(1+fir,(11-1))*power(1+ir,(1-11));
**display cgiir, cgoir, ctir, cfir;
cinv(q,p)= Tdata(q,'invg')*cgiir(p);
comv(q,p)= Tdata(q,'omvg')*cgoir(p);
ctransf(i,j,p)$CONEX(i,j) = Adata(i,j,'ftrans')*ctir(p)*Adata(i,j,'lenght');
ctransv(i,j,p)$CONEX(i,j) = Adata(i,j,'vtrans')*ctir(p);
cimpf(k,p) = Fdata(k,'fcost')*cfir(p);
Set
types(i,q) set of allowed technologies in nodes;
types(i,q)$Allowtec(i,q) = yes;
Scalars
w, w1, w2, w3, w4, w11, w12, w13, w14;
Variables
z weighting objective function variable
gn(i,q,p) generation of unit type q at node i in period p
G(i,q,p) Capacity of new unit type q at node i in period p
CG(i,q,p) Cumulated capacity of new unit type q at node i in period p
x(i,j,p) power flow through arc i-j in period p
deltax(i,j,p) aditional transmission capacity through arc i-j in period p
cdeltax(i,j,p) cumulated aditional transmission capacity through arc i-j in period p
u(k,p) amount of imported fossi-fuel of type k in period p
;
Positive variable
gn,G,CG,x,deltax,cdeltax,u;
Parameters
maxcapg(q), maxcapt(i,j);
** Bounds on variables, using previously defined data
maxcapg('1') = 10388*1;
maxcapg('2') = 10790*1.25;
maxcapg('3') = 3811*1;
maxcapg('4') = 4700*0.5;
maxcapg('5') = 1365*1;
maxcapg('6') = 230*2;
maxcapg('7') = 1000*1;
maxcapg('8') = 10159*0.2;
maxcapt(i,j)$CONEX(i,j) = Adata(i,j,'caparc')*3;
u.up('1',p) = Fdata('1','capfuel')*1;
u.up('2',p) = Fdata('2','capfuel')*1;
u.up('3',p) = Fdata('3','capfuel')*1;
u.up('4',p) = Fdata('4','capfuel')*1;
CG.fx(i,q,'1') = Edata(i,q);
G.fx(i,q,'1') = 0;
cdeltax.fx(i,j,'1')$CONEX(i,j) = Adata(i,j,'caparc');
u.fx(k,'1') = 0;
Equations
obj weighting objective function
nodebal(i,p) node balance equation in period p
transcap(i,j,p) transmission capacity in period p
fueldem(k,p) fossil-fuel demand in period p
newgen(i,q,p) new capacity generation in period p
cumtranscap(i,j,p) cumulative transmission capacity in period p
cumnewgen(i,q,p) cumulative new capacity generation in period p
maxinvg(q) maximum amount of investment in generation
maxinvt(i,j) maximum amount of investment in transmission
reserve operative reserve;
obj.. z =e= w1*( sum(p$(ord(p) GT 1), sum(i, sum(q$types(i,q), cinv(q,p)*G(i,q,p)+comv(q,p)*gn(i,q,p)) ) )+
sum(p$(ord(p) GT 1), sum((i,j)$CONEX(i,j), (ctransf(i,j,p)+ctransv(i,j,p)*Adata(i,j,'lenght'))*deltax(i,j,p)) ) )
/(3.082982E+10-8.6973613E+9) +
w2*( sum(p$(ord(p) GT 1), sum(i, sum(q$types(i,q), Tdata(q,'co2em')*gn(i,q,p))) ) )
/(296975.05-120824.81) +
w3*( sum(p$(ord(p) GT 1), sum(k, cimpf(k,p)*u(k,p)) ) )
/(4.0600182E+9-8362634.97) +
w4*( sum(p$(ord(p) GT 1), sum( k, sum(i, sum(q$(types(i,q) and MAPT(q,k)), Fdata(k,'pricesd')*gn(i,q,p)))) ) )
/(154425.61-78756.79);
nodebal(i,p)$(ord(p) GT 1).. sum(j$CONEX(j,i),x(j,i,p)) - sum(j$CONEX(i,j),x(i,j,p)) + sum(q$types(i,q), gn(i,q,p)) =e= Ndem(i,p);
transcap(i,j,p)$(CONEX(i,j) and (ord(p) GT 1)).. x(i,j,p) - cdeltax(i,j,p-1) =l= deltax(i,j,p);
newgen(i,q,p)$(types(i,q) and (ord(p) GT 1)).. gn(i,q,p) - CG(i,q,p-1) =l= G(i,q,p);
fueldem(k,p)$(ord(p) GT 1).. sum(i, sum(q$(types(i,q) and MAPT(q,k)), Tdata(q,'consume')*gn(i,q,p))) - u(k,p) =l= 0;
cumtranscap(i,j,p)$(CONEX(i,j) and (ord(p) GT 1)).. cdeltax(i,j,p-1) + deltax(i,j,p) =e= cdeltax(i,j,p);
cumnewgen(i,q,p)$(types(i,q) and (ord(p) GT 1)).. CG(i,q,p-1) + G(i,q,p) =e= CG(i,q,p);
maxinvg(q).. sum(p$(ord(p) GT 1), sum(i, G(i,q,p))) =l= maxcapg(q);
maxinvt(i,j)$CONEX(i,j).. sum(p$(ord(p) GT 1), deltax(i,j,p)) =l= maxcapt(i,j);
reserve(p)$(ord(p) GT 1).. sum(i, sum(q$types(i,q), CG(i,q,p) ) ) =g= sum(i, Ndem(i,p))*1.06;
Parameters
cost, investment, generation, transmission, environment, import, riskp, riskn,
steam, cc, tg, coal, nuclear, geo, wind, hidro;
Model
weightsmgep2 /obj,nodebal,transcap,newgen,fueldem,cumtranscap,cumnewgen,maxinvg,maxinvt,reserve /
;
* OUTPUT FILE*
file out /extreme_points.out/;
*SOLVE THE MGEP PROBLEM FOR 2000 times**
loop(r,
w1 = 0.1 + uniform(0,1);
w2 = 0.1 + uniform(0,1);
w3 = 0.1 + uniform(0,1);
w4 = 0.1 + uniform(0,1);
w = w1+w2+w3+w4;
w1 = w1/w;
w2 = w2/w;
w3 = w3/w;
w4 = w4/w;
w11 = w1*1000000;
w12 = w2*1000000;
w13 = w3*1000000;
w14 = w4*1000000;
**display w11, w12, w13, w14;
z.l = 0;
gn.l(i,q,p) = 0;
G.l(i,q,p) = 0;
CG.l(i,q,p) = 0;
x.l(i,j,p) = 0;
deltax.l(i,j,p) = 0;
cdeltax.l(i,j,p) = 0;
u.l(k,p) = 0;
Solve
weightsmgep2 using lp minimizing z;
cost = sum(p$(ord(p) GT 1), sum(i, sum(q$types(i,q), cinv(q,p)*G.l(i,q,p)+comv(q,p)*gn.l(i,q,p)) ) )+
sum(p$(ord(p) GT 1), sum((i,j)$CONEX(i,j), (ctransf(i,j,p)+ctransv(i,j,p)*Adata(i,j,'lenght'))*deltax.l(i,j,p)) );
investment = sum(p$(ord(p) GT 1), sum(i, sum(q$types(i,q), cinv(q,p)*G.l(i,q,p)) ) );
generation = sum(p$(ord(p) GT 1), sum(i, sum(q$types(i,q), comv(q,p)*gn.l(i,q,p)) ) );
transmission = sum(p$(ord(p) GT 1), sum((i,j)$CONEX(i,j), (ctransf(i,j,p)+ctransv(i,j,p)*Adata(i,j,'lenght'))*deltax.l(i,j,p)) );
environment = sum(p$(ord(p) GT 1), sum(i, sum(q$types(i,q), Tdata(q,'co2em')*gn.l(i,q,p))) );
import = sum(p$(ord(p) GT 1), sum(k, cimpf(k,p)*u.l(k,p)) );
riskp = sum(p$(ord(p) GT 1), sum( k, sum(i, sum(q$(types(i,q) and MAPT(q,k)), Fdata(k,'pricesd')*gn.l(i,q,p)))) );
riskn = sum(p$(ord(p) GT 1), sum(i, gn.l(i,'5',p)) );
steam = sum(p$(ord(p) GT 1), sum(i, G.l(i,'1',p)) );
cc = sum(p$(ord(p) GT 1), sum(i, G.l(i,'2',p)) );
tg = sum(p$(ord(p) GT 1), sum(i, G.l(i,'3',p)) );
coal = sum(p$(ord(p) GT 1), sum(i, G.l(i,'4',p)) );
nuclear = sum(p$(ord(p) GT 1), sum(i, G.l(i,'5',p)) );
geo = sum(p$(ord(p) GT 1), sum(i, G.l(i,'6',p)) );
wind = sum(p$(ord(p) GT 1), sum(i, G.l(i,'7',p)) );
hidro = sum(p$(ord(p) GT 1), sum(i, G.l(i,'8',p)) );
display
cost, investment, generation, transmission, environment, import, riskp, riskn,
steam, cc, tg, coal, nuclear, geo, wind, hidro;
display G.l,deltax.l;
put out;
put w1,w2,w3,w4,' ',cost,' ',investment,' ',generation,' ',transmission,environment,import,riskp,riskn;
put /;
*put 'GAMS Execution Time', 'time ',system.time ///;
);