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: Ariel Daliot
Subject: RE: [Help-glpk] Multi-ranged column bounds
Date: Sun, 14 Feb 2010 19:11:03 +0200

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: address@hidden
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/address@hidden/msg01467.html

------------------------------

Message: 4
Date: Thu, 11 Feb 2010 14:34:46 +0200
From: Ariel <Ariel. address@hidden>
Subject: [Help-glpk] Multi-ranged column bounds
To: "address@hidden" <address@hidden>
Message-ID:
        <address@hidden>

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






reply via email to

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