help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] OPB output file anomaly


From: Oscar Gustafsson
Subject: Re: [Help-glpk] OPB output file anomaly
Date: Fri, 29 Feb 2008 20:48:02 +0100 (MET)

Hi Joey!

The OPB export has (at least) one issue. However, I'm not sure if this is related to your problem (I do not think so from what you are writing, but still):

It is assumed that the coefficients are integers.

But, from your explanation it seems like all the coefficients are zero, which is strange. Especially since you get an incorrect result when removing the empty constraints. (Clearly it would be good to check if there are any non-zero coefficients.)

One possible reason is that your model generates some dummy constraints that breaks the model and that you also have fractional coefficients that are not well handled by the export function leading to an incorrect solution.

Regards

Oscar

On Fri, 29 Feb 2008, Joey Rios wrote:

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.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan

reply via email to

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