[AMPL 2780] combining AMPL and CPLEX

View: New views
3 Messages — Rating Filter:   Alert me  

[AMPL 2780] combining AMPL and CPLEX

by Thomas Granz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi folks,

I have  AMPL and I have a CPLEX 10.1. But my version of CPLEX is not especially for AMPL. Is there a way to make them work together or do I need a special CPLEX(for AMPL) version?
Now, when I use "option solver cplex; solve;" then instead of solving the given problem a CPLEX comando line is opend.
The programm execution looks like this:
--------------------
ampl: model test.mod;
ampl: data test.dat;
ampl: option solver cplex;
ampl: solve;
ILOG CPLEX 10.100, licensed to "xxx", options: e m b q use=20

Welcome to CPLEX Interactive Optimizer 10.1.0
  with Simplex, Mixed Integer & Barrier Optimizers
Copyright (c) ILOG 1997-2006
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>  
--------------------


Best regards,
L. J.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


[AMPL 2783] Re: combining AMPL and CPLEX

by Paul A. Rubin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Aug 28, 10:48 am, Thomas Granz <ampl...@...> wrote:
>
> I have  AMPL and I have a CPLEX 10.1. But my version of CPLEX is not especially for AMPL. Is there a way to make them work together or do I need a special CPLEX(for AMPL) version?
> Now, when I use "option solver cplex; solve;" then instead of solving the given problem a CPLEX comando line is opend.

The command 'cplex' tells CPLEX to run its interactive optimizer,
which is not what you want.  You need a driver program that will run
CPLEX's optimization engine only (not the interactive GUI).

Versions of AMPL bought from ILOG should come with an executable named
'cplexamp'.  If you have that, just use "option solver cplexamp" and
you should be in business.  If you don't have it, there's C source
code for a drive at the AMPL web site (http://www.ampl.com/
solvers.html#Table).

/Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


[AMPL 2785] AW: [AMPL 2783] Re: combining AMPL and CPLEX

by Thomas Granz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thanks Paul,

this brought me one step further. But when I try to compile the driver, I get the following error:

$ make
cc -s -o cplex cplex.o ../funcadd0.o ../amplsolver.a libcplex.a -lm -lpthread
cplex.o(.text+0x81b4): In function `amplout':
: undefined reference to `tunewrite'
collect2: ld returned 1 exit status
make: *** [cplex] Error 1

I have already compiled 'amplsolver.a' in 'ampl/solvers'. Does anyone has an idea what the problem is?
Thank you,
L. J.


Von: Paul <rubin@...>
An: AMPL Modeling Language <ampl@...>
Gesendet: Samstag, den 29. August 2009, 00:58:25 Uhr
Betreff: [AMPL 2783] Re: combining AMPL and CPLEX


On Aug 28, 10:48 am, Thomas Granz <ampl...@...> wrote:
>
> I have  AMPL and I have a CPLEX 10.1. But my version of CPLEX is not especially for AMPL. Is there a way to make them work together or do I need a special CPLEX(for AMPL) version?
> Now, when I use "option solver cplex; solve;" then instead of solving the given problem a CPLEX comando line is opend.

The command 'cplex' tells CPLEX to run its interactive optimizer,
which is not what you want.  You need a driver program that will run
CPLEX's optimization engine only (not the interactive GUI).

Versions of AMPL bought from ILOG should come with an executable named
'cplexamp'.  If you have that, just use "option solver cplexamp" and
you should be in business.  If you don't have it, there's C source
code for a drive at the AMPL web site (http://www.ampl.com/
solvers.html#Table).

/Paul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---