help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] un reduced filed


From: Kevin Hunter
Subject: Re: [Help-glpk] un reduced filed
Date: Sat, 06 Nov 2010 16:59:21 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

At 3:34pm -0400 Sat, 06 Nov 2010, Andrew Makhorin wrote:
Am I incorrect in thinking that no matter where it is, a term
multiplied by 0 is effectively useless information? It is perhaps
of note that I only see any +0 terms in the objective function.

Zero objective and constraint entries (i.e. entries like 0 * x) are
allowed, however, you do not need to specify them, because glpk
assumes sparse data format: if some constraint matrix or objective
coefficient is omitted, it is considered as zero by default.

Right. I'm aware that I don't need to specify them, but they're in the LP output of another like program, with which I've recently become acquainted. I'm asking why does GLPK leaves them in? Aren't they superfluous.

Btw, you can reduce the lp file size much more by appending the
suffix '.gz', for instance, --wlp smaller_file.lp.gz.

Oh! I must have missed that in the documentation. I knew that Gurobi transparently supported .gz, and I guessed that GLPK did via the output from ./configure (--with-zlib), but I hadn't yet figured out where.

However, I actually want to reduce the LP as much as possible so that I can have an easier time visually inspecting it. The LP is the output of another project that I'm working on, of which I'm sometimes suspicious.

In a similar vein, is it possible to presolve *without* solving? In an effort to reduce the file size, I tried this:

parm.presolve = GLP_ON;
parm.tm_lim = 500;  // Something really small because what I want
                    // is the presolved instance.
glp_simplex( lp, &parm );
glp_write_lp( lp, some_file );

As I'm sure you're aware, this didn't do any good.

Finally, I was hoping to use Heinrich's code to reduce the output some more, because my LP file contains a number of constraints that could be merged:

C1: x >= 5
C2: x <= 5

But after compiling, I wasn't sure how to use it. Do you have any suggestions of how else I could reduce the redundancies in my LP file (of which there are *many*)?

Thanks,

Kevin

P.S. If you're curious, here's an xzipped version of my 296 MiB LP file:

http://cygnus.ce.ncsu.edu/~kevin/tmp/co2ng_4branch.lp.xz [5.9MiB]



reply via email to

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