[Cbc] AMPL can't call CBC

Ted Ralphs ted at lehigh.edu
Thu Sep 8 20:53:21 EDT 2011


I will try to look into this. An alternative is to use the AMPL client that
comes with the Optimization Services project (projects.coin-or.org/OS). It
bundles many of the COIN solvers into a single executable that can be called
from AMPL and should work well.

Cheers,

Ted

On Mon, Sep 5, 2011 at 2:25 PM, vladimir voloshinov <
vladimir.voloshinov at gmail.com> wrote:

> Dear colleagues,
> We have got some experience in using AMPL, in particular, with COIN-OR
> Bonmin solver (for MINLP).
> But recently I tried CBC for MILP problem and found that I cann't run
> CBC neither by AMPL script, nor
> via passing generated AMPL-stub directly to CBC.
>
> All further relates to host with Linux "Red Hat", where licensed AMPL
> and various solvers (LPSOLVE, BONMIN, KNITRO, Snopt, ...) work
> properly.
>
> I built CBC 2.7 from sources downloaded from coin-or repository:
> svn co https://projects.coin-or.org/svn/Cbc/stable/2.7 coin-Cbc
>
> All "ThirdParties", including ASL, have been downloaded by appropriate
> <get.*> scripts.
>
> Before compilation, the package has been configured with "ASL" option
> ./configure --with-asl ...
> When I checked generated file <config.h>
> (<coin-Cbc/Cbc/src/config.h>), among others, I found proper directive
> (am I right?)
> #define COIN_HAS_ASL 1
> ...
> All of "make", "make test" and "make install" have been completed
> correctly.
>
> But when I prepare the simplest test MILP (being inspired by
> http://list.coin-or.org/pipermail/cbc/2010-July/000451.html):
> ====cbc-test.amp=====
> set bits := 1..8;
> var z{bits} binary;
> minimize obj:  sum{i in bits} z[i]*(-1)^i;
> ===================
>
> and AMPL-script
> ====milp-test.amp=====
> model milp-test.mod;
> option solver cbc;
> option cbc_options "cuts=on log=10 feas=on slog=1";
> solve;
> display z;
> ===================,
> I found that <ampl milp-test.amp> gives the following console output:
> >$ ampl milp-test.amp
> >CoinSolver takes input from arguments ( - switches to stdin)
> >Enter ? for list of commands or help
> >Coin:
>
> So, solving procedure does not start... and CBC waits for user input!?
> What's the problem?
>
> Replacing "option solver cbc" to "option solver bonmin" leads to correct
> AMPL output:
> ...
> bonmin: Optimal
> z [*] :=
> 1  1
> 2  0
> 3  1
> 4  0
> 5  1
> 6  0
> 7  1
> 8  0
> ;
>
> We'll appreciate any advice.
>
> Regards,
> --
> Vladimir V. Voloshinov,
> Ph.D, head of lab. C-3 "Distributed computing algorithms"
> Center of Grid-technologies & Distributed Computing, http://dcs.isa.ru,
> web: http://dcs.isa.ru/wiki/staff/vladimirv
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>



-- 
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/20110908/e4bfb651/attachment.html 


More information about the Cbc mailing list