Restricting the domain of a constraint

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

\

Hi
Cons1(‘jan’)…
Cons2(t)$(Ord(t)1)…

On Tue, Feb 7, 2012 at 11:19 PM, Nazanin wrote:

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


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

I agree with Alireza. That should normally do the job for you.

On Wed, Feb 8, 2012 at 5:34 AM, Alireza Bahari wrote:

Hi
Cons1(‘jan’)…
Cons2(t)$(Ord(t)1)…


On Tue, Feb 7, 2012 at 11:19 PM, Nazanin wrote:

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


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thank you everyone. I will try it. I really appreciate your help and
consideration.

On Wed, Feb 8, 2012 at 12:29 AM, Destin Zed wrote:

I agree with Alireza. That should normally do the job for you.

On Wed, Feb 8, 2012 at 5:34 AM, Alireza Bahari
wrote:

Hi
Cons1(‘jan’)…
Cons2(t)$(Ord(t)1)…

On Tue, Feb 7, 2012 at 11:19 PM, Nazanin
wrote:

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


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.

\