> I am having some difficulty with MathProg syntax with regards to
> logical operators and sets. Basically, I am making a big set, C, that
> is a set of 2-tuples, where each 2-tuple consists of an element from
> sets A and B. I can do this for every combination of elements in A and
> B using setof, but I want to use a logical operator to exclude some
> combinations (say not allow a's that are members of set D to be paired
> with b's that are members of E). Is this possible? Could someone
> provide an example?
> 

set C := setof{a in A, b in B: (a not in D) and (b not in E)} (a, b);

Another way:

set C := (A diff D) cross (B diff E);


_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to