EnergyHub : Optimal operation of energy hub

Reference

  • Alireza Soroudi, Power System Optimization Modelling in GAMS, Model EnergyHub (Gcode10.3) in chapter Energy System Integration, 2017

Category : GAMS PSOPT library


Mainfile : EnergyHub.gms

$title Optimal operation of energy hub

$onText
For more details please refer to Chapter 10 (Gcode10.3), of the following book:
Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017.
--------------------------------------------------------------------------------
Model type: MIP
--------------------------------------------------------------------------------
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 /;

Table data(t,*)
        Dh    De     Dc    lambda
   t1   21.4  52.1   11.5  36.7
   t2   23.2  66.7   13.7  40.4
   t3   26.1  72.2   16    38.5
   t4   26.7  78.4   21.4  38
   t5   25.6  120.2  22    40.2
   t6   26.4  83.5   30.8  38.6
   t7   39.5  110.4  38.9  52.3
   t8   47.3  124.3  46.8  67.3
   t9   52.1  143.6  51    70.5
   t10  49.1  149.3  48.9  66.2
   t11  69.3  154.2  34.8  73.3
   t12  62    147.3  32.7  60.8
   t13  68    200.7  27.8  63.2
   t14  68.6  174.4  32    70.8
   t15  56.4  176.5  33.2  63.1
   t16  41.3  136.1  34.1  52.5
   t17  37.4  108.7  40.8  57
   t18  25.4  96.9   43.6  49.2
   t19  25.7  89.1   51.5  47.5
   t20  21.9  82.5   43.1  49.5
   t21  22.4  76.9   36.5  53.1
   t22  24.6  66.8   27.7  51.6
   t23  22.7  47.2   19.1  50.5
   t24  22.6  64.7   11    36.4;

Scalar
   CBmax   / 500  /
   eta_ee  / 0.98 /
   eta_ghf / 0.9  /
   eta_hc  / 0.95 /;

Variable cost;
Positive Variable E(t), G(t), H1(t), H2(t);
H2.up(t) = CBmax;

Equation eq1, eq2, eq3, eq4, eq5;
eq1..    cost =e= sum(t, data(t,'lambda')*E(t) + 12*G(t));
eq2(t).. eta_ee*E(t) =e= data(t,'De');
eq3(t).. H1(t) =e= data(t,'Dh');
eq4(t).. eta_ghf*G(t) =e= H1(t) + H2(t);
eq5(t).. eta_hc*H2(t) =e= data(t,'Dc');

Model Hub / all /;
solve hub using lp minimizing cost;

Parameter report(t,*);
report(t,'E')  = E.l(t);
report(t,'G')  = G.l(t);
report(t,'h1') = h1.l(t);
report(t,'h2') = h2.l(t);
display report;