[Cbc] Pass model and/or data to the executable via standard input

Ted Ralphs ted at lehigh.edu
Tue Apr 16 14:24:27 EDT 2013


On Tue, Apr 16, 2013 at 1:44 PM, John Forrest
<john.forrest at fastercoin.com>wrote:

> Pietro,
>
> If you can do something like this (in linux) would that work?
>
> cat test.lp |bin/cbc -import stdin_lp -solve
>

I thought it used to be that the filename "-" *or something similar meant
that the file should be read from stdin. Am I mis-remembering?


> Welcome to the CBC MILP Solver
>
> command line - bin/cbc -import stdin_lp -solve (default strategy 1)
> Continuous objective value is 3.23684 - 0.00 seconds
> Cgl0004I processed model has 1 rows, 3 columns (0 integer) and 3 elements
> Cbc3007W No integer variables - nothing to do
>
> I have committed fixes to trunk - key thing is to import from stdin_lp
> (exact spelling needed)
>
> Does anyone know how to get GMPL working on Windows?
>

I got it working once a long time ago. It was fairly straightforward using
GLPK's Visual Studio project. The only tricky part is that you have to set
a few compiler defines by hand in the CBC Visual Studio file. I can try to
replicate, but not in the very near future.

Unfortunately, we cannot distribute binaries with GMPL built in because of
licensing issues (basically because GLPK is licensed under the GPL). A
while back, I put a modest effort into getting an exception for COIN codes
to link to GLPK, but it didn't go anywhere.

Ted

-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20130416/51b4ee74/attachment.html>


More information about the Cbc mailing list