help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] if-then constrains


From: Philip Warner
Subject: Re: [Help-glpk] if-then constrains
Date: Wed, 01 Jun 2005 17:20:52 +1000

At 04:32 PM 1/06/2005, F. Javier Diego Martín wrote:
For example: if X1+X2>= 10 then X3+X4<=25

One way, not sure it's the best:

Define S = (X1+X2 - 10)/M, where M is fixed and large enough to ensure S <= 1
    Define x in {0,1} (ie. binary integer)
    Constrain x >= S, so x will be 1 if X1+X2 > 10
Constrain X3+X4 + (x-1)*Q <= 25 where Q is fixed and large enough for X3+X4-Q <=25 always




----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp.mit.edu:11371 |/




reply via email to

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