CS635: Tools and Environments for Optimization
Spring 2006

Schedule


Office: 
4379 CS&S 
Phone: 
2624838 
Email: 

Office Hours: 
Wednesday 2:303:30, Thursday 4:005:00 


Teaching Assistant: Kelly Sorensen
Email: 

Office Hours: 
Tuesday 12:001:00, Friday morning 
Ms Sorensen will conduct office hours in the weeks in which she is grading the assignments, which will be most of the weeks early in the semester. 

Teaching Assistant: Arinbjorn Olafsson
Mr Olafsson will conduct office hours in the weeks in which he is grading the assignments, which will be three weeks toward thd end of semester. 

General Course Information
Many companies and research programs are integrating optimization technology into their daytoday operations. Manipulating models and optimization software and applying general operations research methodology in various contexts is becoming an increasingly soughtafter skill. This course is designed to teach students about "optimization in practice". The course involves learning about, using, and analysing the results of stateoftheart optimization software. The student will learn how to design good models for realistic applications in engineering and the sciences. In a final class project, each student will develop a "commercial strength" application of optimization technology.


Course Outline
 Introduction: Development cycle, interacting with clients, presenting results.
 Fundamentals: Basic model classes, linking them together and tricks to help solve them.
 Modeling Language Concepts: Using GAMS to build practical models.
 Data Management: Obtaining and manipulating data.
 Validation: Analysis and visualizion of results.
 Tools: Matlab, Spreadsheets, IDE, Embedded optimization
 Other Environments: Callable libraries, automatic differentiation, webbased optimization.


Assessment
 Approximately 12 Homework Assigments, approximately one per week, 75% of grade.
 Most assignments will involve programming in GAMS. For further details on setting up your GAMS environment, see below.
 Electronic submission required by 5:00pm on due date.
 All homeworks will be handed in using the CSL handin program
(details here)
 Grades will be available through the Learn@UW system. Use the "Grades" tab at the top of the page.
 You may discuss the assignments with your classmates. However, you may not share any code, or write code together. Discussion should only involve verbal communication. The written parts of the assignments need to be done entirely separately. Submitting someone else's work as your own is academic misconduct. Such cheating and plagiarism will be dealt with in accordance with University procedures (see the Academic Conduct Guide for Students)
 Class Project, 25% of grade
 Due May 11, 2006, at 5:00pm
 By April 7, 2006, write a onepage outline of project and get it approved by the instructor.
 By April 21, 2006, answer any questions of the instructor about your outline.
 Implement an optimization model and describe the results in a form reasonable for the application.
 For each project I need a hard copy of a (short) project report. The report should make clear what you have done, and detail your contribution to the question at hand. If you ran into significant problems with certain aspects of the project, you should detail what the changes you made were, and why they were necessary/time consuming.
 Many projects will result in models or extra (electronic) information that may be useful when I assess the work. If so, all the relevant files should be assembled into a single compressed file called "project.zip" or "project.gz" and submitted using the standard homework handin program (a "project"). You can refer to these files within your project report.
 An oral defense of the project may be required.
 No midterm or final exam.


Homework Assignments


Computing Information
Use the CS Unix Labs on the first floor of CS&S: Locations here.
For new users of Unix and the CS Unix facilities, orientation sessions will be held in CS&S 1325 according to the following schedule.
CS Unix Environment: You can develop models for any homework assignment or project on your Windows PC (see below) or some other nonunix environment. Ultimately, however, your programs must be runnable on the CS Unix systems and must be submitted through these systems.
You need to set up your unix paths properly in order to run GAMS and the handin utility for homework submission. We have created a .cshrc file that does this for you. To obtain and run it, login to your CS Unix account and type
cp ~cs6351/public/.cshrc.local ~/.cshrc.local
source ~/.cshrc
GAMS for the PC: Limited versions of GAMS can be downloaded for many platforms. The Windows version is particularly nice, as it includes an Integrated Development Environment. We cannot give support for installation on your own personal computers.
Thanks to GAMS, I have obtained a license for the full version of GAMS for Windows PCs for the duration of the class. When you download and install GAMS on your PCs, it will ask you for the license file during installation. Please save this file somewhere on your PC, and tell GAMS its whereabouts during installation.


Texts
GAMS  A User's Guide is electronically available.
The following should be on 2hour reserve at the Wendt Library.
 Model Building in Mathematical Programming, H.P. Williams,
Wiley, (4th Edition) 1999.
 Introduction to Mathematical Programming, W. Winston and M. Ventataraman,
Duxbury, (4th Edition) 2003.
 Optimization in Operations Research, R. Rardin,
Prentice Hall, 1998.
 Practical Management Science, Winston and Albright, Duxbury Press, 1997.
Other Useful Texts:


Examples (some will be used in class)

Top Brass Example (Rardin). Variants with
 MoBrass Example: modified version of topbrass, with costs included.
 Transport Model (GAMS Library)
 Examples with sets, subsets, ord() and card():
 Examples showing logical conditions and conditional assignments:

Drugco Example (Winston and Albright).
 Tyco Example (Winston and Albright, p.116).
 Mighty Steel Example, and
listing file.
 Simple unbounded and infeasible linear programs.
 Use of options in display statements, and listing
file
 Fibonacci example using dynamic sets, and
listing file.
 Establishing static and dynamic sets, and
listing file.
 Using dynamic sets to find leaves and root nodes of a directed graph, and
listing file.
 Minimum
cost network flow example and listing
file. Also a modified
version with capacity constraints, and listing
file.
 Larger
random minimumcost network flow example and listing
file.
 The
same minimumcost network flow example, with different options
contained in the cplex.opt file. Here are listing files for primal
simplex (lpmethod 1; takes about 71 seconds), dual
simplex (lpmethod 2, which is the default; takes about 18 seconds), network
simplex (lpmethod 3; takes about 15 seconds to execute, since it's best suited to the problem structure).
 Sailco example: application of mincost network flow.
 Shortestpath
problem with lake and listing
file.
 Repeated
shortestpath, illustrating solves within loops, conditional
(if) statement, interrogation of model attributes. Here's an
edited listing
file.
 Gandhi
example: Fixedcost model: LP with binary variables.
 Modified
Gandhi example: Includes capacity constraints on each machine,
more than one machine of each type can be used.
 Dorian
Auto: EitherOr Constraints. See the following more concise formulation with semiint variables.
 Pitcher: IfThen Constraints.
 Happy
Class: Assignment Problem.
 Kilroy
County Fire Department: Setcovering problem.
 More set covering: Aggregate, Warehouse.
 How
many female IE undergrads?: Modeling logical conditions.
 Happy
Class Revisited: Assignment Problem with Logical Constraints.
 Multicast
Server Location: Piecewise linear concave cost function, with
integer variables representing location of servers.
 Happy Milk Description and Solution. Version with a concave cost function. The latter illustrates the use of SOS2 variables
to model such a cost function. Here is the edited listing
file.
 Basketweavers
University: Precedence constraints.
 stars.gms:
use of $include statement. See also the listing file.
 qp1.gms,
Portfolio Optimization problem, as formulated in the GAMS Model
Library. Uses the data file qpdata.inc.
 Transport
example, with reports written by the put statement. Here
are the report files: factors.dat, results.dat
 largenet3.gms,
modification of largenet2.gms, modified to write its own
cplex.opt file.
 qp1rho.gms,
Modified (standard) version of portfolio optimization, in which the
parameter rho is used to weight between risk and return. Try values rho=0.1, 1, 10.
 translcp.gms,
transport problem, LCP model.
 lqr.gms,
linearquadratic regulator optimal control. Try varying Ubound and see the effect on optimal objective and solution. This example
writes an output file lqr.out.
 ngon.gms,
calculating the Ngon of radius 1 with maximum area. (A nonlinear
model.)
 ngon_betterstart.gms:
improved starting point leads to better robustness. (ngon.gms fails for
N>8). But this model still produces some nonoptimal "solutions";
e.g. the area obtained for N=25 is smaller than for N=20.
 ngon_alt.gms: An alternative model due to Vanderbei.
 ngon_prieto.gms: A model due to prieto which seems to do well up to quite large values of N.
 unitcircle.gms,
calculating the Ngon inscribed in a unit circle of maximum area. (A
nonlinear model.) (The solutions are regular polygons, with smaller
areas than those in the previous model.)
 Use of scaling options: scaling.gms and scaling_alt.gms. See User Guide Section 17.3.
 ex1.gms, simplot1.m:
Generating and plotting some simple random data using Matlab. See also
the variants simplot1a.m and simplot1b.m.
 ex2.gms, simplot2.m:
The same data, done in a slightly nicer way. (The plot is slightly
different.)
 ngonplot.gms, ngon.m:
plots the optimal Ngon of radius 1 with maximum area. Here is the
fancier program ngon_wedges.m,
which divides the polygon into "pie slices" and plots them each in a
different color.
 mincostplot.gms:
Mininum cost network flow problem from mincost.gms,
but uses put facility to write arcs and computed flows to a file
mincost.dat. The file is read and plotted by mincostplot.m.
 Some simple examples illustrating the use of the Matlab
Optimization Toolbox routine linprog: lp1.m, lp2.m
 Some examples illustrating the use of the Matlab Optimization
Toolbox routine quadprog, on convex and nonconvex problems:
qp1.m,
qp2.m,
qp3.m,
qp4.m,
qp5.m.
 translcp.gms: Transportation Problem expressed as an LCP.
 matchingpennies.gms: The matching pennies problem, a twoperson game. We find the Nash equibrium by using a complementarity formulation.
 matchingsavant.gms: Variant on the matching pennies game, in which one of the players has an edge.
 Natural
gas planning (2 stages) , a stochastic linear program.
 Natural
gas planning (3 stages), a stochastic linear program.


Miscellaneous




