$title Dynamic Economic Load Dispatch $onText For more details please refer to Chapter 4 (Gcode4.1), of the following book: Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017. -------------------------------------------------------------------------------- Model type: QCP -------------------------------------------------------------------------------- Contributed by Dr. Alireza Soroudi IEEE Senior Member Email: alireza.soroudi@gmail.com We do request that publications derived from the use of the developed GAMS code explicitly acknowledge that fact by citing Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017. DOI: doi.org/10.1007/978-3-319-62350-4 $offText Set t 'hours' / t1*t24 / i 'thermal units' / g1*g4 /; Table gendata(i,*) 'generator cost characteristics and limits' a b c d e f Pmin Pmax RU0 RD0 g1 0.12 14.80 89 1.2 -5 3 28 200 40 40 g2 0.17 16.57 83 2.3 -4.24 6.09 20 290 30 30 g3 0.15 15.55 100 1.1 -2.15 5.69 30 190 30 30 g4 0.19 16.21 70 1.1 -3.99 6.2 20 260 50 50; Parameter demand(t) / t1 510, t2 530, t3 516, t4 510, t5 515, t6 544 t7 646, t8 686, t9 741, t10 734, t11 748, t12 760 t13 754, t14 700, t15 686, t16 720, t17 714, t18 761 t19 727, t20 714, t21 618, t22 584, t23 578, t24 544 /; Variable costThermal 'cost of thermal units' p(i,t) 'power generated by thermal power plant' EM 'emission calculation'; p.up(i,t) = gendata(i,"Pmax"); p.lo(i,t) = gendata(i,"Pmin"); Equation Genconst3(i,t), Genconst4(i,t), costThermalcalc, balance(t), EMcalc; costThermalcalc.. costThermal =e= sum((t,i), gendata(i,'a')*sqr(p(i,t)) + gendata(i,'b')*p(i,t) + gendata(i,'c')); Genconst3(i,t).. p(i,t+1) - p(i,t) =l= gendata(i,'RU0'); Genconst4(i,t).. p(i,t-1) - p(i,t) =l= gendata(i,'RD0'); balance(t).. sum(i, p(i,t)) =g= demand(t); EMcalc.. EM =e= sum((t,i), gendata(i,'d')*sqr(p(i,t)) + gendata(i,'e')*p(i,t) + gendata(i,'f')); Model DEDcostbased / all /; solve DEDcostbased using qcp minimizing costThermal; embeddedCode Connect: - GAMSReader: symbols: [ { name: p } ] - Projection: name: p.l(i,t) newName: p_l(i,t) - ExcelWriter: file: DEDcostbased.xlsx symbols: [ { name: p_l, range: Pthermal!A1 } ] endEmbeddedCode