[Cbc] AMPL can't call CBC

vladimir voloshinov vladimir.voloshinov at gmail.com
Mon Sep 5 14:25:51 EDT 2011


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



More information about the Cbc mailing list