1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department...

44
1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003

Transcript of 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department...

Page 1: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

1

Ten Keys to Success in Optimization Modeling

Richard E. RosenthalOperations Research Department

Naval Postgraduate School

INFORMS Atlanta, October 2003

Page 2: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

2

Theme

Optimization is valuable and pervasive (no need to preach to the converted here)

Practical optimization applications continue to be:biggermore complexcloser to real-time (if the situation warrants)less dependent on OR gurusmore depended upon by companies, andtaken for granted or taken over and claimed credit for by non-OR’s

Page 3: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

3

Theme (continued)

As we all know, this has been made possible by remarkable improvements in computers, modeling systems, and solvers (algorithms and their implementations). We have many great researchers and commercial implementers to thank.

But, there is also another, important, sometimes overlooked piece of the story:

GOOD MODELING PRACTICE

Page 4: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

4

Acknowledgements

My ideas on good modeling practice have been greatly influenced by my NPS colleagues Jerry Brown, Matt Carlyle, Rob Dell, Kevin Wood, and other great modelers I have observed in the practice of their art, such as Harlan Crowder, Terry Harrison, Karla Hoffman, David Ryan, Linus Schrage, Julie Ward, Andres Weintraub, Kirk Yost.

Many great ideas have come from NPS students.

Today’s talk owes a special debt to Jerry Brown.

Page 5: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

5

Can You Teach Modeling?

Page 6: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

6

Key #1: Communicate Early and Often

Mathematical formulation – kept up to dateVerbal description of formulationExecutive summary – in the right language

John Stuart Curry, Tragedy and Prelude - John Brown

Page 7: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

7

Mathematical Formulation

Index use

Given data (and units) in lower case

Decision Variables (and units) in UPPER CASE

Objectives and constraints

Page 8: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

8

Verbal Description of Formulation

“Constraints [3] ensure that one service facility is assigned responsibility for each product line p.”

You wonder why I mention this, but look at our applied literature.

Page 9: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

9

Non-mathematical Executive Summary

Jerry Brown’s Five Essential Steps:• What is the problem?• Why is the problem important?• How will the problem be solved without you?• How will you solve the problem?• How will the problem be solved with your

results, but without you?

Page 10: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

10

Refining Your Executive Summary

Have a non-OR read your summary out loudAsk the reader to explain what is going onListen wellRevise and repeat

If you don’t learn how to speak in the executives’ language, then someone less qualified than you will be entrusted with solving their problems.

Page 11: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

11

Non-mathematical Executive Summary

“That’s it? That’s peer review?”

Page 12: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

12

Key #2: Bound all Decisions

A trivial concept, too-often ignored

Remember all the formal “neighborhood” assumptions underlying your optimization method?

Bob Bixby tells of real customer MIP with only 51 variables and 40 constraints that could not be solved… until bounds were added, and then it solved in a flash.

Page 13: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

13

Bound all Decisions

• Optimization is an excellent way to find data errors, but it really exploits them

• Moderation is a virtue

• Bonus! You never have to deal with the embarrassment (or the theory) ofunbounded models.

Page 14: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

14

Bound all Decisions

Page 15: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

15

Key #3: Expect any Constraint to Become an Objective, and Vice Versa

Real-world models are notorious for multiple, conflicting objectives

Expert guidance from senior leaders is often interpreted as constraints

These “constraints” are often infeasibleDiscovering what can be done changes your

concept of what should be doneContrary to impression of textbooks,

alternate optima are the rule, not the exception.

Page 16: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

16

Key #4: Sensitivity Analysis in the Real World Is Nothing Like Textbook SA

LP Sensitivity Analysis, Textbook Style

Disappointing in practice because theory creates limits.

•  

Textbooks have sleek algorithms for one modification at a time, all else held constant, e.g.,

minimize j cj Xj + Xk

Not very exciting in practice. So why is this stuff in all the textbooks? What is worth talking about?

Page 17: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

17

LP Sensitivity, Practitioner Style

Operations Research, Jul-Aug 2002

Page 18: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

18

Sensitivity Analysis, Practitioner Style

Large-scale LP for optimizing airlift -- multiple time-space muticommodity networks, linked together with non-network constraints .

Initial results on realistic scenario: only 65% of required cargo can be delivered on time.

Analysis of result revealed most of the undelivered cargo was destined for City A from City B, so.. what if we redirect some of this cargo to City A’?

Sensitivity analysis: add ~12,000 new rows and ~10,000 columns... on-time delivery improves to 85%.

Page 19: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

19

Forget Textbook Sensitivity Analysis, Plan on Lots of Model Excursions

“The beauty of this is that it is only of theoretical importance, and there is no way it can be of any practical use whatsoever!”

Page 20: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

20

Key #5: Bound the Dual Variables

Huh?Elastic constraints, with a linear (or piece-wise linear) penalty per unit of violation,bound the dual variables

“I’m willing to satisfy this restriction (constraint),as long as it doesn’t get too expensive.Otherwise, forget it; I’ll deal with the consequences”

Page 21: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

21

Key #6: Model Robustly

Your analysis should consider alternate future scenarios, and render a single robust solution.

There may be many contingency plans,but you only get one chance per yearto ask for the money to get ready.

Page 22: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

22

Model Robustly

“This is the part I always hate.”

Page 23: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

23

Key #7: Eliminate Lots of Variables

Big models get to be big through Cartesian products of indices

Find rules for eliminating lots of index tuples before they are generated in the model

Sources of rules: mathematical reasoning and common sense based on understanding of the problem

You can often eliminate constraints too!

Page 24: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

24

Example 1 of Variable Elimination

XD(a,i,r,t) = # of type a aircraft direct delivering cargo for customer i on route r departing at time t

Allow variable to exist only if Route r is a direct delivery route from customer i ’s origin to i ’s destination Aircraft type a is available at i ’s origin at t Aircraft type a can fly route r ’s critical legAircraft type a can carry some cargo type that customer i demandsTime t is not before i ’s available-to-load timeTime t is not after i ’s required delivery date + maxlate – travel time

Page 25: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

25

Example 2 of Variable Elimination

Ann Bixby and Brian Downs of Aspen Technology developed real-time Capable-to-Promise model for large meatpacking company

One of their major efforts to bring solution times down low enough was variable elimination.

Page 26: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

26

Eliminate Lots of Variables

You won’t win the Nobel or Lanchester Prize for this key idea, but it really, really helps.

Page 27: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

27

Eliminate Lots of Variables

“In effect, what you’re doing is taking a big lead off third.”

Page 28: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

28

Key #8: Incremental Implementation

In a complex model, add features incrementally. Test each new feature on small instances and take no prisoners.

When new features don’t work, there is either a bug to be fixed or a new insight to be gained. Either way, treasure the learning experiences.

Page 29: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

29

Incremental Implementation

Eliminate variables corresponding to airlifters switching from long-haul to shuttle status, if there are no foreseeable shuttle opportunities.

Feature tested with small example: removing the option to make a seemingly foolish decision actually caused degradation of objective function.What happened?

Euro

US SWA FOB

Page 30: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

30

Key #9: Persistence

“Any prescriptive model that suggests a plan and then, when used again, ignores its own prior advice…… is bound to advise something needlessly different, and lose the faith of its beneficiaries.”

Jerry Brown

Page 31: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

31

Illustration of Persistence

Customer Eqpt Type Site DistanceCust01 Eqpt-01 HHH 353Cust02 Eqpt-01 HHH 724Cust03 Eqpt-01 HHH 773Cust04 Eqpt-01 YYY 707Cust05 Eqpt-01 YYY 719Cust06 Eqpt-03 RRR 495Cust07 Eqpt-01 HHH 442Cust08 Eqpt-03 RRR 590

Results for Initial Case with 8 Customers

There are initially 8 customers to serve. We must choose serving site and equipment type.

Page 32: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

32

Illustration of Persistence

Just a moment after this solution is announced, two high-priority customers call in. The model is rerun with the 10 customers.

There are not enough assets to cover all 10 customers.

The new solution requires a major reallocation of assets. Major changes in the solution are highlighted.

Page 33: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

33

Illustration of Persistence

Customer Eqpt Type Site Dist (nm)Cust01 Eqpt-01 HHH 353Cust02 Eqpt-01 YYY 678Cust03 Eqpt-01 YYY 703Cust04Cust05 Eqpt-03 RRR 705Cust06 Eqpt-03 RRR 495Cust07 Eqpt-01 HHH 442Cust08Cust09 Eqpt-01 HHH 353Cust10 Eqpt-01 HHH 353

Results for 10 Customers without Persistence

NOT SERVED

NOT SERVED

Page 34: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

34

Illustration of Persistence

A persistent version of the model is run to obtain a new optimal solution that discourages major changes from the original announced solution.

Add to objective function: penalties on deviations from original solution, weighted by severity of disruption.

Page 35: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

35

Illustration of Persistence

Customer Eqpt Type Site Dist (nm)Cust01 Eqpt-01 HHH 353Cust02 Eqpt-01 HHH 724Cust03 Eqpt-01 HHH 773Cust04Cust05 Eqpt-01 YYY 719Cust06 Eqpt-02 RRR 495Cust07 Eqpt-01 HHH 442Cust08Cust09 Eqpt-01 YYY 380Cust10 Eqpt-01 RRR 363

Results for 10 Customers with Persistence

NOT SERVED

NOT SERVED

Page 36: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

36

Illustration of Persistence

At a cost of 1% in the objective function, the persistent solution causes no disruption to the announced plans, other than substitution of the two new customers.

Orig.With persistence? - No YesCustomers 8 10 10Objective function value Customers not served 0 180.00 180.00 Original objective 206.67 151.75 155.20 Total 206.67 331.75 335.20

Comparison of Solutions Subsequent

Page 37: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

37

Persistence

Key reference:G. Brown, R. Dell, K. Wood, “Optimization and Persistence,” Interfaces 1997.

Page 38: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

38

Key #10: Common Sense

• Heuristics are easy --- so easy we are tempted to use them in lieu of more formal methods

• Heuristics may offer a first choice to assess a “common sense” solution

• But, heuristics should not be your only choice

Page 39: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

39

Common Sense

A formal optimization model takes longer to develop, and solve

But it provides a qualitative bound on each heuristic solution

Without this bound, our heuristic advice is of completely unknown quality

This quality guarantee is key

Page 40: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

40

Common Sense

It’s OK to use a heuristic, but you should pair it with a traditional, “calibrating” mathematical model

With no quality assessment, you are betting your reputation that nobody else is luckier than you are

Page 41: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

41

Common Sense

“I tend to agree with you,especially since that’s my lucky number.”

Page 42: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

42

10 Keys to Success in Optimization Modeling

#1 Write formulation, communicate with execs

#2 Bound decisions

#3 Objectives and constraints exchange roles (alt. optima likely)

#4 Forget about sensitivity analysis as you learned it

#5 Elasticize (bound duals)

#6 Model robustly

#7 Eliminate variables – avoid generating them when you can

#8 Incremental implementation

#9 Model persistence

#10 Bound heuristics with optimization

Page 43: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

43

“That’s it? That’s the Grand Unified Theory?”

10 Keys to Success in Optimization Modeling

Page 44: 1 Ten Keys to Success in Optimization Modeling Richard E. Rosenthal Operations Research Department Naval Postgraduate School INFORMS Atlanta, October 2003.

44

Questions and Comments?

Stephen Hansen, Man on a Limb