Problem with AMPL 10 together with CPLEX 11

12 views
Skip to first unread message

Andreas

unread,
Nov 2, 2009, 5:57:09 AM11/2/09
to AMPL Modeling Language
Hello,
I am having the following problem: I am using AMPL 10 together with
CPLEX 11. When I specify in AMPL to use CPLEX with

option solver cplex;

and then run the

solve;

command, I get the following output:


ILOG AMPL 10.000, licensed to "tu-berlin".
AMPL Version 20051214 (Linux 2.6.9-5.ELsmp)

Presolve eliminates 1536 constraints and 720 variables.
Adjusted problem:
11224 variables:
4544 binary variables
6680 linear variables
36014 constraints, all linear; 176104 nonzeros
0 objectives.

ILOG CPLEX 11.010, licensed to "tu-berlin", options: e m b q use=10

Welcome to CPLEX Interactive Optimizer 11.0.1
with Simplex, Mixed Integer & Barrier Optimizers
Copyright (c) ILOG 1997-2008
CPLEX is a registered trademark of ILOG

Type 'help' for a list of available commands.
Type 'help' followed by a command name for more
information on commands.

CPLEX> can't open /tmp/at6353.sol

this confuses me, since I thought that CPLEX reads the input and then
creates the output file (with the suffix .sol). If I add a command
like

write moutput;

I get a similar error message ("CPLEX> can't open output.sol").

Thank you very much in advance!
Kind regards,
Andy

Paul

unread,
Nov 2, 2009, 11:25:24 AM11/2/09
to AMPL Modeling Language


On Nov 2, 5:57 am, Andreas <andreas.wiese.ber...@googlemail.com>
wrote:
To get AMPL to pass files directly to CPLEX, and CPLEX to pass
solutions directly to AMPL, you need to use a driver program that
bridges the two. (Not sure if my terminology is exactly correct
there.) CPLEX/ILOG/IBM/whoever sells an AMPL/CPLEX bundle that does
this, but since you apparently have separate copies of AMPL and CPLEX,
you'll need to compile the bridge program yourself. There's C code
available at http://www.netlib.org/ampl/solvers/cplex/.

/Paul

Andy

unread,
Nov 2, 2009, 10:23:30 AM11/2/09
to AMPL Modeling Language
I think the answer has been given in

http://groups.google.com/group/ampl/browse_thread/thread/46a3bf513b2b4f35/3b43882c2da298a2?lnk=gst&q=solver+cplex#3b43882c2da298a2

the thread can be closed.
Thanks,
Andy

On Nov 2, 11:57 am, Andreas <andreas.wiese.ber...@googlemail.com>
wrote:

Ashutosh Mahajan

unread,
Nov 2, 2009, 10:28:40 AM11/2/09
to am...@googlegroups.com
On Mon, 02 Nov 2009, Andreas wrote:

> Hello,
> I am having the following problem: I am using AMPL 10 together with
> CPLEX 11. When I specify in AMPL to use CPLEX with
>
> option solver cplex;
>
> and then run the
>
> solve;
>
> command, I get the following output:

you dont have to use the 'option solver cplex' line. remove this line and your
problem should get solved.

--
regards
Ashutosh Mahajan
http://coral.ie.lehigh.edu/~asm4

Andy

unread,
Nov 3, 2009, 5:06:57 AM11/3/09
to AMPL Modeling Language
Thank you very much for your quick answers!

Yes, when I remove the line

option solver cplex;

then the problem disappears, however, then AMPL uses CPLEX 10 rather
than CPLEX 11. I will do what Paul suggested and try to compile
cplexampl with CPLEX 11.
Best,
Andy

> On Mon, 02 Nov 2009, Andreas wrote:
> > Hello,
> > I am having the following problem: I am usingAMPL10 together with
> >CPLEX11. When I specify inAMPLto useCPLEXwith
>
> > option solvercplex;
>
> > and then run the
>
> > solve;
>
> > command, I get the following output:
>
> you dont have to use the 'option solvercplex' line. remove this line and your
Reply all
Reply to author
Forward
0 new messages