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);
Thanks,
Ariel
-----Original Message-----
From: help-glpk-bounces
Sent: Thursday, February 11, 2010 3:17 PM
To: [email protected]
Subject: Re: [Help-glpk] Multi-ranged column bounds
Hi,
you are talking about semi-continuous variables
(http://lpsolve.sourceforge.net/5.5/semi-cont.htm). They are not modelled in
GLPK but you can simulate them using the approach explained here:
http://www.mail-archive.com/[email protected]/msg01467.html
------------------------------
Message: 4
Date: Thu, 11 Feb 2010 14:34:46 +0200
From: Ariel <Ariel. [email protected]>
Subject: [Help-glpk] Multi-ranged column bounds
To: "[email protected]" <[email protected]>
Message-ID:
<b2150c16daed5547b38206d48f323ddd0a2b4e3...@srvbpi-ex.il.betterplace.local>
Hello all,
I am trying to solve a problem using glpk 4.42.
I need the continuously valued columns to upper and lower bounds but also to be
able to have a single integer value out of this bound.
More specifically, I need all the columns Xi to be bounded by 6=< Xi =<16 but I
also want Xi=0 to be a possible value for the variables.
This is how I set the range:
glp_set_col_kind(lp, Xi, GLP_CV);
glp_set_col_bnds(lp, Xi, GLP_DB, 6.0, 16.0);
but how can I add Xi=0 to the allowed range?
Thanks in advance,
Ariel
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk