Linear Programming in Practice - FRField's...

11

Click here to load reader

Transcript of Linear Programming in Practice - FRField's...

Page 1: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

1

Linear Programming in Practice

Essential Issue: To model non-linear realitywith linear equations

•Activities•Piece-wise linear approximations•Fixed charges

Another practical questionDuality

Activities

Motivation:

If we use a standard production function

f(X) = Σ ciXi = Zresources output

We are not able to represent typical production function with diminishing marginal returns and non-linear isoquants

Actual Isoquant

Z = Σ ciXi

X10

X2

Page 2: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

2

Activities (continued)

Concept–An activity is a

ƒSpecific way to use resourcesƒin fixed proportions

Physical interpretation is direct, e.g.:–an aircraft using pilots, fuel / ton-km–a machine requiring labor, materials per unit product

Think of activities as intermediates between resources and output

resources activities output

Example: transport process A1 uses 40persons, $20k to produce 100 T-km

0 40 80 120 160X1 (persons)

$0

$10

$20

$30

$40

$50

$60

$70

$80

X2

A1 = 100

A1 = 200

A1 = 300

0 40 8000X1 (persons)

$0

$10

$20

$30

$40

$0

X2

feasibleregion

Page 3: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

3

Two Activities

A1 = (40,20K) ==> 100 T-m

A2 = (10,20K) ===> 50 T-m

A2 = 1 {10, 20} => 50A1 = ½ {20, 10} => 50

Activities

0 10 20 30 40 50 60persons

0

10

20

30

40

50

60

$100

0

100 T-m

A2

A1A1 & (A2 = 1)

Many Activities

0 10 20 30 40 50 600

10

20

30

40

50

60 A1

A2

A3

A4

Page 4: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

4

Engineering Systems Analysis for Design Richard de Neufville, Joel Clark and Frank R. FieldMassachusetts Institute of Technology Intro. to Linear Programming Slide 7 of 18

LP Formulation with Activities

Optimize: Z = Σ ci Ai -- subject to constraintsExample: Alloy optimization–Three possible processes, each with different unit costs–subject to limits on Cr, C content

Cr (kg) C (kg) Profit ($)

Process 1

Process 2

Process 3

6

5

3

4

2

6

30

28

29

Engineering Systems Analysis for Design Richard de Neufville, Joel Clark and Frank R. FieldMassachusetts Institute of Technology Intro. to Linear Programming Slide 8 of 18

Formulation

max Z = 30 P1 + 28 P2 + 29 P3s.t. 6 P1 + 5 P2 + 3 P3 < 26 (Cr)

4 P1 + 2 P2 + 6 P3 < 7 (C)

0 1 2 3 4 5 6 7 82 4 6012345678

0

3

56

p = 30

2 1

3

Page 5: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

5

Engineering Systems Analysis for Design Richard de Neufville, Joel Clark and Frank R. FieldMassachusetts Institute of Technology Intro. to Linear Programming Slide 9 of 18

Piece-Wise Linear Approximations (1)

Motivation:–Returns to scale generally non-linear–Straight line approximations are inaccurate

c1 X1

f (X1)

Engineering Systems Analysis for Design Richard de Neufville, Joel Clark and Frank R. FieldMassachusetts Institute of Technology Intro. to Linear Programming Slide 10 of 18

Piece-Wise Linear Approximations (2)

Concept:–Represent f(X1) with several lines

c1 X1

f (X1)

c1A X1

c1B X1

c1C X1

Page 6: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

6

Piece-wise Linear Approximations

Implementation Notes:

X1 must be redefined as several variables -X1A, X1B, ...These new variables must not overlap, so X1A < X1B, etc.New variables and constraints make the LP larger and, therefore, more expensive

c1A X1A

c1B X1B

c1C X1C

Piece-wise Linear Approximations

Mathematically:

Given: Max Z = f(X1) + 4X2s.t. 3X1 + 6X2 < 8

Piece-wise linear approximation gives:–X1 => X1A + X1B

–X1A, X1B have same aij as X1

–c1 = c1A, c2A

–X1A < cutoff X value between X1A and X1B, X'

Thus: Max Z = c1A X1A + c1B X1B + 4X2s.t. 3 X1A + 3X1B + 6X2 < 8

X1A < X'

Page 7: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

7

Piece-wise Linear Approximations (4)

Key Limitation:–ONLY works for convex feasible region!

Why?–What if c1B > c1A? (see fig)

Max Z = c1A X1A + c1B X1B + 4X2

The LP will select X1Bbefore X1B;

Result may be meaningless! c1A X1A

c1B X1B

Convex Feasible Regions Review:Piecewise linear approximation works when FR is convex

X0

f(x)

Max Y

X0

f(x)

Min C

X0

f(x)

Max Y

X0

f(x)

Min C

Page 8: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

8

Fixed ChargesExample: Warehousing–Cost = fixed rent, etc. + variable–Unless you choose not to operate it!

f(X1) = c0 + c1X1 X1 > 0f(X1) = 0 X1 = 0

LP generally cannot handle fixed chargesException:–All Xi > 0; Xi ≠ 0–then subtract Σc0 and optimize

FR

also feasible!

Duality

Concept:–A "dual" is a mirror-image form to another problem (the "primal")–If primal = max; then dual = minIf primal = min; then dual = max

–Dual contains all information of the primal, but in a different format

–Optimum value of primal = optimum value of dual

Example:–Primal: maximize output subject to budget limitations–Dual: minimize costs subject to output requirements

Page 9: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

9

LP Duality

Mathematics:–Given a Primal:

Optimize: Z = c Xsubject to: A X < > B

–Dual is:Optimize: Y = BTWsubject to: ATW < > cT

Change of dimensionality between primal & dual:–cT and B have different number of variables

Can use duality to:–Reduce size of constraint matrix–Speed up LP solution

LP Duality - Example

–Primal: Max: Z = X1 + 2X2 + 3X3s.t. 4X1 + 2X2 < 5

6X1 + 7X2 + 9X3< 12

–A = 4 2 0 AT = 4 66 7 9 2 7

0 9

–B = 5 BT = 5 1212

–C =1 2 3 CT = 123

Page 10: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

10

LP Duality - Example - continued

–Primal: Max: Z = X1 + 2X2 + 3X3s.t. 4X1 + 2X2 < 5

6X1 + 7X2 + 9X3< 12

–Dual: Min: Y = 5W1 + 12 W2s.t. 4W1 + 6W2 > 1

2W1 + 7W2 > 29W2 > 3

LP Duality - Interpretation of Results

–Primal:Max: Z = 3X1 + X2 + 8X3s.t. X1 + X3 < 4

X1 + X2 + X3 < 72X2 + X3 < 8

–Dual:Min: Y = 4W1 + 7 W2 + 8 W3s.t. W1 + W2 > 3

W2 + 2W3 > 1W1 + W2 + W3 > 8

X* = {0,2,4} SP* = {7.5,0,0.5} OC* = {4.5,0,0}SV* = {0,1,0}Z* = 34

W* = {7.5,0,0.5} dSV* = {4.5,0,0} dSP* = {0,2,4}dOC* = {0,1,0}Y* = 34

Page 11: Linear Programming in Practice - FRField's Pagemsl1.mit.edu/MIB/infosys/2002/LinearProgramminginPractice.pdf · Linear Programming in Practice ... Actual Isoquant Z = ...

11

Dual/Primal Solution Relationships

Primal

Decision Variables

Shadow Prices

Opportunity Costs

Slack Variables

Dual

Shadow Prices

Decision Variables

Slack Variables

Opportunity Costs