help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Binary variables in glpk


From: Ali Baharev
Subject: Re: [Help-glpk] Binary variables in glpk
Date: Sat, 15 Sep 2007 18:24:39 +0200

If i am not mistaken, the function you are looking for is

glp_set_col_kind(glp_prob* mip, int j, int kind)

where kind is GLP_BV. It is discussed in section Mixed integer
programming routines.

Do you have to use the C API? Using Mathprog could be easier.

Good luck,

Ali

On 9/15/07, Nicholas Patsourakis <address@hidden> wrote:
>
>
>
>
> I am newbie in glpk and I want to solve an lp problem with binary decision
> variables, that is  zero (0) or one (1). How can I declare that in glpk? In
> the manual I found these:
>
>
>
> LPX_FR −1 < x < +1 Free (unbounded) variable
>
> LPX_LO lb _ x < +1 Variable with lower bound
>
> LPX_UP −1 < x _ ub Variable with upper bound
>
> LPX_DB lb _ x _ ub Double-bounded variable
>
> LPX_FX lb = x = ub Fixed variable
>
>
>
> But I none of the above can declare my binary decision variables (lpx set
> col bnds). Can anyone help? I am sure that there must be an answer but I
> cant find it.
>
>
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
>
>




reply via email to

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