AMPL Tutorial
AMPL Tutorial Video 1
In this video Dr. Kelly Sullivan goes over the preliminaries of AMPL. You will need to download test.mod.
AMPL Tutorial Video 2
In this video Dr. Kelly Sullivan creates a first 3 variable linear program, translates it to AMPL, solves the model using the CPLEX solver, and display results.
AMPL Tutorial Video 3
In this video Dr. Kelly Sullivan demonstrates how to place integer restrictions on decision variables using AMPL.
AMPL Tutorial Video 5
In this video I discuss how to solve the Transportation Problem from Video 4 in AMPL. Further, I discuss different ways to output the solutions to math programs in AMPL.
AMPL Tutorial Video 6
In this video I demonstrate how to get sensitivity information from AMPL using CPLEX. You need to save the LegoWorkshop.mod file to follow along. To get the sensitivity information I use the following commands:
display _varname, _var, _var.rc, _var.current, _var.up, _var.down
display _conname, _con.body, _con.slack, _con.dual, _con.current, _con.up, _con.down
The meaning of these commands are as follows:
_varname displays each of your variable names (e.g., x[1], x[2])
_var displays the current (optimal) value of each of your decision variables
_var.rc displays the reduced cost associated with each of your input variables
_var.current displays the objective function coefficient associated with each decision variable
_var.up displays the largest objective function coefficient for which the current optimal solution remains optimal
_var.down displays the smallest objective function coefficient for which the current optimal solution remains optimal
_conname displays the name of each constraint
_con.body displays what the left hand side of each constraint evaluates to in the optimal solution
_con.slack displays the value of the slack variable associated with each constraint
_con.dual displays the dual variable values or shadow price of each constraint
_con.current displays the value of the right hand side of each constraint
_con.up displays the largest right hand side value for which the current optimal solution remains optimal
_con.down displays the smallest right hand side value for which the current optimal solution remains optimal