Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science...

25
page 1 of 25 Mathematics for Management Science Notes 06 prepared by Professor Jenny Baglivo © Jenny A. Baglivo 2002. All rights reserved. Integer Linear Programming (ILP) When the values of the decision variables in a linear programming problem are restricted to integers, we say that we have an integer linear programming problem or an ILP problem. When there are a large number of feasible solutions, we usually solve the LP relaxation problem (that is, the problem you get by ignoring the restriction to integer decision variables) and round the values at the end. When there are (relatively) few feasible solutions, it is best to solve the problem by trying all possibilities. Example ILP problem : Maximize OBJECTIVE = 2 x1 + 3 x2 Subject to: Constraint 1: x1 + 3 x2 8.25 Constraint 2: 2.5 x1 + x2 8.75 Non-negativity: x1 0, x2 0 Integer: x1, x2 integer (1) The feasible set for the ILP problem is the collection of 11 points highlighted below. The feasible set for the LP relaxation problem is the gray area plus the boundary lines. The dashed line is 2 x1 + 3 x2 = 11.0192.

Transcript of Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science...

Page 1: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 1 of 25

Mathematics for Management Science Notes 06 prepared by Professor Jenny Baglivo © Jenny A. Baglivo 2002. All rights reserved. Integer Linear Programming (ILP) When the values of the decision variables in a linear programming problem are restricted to integers, we say that we have an integer linear programming problem or an ILP problem. When there are a large number of feasible solutions, we usually solve the LP relaxation problem (that is, the problem you get by ignoring the restriction to integer decision variables) and round the values at the end. When there are (relatively) few feasible solutions, it is best to solve the problem by trying all possibilities. Example ILP problem: Maximize OBJECTIVE = 2 x1 + 3 x2 Subject to: Constraint 1: x1 + 3 x2 ≤ 8.25 Constraint 2: 2.5 x1 + x2 ≤ 8.75 Non-negativity: x1 ≥ 0, x2 ≥ 0 Integer: x1, x2 integer (1) The feasible set for the ILP problem is the collection of 11 points highlighted below. The feasible set for the LP relaxation problem is the gray area plus the boundary lines. The dashed line is 2 x1 + 3 x2 = 11.0192.

Page 2: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 2 of 25

(2) The solution to the ILP problem is x1=2 and x2=2. The maximum value of the objective function is 10.

Feasible Point OBJECTIVE Feasible Point OBJECTIVE (0,0) 0 (2,0) 4 (0,1) 3 (2,1) 7 (0,2) 6 (2,2) 10 Max (1,0) 2 (3,0) 6 (1,1) 5 (3,1) 9 (1,2) 8

(3) The solution to the LP relaxation problem is x1=36/13 and x2=95/52. The maximum value of the objective function is 11.0192.

Corner Point OBJECTIVE value (0,0) 0 (0,33/12) 8.25 (36/13,95/12) 11.0192 Max (7/2,0) 7

(4) If you round the solution to the LP relaxation problem, then you get an infeasible solution (that is, one that does not satisfy the constraints). Bounding Principles: (1) The maximum value for an ILP problem is always less than or equal to the maximum value for the LP relaxation:

MAX for ILP ≤ MAX for LP relaxation (2) The minimum value for an ILP problem is always greater than or equal to the minimum for the LP relaxation:

MIN for ILP ≥ MIN for LP relaxation

Page 3: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 3 of 25

Implementing ILP problems in Solver: Step 1: Add constraints for each integer decision variable: (1) Put the address of the decision variable in the lefthand side, (2) Select “int” where you would normally select a relation (≤, ≥, =), (3) The word integer should appear on the righthand side. If nothing appears, then you

should type =integer on the righthand side. Step 2: Make appropriate selections in the options window : (1) Assume Linear Model (2) Assume Non-negative (3) 0% Tolerance (4) 1000 Iterations (or more, if needed). Comments: • If one or more variables are integer, then Solver switches from the usual linear

programming algorithm to one that searches the integer points. It uses a technique called “branch-and-bound” so that it doesn’t have to look at every single integer point before finding the optimal solution. This algorithm does not produce sensitivity reports.

• The tolerance default value is 5%. If the 5% value stays in effect, then Solver will return a solution whose objective function value is within 5% of the best possible. For maximization problems, the stopping criterion is

0.95 * Maximum for LP relaxation ≤ Current objective function value.

For minimization problems, the stopping criterion is

Current objective function value ≤ 1.05 * Minimum for LP relaxation.

Page 4: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 4 of 25

Simple example solution sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

A B C D E

Simple Example

Variable 1 Variable 2 Bound

Constraint 1 1 3 8.25

Constraint 2 2.5 1 8.75

Objective 2 3

MODEL

Variable 1 Variable 2

#Units: 2 2

Max im i z e

Object ive: 10

Constra ints LHS R H S

Constraint 1 8 <= 8.25

Constraint 2 7 <= 8.75

Decision Variables

Maximize: B14

By Changing: B11:C11

Subject to:

B17:B18 <= C17:D18

B11:C11 = integer

Options:

Assume Linear Model

Assume Non-negative

0% Tolerance

1000 Iterations

Page 5: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 5 of 25

Exercise 1: Air-Express is an express shipping service that guarantees overnight delivery of packages anywhere in the continental United States. The company has various operations centers, called hubs, at airports in major cities across the country. Packages are received at hubs from other locations and then shipped to intermediate hubs or to their final destinations. The manager of the Air-Express hub in Baltimore, Maryland, is concerned about labor costs at the hub and is interested in determining the most effective way to schedule workers. The hub operates seven days a week, and the number of packages it handles each day varies. Using historical data on the average number of packages received each day, the manager estimates the number of workers needed to handle the packages as:

Day Sun Mon Tue Wed Thu Fri Sat # Required 18 27 22 26 25 21 19

The package handlers working for Air-Express are unionized and are guaranteed a five-day work week with two consecutive days off. The base wage for the handlers is $655 per week. Because most workers prefer to have Saturday or Sunday off, the union has negotiated bonuses of $25 per day for its members who work on these days. The possible shifts and salaries for package handlers are:

Shift Number Days Off Wages 1 Sun and Mon 2 Mon and Tue 3 Tue and Wed 4 Wed and Thu 5 Thu and Fri 6 Fri and Sat 7 Sat and Sun

The manager wants to keep the total wage expense for the hub as low as possible. With this in mind, how many package handlers should be assigned to each shift if the manager wants to have a sufficient number of workers available each day? • Summarize the problem

Page 6: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 6 of 25

• Define the decision variables precisely • Completely specify the ILP model

Page 7: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 7 of 25

• Clearly state the optimal solution Exercise 1 solution sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

A B C D E F G H I J

Air Express

Min

Shift 1 Shift 2 Shift 3 Shift 4 Shift 5 Shift 6 Shift 7 Req:

Sunday 0 1 1 1 1 1 0 18

Monday 0 0 1 1 1 1 1 27

Tuesday 1 0 0 1 1 1 1 22

Wednesday 1 1 0 0 1 1 1 26

Thursday 1 1 1 0 0 1 1 25

Friday 1 1 1 1 0 0 1 21

Saturday 1 1 1 1 1 0 0 19

Wages/wk: 680 705 705 705 705 680 655

MODEL

Shift 1 Shift 2 Shift 3 Shift 4 Shift 5 Shift 6 Shift 7

#Workers: 6 8.8818E-16 6 0 7 5 9

M i n i m i z e

Total Wages: 22540

Subject to

L H S R H S

Sunday 18 >= 18

Monday 27 >= 27

Tuesday 27 >= 22

Wednesday 27 >= 26

Thursday 26 >= 25

Friday 21 >= 21

Saturday 19 >= 19

Days On = 1, Days Off = 0

Decision Variables:

Solver:

Minimize B22

By Changing B19:H19

Subject to

B26:B32 >= D26:D32

B19:H19 = integer

Options:

Assume Linear Model

Assume Non-negative

0% Tolerance

1000 Iterations

Page 8: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 8 of 25

Formulas sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

A B C D

Air Express

Days On = 1, Days Off = 0

Shift 1 Shift 2 Shift 3

Sunday 0 1 1

Monday 0 0 1

Tuesday 1 0 0

Wednesday 1 1 0

Thursday 1 1 1

Friday 1 1 1

Saturday 1 1 1

Wages/wk: =655+25*(B5+B11) =655+25*(C5+C11) =655+25*(D5+D11)

MODEL

Decision Variables:

Shift 1 Shift 2 Shift 3

#Workers: 0 0 0

M i n i m i z e

Total Wages: =SUMPRODUCT(B13:H13,B19:H19)

Subject to

L H S R H S

Sunday =SUMPRODUCT(B5:H5,$B$19:$H$19) >= =J5

Monday =SUMPRODUCT(B6:H6,$B$19:$H$19) >= =J6

Tuesday =SUMPRODUCT(B7:H7,$B$19:$H$19) >= =J7

Wednesday =SUMPRODUCT(B8:H8,$B$19:$H$19) >= =J8

Thursday =SUMPRODUCT(B9:H9,$B$19:$H$19) >= =J9

Friday =SUMPRODUCT(B10:H10,$B$19:$H$19) >= =J10

Saturday =SUMPRODUCT(B11:H11,$B$19:$H$19) >= =J11

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

E F G H I J

Min

Shift 4 Shift 5 Shift 6 Shift 7 Req:

1 1 1 0 18

1 1 1 1 27

1 1 1 1 22

0 1 1 1 26

0 0 1 1 25

1 0 0 1 21

1 1 0 0 19

=655+25*(E5+E11) =655+25*(F5+F11) =655+25*(G5+G11) =655+25*(H5+H11)

Shift 4 Shift 5 Shift 6 Shift 7

0 0 0 0

Page 9: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 9 of 25

Programming with binary (0–1) variables To restrict an integer variable to the values 0 and 1 only, add a constraint as follows: 1. Put the address of the decision variable in the lefthand side, 2. Select “bin” where you would normally select a relation ( ≤ , ≥ , = ), 3. The word binary should appear on the righthand side. If nothing appears, then you should

type =binary on the righthand side. The next exercise is an example of a capital budgeting problem, where the decision variable equals 1 when a project is selected and equals 0 otherwise. Exercise 2: In his position as vice president of research and development (R&D) for CRT Technologies, Mark Schwartz is responsible for evaluating and choosing which R&D projects to support. The company received 18 R&D proposals from its scientists and engineers and identified six projects as being consistent with the company’s mission. However, the company does not have the funds available to undertake all six projects. Mark must determine which of the projects to select. The funding requirements for each project are summarized below, along with the expected net present value (NPV) the company expects each project to generate. Expected Capital (Thous $$) Required in: NPV Project (Thous $$) Year 1 Year 2 Year 3 Year 4 Year 5 1 141 75 25 20 15 10 2 187 90 35 0 0 30 3 121 60 15 15 15 15 4 83 30 20 10 5 5 5 265 100 25 20 20 20 6 127 50 20 10 30 40 The company currently has $250,000 available to invest in new projects. It has budgeted $75,000 for continued support for these projects in year 2 and $50,000 per year in years 3, 4, and 5. Which projects should CRT support in order to maximize total expected NPV? • Summarize the problem

Page 10: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 10 of 25

• Define the decision variables precisely • Completely specify the ILP model • Clearly state the optimal solution

Page 11: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 11 of 25

Exercise 2 solutions and formulas sheets:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

A B C D E F G H

CRT Tech.

Thousands of Dollars:

Max

Project 1 Project 2 Project 3 Project 4 Project 5 Project 6 Avlbl:

Year 1 75 90 60 30 100 50 250

Year 2 25 35 15 20 25 20 75

Year 3 20 0 15 10 20 10 50

Year 4 15 0 15 5 20 30 50

Year 5 10 30 15 5 20 40 50

NPV: 141 187 121 83 265 127

MODEL

Project 1 Project 2 Project 3 Project 4 Project 5 Project 6

Select? 1 0 0 1 1 0

(1=Yes,0=No)

Max im i z e

NPV : 489

Subject to: LHS R H S

Year 1 205 <= 250

Year 2 70 <= 75

Year 3 50 <= 50

Year 4 40 <= 50

Year 5 35 <= 50

Decision Variables:

Maximize B21

By Changing B17:G17

Subject to:

B25:B29 <= D25:D29

B17:G17 = binary

Assume Linear Model

Assume Non-negative

0% Tolerance

1000 Iterations

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

A B C D E F G H

CRT Tech.

Thousands of Dollars:Max

Project 1 Project 2 Project 3 Project 4 Project 5 Project 6 Avlbl:Year 1 75 90 60 30 100 50 250

Year 2 25 35 15 20 25 20 75

Year 3 20 0 15 10 20 10 50

Year 4 15 0 15 5 20 30 50

Year 5 10 30 15 5 20 40 50

NPV: 141 187 121 83 265 127

MODELDecision Variables:

Project 1 Project 2 Project 3 Project 4 Project 5 Project 6Select? 0 0 0 0 0 0

(1=Yes,0=No)

Max im i z eNPV : =SUMPRODUCT(B12:G12,B17:G17)

Subject to: LHS R H SYear 1 =SUMPRODUCT(B6:G6,$B$17:$G$17) <= =H6

Year 2 =SUMPRODUCT(B7:G7,$B$17:$G$17) <= =H7

Year 3 =SUMPRODUCT(B8:G8,$B$17:$G$17) <= =H8

Year 4 =SUMPRODUCT(B9:G9,$B$17:$G$17) <= =H9

Year 5 =SUMPRODUCT(B10:G10,$B$17:$G$17) <= =H10

Page 12: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 12 of 25

The next exercise is an example of a fixed cost problem. It is assumed that the cost of production includes a setup cost (which is a fixed cost) and a variable cost (which is directly related to the quantity produced). The setup cost is only incurred if you choose to produce the product. Products are indexed using i=1, 2, etc. For product i, let 1. Xi equal the number of items produced, 2. Yi equal 1 when the fixed cost is incurred and 0 otherwise, and 3. Mi equal the maximum number that could be produced under given constraints. A constraint of the form Xi ≤ Mi * Yi assures that Yi = 1 when and only when Xi is positive. Exercise 3: Remington Manufacturing is planning its next production cycle. The company can produce three products, each of which must undergo machining, grinding, and assembly operations. The table below summarizes the hours of machining, grinding and assembling required for each unit, and the total hours of capacity available in the next production cycle. Hours Required by: Operation Product 1 Product 2 Product 3 Hours Available Machining 2 3 6 1200 Grinding 6 3 4 600 Assembly 5 6 2 800 Products 1, 2, and 3 have unit profits of $48, $55, and $50, respectively. There are also production line setup costs associated with producing each product. These costs are $1,000 for Product 1, $800 for Product 2, and $900 for Product 3. The marketing department believes it can sell all the products produced. Therefore, the management of Remington wants to determine the most profitable mix of products to produce. • What are the values of M1, M2, and M3?

Page 13: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 13 of 25

• Define the decision variables precisely • Completely specify the ILP model

Page 14: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 14 of 25

• Clearly state the optimal solution Exercise 3 solution sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

A B C D E F G

Remington Mfg

Hours:

Max

Product 1 Product 2 Product 3 Avlbl:Machining 2 3 6 1200

Grinding 6 3 4 600

Assembly 5 6 2 800

Unit Profit ($): 48 55 50

Setup charge ($): 1000 800 900

Max #Units: 100 133.333333 150

MODEL

Product 1 Product 2 Product 3#Units: 0 111 66

Setup? 0 1 1

(1=Yes,0=No)

Product Profits: 9405

Fixed Charges: 1700

Max Profit: 7705

Subject to: LHS R H SMachining 729 <= 1200

Grinding 597 <= 600

Assembly 798 <= 800

Product 1 Max 0 <= 0

Product 2 Max 111 <= 133.333333

Product 3 Max 66 <= 150

Decision Variables:

Maximize B24

By Changing B18:D19

Subject to:

B27:B32 <= D27:D32

B18:D18 = integer

B19:D19 = binary

Assume Linear Model

Assume Non-negative

0% Tolerance

1000 Iterations

Page 15: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 15 of 25

Formulas sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

A B C D E

Remington Mfg

Hours:

Max

Product 1 Product 2 Product 3 Avlbl:Machining 2 3 6 1200

Grinding 6 3 4 600

Assembly 5 6 2 800

Unit Profit ($): 48 55 50

Setup charge ($): 1000 800 900

Max #Units: =MIN(E5/B5,E6/B6,E7/B7) =MIN(E5/C5,E6/C6,E7/C7) =MIN(E5/D5,E6/D6,E7/D7)

MODEL

Product 1 Product 2 Product 3#Units: 0 0 0

Setup? 0 0 0

(1=Yes,0=No)

Product Profits: =SUMPRODUCT(B9:D9,B18:D18)

Fixed Charges: =SUMPRODUCT(B10:D10,B19:D19)

Max Profit: =B22-B23

Subject to: LHS R H SMachining =SUMPRODUCT(B5:D5,$B$18:$D$18) <= =E5

Grinding =SUMPRODUCT(B6:D6,$B$18:$D$18) <= =E6

Assembly =SUMPRODUCT(B7:D7,$B$18:$D$18) <= =E7

Product 1 Max =B18 <= =B12*B19

Product 2 Max =C18 <= =C12*C19

Product 3 Max =D18 <= =D12*D19

Decision Variables:

Page 16: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 16 of 25

Exercise 4: In the Remington Manufacturing problem, suppose that management does not want to produce a product unless it produces at least 70 units of that product. The sheet below gives the new optimal solution.

• How does the original model change?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

A B C D E

Remington II

Hours:

Max

Product 1 Product 2 Product 3 Avlbl:Machining 2 3 6 1200

Grinding 6 3 4 600

Assembly 5 6 2 800

Unit Profit ($): 48 55 50

Setup charge ($): 1000 800 900

Max #Units: 100 133.333333 150

MODEL

Product 1 Product 2 Product 3#Units: 0 106 70

Setup? 0 1 1

(1=Yes,0=No)

Product Profits: 9330

Fixed Charges: 1700

Max Profit: 7630

Subject to: LHS R H SMachining 738 <= 1200

Grinding 598 <= 600

Assembly 776 <= 800

Product 1 Max 0 <= 0

Product 2 Max 106 <= 133.333333

Product 3 Max 70 <= 150

Product 1 Min 0 >= 0

Product 2 Min 106 >= 70

Product 3 Min 70 >= 70

Decision Variables:

Page 17: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 17 of 25

Exercise 5: The Martin-Beck Company operates a plant in St. Louis which has an annual production capacity of 30,000 units. The final product is shipped to regional distribution centers located in Boston, Atlanta, and Houston. Because of an anticipated increase in demand, Martin-Beck plans to increase capacity by constructing a new plant in one or more of the following cities: Detroit, Toledo, Denver, Kansas City. The estimated annual fixed cost and the annual capacity for the four proposed plants are as follows:

Proposed Plant Annual Fixed Cost ($) Annual Capacity (units) Detroit 262,500 15,000 Toledo 450,000 30,000 Denver 375,000 30,000 Kansas City 400,000 32,000

The company's long-range planning group has developed the following forecasts of the anticipated annual demand at the distribution centers:

Distribution Center Annual Demand (units) Boston 30,000 Atlanta 20,000 Houston 20,000

The shipping cost ($) per unit from each (proposed) plant to each distribution center is shown in the following table:

to Boston to Atlanta to Houston From Detroit 5 2 3 From Toledo 4 3 4 From Denver 9 7 5 From Kansas City 10 5 2 From St. Louis 8 4 3

Finally, Martin-Beck would like to locate a plant in either Detroit or Toledo, but not both. Martin-Beck would like to determine where to locate the new plant(s) and how much should be shipped from each plant to each distribution center in order to minimize the total annual fixed costs and transportation costs. Notation: Source nodes: 1 Detroit, 2 Toledo, 3 Denver, 4 Kansas City, 5 St Louis Destination nodes: 1 Boston, 2 Atlanta, 3 Houston

Page 18: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 18 of 25

• Define the decision variables precisely • Completely specify the ILP model

Page 19: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 19 of 25

• Clearly state the optimal solution Exercise 5 solution sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

A B C D E F G H I J

M a r t i n - B e c k

Annual

Production Fixed

to Boston to Atlanta to Houston Capacity: Cost:

from Detroit 5 2 3 15000 262500

from Toledo 4 3 4 30000 450000

from Denver 9 7 5 30000 375000

from Kansas City 10 5 2 32000 400000

from St. Louis 8 4 3 30000

Demand: 30000 20000 20000

MODEL

Transp. Costs: 320000

Fixed Costs: 662500

Minimize Cost 982500

Setup?

to Boston to Atlanta to Houston (1=Yes,0=No) L H S R H S

from Detroit 15000 0 0 1 15000 <= 15000

from Toledo 0 0 0 6.4835E-17 0 <= 1.9451E-12

from Denver 9.0949E-13 0 0 0 9.0949E-13 <= 0

from Kansas City 0 5000 20000 1 25000 <= 32000

from St. Louis 15000 15000 0 30000 <= 30000

L H S 30000 20000 20000

= = =

R H S 30000 20000 20000

L H S R H S

Detroit/Toledo 1 = 1

Unit Shipping Costs:

Decision Variables:

Minimize B17

By Changing B21:D25, F21:F24

Subject to:

H21:H25 <= J21:J25

B27:D27 = B29:D29

B32 = D32

B21:D25 = integer

F21:F24 = binary

Assume: linear model, non-negative

0% Tolerance

1000 Iterations

Page 20: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 20 of 25

Formula sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

A B C D E

M a r t i n - B e c k

to Boston to Atlanta to Houston

from Detroit 5 2 3

from Toledo 4 3 4

from Denver 9 7 5

from Kansas City 10 5 2

from St. Louis 8 4 3

Demand: 30000 20000 20000

MODEL

Transp. Costs: =SUMPRODUCT(B5:D9,B21:D25)

Fixed Costs: =SUMPRODUCT(G5:G8,F21:F24)

Minimize Cost =B15+B16

to Boston to Atlanta to Houston

from Detroit 0 0 0

from Toledo 0 0 0

from Denver 0 0 0

from Kansas City 0 0 0

from St. Louis 0 0 0

L H S =SUM(B21:B25) =SUM(C21:C25) =SUM(D21:D25)

= = =

R H S =B11 =C11 =D11

L H S R H S

Detroit/Toledo =F21+F22 = 1

Unit Shipping Costs:

Decision Variables:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

F G H I J

Annual

Production Fixed

Capacity: Cost:

=1.5*10000 =1.5*175000

=1.5*20000 =1.5*300000

=30000 =375000

=0.8*40000 =0.8*500000

30000

Setup?

(1=Yes,0=No) L H S R H S

0 =SUM(B21:D21) <= =F21*F5

0 =SUM(B22:D22) <= =F22*F6

0 =SUM(B23:D23) <= =F23*F7

0 =SUM(B24:D24) <= =F24*F8

=SUM(B25:D25) <= =F9

Page 21: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 21 of 25

Some modelling tips for binary variables: Suppose that Xi = 1 when a project is chosen and 0 otherwise, for i=1, 2, . . . , n. (1) To choose exactly k of the projects, add the constraint

X1 + X2 + . . . Xn = k . Replace with ≥ when you want k or more projects chosen. Replace with ≤ when you want k or fewer projects chosen. (2) To choose project i only when project j is chosen, add the constraint

Xi = Xj. (3) The conditional constraint

Xi ≤ Xj has the following effect: • If Xi equals 1, then it forces Xj to equal 1. • If Xj equals 0, then it forces Xi to equal 0.

Page 22: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 22 of 25

Exercise 6: Office Warehouse (OW) has been downsizing its operations. It is in the process of moving to a much smaller location and reducing the number of different computer products it carries. Coming under scrutiny are ten products OW has carried for the past year. For each of these products, OW has estimated the floor space required for effective display, the capital required to restock if the product line is retained, and the short-term loss that OW will incur if the corresponding product is eliminated (through liquidation sales, etc.) Cost to Cost to Floor Product Product Manufactured Liquidate Restock Space Number Line by (thous $) (thous $) (sqr.ft.) 1 Notebook Toshiba 10 15 50 2 Notebook Compaq 8 12 60 3 PC Compaq 20 25 200 4 PC Packard Bell 12 22 200 5 Macintosh Apple 25 20 145 6 Monitor Packard Bell 4 12 85 7 Monitor Sony 15 13 50 8 Printer Apple 5 14 100 9 Printer HP 18 25 150 10 Printer Epson 6 10 125 ("Notebook" refers to a notebook computer.) Office Warehouse wishes to minimize the loss due to the liquidation of product lines subject to the following conditions: (1) At least four product lines will be eliminated. (2) The remaining products will occupy no more than 600 sqr. ft. of floor space. (3) At most $75,000 is to be spent on restocking the product lines. (4) If one product from a particular manufacturer is eliminated, then all products from that manufacturer will be eliminated. (5) At least two of the five computer models (Toshiba NB, Compaq NB, Compaq PC, Packard Bell PC, Apple Macintosh) will continue to be carried by Office Warehouse. (6) If the Toshiba notebook computer is to be retained, then the Epson line of printers will also be retained.

Page 23: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 23 of 25

• Define the decision variables precisely • Completely specify the ILP model

Page 24: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 24 of 25

• Clearly state the optimal solution Exercise 6 solution sheet:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

A B C D E F G H I J K

Office Whse

Product Numbers:

1 2 3 4 5 6 7 8 9 10

Line: NB NB PC PC Mac Monitor Monitor Printer Printer Printer

Mfg: Toshiba Compaq Compaq PB Apple PB Sony Apple HP Epson

Liquidation

Cost (thous $): 10 8 20 12 25 4 15 5 18 6

Restock

Cost (thous $): 15 12 25 22 20 12 13 14 25 10

Floor space

(sqr feet): 50 60 200 200 145 85 50 100 150 125

Max Space Min # Max Cost

Used by Computer for

Max # Remaining Models Restocking

Remaining: (sqr ft): Remaining: (thous $):

6 600 2 75

MODEL

1 2 3 4 5 6 7 8 9 10

Keep? 1 0 0 0 1 0 1 1 0 1

(1=Yes,0=No)

M i n i m i z e

L iqu idat ion : 62

Subject to: L H S R H S

#Remaining: 5 <= 6

Space: 470 <= 600

Restocking 72 <= 75

Compaq 0 = 0

PB 0 = 0

Apple 1 = 1

Computers 2 >= 2

If #1, then #10 1 <= 1

Decision Variables:

Minimize B29

By Changing B25:K25

Subject to:

B32:B34 <= D32:D34

B35:B37 = D35:D37

B38 >= D38

B39 <= D39

B25:K25 = binary

Assume: linear model, non-negative

0% Tolerance

1000 Iterations

Page 25: Mathematics for Management Science Notes 06 · PDF fileMathematics for Management Science Notes 06 ... MODEL Decision Variables: Shift 1 Shift 2 Shift 3 ... To restrict an integer

page 25 of 25

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

A B C D

Office Whse

Product Numbers:

1 2 3

Line: NB NB PC

Mfg: Toshiba Compaq Compaq

Liquidation

Cost (thous $): 10 8 20

Restock

Cost (thous $): 15 12 25

Floor space

(sqr feet): 50 60 200

Max Space

Used by

Max # Remaining

Remaining: (sqr ft):

6 600

MODEL

Decision Variables:

1 2 3

Keep? 1 0 0

(1=Yes,0=No)

M i n i m i z e

L iqu idat ion : =SUM(B9:K9)-SUMPRODUCT(B9:K9,B25:K25)

Subject to: L H S R H S

#Remaining: =SUM(B25:K25) <= =B20

Space: =SUMPRODUCT(B14:K14,B25:K25) <= =D20

Restocking =SUMPRODUCT(B12:K12,B25:K25) <= =H20

Compaq =C25 = =D25

PB =E25 = =G25

Apple =F25 = =I25

Computers =SUM(B25:F25) >= =F20

If #1, then #10 =B25 <= =K25

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

E F G H I J K

4 5 6 7 8 9 10

PC Mac Monitor Monitor Printer Printer Printer

PB Apple PB Sony Apple HP Epson

12 25 4 15 5 18 6

22 20 12 13 14 25 10

200 145 85 50 100 150 125

Min # Max Cost

Computer for

Models Restocking

Remaining: (thous $):

2 75

4 5 6 7 8 9 10

0 1 0 1 1 0 1