[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] printf statement being ignored with large constraint
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] printf statement being ignored with large constraint |
Date: |
Mon, 28 Jan 2008 13:17:33 +0300 |
> When I add a large constraint (third constraint
> (HTsHaveSameCompanionForAllFamilies) in the attached model) with dimensions
> 40x40x57 (91,200 elements), my printf statement seems to get ignored.
> gplsol tells me OPTIMAL SOLUTION FOUND in the simplex section and PROBLEM
> HAS NO INTEGER FEASIBLE SOLUTION in the integer section. When I comment out
> the third constraint, the printf runs as expected. This seems like a bug.
> As long as the simplex section finds a solution, the printf should run,
> shouldn't it?
Hmm... Looks like there is something wrong in your model, not in glpsol.
The following model works for me:
var x, integer, >= 1, <= 3;
s.t. foo: x = 2.5;
solve;
printf "x = %g", x;
end;
Reading model section from test.mod...
5 lines were read
Generating foo...
Model has been successfully generated
glp_simplex: original LP has 1 row, 1 column, 1 non-zero
Objective value = 0
OPTIMAL SOLUTION FOUND BY LP PRESOLVER
Integer optimization begins...
+ 0: mip = not found yet >= tree is empty (0; 1)
PROBLEM HAS NO INTEGER FEASIBLE SOLUTION
Time used: 0.0 secs
Memory used: 0.1 Mb (104277 bytes)
x = 0
Model has been successfully processed
If solving of your model takes a long time, you can write the
solution to a file with the option '-w filename', and then specify it
with the option '-r filename', in which case it will be passed to the
model without solving.