|
From: | Stefan Balev |
Subject: | Re: [Help-glpk] 'not' or 'or' constraints? |
Date: | Fri, 27 May 2005 11:03:05 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 |
Philip Warner wrote:
This may not be the right forum for this, but I need to solve an LP problem that is subject to constraints like:s <= 0 OR s >= 100 or, rewritten, Not (0 < s < 100) Is this something I can do in GLPK?
Hi,By definition this is NOT LP problem and cannot be handled by LP techniques. The main reason is that the feasible set is not convex.
A standard remedy consists in introducing a binary variable x in {0,1} together with the constraints
s <= M x s >= 100 + M (x - 1)where M is "sufficiently large". This is a MIP problem and can be handled by glpk.
-- Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |