help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Is this a bug I see before me?


From: Nigel Galloway
Subject: [Help-glpk] Is this a bug I see before me?
Date: Mon, 2 Mar 2009 16:53:43 +0300

Is this a bug I see before me, or the mere manifestation of a new feature?

Running a variation on my favorite mathprog:

param a, integer;
param b, integer;
param guess, integer;
var x, integer;
var y, integer;

s1:  1 <= a*x+b*y <= guess;

solve;

printf "x= %i y= %i a*x+b*y= %i\n",x,y,a*x+b*y;

data;

param a := 75;
param b := 15;
param guess := 14;

end;

Produces:

address@hidden:~/myGLPK/mods$ /opt/glpk.4.36/bin/glpsol --math t1.mod 
Reading model section from t1.mod...
Reading data section from t1.mod...
20 lines were read
Generating s1...
Model has been successfully generated
ipp_basic_tech:  0 row(s) and 0 column(s) removed
ipp_reduce_bnds: 1 pass(es) made, 0 bound(s) reduced
ipp_basic_tech:  0 row(s) and 0 column(s) removed
ipp_reduce_coef: 1 pass(es) made, 0 coefficient(s) reduced
glp_intopt: presolved MIP has 1 row, 2 columns, 2 non-zeros
glp_intopt: 2 integer columns, none of which are binary
Scaling...
 A: min|aij| =  1.500e+01  max|aij| =  7.500e+01  ratio =  5.000e+00
GM: min|aij| =  1.000e+00  max|aij| =  1.000e+00  ratio =  1.000e+00
EQ: min|aij| =  1.000e+00  max|aij| =  1.000e+00  ratio =  1.000e+00
2N: min|aij| =  9.375e-01  max|aij| =  1.172e+00  ratio =  1.250e+00
Crashing...
Size of triangular part = 1
Solving LP relaxation...
*     0: obj =   0.000000000e+00  infeas =  0.000e+00 (0)
OPTIMAL SOLUTION FOUND
Integer optimization begins...
+     0: mip =     not found yet >=              -inf        (1; 0)
+398442: mip =     not found yet >=   0.000000000e+00        (2; 0)
+797967: mip =     not found yet >=   0.000000000e+00        (2; 0)
+1194797: mip =     not found yet >=   0.000000000e+00        (2; 0)
+1593432: mip =     not found yet >=   0.000000000e+00        (2; 0)
+1991942: mip =     not found yet >=   0.000000000e+00        (2; 0)
+2389899: mip =     not found yet >=   0.000000000e+00        (2; 0)
+2788043: mip =     not found yet >=   0.000000000e+00        (2; 0)
+3186585: mip =     not found yet >=   0.000000000e+00        (2; 0)
+3584825: mip =     not found yet >=   0.000000000e+00        (2; 0)
+3982340: mip =     not found yet >=   0.000000000e+00        (2; 0)
+3997277: >>>>>   0.000000000e+00 >=   0.000000000e+00   0.0% (2; 0)
+3997277: mip =   0.000000000e+00 >=     tree is empty   0.0% (0; 3)
INTEGER OPTIMAL SOLUTION FOUND
Time used:   50.2 secs
Memory used: 0.1 Mb (146581 bytes)
x= 1333334 y= -6666670 a*x+b*y= 0
Model has been successfully processed
address@hidden:~/myGLPK/mods$ 

Ever since 0 has been considered a number, 1 <= 0 <= 14 has been considered 
false.

As the only constraint is that 1 <= a*x+b*y <= 14, and a*x+b*y = 0 is not so 
constrained, is the optimistic conclusion of the model misconceived?












reply via email to

[Prev in Thread] Current Thread [Next in Thread]