help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] OPB output file anomaly


From: Joey Rios
Subject: [Help-glpk] OPB output file anomaly
Date: Fri, 29 Feb 2008 11:28:26 -0800

Hello,

Using the --wpb flag to glpsol, I am getting an invalid OPB file as output.  The original input to glpsol is written in mathprog and is solved correctly by glpsol, also, for the 0-1 problems in the GLPK examples directory all seem to come out fine as OPB files (the ones I tried at least--sudoku, todd, and something else) and are solved with a PB SAT solver just fine.  The OPB file that is output using my files has several lines that look like this:

<= 15
<= 15
<= 12
etc...

It is expected that there would be a LHS to these inequalities if they are being printed at all.  I looked at glplpx19.c which handles the writing of this file.  I added a simple fprintf statement before line 136:

if( k == 0 ) fprintf(fp, "k was zero");

where k was defined earlier as

k=glp_get_mat_row(lp, j, ndx, val);

The result was as expected, for each of the anomalous inequalities above I now have lines like this:

k was zero<=15

So it looks like I have some rows where all coeff's are zero.  I am not sure how to interpret this.  When I manually remove all of these inequalities from the OPB file, my PB SAT solver (minisat+) is happy with the file, but produces the wrong solution (i.e. different from the correct/expected result from glpsol).  So these inequalities are probably necessary to obtain the correct solution.

I'm just a little lost as to where to start looking or how to interpret what the problem is exactly.  Any insight appreciated.  I'm happy to provide more info if it would be helpful.

Thanks,
Joey



Climb to the top of the charts! Play the word scramble challenge with star power. Play now!

reply via email to

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