help-glpk
[Top][All Lists]
Advanced

[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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]