Top Banner
Computational Methods for Management and Economics Carla Gomes Module 10a Integer Programming Models (slides adapted from Hillier and Hillier’s and Orlin’s)
68

Computational Methods for Management and Economics Carla Gomes

Feb 13, 2016

Download

Documents

bary

Computational Methods for Management and Economics Carla Gomes. Module 10a Integer Programming Models. (slides adapted from Hillier and Hillier’s and Orlin’s). Divisibility - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computational Methods for Management and Economics Carla Gomes

Computational Methods forManagement and Economics

Carla Gomes

Module 10a

Integer Programming

Models

(slides adapted from Hillier and Hillier’s and Orlin’s)

Page 2: Computational Methods for Management and Economics Carla Gomes

Divisibility

 

Decision variables in an LP model are allowed to have any values, including noninteger values, that satisfy the functional and nonnegativity constraints. i.e., activities can be run at fractional levels.

What to do when divisibility assumption violated:

realm of integer programming!!!

Page 3: Computational Methods for Management and Economics Carla Gomes

Revisiting the TBA Airlines Problem

An Example where Integrality Matters

Page 4: Computational Methods for Management and Economics Carla Gomes

The TBA Airlines Problem

• TBA Airlines is a small regional company that specializes in short flights in small airplanes.

• The company has been doing well and has decided to expand its operations.

• The basic issue facing management is whether to purchase more small airplanes to add some new short flights, or start moving into the national market by purchasing some large airplanes, or both.

Question: How many airplanes of each type should be purchased to maximize their total net annual profit?

Page 5: Computational Methods for Management and Economics Carla Gomes

Data for the TBA Airlines Problem

SmallAirplane

LargeAirplane

CapitalAvailable

Net annual profit per airplane $1 million $5 million

Purchase cost per airplane 5 million 50 million $100 million

Maximum purchase quantity 2 —

Page 6: Computational Methods for Management and Economics Carla Gomes

Linear Programming Formulation

Let S = Number of small airplanes to purchase

L = Number of large airplanes to purchase

Maximize Profit = S + 5L ($millions)

subject to

Capital Available: 5S + 50L ≤ 100 ($millions)

Max Small Planes: S ≤ 2

and

S ≥ 0, L ≥ 0.

Page 7: Computational Methods for Management and Economics Carla Gomes

Graphical Method for Linear Programming

3

2

1

0 1 2 3 S

L

Feasible region

Number of large airplanes purchased

Number of small airplanes purchased

(2, 1) = Rounded solution (Profit = 7)

(2, 1.8) = Optimal solution

Profit = 11 = S + 5 L

Page 8: Computational Methods for Management and Economics Carla Gomes

Violates Divisibility Assumption of LP

• Divisibility Assumption of Linear Programming: Decision variables in a linear programming model are allowed to have any values, including fractional values, that satisfy the functional and nonnegativity constraints. Thus, these variables are not restricted to just integer values.

• Since the number of airplanes purchased by TBA must have an integer value, the divisibility assumption is violated.

Page 9: Computational Methods for Management and Economics Carla Gomes

Integer Programming Formulation

Let S = Number of small airplanes to purchase

L = Number of large airplanes to purchase

Maximize Profit = S + 5L ($millions)

subject to

Capital Available: 5S + 50L ≤ 100 ($millions)

Max Small Planes: S ≤ 2

and

S ≥ 0, L ≥ 0

S, L are integers.

Page 10: Computational Methods for Management and Economics Carla Gomes

Graphical Method for Integer Programming

3

2

1

0 1 2 3 S

LNumber of large airplanes purchased

Number of small airplanes purchased

(2, 1) = Rounded solution (Profit = 7)

(2, 1.8) = Optimal solution for the LP relaxation (Profit = 11)

Profit = 10 = S + 5 L

(0, 2) = Optimal solution for the integer programming problem (Profit = 10)

Page 11: Computational Methods for Management and Economics Carla Gomes

Graphical Method for Integer Programming

• When an integer programming problem has just two decision variables, its optimal solution can be found by applying the graphical method for linear programming with just one change at the end.

• We begin as usual by graphing the feasible region for the LP relaxation, determining the slope of the objective function lines, and moving a straight edge with this slope through this feasible region in the direction of improving values of the objective function.

• However, rather than stopping at the last instant the straight edge passes through this feasible region, we now stop at the last instant the straight edge passes through an integer point that lies within this feasible region.

• This integer point is the optimal solution.

Page 12: Computational Methods for Management and Economics Carla Gomes

Why integer programs?

• Advantages of restricting variables to take on integer values– More realistic– More flexibility

• Disadvantages– More difficult to model – Can be much more difficult to solve

Page 13: Computational Methods for Management and Economics Carla Gomes

Integer Programming

• When are “non-integer” solutions okay?– Solution is naturally divisible

• e.g., $, pounds, hours– Solution represents a rate

• e.g., units per week– Solution only for planning purposes

• When is rounding okay?– When numbers are large

• e.g., rounding 114.286 to 114 is probably okay.

• When is rounding not okay?– When numbers are small

• e.g., rounding 2.6 to 2 or 3 may be a problem.– Binary variables

• yes-or-no decisions

Page 14: Computational Methods for Management and Economics Carla Gomes

Types of Integer Programming Problems

• Pure integer programming problems are those where all the decision variables must be integers.

• Mixed integer programming problems only require some of the variables (the “integer variables”) to have integer values so the divisibility assumption holds for the rest (the “continuous variables”).

• Binary variables are variables whose only possible values are 0 and 1.

• Binary integer programming (BIP) problems are those where all the decision variables restricted to integer values are further restricted to be binary variables.

– Such problems can be further characterized as either pure BIP problems or mixed BIP problems, depending on whether all the decision variables or only some of them are binary variables.

Page 15: Computational Methods for Management and Economics Carla Gomes

Examples of Applications of Binary Variables

• Making “yes-or-no” type decisions– Build a factory?– Manufacture a product?– Do a project?– Assign a person to a task?

• Logical constraints– Alternative constraints– Conditional constraints

• Representing non-linear functions– Fixed Charge Problem

• If a product is produced, must incur a fixed setup cost.• If a warehouse is operated, must incur a fixed cost.

– Piecewise linear representation– Diseconomies of scale– Approximation of nonlinear functions

• Set-covering, and set partitioning– Make a set of assignments that “cover” a set of requirements.– Partition a set into subsets meeting given requirements

Page 16: Computational Methods for Management and Economics Carla Gomes

StockCompany ExampleCapital Budgeting Allocation Problem

StockCompany is considering 6 investments. The cash required from each investment as well as the NPV of the investment is given next. The cash available for the investments is $14,000. Stockco wants to maximize its NPV. What is the optimal strategy?

An investment can be selected or not. One cannot select a fraction of an investment.

Page 17: Computational Methods for Management and Economics Carla Gomes

Data for the StockCompany Problem

Investment 1 2 3 4 5 6

Cash Required (1000s)

$5

$7

$4

$3

$4

$6

NPV added (1000s)

$16

$22

$12

$8

$11

$19

Investment budget = $14,000

Page 18: Computational Methods for Management and Economics Carla Gomes

Integer Programming Formulation

Max 16x1+ 22x2+ 12x3+ 8x4+ 11x5+ 19x6

5x1+ 7x2+ 4x3+ 3x4+ 4x5+ 6x6 14

xj {0,1} for each j = 1 to 6

10, if we invest in i 1,...,6,, elseix

What are the decision variables?

Objective and Constraints?

Page 19: Computational Methods for Management and Economics Carla Gomes

Capital Budgeting Allocation Problem (one resource) Knapsack Problem

• Why is a problem with the characteristics of the previous problem called the Knapsack Problem?

• It is an abstraction, considering the simple problem:

A hiker trying to fill her knapsack to maximum total value.Each item she considers taking with her has a certain value and a certain weight. An overall weight limitation gives the single constraint.

Practical applications:

Project selection and capital budgeting allocation problems

Storing a warehouse to maximum value given the indivisibility of goods and space limitations

Sub-problem of other problems e.g., generation of columns for a given model in the course of optimization – cutting stock problem (beyond the scope of this course)

Page 20: Computational Methods for Management and Economics Carla Gomes

• The previous constraints represent “economic indivisibilities”, either a project is selected, or it is not. There is no selecting of a fraction of a project.

• Similarly, integer variables can model logical requirements (e.g., if stock 2 is selected, then so is stock 1.)

Page 21: Computational Methods for Management and Economics Carla Gomes

How to model “logical” constraints

• Exactly 3 stocks are selected.

• If stock 2 is selected, then so is stock 1.

• If stock 1 is selected, then stock 3 is not selected.

• Either stock 4 is selected or stock 5 is selected, but not both.

Page 22: Computational Methods for Management and Economics Carla Gomes

Formulating Constraints

• Exactly 3 stocks are selected

x1+ x2+ x3+ x4+ x5+ x6=3

Page 23: Computational Methods for Management and Economics Carla Gomes

If stock 2 is selected then so is stock 1

A 2-dimensional representation

Stock 2

Stock 1

The integer programming constraint:

x1 x2

Page 24: Computational Methods for Management and Economics Carla Gomes

If stock 1 is selected then stock 3 is not selected

A 2-dimensional representation

Stock 3

Stock 1

The integer programming constraint:

x1 + x3 1

Page 25: Computational Methods for Management and Economics Carla Gomes

Either stock 4 is selected or stock 5 is selected, but not both.

A 2-dimensional representation

stock 5

stock 4

The integer programming constraint:

x4 + x5 = 1

Page 26: Computational Methods for Management and Economics Carla Gomes

California Manufacturing Company

• The California Manufacturing Company is a diversified company with several factories and warehouses throughout California, but none yet in Los Angeles or San Francisco.

• A basic issue is whether to build a new factory in Los Angeles or San Francisco, or perhaps even both.

• Management is also considering building at most one new warehouse, but will restrict the choice to a city where a new factory is being built.

Question: Should the California Manufacturing Company expand with factories and/or warehouses in Los Angeles and/or San Francisco?

Page 27: Computational Methods for Management and Economics Carla Gomes

Data for California Manufacturing

DecisionNumber

Yes-or-NoQuestion

DecisionVariable

Net PresentValue

(Millions)

CapitalRequired(Millions)

1 Build a factory in Los Angeles? x1 $8 $6

2 Build a factory in San Francisco? x2 5 3

3 Build a warehouse in Los Angeles? x3 6 5

4 Build a warehouse in San Francisco? x4 4 2

Capital Available: $10 million

Page 28: Computational Methods for Management and Economics Carla Gomes

Binary Decision Variables

DecisionNumber

DecisionVariable

PossibleValue

Interpretationof a Value of 1

Interpretationof a Value of 0

1 x1 0 or 1 Build a factory inLos Angeles

Do not buildthis factory

2 x2 0 or 1 Build a factory inSan Francisco

Do not buildthis factory

3 x3 0 or 1 Build a warehouse inLos Angeles

Do not buildthis warehouse

4 x4 0 or 1 Build a warehouse inSan Francisco

Do not buildthis warehouse

Page 29: Computational Methods for Management and Economics Carla Gomes

Algebraic Formulation

Let x1 = 1 if build a factory in L.A.; 0 otherwisex2 = 1 if build a factory in S.F.; 0 otherwisex3 = 1 if build a warehouse in Los Angeles; 0 otherwisex4 = 1 if build a warehouse in San Francisco; 0 otherwise

Maximize NPV = 8x1 + 5x2 + 6x3 + 4x4 ($millions)subject to

Capital Spent: 6x1 + 3x2 + 5x3 + 2x4 ≤ 10 ($millions)Max 1 Warehouse: x3 + x4 ≤ 1Warehouse only if Factory: x3 ≤ x1

x4 ≤ x2

andx1, x2, x3, x4 are binary variables.

Contingent decisions

Mutually exclusive decisionsResource Availability

Page 30: Computational Methods for Management and Economics Carla Gomes

Using Excel Solver to Solve Integer Programs

• Add the integrality constraints (or add that a variable is binary)

• Set the Solver Tolerance. (The tolerance is the percentage deviation from optimality allowed by solver in solving Integer Programs.)

– The default is 5% – The default is way to high– It often finds the optimum for small problems

Page 31: Computational Methods for Management and Economics Carla Gomes

Spreadsheet Model

3456789

1011121314151617181920

B C D E F GNPV ($millions) LA SF

Warehouse 6 4

Factory 8 5

Capital Required($millions) LA SFWarehouse 5 2 Capital Capital

Spent AvailableFactory 6 3 9 <= 10

Total MaximumBuild? LA SF Warehouses Warehouses

Warehouse 0 0 0 <= 1<= <=

Factory 1 1

Total NPV ($millions) 13

Page 32: Computational Methods for Management and Economics Carla Gomes

Mpl Model

Max 8x1 + 5x2 + 6x3 + 4x4;

subject to

6x1 + 3x2 + 5x3 + 2x4 <= 10;

x3 + x4 <= 1;

x3 <= x1;

x4 <= x2;

BINARY

x1;

x2;

x3;

x4;

Page 33: Computational Methods for Management and Economics Carla Gomes

Sensitivity Analysis with Solver Table

2324252627282930313233343536

B C D E F GCapital Available Warehouse Warehouse Factory Factory Total NPV

($millions) in LA? in SF? in LA? in SF? ($millions)0 0 1 1 13

5 0 1 0 1 96 0 1 0 1 97 0 1 0 1 98 0 1 0 1 99 0 0 1 1 1310 0 0 1 1 1311 0 1 1 1 1712 0 1 1 1 1713 0 1 1 1 1714 1 0 1 1 1915 1 0 1 1 19

Page 34: Computational Methods for Management and Economics Carla Gomes

Management’s Conclusion

• Management’s initial tentative decision had been to make $10 million of capital available.

• With this much capital, the best plan would be to build a factory in both Los Angeles and San Francisco, but no warehouses.

• An advantage of this plan is that it only uses $9 million of this capital, which frees up $1 million for other projects.

• A heavy penalty (a reduction of $4 million in total net present value) would be paid if the capital made available were to be reduced below $9 million.

• Increasing the capital made available by $1 million (to $11 million) would enable a substantial ($4 million) increase in the total net present value. Management decides to do this.

• With this much capital available, the best plan is to build a factory in both cities and a warehouse in San Francisco.

Page 35: Computational Methods for Management and Economics Carla Gomes

Some Other Applications

• Investment Analysis– Should we make a certain fixed investment?– Examples: Turkish Petroleum Refineries (1990), South African National Defense

Force (1997), Grantham, Mayo, Van Otterloo and Company (1999)

• Site Selection– Should a certain site be selected for the location of a new facility?– Example: AT&T (1990)

• Designing a Production and Distribution Network– Should a certain plant remain open? Should a certain site be selected for a new

plant? Should a distribution center remain open? Should a certain site be selected for a new distribution center? Should a certain distribution center be assigned to serve a certain market area?

– Examples: Ault Foods (1994), Digital Equipment Corporation (1995)

Page 36: Computational Methods for Management and Economics Carla Gomes

Some Other Applications

• Dispatching Shipments– Should a certain route be selected for a truck? Should a certain size truck be used?

Should a certain time period for departure be used?– Examples: Quality Stores (1987), Air Products and Chemicals, Inc. (1983),

Reynolds Metals Co. (1991), Sears, Roebuck and Company (1999)

• Scheduling Interrelated Activities– Should a certain activity begin in a certain time period?– Examples: Texas Stadium (1983), China (1995)

• Scheduling Asset Divestitures– Should a certain asset be sold in a certain time period?– Example: Homart Development (1987)

• Airline Applications:– Should a certain type of airplane be assigned to a certain flight leg? Should a certain

sequence of flight legs be assigned to a crew?– Examples: American Airlines (1989, 1991), Air New Zealand (2001)

Page 37: Computational Methods for Management and Economics Carla Gomes

Modeling Fixed Charge Problems

If a product is produced, must incur a fixed setup cost.

If a warehouse is operated, must incur a fixed cost.

The problem is non-linear.x – quantity of product to be manufacturedx = 0 cost =0;x > 0 cost = C1x + C2

How to model it? Using an indicator variable yy = 1 x is produced; y = 0 x is not produced

Objective function becomes C1x + C2yAdditional Constraint x ≤ My

Page 38: Computational Methods for Management and Economics Carla Gomes

Wyndor with Setup Costs (Variation 1)

Suppose that two changes are made to the original Wyndor problem:

1. For each product, producing any units requires a substantial one-time setup cost for setting up the production facilities.

2. The production runs for these products will be ended after one week, so D and W in the original model now represent the total number of doors and windows produced, respectively, rather than production rates. Therefore, these two variables need to be restricted to integer values.

Page 39: Computational Methods for Management and Economics Carla Gomes

Graphical Solution to Original Wyndor Problem

0 2 4 6 8

8

6

4

2

Production ratefor windows

Production rate for doors

FeasibleRegion

(2, 6)

Optimal solution

10

P = 3,600 = 300 D + 500 W

W

D

Page 40: Computational Methods for Management and Economics Carla Gomes

Net Profit for Wyndor Problem with Setup Costs

Net Profit ($)

Number ofUnits Produced Doors Windows

0 0(300) – 0 = 0 0 (500) – 0 = 0

1 1(300) – 700 = –400 1(500) – 1,300 = –800

2 2(300) – 700 = –100 2(500) – 1,300 = –300

3 3(300) – 700 = 200 3(500) – 1,300 = 200

4 4(300) – 700 = 500 4(500) – 1,300 = 700

5 Not feasible 5(500) – 1,300 = 1,200

6 Not feasible 6(500) – 1,300 = 1,700

Page 41: Computational Methods for Management and Economics Carla Gomes

Feasible Solutions for Wyndor with Setup Costs

0 2 4 6

2

4

6

8Production quantity for windows

(0, 0)gives P = 0

(4, 0) gives P = 500

(4, 3) gives P = 500 + 200

Production quantity for doors

(2, 6) gives P = -100 + 1700

(0, 6) gives P = 1700

8

= 1600

= 700

W

D

Optimal solution

Page 42: Computational Methods for Management and Economics Carla Gomes

Algebraic Formulation

Let D = Number of doors to produce,W = Number of windows to produce,y1 = 1 if perform setup to produce doors; 0 otherwise,y2 = 1 if perform setup to produce windows; 0 otherwise .

Maximize P = 300D + 500W – 700y1 – 1,300y2

subject toOriginal Constraints:

Plant 1: D ≤ 4Plant 2: 2W ≤ 12Plant 3: 3D + 2W ≤ 18

Produce only if Setup:Doors: D ≤ My1

Windows: W ≤ My2

andD ≥ 0, W ≥ 0, y1 and y2 are binary.

Page 43: Computational Methods for Management and Economics Carla Gomes

Spreadsheet Model

3456789

1011121314151617

B C D E F G HDoors Windows

Unit Profit $300 $500Setup Cost $700 $1,300

Hours HoursUsed Available

Plant 1 1 0 0 <= 4Plant 2 0 2 12 <= 12Plant 3 3 2 12 <= 18

Doors WindowsUnits Produced 0 6

<= <= Production Profit $3,000Only If Setup 0 99 - Total Setup Cost $1,300

Setup? 0 1 Total Profit $1,700

Hours Used Per Unit Produced

Page 44: Computational Methods for Management and Economics Carla Gomes

Wyndor with Mutually Exclusive Products(Variation 2)

Suppose that now the only change from the original Wyndor problem is:

• The two potential new products (doors and windows) would compete for the same customers. Therefore, management has decided not to produce both of them together.

– At most one can be chosen for production, so either D = 0 or W = 0, or both.

Page 45: Computational Methods for Management and Economics Carla Gomes

Feasible Solution forWyndor with Mutually Exclusive Products

(for non-binary variables)

0 2 4 6

2

4

6

8Production rate for windows

(0, 0) gives P = 0 (4, 0) gives P = 1,200

Production rate for doors

(0, 6) gives P = 3,000

P = 300 D + 500 W

Either D = 0 or W = 0

8

W

D

Page 46: Computational Methods for Management and Economics Carla Gomes

Algebraic Formulation

Let D = Number of doors to produce,W = Number of windows to produce,y1 = 1 if produce doors; 0 otherwise,y2 = 1 if produce windows; 0 otherwise.

Maximize P = 300D + 500Wsubject to

Original Constraints:Plant 1: D ≤ 4Plant 2: 2W ≤ 12Plant 3: 3D + 2W ≤ 18

Auxiliary variables must =1 if produce any:Doors: D ≤ My1

Windows: W ≤ My2

Mutually Exclusive: y1 + y2 ≤ 1and

D ≥ 0, W ≥ 0, y1 and y2 are binary.

Page 47: Computational Methods for Management and Economics Carla Gomes

Spreadsheet Model

3456789

10111213141516171819

B C D E F GDoors Windows

Unit Profit $300 $500

Hours HoursUsed Available

Plant 1 1 0 0 <= 4Plant 2 0 2 12 <= 12Plant 3 3 2 12 <= 18

Doors WindowsUnits Produced 0 6

<= <= Total MaximumOnly If Produce 0 99 Produced To Produce

Produce? 0 1 1 <= 1

Total Profit$3,000

Hours Used Per Unit Produced

Page 48: Computational Methods for Management and Economics Carla Gomes

Wyndor with Either-Or Constraints(Variation 3)

Suppose that now the only change from the original Wyndor problem is:

• The company has just opened a new plant (plant 4) that is similar to plant 3, so the new plant can perform the same operations as plant 3 to help produce the two new products (doors and windows).

• However, management wants just one of the plants to be chosen to work on these new products. The plant chosen should be the one that provides the most profitable product mix.

Page 49: Computational Methods for Management and Economics Carla Gomes

Data for Wyndor with Either-Or Constraints(Variation 3)

Production Time Used forEach Unit Produced (Hours)

Production TimeAvailable

per Week (Hours)Plant Doors Windows

1 1 0 4

2 0 2 12

3 3 2 18

4 2 4 28

Unit Profit $300 $500

Page 50: Computational Methods for Management and Economics Carla Gomes

Graphical Solution with Plant 3 or Plant 4

0 2 4

2

4

6

8

0 2 4

2

4

6

8

(a) Choose Plant 3 (b) Choose Plant 4

(2, 6) gives P = 3,600

(4, 5) gives P = 3,700

Feasible region

Feasible region

WW

D D

Page 51: Computational Methods for Management and Economics Carla Gomes

Algebraic Formulation

Let D = Number of doors to produce,W = Number of windows to produce,y = 1 if plant 4 is used; 0 if plant 3 is used

Maximize P = 300D + 500Wsubject to

Plant 1: D ≤ 4Plant 2: 2W ≤ 12Plant 3: 3D + 2W ≤ 18 + MyPlant 4: 2D + 4W ≤ 28 + M(1 – y)

andD ≥ 0, W ≥ 0, y is binary.

Page 52: Computational Methods for Management and Economics Carla Gomes

Spreadsheet Model

3456789

10111213141516

B C D E F G HDoors Windows

Unit Profit $300 $500Modified

Hours Hours HoursUsed Available Available

Plant 1 1 0 4 <= 4 4Plant 2 0 2 10 <= 12 12Plant 3 3 2 22 <= 117 18Plant 4 2 4 28 <= 28 28

Doors WindowsUnits Produced 4 5 Total Profit $3,700

Which Plant to Use? (0=Plant 3, 1=Plant 4) 1

Hours Used Per Unit Produced

Page 53: Computational Methods for Management and Economics Carla Gomes

Applications of Binary Variables

• Making “yes-or-no” type decisions– Build a factory?– Manufacture a product?– Do a project?– Assign a person to a task?

• Fixed costs– If a product is produced, must incur a fixed setup cost.– If a warehouse is operated, must incur a fixed cost.

• Either-or constraints– Production must either be 0 or ≥ 100.

• Subset of constraints – meet 3 out of 4 constraints.

Page 54: Computational Methods for Management and Economics Carla Gomes

Special Kinds of Integer Programming Models

• Knapsack Problem

• Set Covering Problem

• Set Partitioning Problem

• Set Packing Problem

• The Traveling Salesman Problem

• The Quadratic Assignment Problem

Page 55: Computational Methods for Management and Economics Carla Gomes

Set Covering Problem

• We are given a set of objects S = {1, 2, 3, …, n}.

• We are also given a set of subsets of S, S. Each subset has a cost associated with it.

• Problem:

– to “cover” all the members of S at the minimum cost using members of S.

• Properties:– The problem is a minimization and all constraints are >=;– All RHS coefficients are 1;– All other matrix coefficients are 0 or 1.

Page 56: Computational Methods for Management and Economics Carla Gomes

Fire Station ProblemSet Covering Problem

1 2 3

4

5 67

8 9

1110

12

14 15

13

16

Locate fire stations so that each district has a fire station in it, or next to it.

Minimize the number of fire stations needed.

Page 57: Computational Methods for Management and Economics Carla Gomes

Representation as Set Covering Problem

1 2 3

4

5 67

8 9

1110

12

14 15

13

16

Set Covers

1 1, 2, 4, 5

2 1, 2, 3, 5, 6

3 2, 3, 6, 7

16 13, 15, 16

Page 58: Computational Methods for Management and Economics Carla Gomes

Representation as Graph Cover Problem

A node covers itself and its neighbors. Thus, node 16 covers nodes 13, 15, 16.

1 2 3

4

5 67

8 9

1110

12

14 15

13

16What is the minimum size of a subset of nodes that covers all of the nodes?

Replace each district with a node.

Two nodes are adjacent if their districts are adjacent

16

Page 59: Computational Methods for Management and Economics Carla Gomes

Representation as Integer program

1 2 3

4

5 67

8 9

1110

12

14 15

13

16

xj = 1 if node j is selectedxj = 0 otherwise

Minimize x1 + x2 + … + x16

s.t. x1 + x2 + x4 + x5 1

x1 + x2 + x3 + x5 + x6 1

x13 + x15 + x16 1

xj {0, 1} for each j.

1

7

11

15

Page 60: Computational Methods for Management and Economics Carla Gomes

Southwestern Airways Crew Scheduling

• Southwestern Airways needs to assign crews to cover all its upcoming flights.

• We will focus on assigning 3 crews based in San Francisco (SFO) to 11 flights.

Question: How should the 3 crews be assigned 3 sequences of flights so that every one of the 11 flights is covered?

Page 61: Computational Methods for Management and Economics Carla Gomes

Southwestern Airways Flights

Seat tl e (SEA)

San Francisco (SFO)

Los Angel es (LAX)

Denver (DEN)

Chicago ORD)

Page 62: Computational Methods for Management and Economics Carla Gomes

Data for the Southwestern Airways Problem

Feasible Sequence of Flights (pairings)

Flights 1 2 3 4 5 6 7 8 9 10 11 12

1. SFO–LAX 1 1 1 1

2. SFO–DEN 1 1 1 1

3. SFO–SEA 1 1 1 1

4. LAX–ORD 2 2 3 2 3

5. LAX–SFO 2 3 5 5

6. ORD–DEN 3 3 4

7. ORD–SEA 3 3 3 3 4

8. DEN–SFO 2 4 4 5

9. DEN–ORD 2 2 2

10. SEA–SFO 2 4 4 5

11. SEA–LAX 2 2 4 4 2

Cost, $1,000s 2 3 4 6 7 5 7 8 9 9 8 9

Page 63: Computational Methods for Management and Economics Carla Gomes

Algebraic Formulation

Let xj = 1 if flight sequence (paring) j is assigned to a crew; 0 otherwise. (j = 1, 2, … , 12).

Minimize Cost = 2x1 + 3x2 + 4x3 + 6x4 + 7x5 + 5x6 + 7x7 + 8x8 + 9x9 + 9x10 + 8x11 + 9x12

(in $thousands)subject to

Flight 1 covered: x1 + x4 + x7 + x10 ≥ 1

Flight 2 covered: x2 + x5 + x8 + x11 ≥ 1

: :Flight 11 covered: x6 + x9 + x10 + x11 + x12 ≥ 1

Three Crews: x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 ≤ 3

andxj are binary (j = 1, 2, … , 12).

pairings

Page 64: Computational Methods for Management and Economics Carla Gomes

Spreadsheet Model

3456789

101112131415161718192021222324

B C D E F G H I J K L M N O P QFlight Sequence

1 2 3 4 5 6 7 8 9 10 11 12Cost ($thousands) 2 3 4 6 7 5 7 8 9 9 8 9 At

LeastIncludes Segment? Total One

SFO-LAX 1 0 0 1 0 0 1 0 0 1 0 0 1 >= 1SFO-DEN 0 1 0 0 1 0 0 1 0 0 1 0 1 >= 1SFO-SEA 0 0 1 0 0 1 0 0 1 0 0 1 1 >= 1LAX-ORD 0 0 0 1 0 0 1 0 1 1 0 1 1 >= 1LAX-SFO 1 0 0 0 0 1 0 0 0 1 1 0 1 >= 1ORD-DEN 0 0 0 1 1 0 0 0 1 0 0 0 1 >= 1ORD-SEA 0 0 0 0 0 0 1 1 0 1 1 1 1 >= 1DEN-SFO 0 1 0 1 1 0 0 0 1 0 0 0 1 >= 1DEN-ORD 0 0 0 0 1 0 0 1 0 0 1 0 1 >= 1SEA-SFO 0 0 1 0 0 0 1 1 0 0 0 1 1 >= 1SEA-LAX 0 0 0 0 0 1 0 0 1 1 1 1 1 >= 1

Total Number1 2 3 4 5 6 7 8 9 10 11 12 Sequences of Crews

Fly Sequence? 0 0 1 1 0 0 0 0 0 0 1 0 3 <= 3

Total Cost ($thousands) 18

Page 65: Computational Methods for Management and Economics Carla Gomes

Set Covering Problem

• We are given a set of objects S = {1, 2, 3, …, n}.

• We are also given S, a set of subsets of S. Each subset has a cost associated with it.

• Problem:

– to “cover” all the members of S at the minimum cost using members of S.

• Properties:– The problem is a minimization and all constraints are >=;– All RHS coefficients are 1;– All other matrix coefficients are 0 or 1.

Page 66: Computational Methods for Management and Economics Carla Gomes

Some Comments on IP models

• There are often multiple ways of modeling the same integer program.

• Solvers for integer programs are extremely sensitive to the formulation. (not true for LPs)

Page 67: Computational Methods for Management and Economics Carla Gomes

Example

constraint A: 2x1 + 2x2 + … + 2x50 51

constraint B: x1 + x2 + … + x50 25assume that x is binary

constraints C: x1 y, x2 y, …, x50 y

(where y is binary)

constraint D: x1 + … + x50 50 y

B dominates A, C dominates D

It is not obvious why, until you see the algorithms.

Page 68: Computational Methods for Management and Economics Carla Gomes

Summary on Integer Programming

• Dramatically improves the modeling capability– Economic indivisibilities– Logical constraints– Modeling nonlinearities (e.g., fixed cost)– classical problems in capital budgeting and in

supply chain management– Lots of other applications and models

• Not as easy to model

• Not as easy to solve.