help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Multi-ranged column bounds


From: Andrew Makhorin
Subject: Re: [Help-glpk] Multi-ranged column bounds
Date: Sun, 14 Feb 2010 21:46:30 +0300

> How do I express the following semi-continuous variable x in GLPK:
> 5 * z <= x <= 10 * z

> I cannot just do:
>                     glp_set_col_kind(lp, z, GLP_BV);

>                     glp_set_col_kind(lp, x, GLP_CV);
>                     glp_set_col_bnds(lp, x, GLP_DB, z*5.0, z*10.0);

You need to create two inequality constraints:

   x - 5 * z >= 0

   x - 10 * z <= 0





reply via email to

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