I have the following sets, variables, and parameters in a GAMS model.
set \quad h/1*3/;
alias (h,t);
Positive variables are $p_d(h)$, $p_c(h)$ and $e(h)$. Parameters are $\eta = 0.9$ and $e(0) = 0$.
I want to write the following equation in GAMS: $$e(h) = e(0)-\sum_{t=1}^h p_d(t)+\eta\cdot\sum_{t=1}^hp_c(t).$$