[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] MathProg Question
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] MathProg Question |
Date: |
Wed, 11 Jan 2012 22:28:23 +0300 |
> 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Help-glpk] MathProg Question,
Andrew Makhorin <=