21
Linear Programming ISQA 459/559

Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

  • View
    216

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Linear Programming

ISQA 459/559

Page 2: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Getting Started with LP• Game problem

• Terms

• Algebraic & Graphical Illustration

• LP with Excel

Page 3: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Determining the Optimal Mix Strategy

• Try multiple attempts with different scenarios

OR• Use Linear Programming (LP)

• You will need to install Solver on your laptop• In Excel:

• Click Tools• Click Add-ins• Click Solver Add-in

• We can use LP to address many production planning & distribution problems.

Page 4: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

What is Linear Programming?

• A sequence of steps that will lead to an optimal solution.

• Used to • allocate scarce resources (shelf

space)• assign workers• determine transportation schemes• solve blending problems (food,

chemicals or portfolios)• solve many other types of problems

Page 5: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Five essential conditions:• Explicit Objective: What are we

maximizing or minimizing? Usually profit, units, costs, labor hours, etc.

• Limiting resources create constraints:workers, equipment, parts, budgets,etc.

• Linearity (2 is twice as good as 1, if it takes 3 hours to make 1 part then it takes 6 hours to make 2 parts)

• Homogeneity (each worker has an average productivity)

Page 6: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Bank Loan Processing• A credit checking company requires

different processing times for consumer loans. • Housing loans (H) require 1 hour of credit

review and 4 hours of appraising. Car loans (C) require 1 hour of credit review and 1 hour of appraising.

• The credit reviewers have 200 hours available; the appraisers have 400 hours available.

• Evaluating Housing loans yields $10 profit while evaluating Cars yields $5 profit. How many of each loan type should the company take?

Page 7: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Graphical Approach (2 variables)• Formulate the problem in

mathematical equations• Plot all the Equations• Determine the area of feasibility

• Maximizing problem: feasible area is on or below the lines

• Minimization: feasible area is on or above the lines

• Plot a few Profit line (Iso-profit) by setting profit equation = different values.

• Answer point will be one of the corner points (most extreme)

Page 8: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Equations• Maximize Profit : $10 H + $5 C

• Constrained Resources• 1H + 1C < 200 (credit reviewing hours)• 4H + 1C < 400 (appraising hours)

• H>0; C>0 (non-negative)• H= ?• C=?

Page 9: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Graphical Display

C

H

200

100

300

400

100 200 300 400

H + C < 200

4H + C < 400

10 H + 5 C

Page 10: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Farmer Gail•Farmer Gail in Pendleton owns 45 acres of land. Gail is going to plant each acre with wheat or corn. Each acre planted with wheat yields $200 profit while corn yields $300. The labor and fertilizer needed for each acre given below. 100 workers and 120 tons of fertilizer are available.

Wheat Corn

Labor /acre 3 workers 2 workers

Fertilizer/acre 2 tons 4 tons

Page 11: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Farmer’s Wheat and Corn Problem

• Variables:• Acres planted in wheat = W• Acres planted in corn = C

• Objective Function:• : Maximize profit $200 W + $300 C

• Constraints:• Labor: 3 W + 2 C < 100• Fertilizer: 2 W + 4 C < 120• Land: 1W + 1 C < 45• Non-Negativity: P1 & P2 > 0

Page 12: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Wheat & Corn

0

10

20

30

40

50

0 50 100

Labor

Fert

Land

Wheat = 20, Corn = 20Profit = 10000

Cor

n

Wheat

Page 13: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Solver Set-up on Excel

Wheat Corn LSE RSEVARIABLES 0 0Profit 200 300 0

Labor 3 2 0 100Fertilizer 2 4 0 120Land 1 1 0 45

=SUMPRODUCT(C2:D2,C3:D3)

=SUMPRODUCT(C2:D2,C5:D5)

These 2 cells will change to find the

solution. They represent W & C (our

unknowns)

Page 14: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Note: The inequality signs are

NOT typed in, they are an option

Page 15: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Answer Report

Target Cell (Max)Cell Name Original Value Final Value

$D$4 Profit Total 0 10000

Adjustable CellsCell Name Original Value Final Value

$B$3 Decision Wheat 0 20$C$3 Decision Corn 0 20

ConstraintsCell Name Cell Value Formula Status Slack

$D$6 Workers Function 100 $D$6<=$F$6 Binding 0$D$7 Fertilize Function 120 $D$7<=$F$7 Binding 0$D$8 Land Function 40 $D$8<=$F$8 Not Binding 5$B$3 Decision Wheat 20 $B$3>=0 Not Binding 20$C$3 Decision Corn 20 $C$3>=0 Not Binding 20

What does slack mean here ?

Page 16: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Sensitivity Report

Adjustable CellsFinal Reduced Objective Allowable Allowable

Cell Name Value Cost Coefficient Increase Decrease$B$3 Decision Wheat 20 0 200 250 50$C$3 Decision Corn 20 0 300 100 166.6666667

ConstraintsFinal Shadow Constraint Allowable Allowable

Cell Name Value Price R.H. Side Increase Decrease$D$6 Workers Function 100 25 100 20 40$D$7 Fertilize Function 120 62.5 120 40 53.33333333$D$8 Land Function 40 0 45 1E+30 5

Profit of Wheat could increase by $250 or decrease by $50 and we would still use plant 20 acres.

Reduced cost: how much more profitable would W or C have to be to be included in the answer?

If we could get another worker, each worker contributes $25 (shadow price) to profit for the range (100+20 =120) to (100 - 40=60) or between 60 and 120 workers.So, how much are we willing to pay for an extra worker? How much are we willingto pay for an extra ton of fertilizer? How much for an extra acre of land ?

Page 17: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Aggregate Planning ExampleSailco

Page 18: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

• Sailco Corporation must determine how many sailboats to produce during each of the four next quarters. The demand during each of the four quarters is as follows:

Q1: 40 sailboatsQ2: 60 sailboatsQ3: 75 sailboatsQ4: 25 sailboats• Sailco must meet demands on time. At the beginning of the first

quarter, Sailco has an inventory of 10 sailboats. At the beginning of each quarter, Sailco must decide how many sailboats to produce during that quarter and we assume that sailboats manufactured during a quarter can be used to meet demand for that quarter.

• During each quarter, Sailco can produce up to 40 sailboats with regular-time labor at a cost of $400 per sailboat. By having employees work overtime during the quarter, Sailco can produce additional sailboats with overtime labor at a total cost of $450 per sailboat. At the end of each quarter (after production has occurred and the current quarter’s demand has been satisfied), a holding cost of $20 per sailboat is incurred.

• Determine a production schedule to minimize the sum of production cost and holding cost.

Page 19: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Sorting it out

• What is the objective?

• What are the variables?

• What can be calculated?

• What are the constraints?

Page 20: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Aggregate Plan for Sailco  Qtr 1 Qtr 2 Qtr 3 Qtr 4

Reg Cost $ 400.00 $ 400.00 $ 400.00 $ 400.00

OT Cost $ 450.00 $ 450.00 $ 450.00 $ 450.00

Holding Cost $ 20.00 $ 20.00 $ 20.00 $ 20.00

Total $ -      

         

Beg. Inv 10.00 0.00 0.00 0.00

Production R 0 0 0 0

Production OT 0 0 0 0

Demand 40 60 75 25

End Inv        

Constraints        

Min Inv 0 0 0 0

Max Reg time 40 40 40 40

Page 21: Linear Programming ISQA 459/559. Getting Started with LP Game problem Terms Algebraic & Graphical Illustration LP with Excel

Variables• Q1ProdReg, Q2ProdReg,

Q3ProdReg, Q4ProdReg = the quantity of boats produced with regular production time.

• Q1ProdOT, Q2ProdOT, Q3ProdOT, Q4ProdOT = the quantity of boats produced with overtime production time.