[Couenne] RV: question about couenne and bonmin using cplex in AMPL

Pietro Belotti belotti at lehigh.edu
Mon Jul 5 08:17:45 EDT 2010


Dear Nathalie,

my apologies for the late reply. I am replying to your email address  
and to the Couenne list. I would appreciate if you could direct all  
future questions about Couenne to this list, as it can be useful for  
other users.

> We have Cplex 121, Couenne, bonmin and other solvers. I hooked these solvers
> to Ampl.. Each, for separated, worked fine, but I have problems changing
> options of couenne. I want to work it with CPLEX as a LP solver and Cplex as
> subsolver of bonmin.
>
> I created de couenne.OPT file and I saved it in the Ampl directory. This
> file contains the following sentences:
>
> bonmin.algorithm B-Hyb
> bonmin.milp_subsolver Cplex
> lp_solver Cplex

This option file should contain a line like this:

lp_solver cplex

although the Open Source LP solver that comes with the Couenne  
distribution, Clp, is also very good. The first two lines about Bonmin  
are used by Bonmin, not Couenne, hence I think they will be ignored.

> Also, I created enviromental variables: ENV CPLEX H with the following path:
> C:\ILOG\CPLEX121\include\ilcplex. And ENV CPLEX LIB with the following path:
> C:\ILOG\CPLEX121\lib\x86_windows_vs2008\stat_mta\
>
> Then I created the config.site file with a notepad. And I wrote these
> sentences:
>
> with cplex lib=\-L$ENV CPLEX LIB -cplex121 -lpthread"
> with cplex incdir=$ENV CPLEX H
>
> I saved this file in the share folder of COIN:
> (C:\AMPL\OS-2.1.1-win32-msvc9\share)

OK. I think this is exactly what needs to be done.

> I tried to run an example calls mymodel.mod in AMPL with couenne solver and
> this is the response:
>
> ampl: option solver OSAmplCLient;
> ampl: option OSAmplCLient_options "-solver couenne";
> ampl: solve;

You are using the OS interface to call Couenne, which has been tested  
and should work correctly. However, the error lines you showed seem to  
point to the OS interface:

>  call nl2osil
> WALK THE TREE FOR NONLINEAR CONSTRAINT TERMS:  1
> WALK THE TREE FOR NONLINEAR OBJECTIVE TERMS  1
>  return from  nl2osil
>  osinstance created
> HERE ARE THE AMPLCLIENT OPTIONS -solver couenne
>  solver Name = couenne
>  solver Options =
>
> This application has requested the Runtime to terminate it in an unusual
> way.
>
> Please contact the application's support team for more information.
>
> exit code 3

My suggestion is to use Couenne directly as a solver, without going  
through the OS interface. If there is a problem with the OS/Couenne  
interface, you may avoid it this way, but that's clearly just a  
hypothesis. So here are the commands you may want to run:

ampl: option solver couenne;
ampl: solve;

This assumes you have the executable of couenne available somewhere.

Let me know if this solves your problem by answering to the Couenne  
list (its address is copied above).

Best,
Pietro

_________________________________________
Pietro Belotti, Lehigh University
Dept. of Industrial and Systems Engineering
200 W Packer Ave, Bethlehem PA 18015.
phone: 610-758-3865   fax: 610-758-4886
email: belotti at lehigh.edu
web:   http://www.lehigh.edu/~pib208


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the Couenne mailing list