License Portal

Search
Close this search box.

AMPL Course Install - Package Instructions

Extend AMPL with over 300 functions chosen from the GNU Scientific Library, including scientific, statistical, and utility functions of many kinds, and a variety of random number generators.

If your course instructor gave you a special link to download AMPL optimization software, then follow the installation instructions below.

If you did not receive a special AMPL for Courses link, then do not use the instructions on this page.
See our AMPL for Students page for other ways to get AMPL.

Welcome to AMPL for Courses!

AMPL for Courses gives you access to unrestricted versions of the AMPL modeling language and system, together with many efficient solvers for a variety of problem types. Problem sizes are unrestricted, and the software will run until a preset timeout date a few weeks after your course ends.

Special AMPL for Courses download links, specific to your course, will be made available by your course instructor. Choose the instructions below that correspond to your operating system (Microsoft Windows, Linux or macOS):

Follow the instructions to download and install the software and to start it up for the first time.

Microsoft Windows

To install: Download your course’s distribution zipfile, ampl_mswin64.zip. Double-click the zipfile icon, or apply an unzip utility, to extract the folder named ampl_mswin64 from the zipfile. This will be your AMPL folder; optionally you may rename it and you may move it to any convenient location on your computer.

To run in an integrated application: Inside your AMPL folder, double-click the amplide folder icon to open that folder, and then double-click the amplide.exe file (with the black cat’s-head icon) to start the AMPL IDE application. A small “AMPL IDE” window will appear while the program is being loaded, and then the full IDE application window will open. To get started, choose Help Contents from the Help menu at the top of the application window.

To run using a simple command-line interface: Double-click the sw.exe file in your AMPL folder, 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. AMPL model and data statements will refer to files that you have saved in your AMPL folder; use any plain-text editor to create and edit these files.

To optimize using either interface: Be sure to choose a solver, by giving a command of the form option solver xxx; with xxx replaced by the name of a solver that you have been instructed to use.

Linux

To install: Download your course’s distribution archive, ampl_linux-intel64.tgz. Then extract the contents of this archive by typing the command

tar xzf amplide.linux64.tgz

When the extraction is complete you will see a directory named amplide.linux64. This will be your AMPL directory; optionally you may rename it and you may move it to any convenient location on your computer.

To run in an integrated application: Inside your AMPL directory, you will find a directory named amplide. Use the cd command to make amplide your current directory, and then start the AMPL IDE application with the command ./amplide. A small “AMPL IDE” window will appear while the program is being loaded, and then the full IDE application window will open. To get started, choose Help Contents from the Help menu at the top of the application window. Before optimizing, be sure to choose a solver, by giving a command of the form option solver xxx; with xxx replaced by the name of a solver that you have been instructed to use.

To run using a simple command-line interface: In a command window, use the cd command 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. AMPL model and data statements will refer to files that you have saved in your AMPL directory; use any plain-text editor to create and edit these files. Before optimizing, be sure to choose a solver, by giving a command of the form option solver './xxx'; with xxx replaced by the name of a solver that you have been instructed to use.

macOS

To install: Download your course’s distribution archive, ampl_macos64.tgz. Double-click this file’s icon to extract its contents. When the extraction is complete you will see a folder named ampl_macos64. This will be your AMPL folder; optionally you may rename it and you may move it to any convenient location on your computer.

Next, to complete your installation, you will need to confirm to macOS that your AMPL software is safe to run. Double-click your AMPL folder to open it, and then follow these steps:

  • In your AMPL folder, control-click the ampl.command icon, and select Open in the menu that pops up.
  • If a box containing a warning message (“macOS cannot verify the developer . . .”) pops up, click Open in that box.
  • A Terminal window labeled ampl.command will appear. After a few seconds, you will see ampl: in the last line in the window. You can then terminate the window, by clicking the red button at the upper left. (If a box containing a warning message Do you want to terminate running processes in this window? pops up, click Terminate in that box.)

To run in an integrated application: In your AMPL folder (created by the installation steps), double-click the Amplide application (with a black cat’s-head icon). A small AMPL window will appear while the program is being loaded, after which the full AMPL IDE application window will open. (The first time you open the AMPL IDE, you might see a few “Amplide would like to access files” boxes at startup; click the OK button in each box to dismiss these.)

To get started using the AMPL IDE, choose Help Contents from the Help menu at the top of the application window. Be sure to choose a solver, by giving a command of the form option solver xxx; with xxx replaced by the name of a solver that you have been instructed to use.

To run using a simple command-line interface: Click on the magnifying glass at the top right of your screen, enter terminal in the Spotlight window, and click on the Terminal icon to open a Mac Terminal window. Use the cd command to go to your AMPL folder; for example if your AMPL folder is ampl_macos64 on your desktop, type cd Desktop/ampl_macos64. Then type ./ampl; you will see an ampl: prompt and can proceed to type AMPL commands.

By default, AMPL model and data statements will refer to files that you have saved in your AMPL folder; you can instead read from the models folder of AMPL book examples (which is part of the installation) by giving the command option ampl_include models;. Be sure to choose a solver, by giving a command of the form option solver ./xxx; with xxx replaced by the name of the solver that you wish to run.

Need more support? Contact us.

Check out all technical documentation here.

Join the conversation on the AMPL forum.