How can I integrate AMPL and CPLEX?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I integrate AMPL and CPLEX?

SKY2008
Hi all,
I have  AMPL and CPLEX11, all unrestricted version, but they are separate. How can I integrate them? My operating system is window xp, C compiler is MS VC++6.0. Can anybody give detail instruction for me? Thanks.  ZSX
Reply | Threaded
Open this post in threaded view
|

[AMPL 1566] Re: How can I integrate AMPL and CPLEX?

Hans Mittelmann

Hi,
http://www.netlib.org/ampl/solvers/cplex/
You need to make in the ampl/solves directory first, then in the cplex
subdirectory. you get an executable cplex which can be used as solver
in AMPL such as
model prob.mod;
option solver cplex;
solve;
to see how apply options of cplex, say cplex -=
Hans Mittelmann


On Jan 16, 3:21 am, SKY2008 <[hidden email]> wrote:
> Hi all,
> I have  AMPL and CPLEX11, all unrestricted version, but they are separate.
> How can I integrate them? My operating system is window xp, C compiler is MS
> VC++6.0. Can anybody give detail instruction for me? Thanks.  ZSX
> --
> View this message in context:http://www.nabble.com/How-can-I-integrate-AMPL-and-CPLEX--tp14877000p...
> Sent from the AMPL mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: [AMPL 1566] Re: How can I integrate AMPL and CPLEX?

SKY2008
Thanks. I still fell upset. I creat the directory  ampl/solvers/cplex, and copy all files in http://www.netlib.org/ampl/solvers to ampl/solves and copy all files in http://www.netlib.org/ampl/solvers/cplex/ , and when I run cd ampl/solves nmake -f makefile.vc, but it shows an error message: fatal   error   LNK1181: cannot find input file. jac2dim.obj ...

any body can save me?

ZSX


Hans Mittelmann wrote
Hi,
http://www.netlib.org/ampl/solvers/cplex/
You need to make in the ampl/solves directory first, then in the cplex
subdirectory. you get an executable cplex which can be used as solver
in AMPL such as
model prob.mod;
option solver cplex;
solve;
to see how apply options of cplex, say cplex -=
Hans Mittelmann


On Jan 16, 3:21 am, SKY2008 <scaum...@163.com> wrote:
> Hi all,
> I have  AMPL and CPLEX11, all unrestricted version, but they are separate.
> How can I integrate them? My operating system is window xp, C compiler is MS
> VC++6.0. Can anybody give detail instruction for me? Thanks.  ZSX
> --
> View this message in context:http://www.nabble.com/How-can-I-integrate-AMPL-and-CPLEX--tp14877000p...
> Sent from the AMPL mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to ampl-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---
Reply | Threaded
Open this post in threaded view
|

[AMPL 1568] Re: How can I integrate AMPL and CPLEX?

Hans Mittelmann

You have to carefully study all the READMEs and adjust the Makefiles
accordingly. I have only done it on Unix/Linux but it should work on
Windows with VC.


On Jan 16, 10:32 am, SKY2008 <[hidden email]> wrote:

> Thanks. I still fell upset. I creat the directory  ampl/solvers/cplex, and
> copy all files inhttp://www.netlib.org/ampl/solversto ampl/solves and copy
> all files inhttp://www.netlib.org/ampl/solvers/cplex/, and when I run cd
> ampl/solves nmake -f makefile.vc, but it shows an error message: fatal
> error   LNK1181: cannot find input file. jac2dim.obj ...
>
> any body can save me?
>
> ZSX
>
>
>
> Hans Mittelmann wrote:
>
> > Hi,
> >http://www.netlib.org/ampl/solvers/cplex/
> > You need to make in the ampl/solves directory first, then in the cplex
> > subdirectory. you get an executable cplex which can be used as solver
> > in AMPL such as
> > model prob.mod;
> > option solver cplex;
> > solve;
> > to see how apply options of cplex, say cplex -=
> > Hans Mittelmann
>
> > On Jan 16, 3:21 am, SKY2008 <[hidden email]> wrote:
> >> Hi all,
> >> I have  AMPL and CPLEX11, all unrestricted version, but they are
> >> separate.
> >> How can I integrate them? My operating system is window xp, C compiler is
> >> MS
> >> VC++6.0. Can anybody give detail instruction for me? Thanks.  ZSX
> >> --
> >> View this message in
> >> context:http://www.nabble.com/How-can-I-integrate-AMPL-and-CPLEX--tp14877000p...
> >> Sent from the AMPL mailing list archive at Nabble.com.
>
> --
> View this message in context:http://www.nabble.com/How-can-I-integrate-AMPL-and-CPLEX--tp14877000p...
> Sent from the AMPL mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---