Exclude Specific Values of Indices

Hello,

can somebody help with what I think is quite a trivial question? How do I exclude the values of some indices from an equation.

I have 4 indices i, l, g and g1. G1 is an alias of g, and I have an equation like

Ailgg1 <= Bil x Cilgg1 - this holds for each i, l , g and g1 BUT with g different from g1

How do I specify g different from g1?

Thanks,

Paolo


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.

You may need to use the dollar operator something like:
.
.
.

YourEquation(i,l,g,g1) $ (ord(g) NE ord(g1)) …

A(i,l,g,g1) wrote:

Hello,

can somebody help with what I think is quite a trivial question? How do I exclude the values of some indices from an equation.

I have 4 indices i, l, g and g1. G1 is an alias of g, and I have an equation like

Ailgg1 <= Bil x Cilgg1 - this holds for each i, l , g and g1 BUT with g different from g1

How do I specify g different from g1?

Thanks,

Paolo


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.

Destin,

I had figured out that I needed the dollar operation but I had got stuck on the syntax so I really thank you for your help.

I had seen in http://opim.wharton.upenn.edu/~guignard/910/2011/slides/class19_20/gams/RonRardinGAMSNotes_rev2.htm#PT3 the basic of the dollar syntax but when I tried to apply to my problem I got plenty of error messages.

After reading your mail I realise that I should have been using NE instead of NOT.

Thanks again

Paolo


On 10 May 2012 09:42, Destin Zed wrote:

You may need to use the dollar operator something like:
.
.
.

YourEquation(i,l,g,g1) $ (ord(g) NE ord(g1)) …

A(i,l,g,g1) wrote:

Hello,

can somebody help with what I think is quite a trivial question? How do I exclude the values of some indices from an equation.

I have 4 indices i, l, g and g1. G1 is an alias of g, and I have an equation like

Ailgg1 <= Bil x Cilgg1 - this holds for each i, l , g and g1 BUT with g different from g1

How do I specify g different from g1?

Thanks,

Paolo

\

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.