DM545 – Linear and integer programming

Quick-Start Instructions for Installing and Running (AMPL & Solvers)

–> For Windows systems:

To install: Create a folder where you will put all your AMPL-related files. Copy the distribution zipfile, ampl_mswin32.zip or ampl_mswin64.zip, to your folder. Then "unzip" this file to place all of the individual AMPL program files into your folder; usually the unzip process can be started by double-clicking on the zipfile.

To run immediately: Double-click "sw.exe" and type "ampl" at the prompt in the window that appears. Then you will see an "ampl:" prompt and can proceed to type AMPL commands. By default the MINOS solver will be invoked by AMPL's "solve;" command; to switch to another solver, use a command of the form "option solver xxx;" where xxx is a solver that you have been instructed to use.

–> For Linux systems:

To install: Create a directory where you will put all your AMPL-related files. Copy the distribution zipfile, ampl_linux-intel32.zip or ampl_linux-intel64.zip, to your directory. Then "unzip" this file to place all of the individual AMPL program files into your directory; most Linux systems provide an unzip command for this purpose, or you can use the decompression option of the zip command.

To run immediately: Open a command window, use "cd" to go to your AMPL directory, and type "ampl" at the system prompt. Then you will see an "ampl:" prompt and can proceed to type AMPL commands. By default the MINOS solver will be invoked by AMPL's "solve;" command; to switch to another solver, use a command of the form "option solver xxx;" where xxx is a solver that you have been instructed to use.

–> For MacOS systems:

To install: Create a folder where you will put all your AMPL-related files. Copy the distribution zipfile, ampl_macosx32.zip or ampl_macosx64.zip, to your folder. Then "unzip" this file to place all of the individual AMPL program files into your folder; usually the unzip process can be started by double-clicking on the zipfile.

To run immediately: Open a Mac terminal window, use "cd" to go to your AMPL folder, and type "./ampl" at the system prompt. Then you will see an "ampl:" prompt and can proceed to type AMPL commands. By default the MINOS solver will be invoked by AMPL's "solve;" command; to switch to another solver, use a command of the form "option solver './xxx';" where xxx is a solver that you have been instructed to use.

Note for Mac and Linux users

In order to be able to run the solvers in a local directory, you will need to change the $PATH environment variable. You can do so by editing the $HOME/.profile file. You can do this by opening a terminal and running the command

vi $HOME/.profile

An editor will now appear on the .profile file. Add the following line:

export PATH=$PATH:.

which tells your operating system to (also) look for a program in the current directory, and save the file. After the editing, just run the command

source ~/.profile or . ~/.profile

which tells the operating system to take into account those changes. This procedure needs to be done only once. Every terminal you open after this will be aware of these changes. After that, you’ll be able to open a terminal and run AMPL without all this.

Date: 2014-04-16T17:57+0200

Author: Marco Chiarandini

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0