[Couenne] COUENNE in matlab
Pietro Belotti
pbelott at clemson.edu
Fri Feb 18 09:43:03 EST 2011
Dear Jean-Charles,
at the moment, the only modeling language interface for Couenne is the
AMPL interface. We are extending it now to accept other formats by using
the Optimization Services package in COIN-OR
(https://projects.coin-or.org/OS), but it will take some time. I am not
sure how to do it in Matlab, but here's one possible way: Couenne accepts
.nl files that are written by AMPL: if, from AMPL, you give the commands
model mymodel.mod;
data mydata.dat;
write gmyfile;
AMPL will create a file myfile.nl (without the "g") on which you can run
"couenne myfile.nl" and solve it. Couenne then produces a file myfile.sol
which contains the optimal solution, and which is once again in an AMPL
format, but you can just read the last n lines of the file (n is the
number of variables) as they usually contain the solution to your problem.
If you are able to write a .nl file from Matlab (see
http://www.ampl.com/hooking.html), which is not trivial. You should then
be able then to run Couenne as a shell script from Matlab and read the
.sol file. I have to say I never tried this as I'm not a Matlab user. If
you try this, let me know if you have any success.
Also, I would highly appreciate if you could direct all your questions to
the Couenne mailing list (in CC).
Regards,
Pietro
--
Pietro Belotti
Dept. of Mathematical Sciences
Clemson University
email: pbelott at clemson.edu
phone: 864-656-6765
web: myweb.clemson.edu/~pbelott
On Fri, 18 Feb 2011, jean-charles bazin wrote:
> Dear Pietro Belotti,
>
> My name is Jean-Charles Bazin and I work on computer vision. For my research, I am now using COUENNE. I got your contact from https://projects.coin-or.org/Couenne/wiki
>
> I managed to use couenne from ampl, and it works great!
> My question is the following: is it possible to call couenne directly from matlab?
> Actually I need to run couenne several hundreds of time, so if I could call couenne automatically from matlab and process the outputs directly in matlab, that would be wonderful.
>
> Best regards,
>
> --
> Jean-Charles BAZIN
> Post-doctoral fellow
> Ikeuchi Laboratory
> University of Tokyo, Japan
> +82-10-7216-6039
More information about the Couenne
mailing list