Hi, I get below solutions
(gdb) p glp_get_col_val(lp, 'n', 7) $4 = 0 (gdb) p glp_get_col_val(lp, 'c', 0) $5 = 1 (gdb) p glp_get_col_val(lp, 'c', 1) $6 = 1 (gdb) p glp_get_col_val(lp, 'c', 2) $7 = 1 (gdb) p glp_get_col_val(lp, 'c', 4) $8 = 1.0000000000000002 for the following constraint. n7 - c0 - c1 - c2 - c4 >= -4 n7 should be greater than 0, but because of rounding errors it passes the constraint check. (gdb) p (0 - 1 - 1 - 1 - 1.0000000000000002) >= -4 1 What's the recommended way of solving such problems? I looked at ml archives and found out that people use glp_scale_prob() method. But for my particular case -- where I just check if (nx == 0.0) and if (cx == 1.0) -- I couldn't figure out which option to use with glp_scale_prob() method. Any ideas? Regards. _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
