help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] question about GLP_BV


From: Heinrich Schuchardt
Subject: Re: [Help-glpk] question about GLP_BV
Date: Wed, 21 May 2014 08:05:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0

Hello Onor,

glp_simplex is the LP solver so you cannot expect integer results.

You have to use glp_intopt to get integer results..

Best regards

Heinrich

https://www.xypron.de



On 21.05.2014 05:13, Aaron wrote:
Hello,

I have a very strange problem.

I solve an LP problem. We set the each column of object function to the
GLP_BV. glp_set_col_kind(prob, i, GLP_BV), Since the vaules of my variables
are integer 0 or 1;

Then I use the glp_simplex(prob, NULL) to solve my LP problem. And I get my
result.

The question is that most vaules of my result are 1 or 0, but some values are
decimal between 0 and 1, like 0.333333, 0.24444444 and so on.

I don't know why there are some decimal in my result, since i have set
glp_set_col_kind to GLP_BV?
And if i just want the value of my result to be 0 or 1, how should I do?

Thank you

Onor


_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

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