[Clp] Dense LP Problem Interface

victor.zverovich at gmail.com victor.zverovich at gmail.com
Wed Jul 8 13:04:50 EDT 2015


Contrary to popular opinion, file-based I/O is usually not a bottleneck
when interfacing with solvers. NL format
<https://en.wikipedia.org/wiki/Nl_(format)> used by AMPL and Pyomo is
extremely compact and efficient. For example, a simple problem with 1000
variables and 1000 constraints and a 1000x1000 dense constraint matrix

  var x{1..1000};
  s.t. c{j in 1..1000}: sum{i in 1..1000} Uniform01() * x[i] = j;

takes about 11 MiB which is little more than the storage required for the
constraint matrix alone.

Best regards,
Victor

On Wed, Jul 8, 2015 at 9:38 AM Meketon, Marc <Marc.Meketon at oliverwyman.com>
wrote:

>  I’ve just begun to look into Pyomo, and I asked their user-group if it
> directly connect to CBC (and I presume CLP) (
> https://groups.google.com/forum/#!topic/pyomo-forum/60G-vDRSLbA).  The
> answer from Gabriel Hackebeil is that Pyomo uses file-based I/O, so I
> imagine it does not solve support the “hundreds of gigabytes” issue that
> Matt has.
>
>
>
> *From:* clp-bounces at list.coin-or.org [mailto:clp-bounces at list.coin-or.org]
> *On Behalf Of *Matthew Gidden
> *Sent:* Wednesday, July 08, 2015 12:00 PM
> *To:* Matt Bromberg
> *Cc:* clp at list.coin-or.org
> *Subject:* Re: [Clp] Dense LP Problem Interface
>
>
>
> Hi Matt,
>
>
>
> Have you checked out Pyomo <https://software.sandia.gov/trac/pyomo>? It's
> a python mathematical programming interface from Sandia that can call a
> number of solvers (namely, COIN CBC for this case). I admit that I haven't
> used it much myself (yet), but it looks promising and seems to have some
> overlap with the COIN-OR community as well.
>
>
>
> On Wed, Jul 8, 2015 at 10:53 AM, Matt Bromberg <mattcbro at earthlink.net>
> wrote:
>
> I have yet to see a simple way to use CBC or CLP using raw binary data.
> In particular I have a large problem with 40K constraints 10K variables or
> so.
> That's about 3Gbytes of raw doubles.  It expands to an unwieldy size using
> any of the text base input formats. (hundreds of gigabytes).
>
> I can get that data into a python numpy array but it does not appear to be
> easy to dump that raw array into CLP.  Unfortunately cylp doesn't support
> the latest API.
> I would roll my own python interface but there is literally no
> documentation I can find online for the C interface to something like
> CoinMP.
>
> All the other interfaces appear to be useless for my purposes.  Pulp is
> rather arcane and there is no obvious way to pull the data back into python.
>
> I am in somewhat disbelief that I can't do this:
> [xopt,fmin] = linprog(c, Acon, rhsvec) ;
>
> to solve min c' * x  given Acon * x <= rhsvec .
>
>  The above is the one line matlab interface to linprog.  There should be
> something similar in Python in support of CLP using it's primary matrix
> array interface, numpy/ndarrays.
> Even my cylp solution takes 10 lines of python code to do this, plus half
> a day of parsing documentation.  It's just unfortunate that it segfaults on
> the larger problems.
>
> If anyone has a good way to do this in Python or C, with an example I'd
> love to see it.  For now I have to move on to other solvers.
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>
>
>
>
>
> --
>
> Matthew Gidden, Ph.D.
> Postdoctoral Associate, Nuclear Engineering
>
> The University of Wisconsin -- Madison
> Ph. 225.892.3192
>
> ------------------------------
> This e-mail and any attachments may be confidential or legally privileged.
> If you received this message in error or are not the intended recipient,
> you should destroy the e-mail message and any attachments or copies, and
> you are prohibited from retaining, distributing, disclosing or using any
> information contained herein. Please inform us of the erroneous delivery by
> return e-mail. Thank you for your cooperation.
>  _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20150708/69f34cc0/attachment.html>


More information about the Clp mailing list