Dear All,
Excuse me for this simple question, but kindly would like to know how to write the below mathematical expression (h belongs to H(l,p)) in GAMS (the one in red rectangular).
Here is my GAMS model, am I identifying it in the correct way? Please advise
Thanks in advance
Mathematical Expersion Explanation
Re: Mathematical Expersion Explanation
There is h (one dimensional set) and there H (two dimensional set). Don't confuse the two.
Since GAMS is case insensitive, declare another set hlp(l,p)
you can then assign elements to this set
you can then use set hlp wherever you have H in your formulation. Wherever you have h, you can use the set h.
- Atharv
Since GAMS is case insensitive, declare another set hlp(l,p)
Code: Select all
set hlp(l,p);
Code: Select all
hlp("H1","NS") = yes;
- Atharv
Re: Mathematical Expersion Explanation
Dear Atharv,
Thanks a lot for your explanation
But my question was how to write the expression Sum h ϵ H(l,p). For example, am I writing it correctly in the below code?
<C1(l,p,t).. sum(h$HLP(l,p),ALPHA(h,l,p,t)*MAKE(h,p,t)) =l= U(l,p,t) ;>
Thanks in advance
Thanks a lot for your explanation
But my question was how to write the expression Sum h ϵ H(l,p). For example, am I writing it correctly in the below code?
<C1(l,p,t).. sum(h$HLP(l,p),ALPHA(h,l,p,t)*MAKE(h,p,t)) =l= U(l,p,t) ;>
Thanks in advance
Re: Mathematical Expersion Explanation
Once you have a 2D set, everything else follows. You can write sum over hlp(l, p) as follows.
sum((l, p)$hlp(l, p), ....)
will do the needful.
- Atharv
sum((l, p)$hlp(l, p), ....)
will do the needful.
- Atharv