OPIM 910/ESE 504 (PhD level)

Electrical and Systems Engineering (SEAS)

OPIM (Wharton)

ESE-504/OPIM-910: Introduction to Optimization Theory

PhD level course, but open to undergrads with permission.

Tuesdays & Thursdays 3-4:30PM
JMHH 270
Fall 2008
Professor Monique Guignard-Spielberg
opim910 at yahoo.com


 
To go directly to one of the following topics, click on the corresponding link:


New this week
General Information
Textbook
Syllabus
Slides
Class summaries
Grading
Homework
Project
Exams
Handouts
OR/MS Links
more on GAMS


HOME


================================================

New this week (Dec. 1)

This is week 14.

The final exam will be comprehensive. It will be on Friday, December 12th from 9-11 am in room 360 JMHH.

Both classes this week will be regular classes. Project presentations will take place next Monday, 8 Dec., from 6 pm to 9pm +. I'll order pizza and soft finks.

Since there are 12 projects, we'll have to be strict about timing: up to 15 minutes per project. Prepare one double-sided page to be distirbuted to the class. Send it to me by email no later than 5 pm, and I'll print it. If I don't get anything from you by 5 pm, I'll assume you'll print it yourself. Please prepare professional presentations, using for instance pdf or ppt. Concentrate on the essential: the problem, the model, your chosen solution method. Leave the details for the final reports. The reports will be due on the last day of the exam period. If you are not ready by then, you'll automatically get an incomplete, and your grade will be postponed until January.

back to the top

================================================

New this week (Nov. 24)

This is week 13.

No class this week, instead there is a "catch-up" exam for those who got 70 or less in the midterm. On Tuesday 25 Nov., 3-4:30, 270 JMHH.

Here is homework 6, due Monday 8 December.

Happy Thanksgiving!

back to the top

================================================

New this week (Nov. 17)

This is week 12.

Please download
(1) the file on primal affine scaling.
(2) the file on NLP(1),
(3) the file on NLP(2),
(4) the file on the KKT conditions, and
(5) the enlarged KKT picture.

We will look at NLP(2) before NLP(1).

You should also look at this summary.

back to the top

================================================

New this week (Nov. 10)

This is week 11.

Don't forget that there will be a quiz at the beginning of class this Thursday 11/13/2008. It will be based on everything, up to and including transportation and assignment.
You must let us know in advance by email if you cannot make it to class on that day.

Homework 5 will be due on Thursday 20 November.

We will look today (11/11) at
(1) cuts (p. 23-38 and 47-51) and Gomory cuts ,
(2) the dual simplex method (see section 6.11, p. 329-334),
(3) BB and variables with upper bounds in LINDO.

On Thursday we will look at interior point methods for solving LPs in polynomial time. While Karmarkar's method is guaranteed to converge in polynomial time, it is rather difficult to understand. We will rather look at the affine scaling algorithm, another interior point method, even though it is not polynomial. It works well in practice.
Look at the gams code implementing affine scaling, and at the Wikipedia article on it.

To help you get some practice with logical constraints, here is a folder full of examples. Have fun!

back to the top

================================================

New this week (Nov. 3, election week!)

This is week 10.

Updated answer to midterm problem 3.

Updated answer to midterm problem 2.

Don't forget that there will be a quiz at the beginning of class next Thursday 11/13/2008. You must let us know in advance by email if you cannot make it to class on that day.

A farmer is carrying a bushel of corn and is accompanied by a goose and a wolf. He came to a river.... you know the story! Except that in France, one talks about a cabbage, a goat and a wolf...
Download, study and run the corresponding gams model from the GAMS Model Library.
How many times does the farmer have to cross the river?

There are several errors in the slides of Sarper for Chapter 9, so please download this file instead.

The following summary may also help you model constraints with 0-1 variables.

back to the top

================================================

New this week (Oct. 27)

Good news, it seems the email account is working again...

This is week 9.

The following file 1 and file 2 may help you review duality in linear programming.

Here is an example with an infinite duality gap.

The following gams files may be useful, in particular they illustrate the use of mpswrite.

Transportation problems: try to run the following gams program, this is the listing, and this is the log file.
In gams under windows you automatically obtain the log file.
In unix, it is not automatically saved, but you can get it by running your program in batch mode,
using the command "gamsbatch mymodel" instead of "gams mymodel".
In batch mode, you can even turn your computer off, and the run continues
in the background on the unix machine. This is useful in particular for long runs.

An example of a transportation problem and questions about it: the problem and the answers.

back to the top

================================================

New this week (Oct. 20)

Please stop sending email messages to the yahoo account, it has been suspended by yahoo for "suspicious activity".
I will let you know (by email) when it is restored. Right now it still receives your messages but I cannot reply.
Thanks for letting me know that there was a confusion between the two variables in the LINDO output, as well as a
typo in the answer to Problem 2. Oh! well...

Here are the answer to the asparagus problem, with the typo corrected, and the answer to the incomplete LINDO output.
The answer to Problem 3 is here.

Please read the following short note and try to figure out what it is doing (the student who wrote it wrote it in a very terse way! notice also that the dual should be a max if the primal is a min!)

Homework 4 will be due on Thursday 6 November.

Next week Jian and I will exchange days for the office hours. I will have mine on Monday, on the 6th floor of JMHH (the OPIM conference room will not be available on that day).

I suggest that if you have a few minutes to spare, you go to the following webpage. It shows a number of real uses of OR in practice. In addition it is really well done!

___________________________________________________________

To help you practice, here is the text of the quiz (without answers) and quiz (with answers).

Remember that the midterm will be in class on Thursday 23 October, 3-4:30.
Closed book, but you can bring a sheet with all you want to have handy during the exam.
Don't forget to take a small calculator, a ruler, and an eraser. We will provide paper.

Finally, tomorrow, Wednesday, I will have expanded office hours, 3-5 and then after 6
(but no later than 7!) for those who really cannot make it between 3 and 5. In the OPIM suite, room 541.
Bring your questions.

back to the top

================================================

New this week (Oct. 6)

SLIDES

Please download the following two files, we will look at them in class on Thursday.

HOMEWORK

Here is the third homework, due Tuesday 21 October.

Don't forget that last week, you were supposed to read the "portfolio selection" part in Financial applications! As part of HW3, you are asked to solve the corresponding model in LINDO, append your printout, then interpret the sensitivity analysis part in the context of this problem. Would it not make sense to question the apparent "arbitrariness" of some of the constraints?

SUMMARY

The class summary for Tuesday 30 September is now available.

READINGS

No reading this week, you have enough to do with class material, the first project, and HW3.
You might however find the following files useful for a deeper understanding of class material:
(*) an incomplete LINDO output (expect to get such a question for the midterm!)
(*) another example of how to determine graphically the range of an objective function coefficient within which the optimal basis is unchanged
(*) an example with detailed sensitivity analysis. There are many questions, and you could try to answer them first without looking at the answers. Good practice for the midterm :)

EMAIL/OFFICE HOURS

Finally don't hesitate to come to office hours (3:30 to 5, Mo. and Wed., in one of the OPIM conference rooms, 5th floor, JMHH), or to write us email at opim910@yahoo.com if you have questions. Not just for the homework, but on any course related issue.

QUIZZZZZ

Here is the answer to Thursday's quiz.
There will be another quiz this Thursday, and this time, it will be collected and graded. It will count as a mini homework.

back to the top

================================================

New this week (Sept. 29)

This might make your life easier if you use the DOS version of LINDO and want to print (part of) the screen.
The procedure goes as follows:
when you have the DOS window open, (black background), click on the c:\ at the top left corner, click on edit, then on mark, then mark by select-clicking the part of the screen that you want to print (that part will be white). Click on c:\ again and click on copy. Then go to your text editor and paste your selection in a new file that you can then print normally or send us as a text file... That is all there is to it. You could also click on select all if that is what you want... it is easier, and you can then edit the text file :)

For Thursday's class, as well as next Tuesday's class, please download Sarper's notes on Chapter 5.

I would suggest that you read the slides on CH. 5 by Orlin on your own as a complement.


Note: in the homework, in general, if the question is: "what is the optimal solution," don't forget to give the optimal value as well. This is obviously important information!

Reading for the week:
this file contains a number of applications.
Read in particular the "portfolio selection" part in Financial applications, solve the corresponding model in LINDO, and append your printout to the next homework (HW 3). Interpret the sensitivity analysis part in the context of this problem. Would it not make sense to question the apparent "arbitrariness" of some of the constraints?

back to the top

================================================

New this week (Sept. 22)

Please go to "slides" and download "my" slides for week 4.

Look at this!

Here is the second homework, due Thursday 2 October.

Remember that you are allowed, and even encouraged, to work in groups on the homework problems.
However, you must each return your own answer, and it must be your own!
In particular, for this homework, you must write your own model in LINDO and run it yourself.
It is NOT allowed to use any outside help or outside source in this class without referencing it.
It is all right to cooperate with your classmates as long as you do not copy someone else's work.

back to the top

================================================

New this week (Sept. 15)

For your enjoyment: click here. Be sure to move the cursor over the picture!



Now, something more serious! Office hours will be Mondays and Wednesdays, 3:30 to 5 pm, in the OPIM conference room.

The first project description can be found here.

Finally, the reading for this week is by George Dantzig in Interfaces. The reference is
George B. Dantzig, "The Diet Problem." Interfaces 20:4 (July-August 1990) 43-47.
This time use EBSCO MegaFILE for the download.

To get the slides go there.

If you want to download the free version of the text editor NoteTabLight, click here.

back to the top

================================================

New this week (Sept. 10)

Here is the first homework, due Thursday September 18.

Remember that you are allowed, and even encouraged, to work in groups on the homework problems.
However, you must each return your own answer, and it must be your own!
It is NOT allowed to use any outside help or outside source in this class without referencing it.
It is all right to cooperate with your classmates as long as you do not copy someone else's work.

Be sure to read the section on projects, and to start thinking about possible topics. The groups for the final project will be mailed to you at the end of the week.

Finally, here is a short article on modeling in Math. Programming. You might want to read it and re-read it and ... many times during the semester. Modeling is an art, and practice is the best way to become a master.

back to the top

================================================

New this week (Sept. 3)

The first readings for the semester are taken from the INFORMS Journal called Interfaces.
You can download them using the Penn Library journal access system (requires Pennkey).

The first reading emphasizes the usefulness of spreadsheets in Management Science/Operations Research.
Interfaces, Vol.38, No.4, July-August 2008, p. 225-227.

The second one presents an application of spreadsheet optimization for scheduling radiology residents at a teaching university hospital.
Interfaces, Vol.38, No.4, July-August 2008, p. 311-323.

These papers should be read by the end of next week.

While this course does not emphasize the use of spreadsheets, they are a useful tool, either alone or combined with a system such as GAMS.


back to the top

================================================

New this week (Aug. 16)

Well, this is the first message for this semester.
The website is under construction, and in some way, it will be so until the end of the semester :)
Feel free to browse now, and during the semester, feel obliged to do so at least every second day, as this will be the main communication channel from instructor/TA to you.

When you install the CD from the back of the textbook on your computer, you will August 2008, 311notice that LINDO and LINGO will be installed automatically, among other things. Be sure that you are connected to the internet at this point, as the system will look for a possible update on the LINDO site (and chances are there is a newer version than that on your CD). The good news is that you don't have to go to the LINDO site to download the LINDO package on your own, this will be done automatically.

back to the top

================================================
G. B. Dantzig, the father of Linear Programming, passed away in May 2005.

As he stated it himself,
"Linear programming is a revolutionary development giving man the ability to state general objectives and to find, by means of the simplex method, optimal policy decisions for a broad class of practical problems of great complexity."



Read the article, or this one entitled "G. B. Dantzig 1914 - 2005", in the Bulletin of the Czech Econometric Society 22 (2005), by J.Dupacova and D.P.Morton.

================================================



Operations Research: the science of better. Click on "Benefit", then "Optimize Resource". Look at the examples.




================================================
You may look online at (but not print) the following book on optimization. This book is used in OPIM 913, Advanced Linear Programming. You might want to at least glance through it occasionally.


back to the top

================================================

General Information

Course Description

Optimization problems arise in a wide variety of systems including manufacturing systems, transportation systems, financial systems, and telecommunication systems. This course covers major mathematical models of optimization problems -- linear programming, network flow, integer programming, and nonlinear programming. We will focus on formulation issues and solution methodologies for these classes of optimization models.

Excerpt from the first article quoted about G.B. Dantzig:
"Dr. Dantzig's seminal work allows the airline industry, for example, to schedule crews and make fleet assignments. It's the tool that shipping companies use to determine how many planes they need and where their delivery trucks should be deployed. The oil industry long has used linear programming in refinery planning, as it determines how much of its raw product should become different grades of gasoline and how much should be used for petroleum-based byproducts. It's used in manufacturing, revenue management, telecommunications, advertising, architecture, circuit design and countless other areas."

We will use several optimization software packages, first the easy-to-use commercial packages, LINDO and possibly EXCEL. These are good for small problems but data entry can be tedious. Another class of solvers work on algebraic formulations, and are useful in particular when one must solve several problems with the same structure, such as transportation or assignment problems. One of these is LINGO, an extension of LINDO, also available on the CD that comes with the text. Another one is GAMS (General Algebraic Modeling System). It is both an interface between us, the users, and commercial "solvers", i.e., software packages that are designed to solve one or more of the model types mentioned above, and a language, in which one can write models and to some extent algorithms for solving them, using, or not, the solvers provided. GAMS is available on a number of servers on campus.
You should download the academic demo version available on the GAMS website (look for information, documentation, and links, at http://www.gams.com., http://www.gams.com/presentations/orms_sungrid.pdf, and http://www.gamsworld.org.)
Please also download (and look at :o) )this ppt file.

back to the top

Audience

This course is intended as a first course in Mathematical Programming for graduate students in engineering, mathematics, statistics, marketing and operations management/research. This section is specially designed for doctoral students, who will most likely take some more advanced courses after this one, such as Advanced Linear Programming, Advanced Nonlinear Programming, Advanced Integer Programming, Graph Theory, and so on. More emphasis will be placed on algorithms, the underlying theory, and on matrix representations.

back to the top

Background

This course assumes elementary background in multivariate differential calculus and in linear algebra, plus familiarity with vector/matrix notation and arithmetic.

Instructor and TA

Prof. Monique Guignard-Spielberg
Office: 5th floor, OPIM Dept., JMHH
Phone: 215-898-8235
Email: guignard at wharton.upenn.edu
URL: http://opim.wharton.upenn.edu/~guignard
Office Hours: Wed., 3:30-5 pm, in one of the the OPIM Conference room.


The TA for the class is Jian Guo.
Office: Room 201 LRSM, 3231 Walnut Street.
Email: jianguo at seas.upenn.edu
Office hours: Mondays, 3:30-5 pm, in one of the OPIM Conference room.

Office hours will start the week of September 17.

The teaching team can be reached at the following email address:
opim910 at yahoo.com

back to the top


Textbook

The textbook used for the course is "Introduction to Mathematical Programming," by W. L. Winston and M. Venkataramanan, Thomson, 4th edition.
Make sure that you get a copy with a CD on the back cover.

back to the top


Course Syllabus

    Students must read the material before class. The material covered in class will often differ from the readings, as the emphasis will be more on concepts and on more rigourous presentations of algorithms, using matrix notation and higher dimension problems. Homeworks will cover both the chapter material and class material.

    The syllabus for fall 2008 can be found here.

    back to the top


Slides

    Class #3 Orlin's modified Chapter 3-A slides, the EXCELfile and the LINDO input file.
    Here is a simple DOS file to execute LINDO. It is very portable, but not as flexible as the Windows version. Also it is an older version.
    Notice that you probably have to download it and run it from the command line on your PC.

    Week 4 Orlin's modified slides as well as my slides for Chapter 4, part 2, on the simplex method, and the LINDO input file, as well as the Big M method for the Bevco problem.
    Summary of class of 19 September 2006.
    You may also want to look at the following file for Chapter 4 by H. Sarper.

    Week 6 Finish Chapter 5.
    My slides on the structure of the LINDO output and its interpretation.
    Orlin's modified slides for Chapter 6 on sensitivity analysis on a financial problem.
    Orlin's modified slides for Chapter 6 on reduced costs and shadow prices,
    and the corresponding excel sheet.

    Week 7 No new slides, see under "New this week" for reading material.

    Week 8 Sarper's slides for Chapter 7 on the transportation problem.

    Week 9 Sarper's slides for Chapter 7 on the transportation problem.
    My slides (much expanded from Sarper's) for Chapter 7 on the assignment problem.
    Sarper's slides for Chapter 9 on integer programming (part 1), as well as Orlin's modified slides on IP.

    Week 11 slides for Chapter 9 on integer programming (part 3).


back to the top


Grading Policy

  • Projects: 25%
  • Homework: 25%
  • Midterm Exam: 25%
  • Final Exam: 25%

back to the top


Class Summaries

back to the top


Homework

  • All homeworks must be turned in by 3:00 on the Tuesdays/Thursdays listed below.
  • Late homeworks will not be accepted!
  • Computer software (LINDO, EXCEL, GAMS) can ONLY be used to solve problems that explicitly ask you to do so. All other problems have to be solved by hand.

    Homework #1, due September 18.


    Homework #2, due October 2.


    Homework #3, due October 21.


    Homework 4 , due November 6.


    Homework 5, due November 20.


    homework 6, due Monday 8 December.




back to the top


Term Project



This year, the term project will be in two parts. The first part will involve working on two problems similar to those found in the INFORMS journal called Interfaces. This will be an opportunity to study and work on a broader, more realistic problem than those found in the homework.

The first project description can be found here. The second project will be posted later.

The second part will be on a problem that you identify. It would be especially interesting if these projects could be based on optimization problems arising on campus: dining, transportation, heating/cooling, recycling, medical care, maintenance, scheduling, etc...

One-page proposals for the projects should be returned on Thursday 16 October. They should also be sent as electronic files to opim910 at yahoo.com before that class. You should describe the problem, the literature you are proposing to cover, and the numerical experiments you will conduct (data collection, comparison between solvers, model modification, ..., as applicable).

Projects should be done in groups of three or four persons. In the final report, each member of the group will have to specify his/her contribution to the project.
Groups will change so that you will work with different people for different projects.
Initial assignments will be sent by email the second week of class.

There will be a class presentation at the end of the semester (in class on Thursday 4 December), and a written report, including the code(s) developed and the listings, will be due at the time of the final exam.

Some earlier proposals can be found in this directory, and those from last year in this directory. The GAMS file lists a certain number of projects that were done in GAMS. That may give you ideas as to the kind of problems that could be solved by math. programming.

back to the top


Exams

  • The mid-term exam will be in class on Thursday 23 October.


  • The final exam will be comprehensive. It will be on Friday, December 12th from 9-11 am in room 360 JMHH.


  • back to the top


    Handouts

    • Handout 1: Course syllabus & assignments, this file
    • Handout 2: Examples on formulating optimization problems, pdf file from Dr. Zhi-Long Chen
    • Handout 3: Examples on formulating LP problems, pdf file from Dr. Zhi-Long Chen
    • Handout 4: Look at the gams code implementing affine scaling. Rerun it with the other example from Rardin's book. Think about what happens when there is more than one equality constraint.

    • Handout 5: About GAMS. In order to separate data from the program itself, you can use the
      $include file.data
      feature of GAMS. At execution time, the line "$include file.data" will be replaced verbatim by the file file.data or whatever file name you wrote after $include. Example:
      look at the modified file onbshift.gms , it calls the following files arr.txt, dutyf.txt, and dutyp.txt . After downloading these files, and before trying to run this on your own PC, make sure that all the .txt files are in the directory C:\windows\gamsdir.
      If you want to place them somewhere else, you have to modify the file onbshift.gms accordingly.
      Notice that you have to be careful when using the $include inside a gams file to have the right ";" where needed.
      If the file to be included contains table or parameter data, it may be safer to leave the ";" out of the included file, and let the gams file itself decide whether a ";" is needed or not.
      If you want to read more about the $include feature, look in the GAMS notes of Rardin.

    back to the top


    Interesting Links about Operations Research/Management Science