I will try to look into this. An alternative is to use the AMPL client that comes with the Optimization Services project (<a href="http://projects.coin-or.org/OS">projects.coin-or.org/OS</a>). It bundles many of the COIN solvers into a single executable that can be called from AMPL and should work well.<div>
<br></div><div>Cheers,</div><div><br></div><div>Ted<br><br><div class="gmail_quote">On Mon, Sep 5, 2011 at 2:25 PM, vladimir voloshinov <span dir="ltr"><<a href="mailto:vladimir.voloshinov@gmail.com">vladimir.voloshinov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear colleagues,<br>
We have got some experience in using AMPL, in particular, with COIN-OR<br>
Bonmin solver (for MINLP).<br>
But recently I tried CBC for MILP problem and found that I cann't run<br>
CBC neither by AMPL script, nor<br>
via passing generated AMPL-stub directly to CBC.<br>
<br>
All further relates to host with Linux "Red Hat", where licensed AMPL<br>
and various solvers (LPSOLVE, BONMIN, KNITRO, Snopt, ...) work<br>
properly.<br>
<br>
I built CBC 2.7 from sources downloaded from coin-or repository:<br>
svn co <a href="https://projects.coin-or.org/svn/Cbc/stable/2.7" target="_blank">https://projects.coin-or.org/svn/Cbc/stable/2.7</a> coin-Cbc<br>
<br>
All "ThirdParties", including ASL, have been downloaded by appropriate<br>
<get.*> scripts.<br>
<br>
Before compilation, the package has been configured with "ASL" option<br>
./configure --with-asl ...<br>
When I checked generated file <config.h><br>
(<coin-Cbc/Cbc/src/config.h>), among others, I found proper directive<br>
(am I right?)<br>
#define COIN_HAS_ASL 1<br>
...<br>
All of "make", "make test" and "make install" have been completed correctly.<br>
<br>
But when I prepare the simplest test MILP (being inspired by<br>
<a href="http://list.coin-or.org/pipermail/cbc/2010-July/000451.html" target="_blank">http://list.coin-or.org/pipermail/cbc/2010-July/000451.html</a>):<br>
====cbc-test.amp=====<br>
set bits := 1..8;<br>
var z{bits} binary;<br>
minimize obj: sum{i in bits} z[i]*(-1)^i;<br>
===================<br>
<br>
and AMPL-script<br>
====milp-test.amp=====<br>
model milp-test.mod;<br>
option solver cbc;<br>
option cbc_options "cuts=on log=10 feas=on slog=1";<br>
solve;<br>
display z;<br>
===================,<br>
I found that <ampl milp-test.amp> gives the following console output:<br>
>$ ampl milp-test.amp<br>
>CoinSolver takes input from arguments ( - switches to stdin)<br>
>Enter ? for list of commands or help<br>
>Coin:<br>
<br>
So, solving procedure does not start... and CBC waits for user input!?<br>
What's the problem?<br>
<br>
Replacing "option solver cbc" to "option solver bonmin" leads to correct<br>
AMPL output:<br>
...<br>
bonmin: Optimal<br>
z [*] :=<br>
1 1<br>
2 0<br>
3 1<br>
4 0<br>
5 1<br>
6 0<br>
7 1<br>
8 0<br>
;<br>
<br>
We'll appreciate any advice.<br>
<br>
Regards,<br>
--<br>
Vladimir V. Voloshinov,<br>
Ph.D, head of lab. C-3 "Distributed computing algorithms"<br>
Center of Grid-technologies & Distributed Computing, <a href="http://dcs.isa.ru" target="_blank">http://dcs.isa.ru</a>,<br>
web: <a href="http://dcs.isa.ru/wiki/staff/vladimirv" target="_blank">http://dcs.isa.ru/wiki/staff/vladimirv</a><br>
<br>
_______________________________________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted 'at' lehigh 'dot' edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
<br>
</div>