Hi,
I have the following fragment of code in my program:
ia[iai] = irow;
ja[iai] = EdgeStartIndex(d) + (i - 1) * 2 + 1;
ar[iai] = 1.0;
iai++;
ia[iai] = irow;
ja[iai] = VertexStartIndex() + Val[i].k;
ar[iai] = -1.0;
if (Val[i].j == Val[i].k /* && Val[i].k == i - 1 */) {
int Lower = 1 - Val[Val[i].k].maxv;
#if defined(PRINT)
std::cout << irow << ")" << Lower << " <= e[" << ja[iai-1]
<< "] - v[" << ja[iai] << "] <= -1" << std::endl;;
#endif
glp_set_row_bnds(lp, irow, GLP_DB, Lower, -1.0);
} else {
int Lower = 0 - Val[Val[i].k].maxv;
#if defined(PRINT)
std::cout << irow << ")" << Lower << " <= e[" << ja[iai-1]
<< "] - v[" << ja[iai] << "] <= 0" << std::endl;;
#endif
// if (Lower == 0) {
// glp_set_row_bnds(lp, irow, GLP_FX, Lower, 0.0);
// } else {
glp_set_row_bnds(lp, irow, GLP_DB, Lower, 0.0);
// }
}
iai++;
irow++;
Note the code that's commented out at the bottom. The code as it is as
shown says the overall linear system is infeasible (in the reals).
The row causing the infeasibility generated by the code above when Lower
== 0.
So the code is generating a double bounded row with ub = lb = 0.
Uncommenting those 4 lines generates a system that glpk finds feasible.
Is this expected behavior?
Thanks.
Neill.
_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk