Sie sind auf Seite 1von 14

# Integer programming

Integer Programming
Many real-life situations must be formulated as an integer programming problem (IP) in which some or all of the variables are required to be non-negative integers, such as the number of shirts or pants to be produced or the number of cars to be purchased or the number of workers to be hired etc. There are three types of integer programming problems; 1. An IP in which all variables are required to be integers is called a pure integer programming problem.
2.

An IP in which only some of the variables are required to be integers is called a mixed integer programming problem. An integer programming problem in which all the variables must equal 0 or 1 is called a 01 IP.

3.

Integer programming is a Linear programming problem with some additional constraints which states that some variables are integer or binomial (0 or 1), so the feasible region of IP is in feasible region of LP and objective function of LP is generally greater than objective function of IP.

## Z linear programming Z integer programming

Rounding the solution set of an LP problem to make the variables integer will lead to answers which may not be in the feasible region. Such as; Max Z= 4X1+X2 s.t. 2X1+X2 5 2X1+3X2 = 5 X1,X2 0; X1, X2 integer The optimal solution to the LP for this IP is Z = 10, X1= , X2=0. Rounding off this solution, we obtain either the 2 candidate X1=2, X2=0 or the candidate X1=3, X2=0. Neither candidate is a feasible solution to the IP, therefore to obtain the feasible solution, other methods (enumeration method or cutting plane algorithm or branch and bound algorithm) will be used.
5

## 1. Pure integer programming

All variables have integer values.

Enumeration method
Listing all feasible solutions and selecting the one with the best objective function is called enumeration method. This method is suitable only for small problems. WORKED-OUT PROBLEM 1 (Harrison Electric Company) The Company produces two products popular with home renovators, old- fashioned chandeliers and ceiling fans. Both the chandeliers and fans require a two-step production process involving wiring and assembly. It takes about 2 hours to wire each chandelier and 3 hours to wire a ceiling fan. Final assembly of the chandeliers and fans requires 6 and 5 hours respectively. The production capability is such that only 12 hours of wiring time and 30 hours of assembly time are available. Each chandelier produced nets the firm \$7 and each fan \$6. Harrisons production mix decision can be formulated using LP as follows. Maximize profit = \$7X1 + \$6X2 subject to 2X1 + 3X2 12 6X1 + 5X2 30 X1 , X2 0 X1 = number of chandeliers produced ,

where

## (wiring hours) (assembly hours) (nonnegative) X2 = number of ceiling fans produced

Integer programming

CHANDELIERS (X )
1

CEILING FANS (X )
2

1 2

0 0 0 0 0

\$0 7 14 21 28

5
0 1 2 3

0
1 1 1 1

35
6 13 20 27

## Solution if rounding is used

4
0 1 2 3 0 1 0

1
2 2 2 2 3 3 4

34
12 19 26 33 18 25 24

The rounding solution of X1 = 4, X2 = 1 gives a profit of \$34 but the optimal solution is X1 = 5, X2 = 0 which gives a profit of \$35.

Branch-and-Bound Method
The basic concept underlying the branch-and-bound technique is to divide and conquer.Theprocess contains dividing (branching) original large problem into smaller subproblems and bounding the best solution in the subsets. The steps are; Solve the problem without integer restrictions, If the solution is integer , then this must be the solution to integer problem, If these variables are not integer valued, the feasible region is divided by adding constraints restricting the value of one of the variables that was not integer valued, Bounds on the value of the objective function are found and used to help determine which sub-problems can be eliminated and when the optimal solution has been found, If a solution is not optimal, a new sub-problem is selected and branching continues.

Integer programming

Recall that the Harrison Electric Companys integer programming formulation is Maximize profit = subject to where X1 = number of chandeliers produced X2 = number of ceiling fans produced and the optimal non-integer solution is X1 = 3.75 chandeliers, X2 = 1.5 ceiling fans, profit = \$35.25 \$7X1 + \$6X2 2X1 + 3X2 12 6X1 + 5X2 30

Since X1 and X2 are not integers, this solution is not valid. The profit value of \$35.25 will provide the initial upper bound. We can round down to X1 = 3, X2 = 1, profit = \$27, which provides a feasible lower bound. The problem is now divided into two sub-problems A and B. Sub-problem A Maximize profit = subject to \$7X1 + \$6X2 2X1 + 3X2 12 6X1 + 5X2 30 X1 4 Sub-problem B Maximize profit = subject to \$7X1 + \$6X2 2X1 + 3X2 12 6X1 + 5X2 30 X1 3

## Sub-problem Bs optimal solution: X1 = 3, X2 = 2, profit = \$33.00

Sub-problem A has branched into two new sub-problems, C and D. Sub-problem C Maximize profit = subject to \$7X1+\$6X2 2X1 + 3X2 12 6X1 + 5X2 30 X1 4 X2 2 Sub-problem D Maximize profit = subject to \$7X1+ \$6X2 2X1 + 3X2 12 6X1 + 5X2 30 X1 4 X2 1

Sub-problem C has no feasible solution because the all the constraints cannot be satisfied. We terminate this branch and do not consider this solution. Sub-problem Ds optimal solution is X1 = 4.17, X2 = 1, profit = \$35.16 . This non-integer solution yields a new upper bound of \$35.16 .

Integer programming

Finally we derive sub-problems E and F. Sub-problem E Maximize profit = subject to \$7X1+\$6X2 2X1 + 3X2 12 6X1 + 5X2 30 X1 4 X1 4 X2 1 Sub-problem F Maximize profit = subject to \$7X1+\$6X2 2X1 + 3X2 12 6X1 + 5X2 30 X1 4 X1 5 X2 1

## Using Excels Solver to formulate Harrisons integer programming model

Integer programming

## Integer variables are specified with a drop-down menu in Solver.

WORKED-OUT PROBLEM 2 The Telfa Corporation manufactures tables and chairs. A table requires 1 hour of labor and 9 square board feet of wood, and a chair requires 1 hour of labor and 5 square board feet of wood. Currently, 6 hours of labor and 45 square board feet of wood are available. Each table contributes \$8 to profit, and each chair contributes \$5 to profit. Formulate and solve an IP to maximize Telfas profit. Solution: Let X1= number of tables manufactured X2 = number of chairs manufactured

Because X1 and X2 must be integers, Telfa wants to solve the following IP: max Z = 8X1 + 5X2 s.t. X1 + X2 6 (Labor constraint) s.t. 9X1 + 5X2 45 (Wood constraint) X1, X2 0; X1, X2 integer The branch-and-bound method begins by solving the LP.Unfortunately, the optimal solution to the LP is Z=

X1= , X2 = . we know that (optimal Z-value for IP) (optimal Z-value for LP). This implies that the optimal Z-value for the IP cannot exceed (upper bound). X1 and X2 are rounded down and found as X1=3 and X2=2 and Z= 34 is lower bound, so optimal Z-value for the IP cannot be less than 34.

X13
X1=3.75 X2 =2.25 Z=41.25

X1=3 X2 =3 Z=39

Candidate solution

X14 X21
X1=4.44 X2 =1 Z=40.5

## X1=4 X2 =1 Z=37 Candidate solution

X14

X1=4 X2 =1.8 Z= 41

X15 X

X22

X1=3.88 X2 =2 Z=41,1

## X14 and it is found as X1=3.88 , so this set of solution is unfeasible.

Among the candidate solutions, Z=40 is maximum value among them. So 5 tables (X1=5), and no chairs (X2 =0) will yield a profit of \$40.

Integer programming

## PROBLEMS (Pure integer programming)

Use branch-and-bound to solve the following IPs. 1. max Z = 5x1 + 2x2 s.t. 3x1 + x2 12 s.t . x1 + x2 5 s.t. 3x1 x1, x2 0; x1, x2 integer 2. max Z = 4x1 + 3x2 s.t. 4x1 + 9x2 26 8x1 + 5x2 17 s.t. 3x1 x1, x2 0; x1, x2 integer 3. max Z = 4x1 + 5x2 s.t. 3x1 + 2x2 10 x1 + 4x2 11 3x1 + 3x2 13 s.t. 3x1 x1, x2 0; x1, x2 integer

4. max Z = 2x1 + 3x2 s.t. x1 + 2x2 10 s.t .x1 + 4x2 25 s.t. 3x1 x1, x2 0; x1, x2 integer 5. max Z = 4x1 + 5x2 s.t. x1 + 4x2 5 3x1 + 2x2 7 s.t. 3x1 x1, x2 0; x1, x2 integer 6. max Z = 7x1 + 3x2 s.t. 2x1 + x2 9 3x1 + 2x2 13 s.t. 3x1 x1, x2 0; x1, x2 integer

1. x1=4,x2=0, Z=20 2. x1=2,x2=0, Z=8 3. x1=2,x2=2, Z=18 4. x1=10, x2=0, Z=20 5. x1=1, x2=1, Z= 9 6. x1=4, x2=0, Z=28

2. Mixed-Integer Programming
There are many situations in which some of the variables are restricted to be integers and some are not. To solve a mixed IP by the branch-and-bound method, branching is applied only on variables that are required to be integers. Consider the following case; max Z = 2x1 + x2 s.t. 5x1+2x2 8 x1+x2 3 x1, x2 0; x1 integer As before, we begin by solving the LP. The optimal solution of the LP relaxation is Z= Because x2 is allowed to be fractional, we do not branch on x2.

, x1= , x2=

X10 Z=
11 3 2 3 7 3

Z= 3 x1= 0 x2= 3

Candidate solution

x1= x2=

X11

Z= 2 x1= 1 3 x2=
2

Candidate solution

Z= , x1= 1 , x2=

## is the optimum solution to the mixed IP.

Integer programming

WORKED-OUT PROBLEM 3

Maximize profit Z= \$85X + \$1.50Y subject to 30X + 0.5Y 2,000 18X + 0.4Y 800 2X + 0.1Y 200 X, Y 0 and X integer

## PROBLEMS (Mixed-Integer Programming)

Use Excel to find the solution of the given LPs and use branch andbound to find the solutions for IPs:

1. max Z = s.t.

## 3x1 + x2 5x1 + 2x2 10 4x1 + x2 7 x1, x2 0; x2 integer

2. min Z = 3x1 + x2 s.t. x1 + 5x2 8 x1 + 2x2 4 x1, x2 0; x2 integer 3. min Z = 4x1 +3x2 + x3 s.t. 3x1 + 2x2 + x3 7 2x1 + x2 + 2x3 11 x1, x2 ,x3 0; x2 ,x3 integer

4. (12.1-6./Hillier)Vincent Cardoza is the owner and manager of a machine shop that does custom order work. This Wednesday afternoon, he has received calls from two customers who would like to place rush orders. One is a trailer hitch company which would like some custom-made heavy-duty tow bars. The other is a mini-car-carrier company which needs some customized stabilizer bars. Both customers would like as many as possible by the end of the week (two working days). Since both products would require the use of the same two machines, Vincent needs to decide and inform the customers this afternoon about how many of each product he will agree to make over the next two days. Each tow bar requires 3.2 hours on machine 1 and 2 hours on machine 2. Each stabilizer bar requires 2.4 hours on machine 1 and 3 hours on machine 2. Machine 1 will be available for 16 hours

Integer programming

over the next two days and machine 2 will be available for 15 hours. The profit for each tow bar produced would be \$130 and the profit for each stabilizer bar produced would be \$150. Vincent now wants to determine the mix of these production quantities that will maximize the total profit. (a) Formulate an IP model for this problem. (b) Use a graphical approach to solve this model. (c) Use the computer to solve the model. 5. (12.1-7. /Hillier) Pawtucket University is planning to buy new copier machines for its library. Three members of its Operations Research Department are analyzing what to buy. They are considering two different models: Model A, a high-speed copier, and Model B, a lower-speed but less expensive copier. Model A can handle 20,000 copies a day, and costs \$6,000. Model B can handle 10,000 copies a day, but costs only \$4,000. They would like to have at least six copiers so that they can spread them throughout the library. They also would like to have at least one highspeed copier. Finally, the copiers need to be able to handle a capacity of at least 75,000 copies per day. The objective is to determine the mix of these two copiers which will handle all these requirements at minimum cost. (a) Formulate an IP model for this problem. (b) Use a graphical approach to solve this model. (c) Use the computer to solve the model.

1. x1=1.2, x2=2, Z=5.6 2. x1=0, x2=2, C=2 3. x1=0.3, x2=3, x3=0, C=10.33 4. x1=0, x2=5, P=750 5. x1=2, x2=4, C=28,000

Integer programming

## 3. Modeling With 0-1 (Binary) Variables

A 0-1 variable is assigned a value of 0 if a certain condition is not met and a 1 if the condition is met. This is also called a binary variable. WORKED-OUT PROBLEM 4 A common capital budgeting problem is selecting from a set of possible projects when budget limitations make it impossible to select them all.A 0-1 variable is defined for each project. Quemo Chemical Company is considering three possible improvement projects for its plant. A new catalytic converter. A new software program for controlling operations. Expanding the storage warehouse.

It cannot do them all.They want to maximize net present value of projects undertaken.

## The basic model is

Maximize net present value of projects undertaken subject to Total funds used in year 1 \$20,000 Total funds used in year 2 \$16,000

The mathematical statement of the integer programming problem becomes Maximize NPV = 25,000X1 + 18,000X2 + 32,000X3 subject to 8,000X1 + 6,000X2 + 12,000X3 20,000 7,000X1 + 4,000X2 + 8,000X3 16,000 X1, X2, X3 = 0 or 1 Solution: Excel solution of problem is X1 = 1, X2 = 0, and X3 = 1 with an objective function value of 57,000. One common use of 0-1 variables involves limiting the number of projects or items that are selected from a group; Suppose Quemo Chemical is required to select no more than two of the three projects regardless of the funds available. This would require adding a constraint X1 + X2 + X3 2 (Limited selection) If they had to fund exactly two projects the constraint would be X1 + X2 + X3 = 2 (Limited selection)

Integer programming

10

At times the selection of one project depends on the selection of another project; Suppose Quemos catalytic converter could only be purchased if the software was purchased The following constraint would force this to occur X1 X2 or X1 X2 0 (Dependent Selections)
(X1 will be selected if X2 is selected. If X2 is zero than X1 is zero, if X2 is 1 than X1 can be zero or 1)

If we wished for the catalytic converter and software projects to either both be selected or both not be selected, the constraint would be X1 = X2 or X1 X2 = 0 (Dependent Selections)

WORKED-OUT PROBLEM 5 Sitka Manufacturing is planning to build at least one new plant and three cities are being considered in Baytown, Texas Lake Charles, Louisiana Mobile, Alabama

Once the plant or plants are built, the company wants to have capacity to produce at least 38,000 units each year.
ANNUAL FIXED COST VARIABLE COST PER UNIT

SITE

ANNUAL CAPACITY

## Solution: We can define the decision variables as

The integer programming formulation becomes Minimize cost = 340,000X1 + 270,000X2 + 290,000X3 + 32X4 + 33X5 + 30X6 subject to X4 + X5 + X6 38,000 X4 21,000X1 X5 20,000X2 X6 19,000X3 X1, X2, X3 = 0 or 1; X4, X5, X6 0 and integer

## The optimal solution is X1 = 0, X2 = 1, X3 = 1, X4 = 0, X5 = 19,000, X6 = 19,000, Objective function value = \$1,757,000

Integer programming

11

WORKED-OUT PROBLEM 6 One client has the following specifications At least two Texas firms must be in the portfolio, No more than one investment can be made in a foreign oil company, One of the two California oil stocks must be purchased.

The client has \$3 million to invest and wants to buy large blocks of shares COMPANY NAME
Trans-Texas Oil British Petroleum Dutch Shell Houston Drilling Texas Petroleum San Diego Oil California Petro

STOCK
1 2 3 4 5 6 7

## EXPECTED ANNUAL RETURN (\$1,000s)

50 80 90 120 110 40 75

## COST FOR BLOCK OF SHARES (\$1,000s)

480 540 680 1,000 700 510 900

Solution: Maximize return = 50X1 + 80X2 + 90X3 + 120X4 + 110X5 + 40X6 + 75X7 subject to X1 + X4 + X5 2 (Texas constraint) X2+ X3 1 (Foreign oil constraint) X6 + X7 =1 (California constraint) 480X1 + 540X2 + 680X3 + 1,000X4 + 700X5 + 510X6 + 900X7 3,000 (\$3 million limit) All variables must be 0 or 1

Integer programming

12

## PROBLEMS (Binary Integer Programming)

1. (12.1-3./Hillier) A real estate development firm, Peterson and Johnson, is considering five possible development projects. The following table shows the estimated long-run profit (net present value) that each project would generate, as well as the amount of investment required to undertake the project, in units of millions of dollars. Development Project 1 solution Estimated profit 1 Capital required 6 2 1.8 12 3 1.6 10 4 0.8 4 5 1.4 8
Decision Number

3. (12.1-1./Hillier) The CALIFORNIA MANUFACTURING COMPANY is considering expansion by building a new factory in either Los Angeles or San Francisco, or perhaps even in both cities. It also is considering building at most one new warehouse, but the choice of location is restricted to a city where a new factory is being built. The net present value (total profitability considering the time value of money) of each of these alternatives is shown in the fourth column of the table. The rightmost column gives the capital required (already included in the net present value) for the respective investments, where the total capital available is \$10 million.
Data for the California Manufacturing Co. example Yes-or-No Question Build factory in Los Angeles? Decision Variable Net Present Value Capital Required

The owners of the firm, Dave Peterson and Ron Johnson, have raised \$20 million of investment capital for these projects. Dave and Ron now want to select the combination of projects that will maximize their total estimated long-run profit (net present value) without investing more than \$20 million. (a) Formulate a BIP model for this problem. (b) Display this model on an Excel spreadsheet. (c) Use the computer to solve this model. 2. (12.1-4./Hillier) The board of directors of General Wheels Co. is considering seven large capital investments. Each investment can be made only once. These investments differ in the estimated long-run profit (net present value) that they will generate as well as in the amount of capital required, as shown by the following table (in units of millions of dollars): Investment Opportunity 1
Estimated profit Capital required

x1

x2

## Build warehouse in Los Angeles? Build warehouse in San Francisco?

x3

x4

\$4 million

\$2 million

2 10 28

3 15 34

4 19 48

5 7 17

6 13 32

7 9 23

Capital available: \$10 million (a) Formulate a BIP model for this problem. (b) Display this model on an Excel spreadsheet. (c) Use the computer to solve this model.

17 43

The total amount of capital available for these investments is \$100 million. Investment opportunities 1 and 2 are mutually exclusive, and so are 3 and 4. Furthermore, neither 3 nor 4 can be undertaken unless one of the first two opportunities is undertaken . There are no such restrictions on investment opportunities 5, 6, and 7. The objective is to select the combination of capital investments that will maximize the total estimated long-run profit (net present value). (a) Formulate a BIP model for this problem. (b) Use the computer to solve this model.

## 1. x1=x3=x4=1, x2=x5=0, Z=3.4 2. x1=x3=x7=1, x2=x4=x5=x6=0 , Z=41 3. x1=x3=0, x2=x4=1, NPV=9

Integer programming

13

ITEM WEIGHT UTILITY 1 8 80 2 1 20 3 7 50 4 6 55 5 3 50 6 12 75 7 5 30 8 14 70

6. (11-14 /Render) Roneo Enterprises sells two sizes of wall posters, a large 3- by 4- foot poster and a smaller 2- by 3- foot poster. The profit earned from the sale of each large poster is \$3; each smaller poster earns \$2. The firm, although profitable, is not large; it consists of one art student, Iumiya Ro, at the Pepperdine University. Because of her classroom schedule, Iumiya has the following weekly constraints: 1) up to three large posters can be sold; 2) up to five smaller posters can be sold; 3) up to 10 hours can be spent on posters during the week, with each large poster requiring 2 hours of work and each small one taking 1 hour. With the semester almost over, Iumiya plans on taking a three-month summer vacation to England and doesnt want to leave any unfinished posters behind. Find the integer solution that will maximize her profit. 7. (11-15/Render) An airline owns an aging fleet of Boeing 737 jet airplanes. It is considering a major purchase of up to 17 new Boeing model 757 and 767 jets. The decision must take into account numerous cost and capability factors, including the following: 1) the airline can finance up to \$1.6 billion in purchases; 2) each Boeing 757 will cost \$80 million, and each Boeing 767 will cost \$110 million; 3) at least one-third of the planes purchased should be the longer-range 757; 4) the annual maintenance budget is to be no more than \$8 million; 5) the annual maintenance cost per 757 is estimated to be \$800,000, and it is \$500,000 for each 767 purchased; and 6) each 757 can carry 125,000 passengers per year, whereas each 767 can fly 81,000 passenger annually. Formulate this as an integer programming problem to maximize the annual passenger-carrying capability. What category of integer programming problem is this? Solve this problem. 8. (11-16/Render) Diya Investments is a venture capital firm that is currently evaluating six different investment opportunities. There is not sufficient capital to invest in all of these, but more than one will be selected. A 0-1 integer programming model is planned to help determine which of the six opportunities to choose. Variables x1, x2, x3, x4, x5, and x6 represent the six choices. For each of the following situations write a constraint (or several constraints), that would be used. a) At least 3 of these choices are to be selected. b) Either investment 1 or investment 4 must be undertaken, but not both. c) If investment 4 is selected, then investment 6 must also be selected. However, if investment 4 is not selected, it is still possible to select number 6. d) Investment 5 cannot be selected unless both investments 2 and 3 are also selected.

Recognizing that the height to the campsite is a long one, a limit of 35 pounds has been sat as the maximum total weight of the items to be carried. a) Formulate this as 0-1 programming problem to maximize the total utility of the items carried. Solve this knapsack problem using a computer. b) Suppose item number 3 is an extra battery pack, which may be used with several of the other items. Hoi has decided that she will only take item number 5, a CD player, if she also takes item number 3. On the other hand, if she takes item number 3, she may or may not take item number 5. Modify this problem to reflect this and solve the new problem.

Integer programming

14

e) Investment 5 must be selected if both investments 2 and 3 are also selected. 9. (11-18/Render) Malik Construction Company specializes in building moderately priced homes in Cincinnati, Ohio. Anu Malik has identified eight potential locations to construct new single-family dwelling, but he cannot put up homes on all of the sites because he has only \$300,000 to invest in all projects. The accompanying table shows the cost of constructing homes in each area and the expected profit to be made from the sale of each home. Note that the homebuilding costs differ considerably due to low costs, site preparation and differences in the models to be build. Note also that a fraction of a home cannot be build. LOCATION COST OF BUILDING AT THIS SITE (\$) 60,000 50,000 82,000 103,000 50,000 41,000 80,000 69,000 EXPECTED PROFIT (\$) 5,000 6,000 10,000 12,000 8,000 3,000 9,000 10,000

a) Develop an integer programming model to maximize the NPV in this situation. b) Solve the problem in part-a using computer software. Which of the three projects would be undertaken if NPV is maximized? How much money would be used each year? 11. (11-21/Render) Pashwa Utilities provides electricity for three cities. The company has four electric generators that are used to provide electricity. The main generator operates 24 hours per day, with an occasional shutdown for routine maintenance. Three other generators (1, 2, and 3) are available to provide additional power when needed. A startup cost is incurred each time one of these generators is started. The startup costs are \$6,000 for 1, \$5,000 for 2, and \$4,000 for 3. These generators are used in the following ways: A generator may be started at 6:00 A.M. and run for either 8 hours or 16 hours, or it may be started at 2:00 P.M. and run for 8 hours (until 10:00 P.M.). All generators except the main generator are shut down at 10:00 P.M. Forecasts indicate the need for 3,200 megawatts more than provided by the main generator before 2:00 P.M., and this need goes up to 5,700 megawatts between 2:00 and 10:00 P.M. Generator 1 may provide up to 2,400 megawatts, generator 2 may provide up to 2,100 megawatts, and generator 3 may provide up to 3,300 megawatts. The cost per megawatt used per eight hour period is \$8 for 1, \$9 for 2, and \$7 for 3. a) Formulate this problem as an integer programming problem to determine the least-cost way to meet the needs of the areas. b) Solve using computer software.

Clifton Mt. Auburn Mt. Adams Amberly Norwood Covington Roselawn Eden Park

a) Formulate Maliks problem using 0-1 integer programming. b) Solve with QM for Windows or Excel. 10. (11-19/Render) A real estate developer is considering three possible projects a small apartment complex, a small shopping center, and a miniwarehouse. Each of these requires different funding over the next two years, and the net present value of the investments also varies. The following table provides the required investment amounts ( in \$1,000s) and the net present value (NPV) of each (also expressed \$1,000s): INVESTMENT YEAR 1 YEAR 2 40 30 30 20 20 20

## Apartment Shopping center Mini warehouse

NPV 18 15 14

The company has \$80,000 to invest in year 1 and \$50,000 to invest in year 2.