[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] un reduced filed
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] un reduced filed |
Date: |
Sat, 06 Nov 2010 22:34:51 +0300 |
> I've created another egregiously bad LP file, that I was hoping GLPK
> could pare down better. For the most, it does, removing (byte-wise)
> about 120 MiB from the LP file. However, I'm still seeing some
> redundant or unusable terms. I'd expect for it to remove terms like these:
>
> + 0 x[3]
>
> For reference, here's how I created the GLPK version of the LP file:
>
> $ glpsol --version | head -1
> GLPSOL: GLPK LP/MIP Solver, v4.43
>
> $ glpsol --lp large_file.lp --wlp smaller_file.lp
>
> $ ll large_file.lp smaller_file.lp
> -rw-r--r-- 1 kevin kevin 294M 2010-11-06 14:20 large_file.lp
> -rw-r--r-- 1 kevin kevin 172M 2010-11-06 14:24 smaller_file.lp
>
> 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.
Btw, you can reduce the lp file size much more by appending the suffix
'.gz', for instance, --wlp smaller_file.lp.gz.