User Tools

Site Tools


How do I use the matching operator?

Q: I have SET c com / c1*c10 /; ALIAS (c,c1); and I would like to have a kind of compatibility matrix, i.e. if comp('c1','c8') = yes, then the two elements are compatible. I would like to use statements such as comp(c1*c4, c8*c10) = YES;

This can easily be achieved using the matching operator:

SET        c com /c1*c10 /
ALIAS (c,c1);
SET comp(c,c1) /c1*c4:c8*c10/;
display comp;

----      4 SET comp  
            c8          c9         c10
c1         YES
c2                     YES
c3                                 YES

For more information please consult the GAMS Release Notes for 22.7 or the McCarl GAMS guide.

gams/use_the_matching_operator.txt · Last modified: 2017/09/02 17:03 by support