Optimization Modelling
Basics of Mathematical Programming in AMPL
Basics of Mathematical Programming in AMPL
This course was given at the Future Resilient Systems in 2021.
The focus of the three lectures presented below is to introduce the basics of optimization problem modeling and solving in AMPL.
There are also homeworks to test your knowledge of the subject. Do your best to solve them before checking the solution!
We will use AMPL (A Mathematical Programming Language) to model optimization problems, and the solver CPLEX to solve them
A problem is formulated in AMPL by means of a .mod file (defining variables, objective, constraints), a .dat file (including parameters), and a .run file for execution
[IMPORTANT - For Windows Users] To run a .run file in AMPL, if you are using Windows enter the AMPL installation folder and double-click on the AMPL application. On the appearing window type "include ex.run" (where ex.run is the name of your run file) and press enter
Downloadable demo AMPL packages (Linux/MacOs/Windows), including CPLEX and other solvers. Select the AMPL Community Edition