Installing AMPL at Home
For Windows
You can easily set up AMPL on your (Windows) computer by:
- Downloading a "starter kit" from the AMPL website;
- Extracting it on your computer;
- Creating a batch file to set up AMPL.
Downloading AMPL
- Go to the AMPL website at www.ampl.com
.
- Click on the download link to get the Student Edition.
![ampl_download.jpg](/pub/OpsRes/AMPLAtHome/ampl_download.jpg)
- Get the quick start zip file (for Windows) and save it to the appropriate directory . Here we will use
= C:\Temp
![ampl_windows.jpg](/pub/OpsRes/AMPLAtHome/ampl_windows.jpg)
Your
directory should look like this:
Extracting AMPL
Open the zip file and extract it into . Make sure to check Use folder names
.
After extraction your directory should look like this:
Creating a Batch File
To simplify your use of AMPL it is easiest to set it up to run from any directory. To do this you need to create a batch file that will set the path to your AMPL executable and then open a Command Line (aka DOS Prompt) window. Here are the steps to do this:
- Right click on the Desktop and create a new Text Document.
![make_text.jpg](/pub/OpsRes/AMPLAtHome/make_text.jpg)
- Name the document
setup_ampl.bat
. If queried about changing the extension, click Yes
.![change_ext.jpg](/pub/OpsRes/AMPLAtHome/change_ext.jpg)
- Open Notepad. Go to the start menu, select Programs, then Accessories and finally Notepad.
![run_notepad.jpg](/pub/OpsRes/AMPLAtHome/run_notepad.jpg)
- Open
setup_ampl.bat
in Notepad.![open_batch.jpg](/pub/OpsRes/AMPLAtHome/open_batch.jpg)
- Add the following lines to
setup_ampl.bat
:path %path%;\amplcml
start cmd.exe
![edit_batch.jpg](/pub/OpsRes/AMPLAtHome/edit_batch.jpg)
- Save
setup_ampl.bat
and then double click on setup_ampl.bat
in your Desktop. You will get a command line window (also known as a DOS prompt) pop up and your path will be set to find AMPL.![run_batch.jpg](/pub/OpsRes/AMPLAtHome/run_batch.jpg)
You can now run AMPL from anywhere on your computer.
-- MichaelOSullivan - 27 Feb 2008