+ All Categories
Home > Documents > Linear Programming Operations Management Dr. Ron Lembke.

Linear Programming Operations Management Dr. Ron Lembke.

Date post: 19-Dec-2015
Category:
View: 230 times
Download: 0 times
Share this document with a friend
Popular Tags:
59
Linear Programming Operations Management Dr. Ron Lembke
Transcript
Page 1: Linear Programming Operations Management Dr. Ron Lembke.

Linear Programming

Operations Management

Dr. Ron Lembke

Page 2: Linear Programming Operations Management Dr. Ron Lembke.

Motivating Example

Suppose you are an entrepreneur making plans to make a killing over the summer by traveling across the country selling products you design and manufacture yourself. To be more straightforward, you plan to follow the Dead all summer, selling t-shirts.

Page 3: Linear Programming Operations Management Dr. Ron Lembke.
Page 4: Linear Programming Operations Management Dr. Ron Lembke.

Example

You are really good with tie-dye, so you earn a profit of $25 for each t-shirt.

The sweatshirt screen-printed sweatshirt makes a profit of $20.

You have 4 days before you leave, and you want to figure out how many of each to make before you head out for the summer.

You plan to work 14 hours a day on this. It takes you 30 minutes per tie dye, and 15 minutes to make a sweatshirt.

Page 5: Linear Programming Operations Management Dr. Ron Lembke.

Example

You have a limited amount of space in the van. Being an engineer at heart, you figure: If you cram everything in the van, you have 40

cubit feet of space in the van.A tightly packed t-shirt takes 0.2 ft3

A tightly packed sweatshirt takes 0.5 ft3.

How many of each should you make?

Page 6: Linear Programming Operations Management Dr. Ron Lembke.

Summary

14 hrs / day

Van: 40.0 ft3 4 days

Tshirt: 0.2 ft3 30 min / tshirt

Sshirt: 0.5 ft3 15 min / Sshirt

How many should we make of each?

Page 7: Linear Programming Operations Management Dr. Ron Lembke.

Linear Programming

What we have just done is called “Linear Programming.”

Has nothing to do with computer programming

Invented in WWII to optimize military “programs.”

“Linear” because no x3, cosines, x*y, etc.

Page 8: Linear Programming Operations Management Dr. Ron Lembke.

Standard Form Linear programs are written the following way:

Max 3x + 4y

s.t. x + y<= 10

x + 2y<= 12

x>= 0

y>= 0

Page 9: Linear Programming Operations Management Dr. Ron Lembke.

Standard Form Linear programs are written the following way:

Max 3x + 4y

s.t. x + y<= 10

x + 2y<= 12

x>= 0

y>= 0

ObjectiveFunction

Constraints

LHS (left hand side)

RHS (right hand side)

inequalities

Non-negativityConstraints

Objective Coefficients

Page 10: Linear Programming Operations Management Dr. Ron Lembke.

Example 2

mp3 - 4 hrs electronics work - 2 hrs assembly time DVD - 3 hrs assembly time - 1 hrs assembly time Hours available: 240 (elect) 100 (assy) Profit / unit: mp3 $7, DVD $5X1 = number of mp3 players to makeX2 = number of DVD players to make

Page 11: Linear Programming Operations Management Dr. Ron Lembke.

Standard Form

Max 7x1 + 5x2

s.t. 4x1 + 3x2 <=240

2x1 + 1x2 <=100

x1 >=0

x2 >=0

electronics

assembly

Page 12: Linear Programming Operations Management Dr. Ron Lembke.

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3X2

X1

Page 13: Linear Programming Operations Management Dr. Ron Lembke.

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X1 = 0, X2 = 80

X1 = 60, X2 = 0

Electronics Constraint

X2

X1

Page 14: Linear Programming Operations Management Dr. Ron Lembke.

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X1 = 0, X2 = 100

X1 = 50, X2 = 0

Assembly Constraint

X2

X1

Page 15: Linear Programming Operations Management Dr. Ron Lembke.

Graphical Solution

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

Assembly Constraint

Electronics Constraint

Feasible Region – Satisfies all constraintsX2

X1

Page 16: Linear Programming Operations Management Dr. Ron Lembke.

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3Isoprofit Line:

$7X1 + $5X2 = $210

(0, 42)

(30,0)

Isoprofit Lnes

X2

X1

Page 17: Linear Programming Operations Management Dr. Ron Lembke.

Isoprofit Lines

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

$210

$280X2

X1

Page 18: Linear Programming Operations Management Dr. Ron Lembke.

Isoprofit Lines

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

$210

$280

$350

X2

X1

Page 19: Linear Programming Operations Management Dr. Ron Lembke.

Isoprofit Lines

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

(0, 82)

(58.6, 0)

$7X1 + $5X2 = $410

X2

X1

Page 20: Linear Programming Operations Management Dr. Ron Lembke.

Mathematical Solution

Obviously, graphical solution is slow We can prove that an optimal solution

always exists at the intersection of constraints.

Why not just go directly to the places where the constraints intersect?

Page 21: Linear Programming Operations Management Dr. Ron Lembke.

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

X1 = 0 and 4X1 + 3X2 <= 240So X2 = 80

X2

X1

4X1 + 3X2 <= 240

(0, 0)

(0, 80)

Page 22: Linear Programming Operations Management Dr. Ron Lembke.

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3X2 = 0 and 2X1 + 1X2 <= 100So X1 = 50

X2

X1

(0, 0)

(0, 80)

(50, 0)

Page 23: Linear Programming Operations Management Dr. Ron Lembke.

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3

4X1+ 3X2 <= 2402X1 + 1X2 <= 100 – multiply by -2

X2

X1

(0, 0)

(0, 80)

(50, 0)

4X1+ 3X2 <= 240-4X1 -2X2 <= -200 add rows together

0X1+ 1X2 <= 40 X2 = 40 substitute into #2

2X1+ 40 <= 100 So X1 = 30

Page 24: Linear Programming Operations Management Dr. Ron Lembke.

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3X2

X1

(0, 0)$0

(0, 80)$400

(50, 0)$350

(30,40)$410

Find profits of each point.

Page 25: Linear Programming Operations Management Dr. Ron Lembke.

Do we have to do this?

Obviously, this is not much fun: slow and tedious

Yes, you have to know how to do this to solve a two-variable problem.

We won’t solve every problem this way.

Page 26: Linear Programming Operations Management Dr. Ron Lembke.

Constraint Intersections

0 20 40 60 80

80

20

40

60

0

100

DVD players

mp3X2

X1

Start at (0,0), or some other easy feasible point.1. Find a profitable direction to go along an edge2. Go until you hit a corner, find profits of point.3. If new is better, repeat, otherwise, stop.

Good news:Excel can do this for us.

Page 27: Linear Programming Operations Management Dr. Ron Lembke.

Minimization Example

Min 8x1 + 12x2

s.t. 5x1 + 2x2 ≥20

4x1 + 3x2 ≥ 24

x2 ≥ 2

x1 , x2 ≥ 0

Page 28: Linear Programming Operations Management Dr. Ron Lembke.

Minimization ExampleMin 8x1 +

12x2

s.t. 5x1 +2x2 ≥ 20

4x1 +3x2 ≥ 24

x2 ≥ 2

x1 , x2

≥ 0

5x1 + 2x2 =20

If x1=0, 2x2=20, x2=10 (0,10)If x2=0, 5x1=20, x1=4 (4,0)

4x1 + 3x2 =24

If x1=0, 3x2=24, x2=8 (0,8)If x2=0, 4x1=24, x1=6 (6,0)

x2= 2

If x1=0, x2=2No matter what x1 is, x2=2

Page 29: Linear Programming Operations Management Dr. Ron Lembke.

Graphical Solution

0 2 4 6 8

8

2

4

6

0

10

5x1 +

2x2 =20

X2

X1

4x1 +

3x2 =24

x2=2

Page 30: Linear Programming Operations Management Dr. Ron Lembke.

0 2 4 6 8

8

2

4

6

0

10

5x1 +

2x2 =20

X2

X1

4x1 +3x

2 =24

x2 =2

(0,10)[5x1+ 2x2 =20]*3

[4x1 +3x2 =24]*2

15x1+ 6x2 = 60

8x1 +6x2 = 48- 7x1 = 12

x1 = 12/7= 1.71

5x1+2x2 =20

5*1.71 + 2x2 =20

2x2 = 11.45

x2 = 5.725

(1.71,5.73)

(1.71,5.73)

Page 31: Linear Programming Operations Management Dr. Ron Lembke.

0 2 4 6 8

8

2

4

6

0

10

5x1 +

2x2 =20

X2

X1

4x1 +3x

2 =24

x2 =2

(0,10)

(1.71,5.73)

4x1 +3x2 =24

x2 =2

4x1 +3*2 =24

4x1 =18

x1=18/4 = 4.5

(4.5,2)

(4.5,2)

Page 32: Linear Programming Operations Management Dr. Ron Lembke.

0 2 4 6 8

8

2

4

6

0

10

5x1 +

2x2 =20

X2

X1

4x1 +3x

2 =24

x2 =2

(0,10)

(1.71,5.73)

Z=8x1 +12x2

8*0 + 12*10 = 120

(4.5,2)

Z=8x1 +12x2

8*1.71 + 12*5.73 = 82.44

Z=8x1 +12x2

8*4.5+ 12*2 = 60

Lowest Cost

Page 33: Linear Programming Operations Management Dr. Ron Lembke.

Profit Line

0 2 4 6 8 10 12

8

2

4

6

0

10

5x1 +

2x2 =20

X2

X1

4x1 +

3x2 =24

x2=2

Z=8x1 +12x2

Try 8*12 = 96x1=0

12x2=96, x2=8

x2=0

8x1=96, x1=12

Page 34: Linear Programming Operations Management Dr. Ron Lembke.

Formulating in Excel

1. Write the LP out on paper, with all constraints and the objective function.

2. Decide on cells to represent variables.

3. Enter coefficients of each variable in each constraint in a block of cells.

4. Compute amount of each constraint being used by current solution.

Page 35: Linear Programming Operations Management Dr. Ron Lembke.

Amount of eachconstraint used by current solution

Current solution

Page 36: Linear Programming Operations Management Dr. Ron Lembke.

Formulating in Excel

5. Place inequalities in sheet, so you remember <=, >=

6. Enter amount of each constraint

7. Enter objective coefficients

8. Calculate value of objective function

9. Make sure you have plenty of labels.

10. Widen columns for readability.

Page 37: Linear Programming Operations Management Dr. Ron Lembke.

RHS of constraints,Inequality signs.

Objective Functionvalue of current solution

Page 38: Linear Programming Operations Management Dr. Ron Lembke.

Solving in Excel

All we have so far is a big ‘what if” tool. We need to tell the LP Solver that this is an LP that it can solve.

Choose ‘Solver’ from ‘Tools’ menu

Page 39: Linear Programming Operations Management Dr. Ron Lembke.

Click “Data” then “Solver”

Page 40: Linear Programming Operations Management Dr. Ron Lembke.

If Solver Doesn’t Appear

Page 41: Linear Programming Operations Management Dr. Ron Lembke.

Solving in Excel

1. Choose ‘Solver’ from ‘Tools’ menu

2. Tell Solver what is the objective function, and which are variables.

3. Tell Solver to minimize or maximize

Page 42: Linear Programming Operations Management Dr. Ron Lembke.
Page 43: Linear Programming Operations Management Dr. Ron Lembke.

Solving in Excel

1. Choose ‘Solver’ from ‘Tools’ menu

2. Tell Solver what is the objective function, and which are variables.

3. Tell Solver to minimize or maximize

4. Add constraints: Click ‘Add’, enter LHS, RHS, choose inequality Click ‘Add’ if you need to do more, or click ‘Ok’ if this

is the last one.

5. Add rest of constraints

Page 44: Linear Programming Operations Management Dr. Ron Lembke.

Add Constraint Dialog Box

Page 45: Linear Programming Operations Management Dr. Ron Lembke.

Constraints Added

Page 46: Linear Programming Operations Management Dr. Ron Lembke.

Assuming Linear

6. You have to tell Solver that the model is Linear. Click ‘options,’ and make sure the ‘Assume Linear Model’ box is checked.

Page 47: Linear Programming Operations Management Dr. Ron Lembke.

Assume Linear

Page 48: Linear Programming Operations Management Dr. Ron Lembke.

Assuming Linear

6. You have to tell Solver that the model is Linear. Click ‘options,’ and make sure the ‘Assume Linear Model’ box is checked.

On this box, checking “assume non-negative” means you don’t need to actually add the non-negativity constraints manually.

7. Solve the LP: Click ‘Solve.’ Look at Results.

Page 49: Linear Programming Operations Management Dr. Ron Lembke.

Solution is Found

When a solution has been found, this box comes up.You can choose between keeping the solution and goingback to your original solution.Highlight the reports that you want to look at.

Page 50: Linear Programming Operations Management Dr. Ron Lembke.

Solution

After clicking on the reports you want generated, they will be generated on new worksheets.

You will return to the workbook page you were at when you called up Solver.

It will show the optimal solution that was found.

Page 51: Linear Programming Operations Management Dr. Ron Lembke.

Optimal Solution

Page 52: Linear Programming Operations Management Dr. Ron Lembke.

Answer Report

Gives optimal and initial values of objective function

Gives optimal and initial values of variables

Tells amount of ‘slack’ between LHS and RHS of each constraint, tells whether constraint is binding.

Page 53: Linear Programming Operations Management Dr. Ron Lembke.

Answer ReportMicrosoft Excel 11.0 Answer ReportWorksheet: [lp_sony.xls]Sheet1Report Created: 1/14/2004 3:30:08 PM

Target Cell (Max)Cell Name Original Value Final Value

$E$2 Objective Actual 12 410

Adjustable CellsCell Name Original Value Final Value

$C$4 Variables DVD 1 30$D$4 Variables mp3 1 40

ConstraintsCell Name Cell Value Formula Status Slack

$E$6 Electronics Actual 240 $E$6<=$G$6 Binding 0$E$7 Assembly Actual 100 $E$7<=$G$7 Binding 0$E$8 DVD Non-Neg Actual 30 $E$8>=$G$8 Not Binding 30

Page 54: Linear Programming Operations Management Dr. Ron Lembke.

Sensitivity Report

Variables: Final value of each variable Reduced cost: how much objective

changes if current solution is changed Objective coefficient (from problem)

Page 55: Linear Programming Operations Management Dr. Ron Lembke.

Sensitivity Report

Variables: Allowable increase:

How much the objective coefficient can go up before the optimal solution changes.

Allowable decreaseHow much the objective coefficient can go

down before optimal solution changes. Up to 24.667, Down to 23.333

Page 56: Linear Programming Operations Management Dr. Ron Lembke.

Sensitivity Report

Constraints Final Value (LHS) Shadow price: how much objective would

change if RHS increased by 1.0 Allowable increase, decrease: how wide a

range of values of RHS shadow price is good for.

Page 57: Linear Programming Operations Management Dr. Ron Lembke.

Sensitivity Report

Microsoft Excel 11.0 Sensitivity ReportWorksheet: [lp_sony.xls]Sheet1Report Created: 1/14/2004 3:30:08 PM

Adjustable CellsFinal Reduced Objective Allowable

Cell Name Value Cost Coefficient Increase$C$4 Variables DVD 30 0 7 3$D$4 Variables mp3 40 0 5 0.25

ConstraintsFinal Shadow Constraint Allowable

Cell Name Value Price R.H. Side Increase$E$6 Electronics Actual 240 1.5 240 60$E$7 Assembly Actual 100 0.5 100 20

Page 58: Linear Programming Operations Management Dr. Ron Lembke.

Limits Report

Tells ranges of values over which the maximum and minimum objective values can be found.

Rarely useful

Page 59: Linear Programming Operations Management Dr. Ron Lembke.

Limits Report

Microsoft Excel 11.0 Limits ReportWorksheet: [lp_sony.xls]Limits Report 2Report Created: 1/14/2004 3:30:08 PM

TargetCell Name Value

$E$2 Objective Actual 410

Adjustable Lower Target Upper TargetCell Name Value Limit Result Limit Result

$C$4 Variables DVD 30 2.377E-12 200 30 410$D$4 Variables mp3 40 2.017E-11 210 40.00 410.000


Recommended