Top Banner
13/11/2013 1 PENELITIAN OPERASIONAL I (TIN 4109) Lecture 8 LINEAR PROGRAMMING Lecture 8 Outline: Duality Analisa Sensitivitas References: Frederick Hillier and Gerald J. Lieberman. Introduction to Operations Research. 7th ed. The McGraw-Hill Companies, Inc, 2001. Hamdy A. Taha. Operations Research: An Introduction. 8th Edition. Prentice-Hall, Inc, 2007. DUALITAS Hubungan PRIMAL – DUAL Bila x adalah feasible terhadap PRIMAL dan y feasible terhadap DUAL, maka cx yb Nilai objektif problem Max Nilai objektif problem Min DUAL Constraint y A c x 0 y Ax cx Ax b y b cx Teorema Dualitas Bila x * adalah penyelesaian dari PRIMAL dan y * adalah penyelesaian dari DUAL, maka cx * = y * b Bila x 0 feasible terhadap PRIMAL dan y 0 feasible terhadap DUAL sedemikian hingga cx 0 = y 0 b, maka x 0 dan y 0 adalah penyelesaian optimal Menyelesaikan PRIMAL Menyelesaikan DUAL z DUAL FR PRIMAL FR Optimal (PRIMAL DUAL FEASIBLE)
9

PENELITIAN OPERASIONAL I LINEAR · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

Feb 05, 2018

Download

Documents

letruc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

1

PENELITIAN OPERASIONAL I

(TIN 4109)

Lecture 8

LINEAR PROGRAMMING

Lecture 8

• Outline: – Duality – Analisa Sensitivitas

• References: – Frederick Hillier and Gerald J. Lieberman. Introduction

to Operations Research. 7th ed. The McGraw-Hill Companies, Inc, 2001.

– Hamdy A. Taha. Operations Research: An Introduction. 8th Edition. Prentice-Hall, Inc, 2007.

DUALITAS

Hubungan PRIMAL – DUAL

Bila x adalah feasible terhadap PRIMAL dan y feasible terhadap DUAL, maka cx yb

Nilai objektif problem Max Nilai objektif problem Min

DUAL Constraint y A c

x 0 y Ax cx

Ax b y b cx

Teorema Dualitas

● Bila x* adalah penyelesaian dari PRIMAL dan y* adalah penyelesaian dari DUAL, maka cx* = y*b

● Bila x0 feasible terhadap PRIMAL dan y0 feasible terhadap DUAL sedemikian hingga cx0 = y0b, maka x0 dan y0 adalah penyelesaian optimal

Menyelesaikan

PRIMAL

Menyelesaikan

DUAL

z DUAL FR

PRIMAL FR

Optimal

(PRIMAL – DUAL FEASIBLE)

Page 2: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

2

Teorema Dualitas

1. P optimal D optimal

2. P tak terbatas

D tak terbatas

D tidak feasible

P tidak feasible

3. P tidak feasible

D tidak feasible

D tak terbatas/tidak feasible

P tak terbatas/tidak feasible

Both Primal and Dual Infeasible.

, ,

Dual Certificate

Someone tells us x* is an optimal solution. Do we trust them? • Check if x* is feasible? • How to check if it is optimal?

Dual Certificates

• Given x (Claimed to be primal optimal solution) and

• Given y (Claimed to be dual optimal solution).

We can use both to convince ourselves.

1. Check feasibility of x using primal problem

2. Form dual problem and check feasibility of y

3. Check that primal objective value is equal to dual objective value.

Complementary Variable Pairs

Primal Decision Variables

Dual Slack Variables

Primal Slack Variables

Dual Decision Variables

Contoh

0 ,

1

832

Subject to

3 Max

21

21

21

21

xx

xx

xx

xx

0 , , ,

1

8 32

Subject to

3 Max

4321

421

321

21

xxxx

xxx

xxx

xx

z x 1 x 2 x 3 x 4 RHS

z 1 -1 -3 0 0 0

x 3 0 2 3 1 0 8

x 4 0 -1 1 0 1 1

z 1 -4 0 0 3 3

x 3 0 5 0 1 -3 5

x 2 0 -1 1 0 1 1

z 1 0 0 0.8 0.6 7

x 1 0 1 0 0.2 -0.6 1

x 2 0 0 1 0.2 0.4 2

Page 3: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

3

Pada Problem Dual

Hubungan Primal - Dual

Primal

Dual

z x 1 x 2 x 3 x 4 RHS

z 1 -1 -3 0 0 0

x 3 0 2 3 1 0 8

x 4 0 -1 1 0 1 1

z 1 -4 0 0 3 3

x 3 0 5 0 1 -3 5

x 2 0 -1 1 0 1 1

z 1 0 0 0.8 0.6 7

x 1 0 1 0 0.2 -0.6 1

x 2 0 0 1 0.2 0.4 2

ANALISA SENSITIVITAS

Shadow Price

• It is often important for managers to determine how a change in a constraint’s right-hand side changes the LP’s optimal z-value.

• With this in mind, we define the shadow price for the ith constraint of an LP to be the amount by which the optimal z-value is improved—increased in a max problem and decreased in a min problem—if the right-hand side of the ith constraint is increased by 1.

• This definition applies only if the change in the right-hand side of Constraint i leaves the current basis optimal.

Diet Problem Data

FOODS

Diet Problem Data

Food Calories

Total_Fat Protein Vit_A Vit_C

Calcium Price

Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8

Potatoes, Baked 171.5 0.2 3.7 0 15.6 22.7 0.5

Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1

Couscous 100.8 0.1 3.4 0 0 7.2 1

White Rice 102.7 0.2 2.1 0 0 7.9 0.4

Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2

Peanut Butter 188.5 16 7.7 0 0 13.1 0.6

Nutrient Min Max

Calories 2000 2250

Total_Fat 0 65

Protein 50 100

Vit A 5000 50000

Vit C 50 20000

Calcium 800 1600

Page 4: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

4

Diet Problem Setup Diet Problem Dual

What does the dual mean?

Food Calories

Total_Fat Protein Vit_A Vit_C

Calcium Price

Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8

Potatoes, Baked 171.5 0.2 3.7 0 15.6 22.7 0.5

Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1

Couscous 100.8 0.1 3.4 0 0 7.2 1

White Rice 102.7 0.2 2.1 0 0 7.9 0.4

Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2

Peanut Butter 188.5 16 7.7 0 0 13.1 0.6

Nutrient Min Max

Calories 2000 2250

Total_Fat 0 65

Protein 50 100

Vit A 5000 50000

Vit C 50 20000

Calcium 800 1600

Optimal Solutions

Food Opt. Amt. Nutrient Dual (yU) Dual (yL)

Peppers 9.55 Calories 0.000 0.002

Potatoes, Baked 0.95 Total_Fat 0.000 0.000

Tofu 5.39 Protein 0.021 0.000

Couscous 0.00 Vit A 0.000 0.002

White Rice 0.00 Vit C 0.000 0.000

Macaroni,Ckd 11.86 Calcium 0.000 0.008

Peanut Butter 0.00

Shadow Cost of Constraints

How does a “small” change in bi affect the total optimal value?

Linear Programming Problem

(6,11)

Page 5: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

5

Dual Optimum Geometric View

Sensitivity Analysis

1. x* and y* be optimal primal/dual from final dictionary 2. dictionary is assumed non-degenerate.

For a infinitesimally small change d in bj (I.e, bj changes to bj +d) the objective changes by yj * d

What does the dual mean?

Food Calories

Total_Fat Protein Vit_A Vit_C

Calcium Price

Peppers 20 0.1 0.7 467.7 66.1 6.7 0.8

Potatoes, Baked 171.5 0.2 3.7 0 15.6 22.7 0.5

Tofu 88.2 5.5 9.4 98.6 0.1 121.8 1.1

Couscous 100.8 0.1 3.4 0 0 7.2 1

White Rice 102.7 0.2 2.1 0 0 7.9 0.4

Macaroni,Ckd 98.7 0.5 3.3 0 0 4.9 0.2

Peanut Butter 188.5 16 7.7 0 0 13.1 0.6

Nutrient Min Max

Calories 2000 2250

Total_Fat 0 65

Protein 50 100

Vit A 5000 50000

Vit C 50 20000

Calcium 800 1600

Optimal Solutions

Food Opt. Amt. Nutrient Dual (yU) Dual (yL)

Peppers 9.55 Calories 0.000 0.002

Potatoes, Baked 0.95 Total_Fat 0.000 0.000

Tofu 5.39 Protein 0.021 0.000

Couscous 0.00 Vit A 0.000 0.002

White Rice 0.00 Vit C 0.000 0.000

Macaroni,Ckd 11.86 Calcium 0.000 0.008

Peanut Butter 0.00

Primal Solution Dual Solution

Page 6: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

6

31

Contoh: Shadow Price Contoh: Shadow Price

Shadow price jika resource

b1 bertambah 1 unit

b1 ditambah 1 unit menjadi 9

Nilai z bertambah 4/5 (shadow

price) 7 + 4/5 = 39/5

Max x1 3x2

ST 2x1 3x2 x3 8

x1 x2 x4 1

x1 , x2 , x3, x4 0

Soal:

The Dakota Furniture Company manufactures desk, tables, and chairs. The manufacture of each type of furniture lumber and two types of skilled labor: finishing and carpentry. The amount of each resource needed to make each type of furniture is given in Table

At present, 48 bard feet of lumber, 20 finishing hours, and 8 carpentry hours are available. A desk sells for $60, and a table for $30, and a chair for $20. Dakota believes that demand for desks, chairs and tables is unlimited. Since available resource have already been purchased. Dakota wants to maximize total revenue. Do the sensitivity analysis for Dakota problem.

Resource Desk Table Chair

Lumber 8 board ft 6 board ft 1 board ft

Finishing hours 4 hours 2 hours 1.5 hours

Carpentry hours 2 hours 1.5 hours 0.5 hours

0,,

85.05.12

205.1 24

48 6 8 ..

203060

321

321

321

321

321

xxx

xxx

xxx

xxxts

xxxzMax

0,,

205.05.1

305.1 26

60 2 4 8 ..

82048

321

321

321

321

321

yyy

yyy

yyy

yyyts

yyywMin

085.005.1228

085.1022420

2481062848

8 ,0 ,2 ,280

3

2

1

321

s

s

s

xxxz

020105.0105.101

530105.110206

06010210408

10 ,10 ,0 ,280

3

2

1

321

e

e

e

yyyw

Graphical Sensitivity Analysis

• Sensitivity Analysis:

– the investigation of the effect of making changes in the model parameters on a given optimum LP solution.

• Changes in objective coefficients

• Changes in right-hand side of the constraints

Graphical Sensitivity Analysis

Example: Stereo Warehouse

Let x = number of receivers to stock

y = number of speakers to stock

Maximize 50x + 20y gross profit

Subject to 2x + 4y 400 floor space

100x + 50y 8000 budget

x 60 sales limit

x, y 0

Page 7: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

7

Graphical Sensitivity Analysis • Example: Stereo Warehouse

0

50

100

150

200

0 50 100 150 200

Z=2000

Z=3000

Z=3600

Z=3800

A B

C

D

E

Optimal solution ( x = 60, y = 40)

Graphical Sensitivity Analysis Objective-Function Coefficients

0

50

100

150

200

0 50 100 150 200

z = 50x + 20y

x 60 (constraint 3 )

2 4 400x y (constraint 1)

100 50 8000x y (constraint 2)

A B

C

D

D(40, 80)

Graphical Sensitivity Analysis Right-Hand-Side Ranging

0

50

100

150

200

0 50 100 150 200

x 60 (constraint 3 )

100 50 8000x y (constraint 2)

A B I

C

D H

H(60, 280)

DUAL SIMPLEX

Dual Simplex -basic concept-

Variation of simplex method

Dual feasible but not primal feasible

Mirror image of simplex method terkait dengan penentuan leaving dan entering

variable

Mengeliminasi penggunaan artificial variable

Digunakan dalam sensitivity analysis

Hanya digunakan sebagai pelengkap solusi pada dual problem

Dual Simplex -contoh-

Primal Problem Dual Problem

Page 8: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

8

Dual Simplex -langkah pengerjaan-

1. Initialization. – Convert constraints in ≥ to ≤ (by multiplying both sides by -1)

– Add slack variables as needed

– Find a basic solution (Optimal solution is feasible if the values are zero for basic variables and nonnegative for non basic variables)

– Go to feasiblity test.

2. Feasibility test. – If all basic variables are nonnegative, then it is feasible, therefore optimal

– Otherwise, go to iteration.

3. Iterasi a. Determine the leaving variable. Select basic variable with most negative

value.

b. Determine the entering variable. Select non basic variable with most negative coefficient in the leaving variable row.

c. Determine the new basic solution. Solve by Gaussian elimination.

d. Return to feasibility test.

Dual Simplex -latihan soal-

● Contoh:

Min 2x1 + 3x2 + 4x3

s.t.

x1 + 2x2 + x3 3

2x1 – x2 + 3x3 4

x1 , x2 , x3 0

Max -2x1 – 3x2 – 4x3

s.t.

-x1 – 2x2 – x3 + x4 -3

-2x1 + x2 – 3x3 + x5 -4

xi 0

Dual Simplex -latihan soal-

z x1 x2 x3 x4 x5 RHS

z 1 2 3 4 0 0 0

x4 0 -1 -2 -1 1 0 -3

x5 0 -2 1 -3 0 1 -4

z x1 x2 x3 x4 x5 RHS

z

x…

x…

z x1 x2 x3 x4 x5 RHS

z

x…

x…

Lecture 9 – Preparation

• Materi:

– Integer Linear Programming

Page 9: PENELITIAN OPERASIONAL I LINEAR  · PDF filePENELITIAN OPERASIONAL I ... Contoh: Shadow Price Contoh: Shadow Price ... Mengeliminasi penggunaan artificial variable

13/11/2013

9