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
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk



_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to