---+ Installing AMPL at Home ---++ For Windows You can easily set up AMPL on your (Windows) computer by: 1 [[#download][Downloading]] a "starter kit" from the AMPL website; 1 [[#extract][Extracting]] it on your computer; 1 [[#batch][Creating a batch]] file to set up AMPL. ---++ <a name="download"></a> Downloading AMPL 1 Go to the AMPL website at [[https://www.ampl.com][www.ampl.com]]. 1 Click on the download link to get the Student Edition.<p><img width="594" alt="ampl_download.jpg" src="%ATTACHURLPATH%/ampl_download.jpg" height="419" /></p><br> 1 Get the quick start zip file (for Windows) and save it to the appropriate directory =<AMPL root>=. Here we will use <pre><AMPL root> = C:\Temp</pre><p><img width="593" alt="ampl_windows.jpg" src="%ATTACHURLPATH%/ampl_windows.jpg" height="418" /></p> Your <AMPL root> directory should look like this: <img width="717" alt="ampl_dir.jpg" src="%ATTACHURLPATH%/ampl_dir.jpg" height="204" /> ---++ <a name="extract"></a> Extracting AMPL Open the zip file and extract it into <AMPL root>. Make sure to check Use folder names. After extraction your <AMPL root> directory should look like this: <img width="716" alt="ampl_done.jpg" src="%ATTACHURLPATH%/ampl_done.jpg" height="164" /> ---++ <a name="batch"></a> 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: 1 Right click on the Desktop and create a new Text Document.<p><img width="397" alt="make_text.jpg" src="%ATTACHURLPATH%/make_text.jpg" height="464" /></p> 1 Name the document =setup_ampl.bat=. If queried about changing the extension, click Yes.<p><img width="401" alt="change_ext.jpg" src="%ATTACHURLPATH%/change_ext.jpg" height="133" /></p> 1 Open Notepad. Go to the start menu, select Programs, then Accessories and finally Notepad.<p><img width="792" alt="run_notepad.jpg" src="%ATTACHURLPATH%/run_notepad.jpg" height="466" /></p> 1 Open setup_ampl.bat in Notepad.<p><img width="733" alt="open_batch.jpg" src="%ATTACHURLPATH%/open_batch.jpg" height="496" /></p> 1 Add the following lines to 'setup_ampl.bat':<pre>path %path%;<AMPL root>\ampcml<br />start cmd.exe<br /></pre><p><img width="244" alt="edit_batch.jpg" src="%ATTACHURLPATH%/edit_batch.jpg" height="102" /></p> 1 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.<p><img width="669" alt="run_batch.jpg" src="%ATTACHURLPATH%/run_batch.jpg" height="338" /></p> You can now run AMPL from anywhere on your computer. -- Main.MichaelOSullivan - 27 Feb 2008
This topic: OpsRes
>
WebHome
>
AMPLGuide
>
AMPLAtHome
Topic revision: r3 - 2008-02-27 - MichaelOSullivan
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback