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

Post on 24-Dec-2015

216 views 0 download

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

1

Ten Keys to Success in Optimization Modeling

Richard E. RosenthalOperations 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

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

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.

5

Can You Teach Modeling?

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

7

Mathematical Formulation

Index use

Given data (and units) in lower case

Decision Variables (and units) in UPPER CASE

Objectives and constraints

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.

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?

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.

11

Non-mathematical Executive Summary

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

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.

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.

14

Bound all Decisions

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.

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?

17

LP Sensitivity, Practitioner Style

Operations Research, Jul-Aug 2002

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%.

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!”

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”

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.

22

Model Robustly

“This is the part I always hate.”

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!

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

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.

26

Eliminate Lots of Variables

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

27

Eliminate Lots of Variables

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

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.

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

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

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.

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.

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

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.

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

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

37

Persistence

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

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

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

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

41

Common Sense

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

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

43

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

10 Keys to Success in Optimization Modeling

44

Questions and Comments?

Stephen Hansen, Man on a Limb