Professional Documents
Culture Documents
Introduction
Many management decisions involve trying to make the most effective use of an organizations resources. Resources typically include machinery, labor, money, time, warehouse space, or raw materials. Resources may be used to produce products (such as machinery, furniture, food, or clothing) or services (such as schedules for shipping and production, advertising policies, or investment decisions). Linear programming (LP) is a widely used mathematical technique designed to help managers in planning and decision making relative to resource allocation. Despite the name, linear programming, and the more general category of techniques called mathematical programming, have very little to do with computer programming. In the world of Operations Research, programming refers to modeling and solving a problem mathematically. Computer programming has, however, played an important role in the advancement and use of LP to solve real-life LP problems
2
{}
=
bi
i =1,,m
xj 0, j = 1,,n
3
Model Components
xj are called decision variables. These are things that you control and you want to determine its values gi(x1, x2 ,, xn)
{}
=
(ii) additivity
(iii) divisibility
linearity
(iv) certainty
14
Explanation of LP Assumptions
(i) activity js contribution to objective function is cjxj and usage in constraint i is aijxj both are proportional to the level of activity j (volume discounts, set-up charges, and nonlinear efficiencies are potential sources of violation) (ii) cross terms such as x x may not 1 5 appear in the objective or constraints.
15
Explanation of LP Assumptions
(iii) Fractional values for decision variables are permitted (iv) Data elements aij , cj , bi , uj are known with certainty Nonlinear or integer programming models should be used when some subset of assumptions (i), (ii) and (iii) are not satisfied. Stochastic models should be used when a problem has significant uncertainties in the data that must be explicitly taken into account [a relaxation of assumption (iv)].
16
Applications Of LP
1. Product mix problem 2. Diet problem 3. Blending problem 4. Media selection problem 5. Assignment problem 6. Transportation problem 7. Portfolio selection problem 8. Work-scheduling problem 9. Production scheduling problem 10. Inventory Problem 11. Multi period financial problem 12. Capital budgeting problem
17
Example
Formulate a linear programming model for this problem, to determine how many containers of each product to produce tomorrow in order to maximize the profits. The company makes four types of juice using orange, grapefruit, and pineapple. The following table shows the price and cost per quart of juice (one container of juice) as well as the number of kilograms of fruits required to produce one quart of juice.
Product Orange juice Grapefruit juice Pineapple juice All in - one Price/quart 3 2 2.5 4 Cost/quart 1 0.5 1.5 2 Fruit needed 1 Kg. 2 Kg. 1.25 Kg.
18 0.25 Kg each
Solution
Decision variables X1 = # of containers of orange juice X2 = # of containers of grapefruit juice X3 = # of containers of pineapple juice X4 = # of containers of All-in-one juice Objective function Max Z = 2 X1 + 1.5 X2 + 1 X3 + 2 X3 Constraints Orange constraints X 1 0.25 X 4 400 Grapefruit constraint 2 X 2 0.25 X 4 300 Pineapple constraints 1.25 X 3 0.25 X 4 200 X 2 0.3( X 1 X 2 X 3 X 4) Max. of grapefruit X1 7 Ratio of orange to pineapple X3 5 1 Max. of pineapple X 2 ( X 1 X 2 X 3 X 4) 3 X 1, X 2, X 3, X 4 0
Non-negativity constraints
20
2. Diet problem
Example My diet requires that all the food I eat come from one of the four basic food groups (chocolate cake, ice cream, soda, and cheesecake). At present, the following four foods are available for consumption: brownies, chocolate ice cream, cola, and pineapple cheesecake. Each brownie costs 50 cents, each scoop of chocolate ice cream costs 20 cents, each bottle of cola costs 30 cents, and each piece of pineapple cheesecake costs 80 cents. Each day, I must ingest at least 500 calories, 6 oz of chocolate, 10 oz of sugar, and 8 oz of fat. The nutritional content per unit of each food is shown in the following table. Formulate a linear programming model that can be used to satisfy my daily nutritional requirements at minimum costs.
21
Diet problem
Calories
Brownie Chocolate ice cream (1 scoop) Cola (1 bottle) Pineapple cheesecake (1piece) 400 200 150 500
Chocolate
3 ounce 2 0 0
Sugar
Fat
2 ounce 2 ounce 2 4 4 4 1 5
22
Diet problem
Solution Decision variables: as always, we begin by determining the decisions that must be made by the decision maker: how much of each food type should be eaten daily. Thus, we define the decision variables: X1 = number of brownies eaten daily X2 = number of scoops of chocolate ice cream eaten daily X3 = number of bottles of cola drunk daily X4 = number of pieces of pineapple cheesecake eaten daily
23
Diet problem
Objective function: my objective function is to minimize the cost of my diet. The total cost of my diet may be the determined from the following relation: Total cost of diet = (cost of brownies) + (cost of ice cream) + (cost of cola) + (cost of cheesecake) Thus, the objective function is: Min Z = 50 X1 + 20 X2 + 30 X3 + 80 X4
24
Diet problem
Constraints: the decision variables must satisfy the following four constraints: Constraint 1: daily calorie intake must be at least 500 calories. Constraint 2: daily chocolate intake must be at least 6 oz. Constraint 3: daily sugar intake must be at least 10 oz. Constraint 4: daily fat intake must be at least 8 oz. To express constraint 1 in terms of the decision variables, note that (daily calorie intake) = (calorie in brownies) + (calories in chocolate ice cream) + (calories in cola) + (calories in pineapple cheesecake) Therefore, the daily calorie intake = 400 X1 + 200 X2 + 150 X3 + 500 X4 must be greater than 500 ounces By the same way the other three constraints can be 25 formulated.
Diet problem
The four constraints are: 400 X1 + 200 X2 + 150 X3 + 500 X4 500 3 X1 + 2 X2 6 2 X1 + 2 X2 + 4 X3 + 4 X4 10 2 X1 + 4 X2 + X3 + 5 X4 8 Nonnegativity constraints: it is clear that all decision variables are restricted in sign, i.e., Xi 0, for all i = 1, 2, 3, and 4
26
Diet problem
Combining the objective function, constraints, and nonnegativity constraints, the LP model is as follows: Min Z = 50 X1 + 20 X2 + 30 X3 + 80 X4 st. 400 X1 + 200 X2 + 150 X3 + 500 X4 500 3 X1 + 2 X 2 6 2 X1 + 2 X2 + 4 X3 + 4 X4 10 2 X1 + 4 X2 + X3 + 5 X4 8 Xi 0, for all i = 1, 2, 3, and 4 The optimal solution to this LP is X1 = X4 = 0, X2 = 1, and Z = 90 cents
27
3. Blending problem
Example The Low Knock Oil company produces two grades of cut rate gasoline for industrial distribution. The grades, regular and economy, are produced by refining a blend of two types of crude oil, type X100 and type X220. each crude oil differs not only in cost per barrel, but in composition as well. The accompanying table indicates the percentage of crucial ingredients found in each of the crude oils and the cost per barrel for each. Weekly demand for regular grade of Low Knock gasoline is at least 25000 barrels, while demand for the economy is at least 32000 barrels per week. At least 45% of each barrel of regular must be ingredient A. At most 50% of each barrel of economy should contain ingredient B. the Low Knock management must decide how many barrels of each type of crude oil to buy each week for blending to satisfy demand at minimum cost .
Blending problem
of crude X100 blend to produce the refined regular of crude X100 blended to produce the refined
of crude X220 blend to produce the refined regular of crude X220 blended to produce the refined
0.05 X2 0.25 X4 0
Xi 0, i = 1, 2, 3, 4 The optimal solution is: X1 = 15000, X2 = 26666.6, X3 = 10000, X4 = 5333.3, and Z = 1,783,600
29
Media Selection
Medium Audience Reached per ad
5000 8500 2400 2800
Cost per ad
800 925 290 380
TV spot (1 minute) Daily newspaper (full-page ad) Radio spot (30 second, prime time) Radio spot (1 minute, afternoon)
The company arrangements require that at least five radio spots be placed each week. To ensure a board-scoped promotional campaign, management also insists that no more than $1800 be spent on radio advertising every week. 31
Media selection
Solution Let X1 = number X2 = number X3 = number X4 = number of of of of 1-miute TV spots taken Each week full-page daily newspaper ads taken each week. 30-second prime-time radio spots taken each week. 1-minute afternoon radio spots taken each week.
Max Z = 5000 X1 + 8500 X2 + 2400 X3 + 2800 X4 st X1 12 (maximum TV spots/week) X2 5 (maximum newspaper ads/week) X3 25 (maximum 30-second radio spots/week) X4 20 (maximum 1-minute radio spots/week) 800 X1 + 925 X2 + 290 X3 + 380 X4 8000 (weekly budget) X3 + X4 5 (minimum radio spots contracted) 290 X3 + 380 X4 1800 (maximum dollars spent on radio) X1, X2, X3, X4 0 The optimal solution is: X1 = 1.97, X2 = 5, X3 =6.2, and X4 = 0, Z = 67240
32
5. Assignment problem
Example A law firm maintains a large staff of young attorneys who hold the title of junior partner. The firm concerned with the effective utilization of this personnel resources, seeks some objective means of making lawyer-to-client assignments. On march 1, four new clients seeking legal assistance came to the firm. While the current staff is overloads and identifies four junior partners who, although busy, could possibly be assigned to the cases. Each young lawyer can handle at most one new client. Furthermore each lawyer differs in skills and specialty interests. Seeking to maximize the overall effectiveness of the new client assignment, the firm draws up the following table, in which he rates the estimated effectiveness (of a scale of 1 to 9) of each lawyer on each new case.
33
Assignment problem
Client case Lawyer Adam Divorce 6 Corporate merger 2 embezzlement 8 exhibitionism 5
Brook Carter
Darwin
9 4
6
3 8
7
5 3
6
8 4
4
34
Assignment problem
Solution Decision variables: 1 if attorney i is assigned to case j Let Xij = 0 otherwise Where : i = 1, 2, 3, 4 stands for Adam, Brook, Carter, and Darwin respectively j = 1, 2, 3, 4 stands for divorce, merger, embezzlement, and exhibitionism respectively. The LP formulation will be as follows:
35
Assignment problem
Max Z = 6 X11 + 2 X12 + 8 X13 + 5 X14 + 9 X21 + 3 X22 + 5 X23 + 8 X24 + 4 X31 + 8 X32 + 3 X33 + 4 X34 + 6 X41 +7 X42 + 6 X43 + 4 X44 St.
X11 + X21 + X31 + X41 = 1 X12 + X22 + X32 + X42 = 1 X13 + X23 + X33 + X43 = 1 X14 + X24 + X34 + X44 = 1 X11 + X12 + X13 + X14 = 1 X21 + X22 + X23 + X24 = 1 X31 + X32 + X33 + X34 = 1 X41+ X42 + X43 + X44 = 1 (divorce case) (merger) (embezzlement) (exhibitionism) (Adam) (Brook) (Carter) (Darwin)
36
The optimal solution is: X13 = X24 = X32 = X41 = 1. All other variables are equal to zero.
6. Transportation problem
Example The Top Speed Bicycle Co. manufactures and markets a line of 10-speed bicycles nationwide. The firm has final assembly plants in two cities in which labor costs are low, New Orleans and Omaha. Its three major warehouses are located near the larger market areas of New York, Chicago, and Los Angeles. The sales requirements for next year at the New York warehouse are 10000 bicycles, at the Chicago warehouse 8000 bicycles, and at the Los Angeles warehouse 15000 bicycles. The factory capacity at each location is limited. New Orleans can assemble and ship 20000 bicycles; the Omaha plant can produce 15000 bicycles per year. The cost of shipping one bicycle from each factory to each warehouse differs, and these unit shipping costs are: 37
Transportation problem
New York $2
3
Chicago
3 1
Los Angeles 5
4
The company wishes to develop a shipping schedule that will minimize its total annual transportation cost
38
Transportation problem
Solution To formulate this problem using LP, we again employ the concept of double subscribed variables. We let the first subscript represent the origin (factory) and the second subscript the destination (warehouse). Thus, in general, Xij refers to the number of bicycles shipped from origin i to destination j. Therefore, we have six decision variables as follows:
X11 X12 X13 X21 X22 X23 = = = = = = # # # # # # of bicycles shipped from New Orleans to New York of bicycles shipped from New Orleans to Chicago of bicycles shipped from New Orleans to Los Angeles of bicycles shipped from Omaha to New York of bicycles shipped from Omaha to Chicago of bicycles shipped from Omaha to Los Angeles 39
Transportation problem
Min Z = 2 X11 + 3 X12 + 5 X13 + 3 X21 + X22 + 4 X23
St
X11 + X21 = 10000 (New York demand) X12 + X22 = 8000 (Chicago demand) X13 + X23 = 15000 (Los Angeles demand) X11 + X12 + X13 20000 (New Orleans Supply X21 + X22 + X23 15000 (Omaha Supply) Xij 0 for i = 1, 2 and j = 1, 2, 3 The optimal solution is: X11 = 10000, X12 = 0, X13 = 8000, X21 = 0, X22 = 8000, X23 = 7000, and Z = $96000 40
7. Portfolio selection
Example The International City Trust (ICT) invests in short-term trade credits, corporate bonds, gold stocks, and construction loans. To encourage a diversified portfolio, the board of directors has placed limits on the amount that can be committed to any one type of investment. The ICT has $5 million available for immediate investment and wishes to do two things: (1) maximize the interest earned on the investments made over the next six months, and (2) satisfy the diversification requirements as set by the board of directors. The specifics of the investment possibilities are:
41
Portfolio selection
Investment Interest earned % 7 11 19 15 Maximum investment ($ Million) 1 2.5 1.5 1.8
In addition, the board specifies that at least 55% of the funds invested must be in gold stocks and construction loans, and that no less than 15% be invested in trade credit.
42
Portfolio selection
Solution To formulate ICTs investment problem as a linear programming model, we assume the following decision variables: X1 = dollars invested in trade credit X2 = dollars invested in corporate bonds X3 = dollars invested in gold stocks X4 = dollars invested in construction loans
43
Portfolio selection
The optimal is: X1 = 75,000, X2 = 950,000, X3 = 1,500,000, and X4 = 1,800,000, and total interest Z = 712,000
44
45
Decision Variables xt = # of full-time employees that begin work in shift t yt = # of part-time employees that work shift t
(8 15.20) (4 12.95)
Min s.t.
121.6 (x1 + x6 x1 x2 x3
+ y6)
+ + + +
y1
15
y2
y3
10
40
y4
y5
70
40
x4 x5
+ +
x5 + x6 +
y6
35
xt, yt 0
Graphical solution
A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an equation and then decide which side of the line is feasible (if its an inequality). 2. Find the feasible region. 3. find the coordinates of the corner (extreme) points of the feasible region.
LP Formulation
Min z = 5x1 + 2x2
s.t.
Feasible Region
4x1 - x2 > 12
4
3
x1 + x2 > 4
2x1 + 5x2 > 10
(16/5,4/5) (10/3, 2/3)
1 2 3 4
2
1
(5,0)
x1
52
Z 88/5 18 25
53
Max s.t.
x1 < 6
(6, 0)
1 2 3 4 5 6 7 8 9 10
x1
55
Constraint #2 Graphed
x2
8 7 6 5 4 3 2 1
(0, 6 1/3)
2x1 + 3x2 < 19
(9 1/2, 0)
1 2 3 4 5 6 7 8 9 10
x1
56
Constraint #3 Graphed
x2
8 7 6 5 4 3 2
(0, 8) x1 + x2 < 8
(8, 0)
1 2 3 4 5 6 7 8 9 10
x1
57
x1 + x2 < 8
x1 < 6
10
x1
58
Feasible Region
1 2 3 4 5 6 7 8 9 10
x1
59
(0, 19/3)
6 5 4 3 2 1
(5, 3) 4
Feasible Region
1
1 2 3 4 5 6
3
2
7
(6, 2)
(0, 0)
10
x1
60
(6, 0)
61
Point
(0,0) (6,0) (6,2) (5,3) (0,19/3)
Z
0 30 44 46 44.33
Optimal Solution
10
x1
62
Feasible Region
The feasible region for a two-variable linear programming problem can be nonexistent, a single point, a line, a polygon, or an unbounded area. Any linear program falls in one of three categories: is infeasible
Special Cases
Alternative Optimal Solutions In the graphical method, if the objective function line is parallel to a boundary constraint in the direction of optimization, there are alternate optimal solutions, with all points on this line segment being optimal. Infeasibility A linear program which is overconstrained so that no point satisfies all the constraints is said to be infeasible. Unbounded For a max (min) problem, an unbounded LP occurs in it is possible to find points in the feasible region with arbitrarily large (small) Z
65
z1
z2
z3
0 0
1 2 3 4
66
67
There are no points that satisfy both constraints, hence this problem has no feasible region, and no optimal solution.
x2
8
2x1 + x2 > 8
3 4
x1
68
s.t.
69
x1 + x2 > 5
2.67
x1
70
A B C D
Structural constraints
x1 40 x2 100
E F
nonnegativity
x1 0, x2 0
Where x1 is the quantity produced from product Q, and x2 is the quantity of product P
71
F ( 1 )
C Q
72
Possible Outcomes of an LP
1. Infeasible feasible region is empty; e.g., if the constraints include x1+ x2 6 and x1+ x2 7 Max 15x1+ 7x2 s.t. x1 + x2 1 x1, x2 0 (no finite optimal solution)
2. Unbounded -
3. Multiple optimal solutions - max 3x1 + 3x2 s.t. x1+ x2 1 x1, x2 0 4. Unique Optimal Solution Note: multiple optimal solutions occur in many practical (real-world) LPs.
73