> You generally do this by adding a binary variable (and, of course, this
> becomes an integer program rather than a simple linear program, and
> therefore more difficult to solve).

> For example:

> var z, binary;

> s.t. condition{f in FOO, b in BAR}: sum{a in BAZ} x[f,b,a] >= 5 * z;

Probably correct formulation should be the following:

s.t. condition1{f in FOO, b in BAR}:
        sum{a in BAZ} x[f,b,a] >= 5 * z;

s.t. condition2{f in FOO, b in BAR}:
        sum{a in BAZ} x[f,b,a] <= u[f,b,a] * z;

where u[f,b,a] is an upper bound of x[f,b,a].



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of JohannesJ
> Sent: Saturday, March 22, 2008 10:46 AM
> To: [email protected]
> Subject: [Help-glpk] "0 or greater than" condition


> Hi all,

> I want to use the following kind of condition in GLPK:

>       s.t. condition{f in FOO, b in BAR}: sum{a in BAZ} x[f,b,a] "is
> either 0 or
> greater than 5"

> Is this possible at all? If yes, do you have any hints on how I can do
> this
> in MathProg? I tried it, but couldn't figure it out.

> Thanks in advance,
> Johannes





_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to