User Tools

Site Tools


This is an old revision of the document!

How do I use the matching operator?

Q: I have SET c com / c1*c593 /; ALIAS (c,c1); and I would like to have a kind of compatibility matrix, i.e. if comp('c1','c5') = yes, then the two elements are compatible. I have quite a few elements and doing this with parameters is very cumbersome. Thus, I would like to use statements such as comp(c1*c20, c400*c500) = YES;

This can easily be achieved using the matching operator:

SET        c com /c1*c593 /
ALIAS (c,c1);
SET comp(c,c1) /c1*c20:c400*c500/;
display comp;

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

IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/use_the_matching_operator.1250253314.txt.gz · Last modified: 2009/08/14 14:35 by support