Sunteți pe pagina 1din 29

Operations Management

POMG2710
Chapter 19: Linear Programming
Linear Programming (LP)
Linear programming (LP) techniques consist of a sequence of steps that will lead to an optimal solution
to linear-constrained problems, if an optimum exists.
Applications include:
• Establishing locations for emergency
• Developing optimal production schedules
• Developing financial plans
• Determining optimal diet plans

LP Models- Mathematical representations of constrained optimization problems, contain:


• Objective function- A mathematical statement of profit (or cost, etc.) for a given solution
• Decision variables- Amounts of either inputs or outputs
• Constraints- Limitations that restrict the available alternatives
• Feasible solution space- set of all feasible combinations of decision variables as defined by constraints
• Parameters- Numerical constants
Linear Programming (LP)
1. List and define the decision variables (D.V.)
The following assumption must be satisfied:
 These typically represent quantities
1. Linearity: the impact of decision variables is linear
2. State the objective function (O.F.) in constraints and objective function
 It includes every D.V. in the model and its 2. Divisibility: none-integer values of decision variables
contribution to profit (or cost) are acceptable
3. List the constraints 3. Certainty: values of parameters are known and constant
 Right hand side value 4. None-negativity: negative values of decision variables
 Relationship symbol (≤, ≥, or =) are unacceptable
 Left Hand Side
The variables subject to the constraint, and their
coefficients that indicate how much of the RHS quantity
one unit of the D.V. represents
4. Non-negativity constraints
Formulation – Example (1) x1 x2
Al Amal company produces two products: bags and shoes , where a bag is sold for
$5 and shoes for $7.
The production rate of bags can not exceeds 6 units per day. They can not
produces more than 8 units of both products in one day. As well as every bag
take 2 hours and each pair of shoes take 3 hours to be produced. The total
working hour per day is 19 hours. What should be the production quantity to get
the maximum revenue
Decision variables:
1) x1 = number of bags sold
2) X2= number of shoes sold

Max 5x1 + 7x2


s.t. x1 < 6
2x1 + 3x2 < 19
x1 + x2 < 8
x 1, x 2 > 0
Linear Programming (LP)-Formulation
 Let X1, X2, and X3 be the number of units to be produced from products 1, 2 and 3 respectively. If product 1 should be
no more than 50% of the total units produced from products 2 and 3, then the constraint should be written as

 Let X1, X2, X3 and X4 be the number of units to be produced from products 1, 2, 3 and 4 respectively. If product 1
should be more than half of the total units produced from products 3 and 4, then the constraint should be written as

 Let X1, X2, and X3 be the number of units to be produced from products 1, 2 and 3 respectively. If product 1 should be
no more one third the total units produced. then the constraint should be written as

 Let X1, X2, X3 and X4 be the number of units to be produced from products 1, 2, 3 and 4 respectively. If product 3
should be at least half of the total units produced from products 1 and 4, then the constraint should be written as

 Let X1, X2, and X3 be the number of units to be produced from products 1, 2 and 3 respectively. If the ratio of product 3
to product 1 is 3 : 4, then the constraint should be written as

 Let X1, X2, and X3 be the number of units to be produced from products 1, 2 and 3 respectively. If the ratio of product 2
to product 4 is 3 : 2, then the constraint should be written as

 Let X1, X2, and X3 be the number of units to be produced from products 1, 2 and 3 respectively. If the ratio of product 2
to product 4 is 3 : 1, then the constraint should be written as
LP-Formulation – Example 2
A small furniture manufacturer produces tables and chairs. Each product must go through three
stages of the manufacturing process: assembly, finishing, and inspection. Each table requires 3 hours
of assembly, 2 hours of finishing, and 1 hour of inspection. Each chair requires 2 hours of assembly, 2
hours of finishing, and 1 hour of inspection. The profit per table is $120, while the profit per chair is
$80. Currently, each week there are 200 hours of assembly time available, 180 hours of finishing time,
and 40 hours of inspection time. To keep a balance, the number of chairs produced should be at least
twice the number of tables. Also, the number of chairs cannot exceed six times the number of tables.
Formulate this as a linear programming problem.
LP-Formulation- – Example 3
Swearingen and McDonald, a small furniture manufacturer, produces fine hardwood tables and
chairs. Each product must go through three stages of the manufacturing process: assembly, finishing,
and inspection. Each table requires 12 hours of assembly, 20 hours of finishing, and 2 hours of
inspection. Each chair requires 4 hours of assembly, 16 hours of finishing, and 3 hours of inspection.
The profit per table is $150 while the profit per chair is $100. Currently, each week there are 300 hours
of assembly time available, 220 hours of finishing time, and 30 hours of inspection time. To keep a
balance, the number of chairs produced should be at least twice the number of tables. Also, the
number of chairs cannot exceed 6 times the number of tables. Formulate this as a linear programming
problem. Find the solution.
A manufacturer of microcomputers produces four models: Portable, Student, Office, and Network. The
profit per unit on each of these four models is $500, $350, $700, and $1000, respectively. The models
require the labor and materials per unit shown below. Formulate this product mix problem using linear
programming.
Portable Student Office Network Total
Labor (hrs/week) 5 5 6 8 4000
Chassis (unit/week) 1 1 1 1 400
Disk Drive (unit/week) 2 1 2 1 300
Hard Disk (unit/week) 0 0 0 1 20
Memory Chip (unit/week) 16 8 32 64 22,000
Circuit Bds. (unit/week) 1 1 2 4 10,000
LP-Formulation – Example 5
A cruise line is planning its menu for the next trip. Vacationers like eating steak, lobster, and chicken.
The cruise line has decided to plan for at least half of all booked passengers to have a steak dinner, for
at least a quarter of all passengers to have lobster, and the rest to have chicken. Steak dinners cost the
company $8, lobsters cost $15, and chicken costs the line $4. On the next cruise, there are 400
passengers booked. In addition, the cruise line has decided to plan for an additional 25% more meals
than bookings. Formulate the appropriate linear program.

Min. Z = 8X1 + 15X2 + 4X3


Computer Solutions
 Simplex: a liner programming algorithm that cab solve problems having more than
two decision variables.
 MS Excel can be used to solve LP problems using its Solver routine
 Enter the problem into a worksheet
 Where there is a zero in Figure 19.15, a formula was entered
 Solver automatically places a value of zero after you input the formula
 You must designate the cells where you want the optimal values for the decision
variables
 In Excel 2010, click on Tools on the top of the worksheet, and in that menu, click on Solver
 Begin by setting the Target Cell
 This is where you want the optimal objective function value to be recorded
 Highlight Max (if the objective is to maximize)
 The changing cells are the cells where the optimal values of the decision variables will appear
 Add a constraint, by clicking add
 For each constraint, enter the cell that contains the left-hand side for the constraint
 Select the appropriate relationship sign (≤, ≥, or =)
 Enter the RHS value or click on the cell containing the value
 Repeat the process for each system constraint
 For the nonnegativity constraints, enter the range of cells designated for the optimal values of the
decision variables
 Click OK, rather than Add
 You will be returned to the Solver menu
 Click on Options
 In the Options menu, Click on Assume Linear Model
 Click OK; you will be returned to the solver menu
Click Solve
Computer Solutions
Computer Solutions
 Solver Results
 The Solver Results menu will appear
 You will have one of two results
 A Solution
 In the Solver Results menu Reports box
 Highlight both Answer and Sensitivity
 Click OK
 An Error message
 Make corrections and click solve
 Solver will incorporate the optimal values of the
decision variables and the objective function into
your original layout on your worksheets
 Sensitivity Analysis
 Assessing the impact of potential changes to the numerical values of an LP model
 Three types of changes
 Objective function coefficients
 Right-hand values of constraints
 Constraint coefficients
O.F. Coefficient Changes
 A change in the value of an O.F. coefficient can cause a change in the optimal solution of a problem
 Not every change will result in a changed solution
Range of Optimality
 The range of O.F. coefficient values for which the optimal values of the decision variables will not change

Basic and Non-Basic Variables


Basic variables
 Decision variables whose optimal values are non-zero
Non-basic variables
 Decision variables whose optimal values are zero
Reduced cost
 Unless the non-basic variable’s coefficient increases by more than its
reduced cost, it will continue to be non-basic
RHS Value Changes
 Shadow price
 Amount by which the value of the O.F would change with a one-unit change in the RHS value of a constraint
 Range of feasibility
 Range of values for the RHS of a constraint over which the shadow price remains the same

Binding vs. Non-binding Constraints


 Non-binding constraints
 have shadow price values that are equal to zero
 have slack (≤ constraint) or surplus (≥ constraint)
 Changing the RHS value of a non-binding constraint (over its range of feasibility) will have no effect on the
optimal solution
 Binding constraint
 have shadow price values that are non-zero
 have no slack (≤ constraint) or surplus (≥ constraint)
 Changing the RHS value of a binding constraint will lead to a change in the optimal decision values and to a
change in the value of the objective function
100% Rule
∑ (change / allowable change) < 1
RHS Example
 Constraint (1) decrease X
X / allowable decrease = 0.5263
 Assembly hours increase 200
200 / 466.67 = 0.4285

0.9548
The sensitivity report can still be used
 Linear programming solvers are part of many The reduced cost for a decision variable with a positive
spreadsheet packages, such as Microsoft Excel. value is 0.
 Partial Spreadsheet Showing Problem Data Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
A B C D
$B$8 X1 5.0 0.0 5 2 0.333333333
1 LHS Coefficients $C$8 X2 3.0 0.0 7 0.5 2
2 Constraints X1 X2 RHS Values
Constraints
3 #1 1 0 6 Final Shadow Constraint Allowable Allowable
4 #2 2 3 19 Cell Name Value Price R.H. Side Increase Decrease
$B$13 #1 5 0 6 1E+30 1
5 #3 1 1 8 $B$14 #2 19 2 19 5 1
6 Obj.Func.Coeff. 5 7 $B$15 #3 8 1 8 0.333333333 1.666666667

 Partial Spreadsheet Showing Solution


A B C D The reduced cost for a decision variable whose
value is 0 in the optimal solution is the amount the
8 Optimal Decision Variable Values
9 X1 X2
10
11
5.0 3.0
variable's objective function coefficient would have
12 Maximized Objective Function 46.0 to improve (increase for maximization problems,
13
14 Constraints Amount Used RHS Limits decrease for minimization problems) before this
15
16
#1
#2
5
19
<=
<=
6
19
variable could assume a positive value.
17 #3 8 <= 8

Slack= 1 = (6 - 5)
In Class Exercise
Solve10, 11, 13 on page 859
Solve 15 and 16 on page 560
In Class Exercise
No. 11 on page 859
wood products firm uses available time at the end of each week to
make goods for stock. Currently, two products on the list of items
are produced for stock: a chopping board and a knife holder. Both Decision variables:
items require three operations: cutting, gluing, and finishing.The x1 = qty. of chopping boards
manager of the firm has collected the following data on these x2 = qty. of knife holders
products:
maximize 2x1 + 6x2
s.t.
Cutting 1.4x1 + .8x2  56 minutes
Gluing 5x1 + 13x2  650
Finishing 12x1 + 3x2  360
The manager has also determined that, during each week, 56 minutes x1, x2  0
are available for cutting, 650 minutes are available for gluing, and 360
minutes are available for finishing.

• Determine the optimal quantities of the decision variables.


• Which resources are not completely used by your solution?
How much of each resource is unused?
In Class Exercise
No. 13 on page 859
Decision variables
A manager wants to know how many units of each product to A = quantity of product A
produce on a daily basis in order to achieve the highest B = quantity of product B
contribution to profit. Production requirements for the
C = quantity of product C
products are shown in the following table.

Material 1 costs $5 a pound, material 2 costs $4 a pound, and


labor costs $10 an hour. Product A sells for $80 a unit, product
B sells for $90 a unit, and product C sells for $70 a unit. Maximize 26A + 50B + 20C (profit)
Available resources each day are 200 pounds of material 1; 300
pounds of material 2; and 150 hours of labor.
s.t.
Mat’l #1 2A + 1B + 6C  200 lb.
The manager must satisfy certain output requirements:The Mat’l #2 3A + 5B  300 lb.
output of product A should not be more than one-third of the
total number of units produced; the ratio of units of product A
Labor 3.2A + 1.5B +2.0C  150 hr.
to units of product B should be 3 to 2; and there is a standing A output 2/3A – 1/3 B – 1/3C 0
order for 5 units of product A each day. Formulate a linear A/B 2A – 3B =0
programming model for this problem, and then solve. A A 5
A, B, C  0
No. 16 on page 560- A garden store prepares various grades of pine bark for
mulch: nuggets (x1), mini-nuggets (x2), and chips (x3). The process requires pine
No. 15 on page 560- Given this linear programming model, solve bark, machine time, labor time, and storage space. The following model has been
the model and then answer the questions that follow. developed. Maximize 9x1 + 9x2 + 6x3 (profit) ; Subject to

• Are any constraints binding? If so, which one(s)? • What is the marginal value of a pound of pine bark? Over what range is this
price value appropriate?
• If the profit on product 3 were changed to $22 a unit, what
• What is the maximum price the store would be justified in paying for
would the values of the decision variables be? The objective
additional pine bark?
function? Explain.
• What is the marginal value of labor? Over what range is this value in effect?
• If the profit on product 1 were changed to $22 a unit, what • The manager obtained additional machine time through better scheduling.
would the values of the decision variables be? The objective How much additional machine time can be effectively used for this
function? Explain. operation? Why?
• If 10 hours less of labor time were available, what would the • If the manager can obtain either additional pine bark or additional storage
values of the decision variables be? The objective function? space, which one should she choose and how much (assuming additional
Explain. quantities cost the same as usual)?
• If a change in the chip operation increased the profit on chips from $6 per
• If the manager decided that as many as 20 units of product 2 bag to $7 per bag, would the optimal quantities change? Would the value of
could be produced (instead of 16), how much additional the objective function change? If so, what would the new value(s) be?
profit would be generated? • If profits on chips increased to $7 per bag and profits on nuggets decreased
• If profit per unit on each product increased by $1, would the by $.60, would the optimal quantities change? Would the value of the
optimal values of the decision variables change? Explain. objective function change? If so, what would the new value(s) be?
What would the optimal value of the objective function be? • If the amount of pine bark available decreased by 15 pounds, machine time
decreased by 27 minutes, and storage capacity increased by five bags, would
this fall in the range of feasibility for multiple changes? If so, what would the
value of the objective function be?
Solve 15 on page 560
a. The first constraint (machine) and the third constraint (material) are binding because S1 and S3 are not in the solution (are not basic variables).
Therefore as nonebasic variables, they each have a value of zero. In other words, there are no excess machine hours or materials.
b. The range of optimality for the objective function coefficient of product 3 is from 13.5 to 36.Therefore an increase from 15 to 22 would not
change the value of the decision variables. However, the objective function value would increase from 792 to 792 + 48 (22 – 15).Therefore the new
value of z = 1128.
c. The range of optimality for the objective function coefficient of product 1 is from – to 22.2. Since 22 is within the range, the change would not
affect the value of decision variables. Since x1 is not a basic variable, the objective function value will not be affected (we are not producing any units
of product 1).
d. We have a slack of 56 hours (S2 = 56), and the range of feasibility lower limit for the second constraint is 232.Therefore, reducing the available
labor hours by 10 (288 – 10 = 278) will not affect the value of the decision variables.The objective function value will not change either. However,
there will be 10 hours less slack.Thus, the new value of S2 = 56 – 10 = 46.
e. If no additional machine hours and materials are obtained, there would not be any change in the profit (z). No change is allowed in the objective
function value because all machine hours and all materials are used (constraint 1 and constraint 3 are binding).
f. To determine if the changes are within the range for multiple changes, we first compute the ratio of the amount of each change to the end of the
range in the same direction.
For product 1, it is 1/22.2 – 12 =1/10.2 = 9.8%
For product 2, it is 1/20 – 18 =1/2 = 50%
For product 3, it is 1/36 – 15 =1/21 = 4.76%
The sum of the ratios = .098 + .50 + .0476 = .646
Since .646 less than 1.0, we conclude that these values are within the range.Therefore, the optimal values of the decision variables will not change
(x1 = 0, x2 = 4, x3 = 48). However, the objective function value will change.The new objective function value = z = (19 x 4) + (16 x 48) = 844
or 792 + 4 + 48 = 844.
Note:The RHS of the machine constraint should be 660 minutes.
(z) would increase from 1125 to 1125 + 1(75 units) = $1200.
g. To determine if the changes are within the range for multiple changes,
No. 16 on page 560 we first compute the ratio of the amount of each change to the end of the
range in the same direction.
a.The marginal value (shadow price) of a pound of bark is $1.50.This
marginal value is in effect from 510 lbs. to 750 lbs. of bark (range of For chips (x3), it is 1/(9 – 6) = .333
feasibility for the first constraint right hand side). For nuggets (x1), it is .6/(9 – 8) = .600
b.1.50 per pound. The sum of the ratios = .333 + .600 = .933
c. The marginal value (shadow price) of 1 labor hour is zero because we Since .933 less than 1.0, we conclude that these values are within the
currently have 105 excess labor hours remaining.This marginal value is in range.Therefore, the optimal values of the decision variables will not
effect from 375 hours to infinity. change (x1 = 75, x2 = 0, x3 = 75). However, the optimal value of the
d. We can not use any additional machine hours because we currently have objective function will change.
135 minutes of excess machine time. The new z = (8.4 x 75) + (7 x 75) = $1,155.
e. Maximum possible increase for pine bark constraint is 150 lbs. (750 – h. To determine if the changes are within the range for multiple changes,
600). Maximum possible increase for storage constraint is 14.21 bags. we first compute the ratio of the amount of each change to the end of the
(1.50) (150) = $225 (expected increase in profit for pine bark) range in the same direction.

(1.50) (14.21) = $21.32 (expected increase in profit for storage) For pine barks (first constraint), it is 15\(750 – 600 )= .10

Therefore, add 150 pounds of pine bark. For machine time (second constraint), it is 27\(600 – 525)= .36

f. The range of optimality for the objective function coefficient of chips For storage capacity (fourth constraint), it is 5\(164.21 – 150)= .352
(x3) is from 5.4 to 9.Therefore an increase from $6 to $7 would not The sum of the ratios = .10 + .36 + .352 = 1.112
change the value of the decision variables. However, the optimal objective
Since 1.112> 1.0, we conclude that these values are not within the range.
function value
Therefore, the optimal values of the decision variables will not change (x1
= 75, x2 = 0, x3 = 75).The optimal value of the objective function (z) will
change.
Linear Programming Problem 1
A small firm makes three similar products, which all follow the same three-step process, consisting of milling, inspection, and drilling.
Product A requires 12 minutes of milling, 5 minutes for inspection, and 10 minutes of drilling per unit; product B requires 10 minutes
of milling, 4 minutes for inspection, and 8 minutes of drilling per unit; and product C requires 8 minutes of milling, 4 minutes for
inspection, and 16 minutes of drilling.The department has 20 hours available during the next period for milling, 15 hours for
inspection, and 24 hours for drilling. Product A contributes R.O2.40 per unit to profit, B contributes R.O 2.50 per unit, and C
contributes R.O 2.5 per unit.The aim is to maximize profit.The computer solution of the problem is provided on the next slide.
a) Formulate the LP model?
b) Which variables are basic and which are non-basic?
c) A new competitor entered the market providing product B with a competitive price, the manager decided to decrease the
profit contribution of product B by 400 baisa.What is the effect of the manager decision?
d) If the manager wants to produce product A, what change should be made to the objective function?
e) Calculate the range of optimality of product C and interpret the result.
f) If the cost of product B increased by R.O 0.25 and cost of product C decreased by R.O 0.20?What is the effect on the
optimal solution?
g) Are there any non-binding constraints? Does it have a slack or surplus? Explain?
h) Calculate the range of feasibility for drilling and interpret the result.
i) Would you recommend increasing the capacity of milling time by 1 hour? Explain.
j) Would you recommend increasing the capacity of drilling time by 2 hours, knowing that the drilling increase per hour will
cost the firm R.O 4? Explain?
k) If you would either increase the drilling time or the milling time by 1.5 hour, which you will select? Why?
l) The milling time is to be decreased by 2 hours and Drilling time to be increased by 5 hours, what is the effect on the
objective function?
Objective Cell (Max)
Cell Name Original Value Final Value
$H$2 Objective 0 325
Variable Cells
Cell Name Original Value Final Value
$C$2 X1 0 0
$D$2 X2 0 80
$E$2 X3 0 50
Constraints
Slack
Cell Name Cell Value Formula Status /Surplus
$B$6 Milling LHS 1200 $B$6<=1200 Binding 0
$B$7 Inspection LHS 520 $B$7<=900 Not Binding 380
$B$8 Drilling LHS 1440 $B$8<=1440 Binding 0
Variable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$2 X1 0 -0.620833333 2.4 0.620833333 1E+30
$D$2 X2 80 0 2.5 0.625 0.5321428
$E$2 X3 50 0 2.5 2.5 0.5
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$6 Milling LHS 1200 0.208333333 1200 600 480
$B$7 Inspection LHS 520 0 900 1E+30 380
$B$8 Drilling LHS 1440 0.052083333 1440 960 480
a) Natural Furniture Company manufactures three outdoor products,
chairs, benches, and tables. Each product must pass through the
following departments before it is shipped: sawing, sanding, assembly, b) A phosphate manufacturer produces three grades of
and painting.The time requirements (in hours) are summarized in the phosphate, A, B, and C, which yield profit of $40, $50, and
tables below. $60 per kilogram, respectively.The products require the
The production time available in each department each week and the labor and materials per batch that are shown in the table.
minimum weekly production requirement to fulfill contracts are as Each batch of Grade A phosphate yields 800kg of phosphate;
follows: each batch of Grade B phosphate yields 700kg of phosphate;
and each batch of Grade C phosphate yields 800kg of
Minimum phosphate.
Capacity Production
Department (In Hours) Product Level
Grade Grade Grade Available
Sawing 450 Chairs 100
Sanding 400 Benches 50 A B C Resource
Assembly 625 Tables 50 s
Painting 550 Labor hours 4 4 5 80 hr
Raw material #1 200 300 300 6,000 kg
Hours Required Unit
Raw material #2 600 400 500 5,000 kg
Product Sawing Sanding Assembly Painting Profit
Chairs 1.5 1.0 2.0 1.5 $15
Formulate as an LP problem to maximize profit.
Benches 1.5 1.5 2.0 2.0 $10
TABLES 2.0 2.0 2.5 2.0 $20

The production manager has the responsibility of specifying


production levels for each product for the coming week. Formulate as
a linear programming problem
b) Objective function
Maximize profit = 40(800)A + 50(700)B + 60(800)C
Constraints
Answers (a)
Labor: 4A +4B +5C  80
X1 = Number of chairs produced
X2 = Number of benches produced Raw material #1 200A +300B +300C  6,000
X3 = Number of tables produced Raw material #2 600A +400B +500C  5,000
The objective function is What mix of products would yield maximize profit? Solving this on the
computer yields the following solution: A = 0, B = 0, C = 10, Profit = 480,000.
Maximize profit = 15X1 + 10X2 + 20X3
Constraints
1.5X1 + 1.5X2 + 2.0X3  450 hours of sawing available
1.0X1 + 1.5X2 + 2.0X3  400 hours of sanding available
2.0X1 + 2.0X2 + 2.5X3  625 hours of assembly available
1.5X1 + 2.0X2 + 2.0X3  550 hours of painting available
X1+ 2.0X2 + 2.0X3  100 chairs
X2 + 2.0X3  50 benches
X3  50 tables
X1, X2, X3 0
What mix of products would yield maximum profit?
Solving with computer software we get: X1= 100 chairs; X2 = 50 benches; X3 = 112.5 tables; profit = $4250.

S-ar putea să vă placă și