Download AMPL Lab Exercise: Solving Optimization Problems using AMPL and CPLEX, MINOS, lpsolve - Pr and more Lab Reports Mathematics in PDF only on Docsity! Name: Lab 1 MA 416 1. Go to the AMPL web site (http://www.ampl.com/). 2. Download the Student Edition of AMPL and the following solvers: CPLEX, MINOS, and lpsolve. (These three solvers come with the student edition of AMPL for Windows. If you are using a Mac or a Linux machine, you will not be able to download CPLEX.) 3. Read pages 1–6 in Chapter 1 of the AMPL book, AMPL: A Modeling Language for Mathematical Programming. 4. Use AMPL to solve the LP described on page 5 of the AMPL book. Type the program exactly as it appears in the book. Be sure to include spaces. The solution to the program should include both the optimal solution and the optimal objective function value. The display command shown on page 5 of the AMPL book will help you to find the optimal solution. The solve command shown on page 5 will help you find the optimal objective function value. 5. Modify the file prod0.mod so that you can answer the following questions. (a) Is it necessary to include spaces between variables and *’s in the AMPL .mod file? (b) Is it necessary to include spaces between numbers and *’s in the AMPL .mod file? (c) Can “max” be substituted for “maximize” in the AMPL .mod file? (d) Is it necessary to name each constraint in the AMPL .mod file? 6. Make an AMPL model file, farmer1.mod, that can be used to solve the Farmer Problem - Version 1. Use AMPL to solve this problem. Find both the optimal solution and the optimal objective function value. 7. Make an AMPL model file, farmer2.mod, that can be used to solve the Farmer Problem - Version 2. Use AMPL to solve this problem. Find both the optimal solution and the optimal objective function value. 8. Make an AMPL model file, farmer3.mod, that can be used to solve the Farmer Problem - Version 3. Use AMPL to solve this problem. Find both the optimal solution and the optimal objective function value. 9. The Lab Report. (a) Type your answers to the following questions. i. Is it necessary to include spaces between variables and “*”’s in the AMPL .mod file? How did you modify prod0.mod to check this? 1