help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] [Fwd: variables with disjoint bounds]


From: Kevin Hunter Kesling
Subject: Re: [Help-glpk] [Fwd: variables with disjoint bounds]
Date: Fri, 15 Nov 2013 00:38:13 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

At 4:18pm -0500 Thu, 14 Nov 2013, Joseph Mundy wrote:
It is possible in glpk to represent variables with multiple bounds
that are disjoint? For example,

1<= x <=2 or 5<=x<=7. It seems that two different linear programs
must be formulated.

Yes, it is generally possible.  Consider:

    1 * b       <= x <= 2*b
    5 * (1 - b) <= x <= 7 * (1 - b)

where 'b' is a binary variable. I don't know if GLPK supports multiple bounds directly on variables, but you can certainly incorporate the disjointness as standard constraints.

Kevin



reply via email to

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