How can I install AMPL in Ubuntu?

2,134 views
Skip to first unread message

zhy...@gmail.com

unread,
Dec 1, 2008, 6:16:36 AM12/1/08
to AMPL Modeling Language
Dear All,
I downloaded the AMPL for Linux from the main web,
then
sudo gzip -d ampl.gz
sudo mv ampl /usr/bin/
sudo chmod +x /usr/bin/ampl
But if I run ampl, the system tell me that no such file or directory
Using command "which ampl", the directory is true.
Someone told me that he found the file is compiled under SUSE.
Thanks!

Stefano Coniglio

unread,
Dec 10, 2008, 2:03:44 PM12/10/08
to AMPL Modeling Language
I use the free (student) version of AMPL on a Ubuntu machine more or
less on a daily basis and it works perfectly fine.

Can you post a link to the specific archive you downloaded on www.ampl.com?

jeffhgo...@gmail.com

unread,
Dec 26, 2008, 2:22:16 AM12/26/08
to AMPL Modeling Language
I went through a bunch of trouble to do this today, and it was
actually very simple. I copied the executable files for ampl and the
solvers (minos and cplex in my case) into the /bin directory, then I
rehashed the directory (hash /bin). Now I can type ampl in the
terminal and it loads and works like normal! One thing to note though
is that I did use chmod +x ampl, however i am not sure this is really
necessary. Good luck!

larrydag

unread,
Jan 1, 2009, 3:33:12 PM1/1/09
to AMPL Modeling Language
There is the option of using GLPK (http://www.gnu.org/software/
glpk/). It is based on GMPL which is a subset of AMPL. You need to
compile is with a linux c compiler like g++ or gcc. There is a great
tutorial on it from the IBM develperworks website.

http://www-128.ibm.com/developerworks/linux/library/l-glpk1/

Be sure to look at parts 2 and 3 of the tutorial as well.

Larry
http://industrialengineertools.blogspot.com/

larrydag

unread,
Jan 1, 2009, 12:22:14 PM1/1/09
to AMPL Modeling Language


On Dec 1 2008, 5:16 am, "zhyi...@gmail.com" <zhyi...@gmail.com> wrote:
You may want to look into using GLPK (http://www.gnu.org/software/
glpk/). It uses GMPL which is a subset of AMPL. You have to download
it and compile it with a c complier like g++ or gcc. IBM has a great
tutorial on the GLPK

http://www.ibm.com/developerworks/linux/library/l-glpk1/

Be sure to look at parts 2 and 3 of the series as well. On the
DeveloperWorks site do a search for "linear programming".


Secondly, I have not used AMPL on linux but I would have to guess that
you need to compile it. I would look at the documentation that came
in the ampl.gz package. Let me know if you have still have troubles
and I will give it a try myself.

Larry
http://industrialengineertools.blogspot.com/
Reply all
Reply to author
Forward
0 new messages