Restricting the domain of a constraint

15 views
Skip to first unread message

Nazanin

unread,
Feb 7, 2012, 2:49:18 PM2/7/12
to gamsworld
Hi,
I'm totally new to GAMS. How can I restrict the domain of a
constraint? For example I have:
set t timeperiod / jan, feb, mar, apr, may, jun, jul, aug, sep, oct,
nov, dec /;
then I want to have constraint, say cons1 that has to be valid for
only t='jan' and I have const2 for rest of the months.

Your help is really appreciated.

Nazanin

Alireza Bahari

unread,
Feb 7, 2012, 11:34:13 PM2/7/12
to gams...@googlegroups.com
Hi
Cons1('jan')..
Cons2(t)$(Ord(t)<>1)..


Nazanin

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


Destin Zed

unread,
Feb 8, 2012, 3:29:51 AM2/8/12
to gams...@googlegroups.com
I agree with Alireza. That should normally do the job for you.

Nazanin S

unread,
Feb 8, 2012, 3:34:11 AM2/8/12
to gams...@googlegroups.com
Thank you everyone. I will try it. I really appreciate your help and
consideration.
Reply all
Reply to author
Forward
0 new messages