|
From: | xiaomi |
Subject: | Re: [Help-glpk] I got a solution that violates the constraints |
Date: | Mon, 23 Aug 2010 17:18:01 -0400 |
User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
By the way, is it the only way to formulate the total number of non-zero value among all Xmax***_*** by following constrants:
0<= Xmax***_*** <= M B,where M is a large number( I used 999,999 in my case), and B is a binary variable.
By minimizing sum of B, I can get the minimum total number of non-zero value. Is there another way to do so?
HelloGLPK does not use exact math for solving MIP problems. Hence rounding errors may occur.What is the value range for Xmax67_134, and Xmax67_136? Can you replace 999,999 by a smaller value?Best regards Xypron xiaomi wrote:version: GLPSOL: GLPK LP/MIP Solver, v4.43 In my lp file, there are 2 constraint voilated by solving in GLPK: Xmax67_134 - 999999 B67_134BB<= 0 Xmax67_136 - 999999 B67_136BB<= 0 B67_134BB and B67_136BB are both binary variables. The solution given by GLPK is following: Row name Activity Lower bound Upper bound Xmax67_134 6.8975 0 B67_134BB * 0 0 1 Xmax67_136 0.7975 0 B67_136BB * 0 0 1 How could GLKP give a solution that is not feasible? Thanks. _______________________________________________ Help-glpk mailing list address@hidden http://lists.gnu.org/mailman/listinfo/help-glpk
[Prev in Thread] | Current Thread | [Next in Thread] |