I'm using your open sourced implementation of Balas algorithm. Thank you for making it open. It contains a bug at LBJ2/infer/BalasHook.java:321
for (int i = 0; i < variables; ++i)
if (negated[i]) {
x[i] = 1 - x[i];
At that last line must be "solution" instead of "x", because x is already copied to solution and changes
to x will not affect solution. So solution accessed through getBooleanValue will be wrong
(in the case of for maximization and positive objective coefficients).
Not a bug, but weird: LBJ2/infer/BalasHook.java:342
From email:
I'm using your open sourced implementation of Balas algorithm. Thank you for making it open. It contains a bug at
LBJ2/infer/BalasHook.java:321
At that last line must be "solution" instead of "x", because x is already copied to solution and changes to x will not affect solution. So solution accessed through getBooleanValue will be wrong (in the case of for maximization and positive objective coefficients). Not a bug, but weird:
LBJ2/infer/BalasHook.java:342
These 2 lines do nothing, because x always contains zeros only at that point.