Tag Archives: teaching

YouTube Videos on Solving LPs with Excel

This had been in the back burner for a long while. Each time I taught my O.R. class (either undergrad or MBA), I kept thinking that the students would like to be able to see the Excel setup of an LP model over and over again. Many of them are not proficient in Excel, and my class is their first contact with things like absolute cell references and SUMPRODUCT. I watched a number of YouTube videos on the topic, but I wasn’t happy with any of them. Besides, I wanted the video to be about the same example that I use in the classroom. So I decided to bite the bullet and go for it. I think the outcome was decent: not great, but not terrible either. My wife said I sound a little stilted. I agree. I was only willing to do it once, no second takes, which means I was a little nervous :-)

Before I give you the link to the videos, I need to bring your attention to two disclaimers:

Disclaimer 1: I used the demo version of iShowU to record my screen action. That means you’ll see a green watermark on top of the video. I know it’s ugly, but I didn’t want to pay $29.95 for it. At least not until I get some feedback to convince me that I’ll be doing more of these videos.

Disclaimer 2: I shamelessly use the same example that they (used to?) use at the Tepper School in my classes: the “famous” farmer problem (sorry Javier :-). I was the head TA for that class a number of times and I literally sat through it at least 3 or 4 times.

Here they are:

Linear Programming: The Farmer Problem, Part I (9:07 min)

Linear Programming: The Farmer Problem, Part II (8:57 min)

I hope these videos turn out to be useful to my students and to anyone who wants to learn about linear programming and Excel Solver. I’m thinking about doing more videos on the diet problem, transportation, sensitivity analysis, etc. Let’s see how things go.

3 Comments

Filed under Linear Programming, Modeling, Teaching, Videos, YouTube

Modeling Logical Conditions

circuitBinary variables are extensively used in integer programming (IP) models to represent yes/no decisions (“Should we open a new restaurant in Coconut Grove?”), and logical conditions (“If it rains tomorrow, I will not go to the beach.”). Most people are familiar with the project selection problem in which each variable Xi is equal to 1 if project “i” is selected, and it’s equal to zero otherwise. To model the condition “if project 1 is selected, then project 2 must also be selected” one can write “X1 ≤ X2″, and “if project 2 is selected, project 3 must not be selected” becomes “X2 + X3 ≤ 1″. Even students who are learning about integer programming for the first time are usually capable of coming up with those two constraints after a few minutes (or hours). A little bit of trial-and-error typically gets you there.

What if the logical condition is a tad more complicated? For instance:

If it rains tomorrow or the Heat defeat the Spurs and grandma doesn’t come to visit on the weekend, then I’ll either go to South Beach and not drink a mojito or I’ll fly to Vegas.

I’m sure it only took you about 7 seconds to figure out that the corresponding IP model is

w + q – x ≥ 0

z + w + q ≥ y

1 + q ≥ x + p

y + p – q – z ≤ 1

This assumes that the binary variables x, y, z, w, p, q are assigned the following meanings: x = whether it rains; y = whether Heat defeat Spurs; z = whether grandma comes to visit, etc.

My students always ask me if there’s a more systematic way to come up with the linear constraints other than trial-and-error or memorization of a few simple cases. This led me to write a 4-page handout on the topic. More recently, I searched around for a while (OK, I confess that my search wasn’t very extensive) and found two references: an article on INFORMS Transactions on Education and H. P. Williams’s book. It turns out that Williams (section 9.2) does an excellent job explaining the process (if only I had known that two years ago…).

I hope this handout can still be helpful to someone out there (instead of just sitting in my hard drive). As always, your comments and feedback are welcome.

3 Comments

Filed under Integer Programming, Modeling, Teaching

No more excuses. Math can be fun!

Everyone who teaches a math-related subject has probably struggled with attracting (and keeping) the students’ attention. At parties, it gets even worse:

- “Hey, nice to meet you. What do you do?”

- “I’m a professor.”

- “Really? What do you teach?”

- “How to use mathematical models to help business managers make better decisions.”

- “Hmm, interesting stuff…I never really liked math…<awkward silence>…see you later.”

Times have changed. With books like The Goal, The Numerati, and Innumeracy (among others) and publications like Interfaces and the Analytics magazine, there are no more excuses. Fun and realistic examples describing how math, stats and OR are being used in real life abound. Why not use them in class? I propose, however, that we go one step further. Why not make one of these books the assigned course reading? Go over the book in class and, every now and then, stop, teach the technique in question, do a few exercises, and then proceed with the reading. I haven’t finished reading the Numerati yet, but it certainly would lend itself to something of the sort. Here’s the approach: start by showing a realistic problem, with a real story and facts provided by a third party that corroborate its relevance. Then, and only then, show the math that tackles it. Repeat until final exam.

While I haven’t had time to transform my own classes in such a drastic way, I’ve decided to increase the appeal of my MBA course on Management Science Models for Decision Making (a.k.a. OR) by spending the first 5 minutes of each lecture going over a real-life application of OR. The source of these applications? My fellow OR bloggers! Here’s the list of applications I used this past Spring:

Open Pit MiningFewer Brown Left Turns, Optimizing Airline Routes, Revenue Management at Thomson Holidays, Swapping Kidneys, Renewable Energy Portfolios, Domino Artwork, Aisle Design for Warehouses, Dutch Railway Scheduling, OR at the Lego Factory.

After explaining the application and the role OR plays in it, I connect the problem with the topic we are currently studying. The students’ reaction is always very positive. And, if you’re feeling audacious, you can even close it all with MC Hammer’s YouTube video on Analytics! I’m curious to know what other instructors in quantitative disciplines do to motivate their students. Let me know in the comments!

2 Comments

Filed under Teaching