FAQ | BOOK | SOLVERS | PLATFORMS | VENDORS | CALENDAR | MORE! | WHAT'S NEW
  EXTENSIONS | CHANGE LOG | REPORTS | NETLIB | EXAMPLES | CONTENTS | HOME

AMPL Download Details

AMPL Student Edition
Windows | Unix/Linux

Solvers that work with AMPL
CPLEX | DONLP2 | Gurobi | KNITRO | LOQO
lp_solve | MINOS | SNOPT | WSAT(OIP)

Standard AMPL database handler for Windows
"Scrolling window" utility for Windows
Papers and reports

       This page gives instructions for downloading versions of AMPL and related software that are available at no charge.

       All downloadable versions of AMPL are Student Editions, which are limited to problems of 300 variables and 300 constraints and objectives, but are full-featured in other respects. They can be used for any of the examples in the AMPL book, or to set up a demonstration version for small-scale evaluation and testing. All Student Editions described on this page are standard (command-line) versions; see our GUI page for the status of graphical user interfaces. (The AMPL Plus Student Edition, which also has a graphical user interface, expired at the end of 2002.)

       Evaluation copies and updates for AMPL Professional Editions -- ones that do not have the strict problem-size limitations of the student software -- are available from authorized AMPL vendors. Updates should be requested from the vendor that originally sold you AMPL. (If you are having trouble locating your vendor, our vendor listing may help. If vendor information is not available or your original vendor cannot be located, write to info@ampl.com for assistance.)

       Several solvers can be downloaded separately in ready-to-use binary (executable) form, for use with any version of AMPL. Problem size limitations vary, but are mostly similar to the limitations on the AMPL Student Edition. Information on obtaining unrestricted versions of these solvers and many others can be found in the AMPL solver listing.

       Windows users can take advantage of two additional downloads that work with student or professional versions of AMPL:

  • A database add-on that works with AMPL's new relational database access features (version 20000209 or later) to read and write external files maintained by Access, Excel, and other data-handling applications for which ODBC drivers are installed.

  • A scrolling-window utility that takes the place of the standard "MS-DOS" window for users of command-line AMPL.

Note on file compression: Files that end in .gz must be decompressed by gzip before you can use them. Most AMPL executables (binaries) available for downloading are gzip-compressed.


Downloading AMPL Student Edition software

       You can download recent versions of the AMPL Student Edition software, which permits solution of problems up to 300 constraints and objectives and 300 variables. Downloads are from an image of the netlib AMPL directory except where specified otherwise.

       You may wish to download the AMPL Student Edition in conjunction with one or more solver downloads, to serve as a demonstration version or for use with the AMPL book; some AMPL vendors may offer downloads from their own web sites as well. For Windows there is also a quick-start alternative that downloads AMPL, several solvers, and some useful utility routines as a single package.


For Windows

       To install the current standard (command line) AMPL Student Edition (under Windows 95, 98, NT or later), download the file and decompress to produce a file ampl.exe. Then download solvers and place the resulting files in the same folder.

       To run standard AMPL under Windows, you may double-click on ampl.exe to bring up the "ampl:" prompt in an "MS-DOS" window. For greater convenience in working with AMPL commands, however, we recommend instead downloading our scrolling-window utility and executing AMPL with its help.

       To use a downloaded solver, set the solver option to the name of the solver's executable file. For example, if you have downloaded lpsolve.exe, enter the command option solver lpsolve.

       For a quick start if you haven't yet acquired any of the above, download the command-line AMPL zip archive file:

If your web browser doesn't automatically unpack this archive, double-click on the amplcml.zip file icon to unpack it. The unpacking procedure should create a folder named amplcml containing the standard AMPL program (ampl.exe), the scrolling-window utility (sw.exe), executables for the solvers MINOS 5.5 (minos.exe) and CPLEX 10.1 (cplex.exe and cplex101.dll), and the Kestrel client (kestrel.exe) for free access to over a dozen more solvers via the Internet. You may move and rename the amplcml folder to whatever is convenient for you. (If you can't get the archive to unpack, your computer lacks a properly configured zip-file utility. You can download a program such as UnZip, WinZip, or Stuffit Expander to unpack zip files.)

       To run AMPL using these files, double-click on sw.exe, and in the window that appears, type ampl to load the AMPL program. At this point the window should show the following,

sw: ampl
ampl:
and you can proceed to enter commands at the "ampl:" prompts as shown in the AMPL book. The default solver will be MINOS; enter the command option solver cplex to switch to CPLEX, or option solver kestrel to start using the Kestrel client.


For Unix (including Linux)

       You can download the latest updates of the standard AMPL Student Edition software for a broad variety of Unix platforms:

The downloaded files must be decompressed by gzip to produce a file named ampl. This file must be made executable, by a Unix command such as chmod +x ampl, after which it may be executed from any directory in your search path.

       To make use of the downloaded AMPL software, you will also need to download solvers to a directory in your search path. Then to use a downloaded solver, set the solver option to the name of the solver's executable file. For example, if you have downloaded lpsolve, enter the command option solver lpsolve.


Downloading solvers that work with AMPL

       To create a working installation of the standard (command-line) AMPL Student Edition by downloading one of the Windows versions or Unix versions described above, you will also need to obtain one or more solvers. A variety of solvers available as ready-to-run executable (binary) files are listed below. Restrictions on use or limitations on availability are indicated as appropriate.

       To install a solver, download and decompress the executable file appropriate for your computer, as indicated below. Under Unix variants, you may also have to make the file executable by giving a command such as chmod +x solvfilename. Place the executable in the same folder or directory as your AMPL executable, or anywhere in your search path. It will then be accessible from AMPL by giving an AMPL command of the form option solver solvfilename before solve.

       Consult our solver listing for sources of further information on these and other solvers that work with AMPL.

       Windows, Linux, and Sun Solaris users can also gain access to over a dozen solvers by downloading a single program, the Kestrel client. See our Kestrel instructions for details and examples.


CPLEX

       CPLEX solves linear and convex quadratic programs by simplex or interior-point methods, and linear and convex quadratic integer programs by a branch-and-bound procedure.

       For academic use: Free, unrestricted versions of CPLEX for AMPL are available for teaching and research at degree-granting academic institutions. Eligible users may obtain licenses by following these steps:

  1. Install AMPL, if you have not done so already.
  2. Register for the IBM Academic Initiative and then download and install CPLEX Optimization Studio 12.2 for your operating system, following IBM’s Academic Initiative instructions.
  3. In the large folder (directory) of files that were installed, find the bin folder inside the cplex folder. Copy the appropriate executable files from the bin folder to wherever your solvers are located (usually the same folder that contains the AMPL program):
    • For Windows, copy cplexamp.exe and cplex122.dll.
    • For Linux and other Unix-based systems, copy cplexamp.
  4. Generate and install a license file on each computer that will be running CPLEX, following IBM’s license generation instructions.
  5. Use CPLEX with AMPL by specifying option solver cplexamp; before solve;.
Note that if you use this version of CPLEX with the Student Edition of AMPL, then AMPL will limit your problem size to 500 variables and 500 constraints plus objectives. But when used with any unlimited version of AMPL, this version of CPLEX can be applied to problems of any size.

       For non-academic use: The full-featured CPLEX for AMPL product is available directly from us. Write to info@ampl.com or call +1 773-882-AMPL for prices. You can also request a 30-day trial; simply specify CPLEX as one of the solvers on the trial license form.


DONLP2

       DONLP2 solves nonlinear optimization problems using a sequential quadratic programming algorithm and dense-matrix linear algebra. Versions providing AMPL support are available for all of the platforms supported by the AMPL Student Edition:

To install, download and decompress by gzip to create an executable file named donlp2 (for Unix variants) or sdonlp2.exe (for Windows). Then follow the general instructions at the beginning of this section.

       Further information for AMPL users is available from a readme file and from the DONLP short users guide (in gzip-compressed postscript form).


Gurobi

       Gurobi solves linear programs by simplex and interior-point methods, linear and convex quadratic mixed-integer programs by a branch-and-bound procedure, and convex quadratic programs by an interior-point method.

       For academic use: Free, unrestricted versions of Gurobi for AMPL are available for teaching and research at degree-granting academic institutions. If your use of Gurobi falls into this category, you may obtain free licenses directly from us as follows. (Assitance with all of these options may be obtained by writing to info@ampl.com or calling +1 773-882-AMPL.)

  • If you are purchasing AMPL from us now, include Gurobi as a no-cost item in your order.
  • If you have already purchased AMPL from us, contact us to request that Gurobi be added to your license.
  • If you obtained AMPL from another source, contact us to discuss options.
Free software and licenses for academic use of Gurobi for AMPL can also be downloaded by following these steps:

  1. Install AMPL, if you have not done so already.
  2. Install the standalone version of Gurobi Optimizer, obtain a license key, and validate the Gurobi license following Gurobi’s academic license instructions.
  3. Download the “Gurobi Solver for AMPL” by logging into the Gurobi account created in step (2) and choosing “Download” from the User’s Menu and then the “AMPL” tab under Download.
  4. Copy the executable files for the AMPL version of Gurobi to an appropriate location, as explained in the instructions for adding Gurobi to an existing AMPL installation.
  5. Use Gurobi with AMPL by specifying option solver gurobi_ampl; before solve;.
Note that if you use this version of Gurobi with the Student Edition of AMPL, then AMPL will limit your problem size to 500 variables and 500 constraints plus objectives. But when used with any unlimited version of AMPL, this version of Gurobi can be applied to problems of any size.

       For non-academic use: The full-featured Gurobi for AMPL product is available directly from us. Write to info@ampl.com or call +1 773-882-AMPL for prices. You can also request a 30-day trial; simply specify Gurobi as one of the solvers on the trial license form.


KNITRO

       KNITRO solves linear and nonlinear optimization problems in continuous variables, using a choice of interior-point and active-set methods. General constraints are allowed, and functions may be convex or nonconvex. KNITRO uses full 2nd-derivative information from AMPL, and supports AMPL's complementarity constraints.

       You can download a free student version, limited to 300 variables and 300 constraints, from the KNITRO download page. You can get a free 30 day evaluation version with no size limit by emailing info@ziena.com. KNITRO is available for Windows, Linux (32-bit or 64-bit), Mac OS X (Intel x86 or PowerPC), and Solaris.


LOQO

       LOQO solves linear and nonlinear optimization problems in continuous variables, using interior-point methods. Full AMPL support is provided in versions 3.10 and later.

       You can download a size-limited student version for Windows (95, 98, NT or later), or size-unrestricted demonstration versions for Unix or Windows that will time out after 60 days. Details and procedures are provided via the LOQO download page.


lp_solve

       Solver lp_solve handles linear and linear integer programs of moderate scale. Versions of lp_solve 3.0 are available from the netlib AMPL directory for all of the platforms supported by the AMPL Student Edition:

To install, download and decompress by gzip to create an executable file named lpsolve (for Unix variants) or lpsolve.exe (for Windows). Then follow the general instructions at the beginning of this section.


MINOS

       MINOS solves linear programs by the primal simplex method, and nonlinear optimization problems in continuous variables by use of a reduced-gradient approach. Restricted-size versions of MINOS 5.5 are available from the netlib AMPL directory for all of the platforms supported by the AMPL Student Edition:

To install, download and decompress by gzip to create an executable file named minos (for Unix variants) or minos.exe (for Windows). Then follow the general instructions at the beginning of this section.

       For detailed instructions on using MINOS from AMPL, including a complete listing of MINOS directives, consult Using AMPL/MINOS.


SNOPT

       SNOPT solves linear programs by the primal simplex method, and nonlinear optimization problems in continuous variables by use of a sequential quadratic programming approach that employs limited-memory approximations to 2nd-derivative information. Restricted-size versions of SNOPT 5.3 are available from the netlib AMPL directory for all of the platforms supported by the AMPL Student Edition:

To install, download and decompress by gzip to create an executable file named snopt (for Unix variants) or snopt.exe (for Windows). Then follow the general instructions at the beginning of this section.

       See the listing of SNOPT directives for further information on controlling SNOPT from the AMPL environment.


WSAT(OIP)

       WSAT(OIP) is a domain-independent local search method for linear integer constraints. A Linux version with a built-in AMPL interface is available through the WSAT download page.


Downloading the standard AMPL database handler for Windows

       AMPL's new relational database facility provides a convenient mechanism for applying AMPL when data values are stored in relational tables managed by other software. A flexible table declaration defines correspondences between sets, parameters, variables, and expressions in AMPL models and relational database tables in external files. New read table and write table commands use these correspondences to import data values into AMPL and to export data and solution values from AMPL. Communication with the database software is managed by plug-in "handlers" that can be loaded as needed.

       You can try out this new feature using the standard (command-line) AMPL Student Edition (version 20000209 or later) in conjunction with the Open Database Connectivity (ODBC) standard under Microsoft Windows (95, NT or later). For a quick start, download the following archive file:

If your web browser doesn't automatically unpack this archive, double-click on the amplcml.zip file icon to unpack it. The unpacking procedure should create a folder named amplcml having the following contents:
  • ampl.exe -- the standard AMPL program for Windows
  • minos.exe -- the MINOS solver
  • cplex.exe and cplex101.dll -- components of the CPLEX solver
  • ampltabl.dll -- the Windows ODBC table handler
  • sw.exe -- the scrolling-window utility

  • README, readme.sw, readme.cplex -- usage notes
  • TABLES -- folder of files for table examples
(If you can't get the archive to unpack, your computer lacks a properly configured zip-file utility. You can download a program such as UnZip, WinZip, or Stuffit Expander to unpack zip files.) You may move and rename the amplcml folder to whatever is convenient for you.

       To run AMPL with the relational table facility, double-click on sw.exe, and in the window that appears, type ampl to load the AMPL program. AMPL will in turn automatically load the table handler from ampltabl.dll. At this point the window should show the following,

sw: ampl
ampl:
and you can proceed to enter commands at the "ampl:" prompts in the usual way.

       See our relational database access writeup for an introduction to the new features and for complete instructions on using table declarations with Windows applications such as Access and Excel. To run any of the scripts (ending in .run) in the list of table examples, simply include the script from the TABLES folder; to run diet.mdb.run, for example, enter the command include TABLES/diet.mdb.run.


Downloading the “Scrolling Window” utility for Windows

       If you run a command-line version of AMPL under Microsoft Windows, the "ampl:" prompts may appear in an "MS-DOS" window that shows only the most recent 25 lines and has other limitations. You can instead use our more flexible "scrolling window" utility, by downloading the following file:
  • sw.exe.gz  (for Windows 95, 98, NT or later).
Decompress to produce a file sw.exe and place that file in the folder that contains your AMPL executable (ampl.exe).

       To run this utility, double-click on sw.exe to bring up the "scrolling window" with the prompt "sw:" in the top line. Type ampl at this prompt to start up AMPL; at this point the contents of the window should be

sw: ampl
ampl:
and you can proceed to enter commands at the "ampl:" prompts in the usual way. The scroll bar at the right lets you scroll back to earlier output, and the menus provide facilities for cut-and-paste and font selection. The arrow keys recall previous commands for editing and resubmission. See the sw readme file for details.



Comments or questions?
Write to info@ampl.com or use our comment form.

Back to AMPL downloads home page.

Back to AMPL home page.


LAST MODIFIED 1 NOVEMBER 2013 BY dmg.