Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Linear

Programming
Post optimal analysis
Duality – example 1
Primal Problem: Dual Problem:
max z = 7x1+ 10x2 min w = 24y1+ 13y2
subject to subject to
y1: 5x1+ 4x2 ≤ 24 x1: 5y1+ 2y2 ≥ 7
y2: 2x1 + 5x2 ≤ 13 x2: 4y1 + 5y2 ≥ 10
x1 , x2 ≥ 0 y1 , y2 ≥ 0
Example 1 – optimal solution (primal problem)
Basic x1 x2 s1 s2 RHS
• Optimal solution:
x1 1 0 5/17 -4/17 4 x1= 4
x2= 1
x2 0 1 -2/17 5/17 1 Z= 38

Z 0 0 15/17 22/17 38

Example 1– optimal solution (dual problem)


Basic y1 y2 s1 s2 RHS
• Optimal solution:
y1 1 0 -5/17 2/17 15/17 y1= 15/17
y2= 22/17
y2 0 1 4/17 -5/17 22/17 Z= 38

w 0 0 -4 -1 38
Dual problem – example 2
Primal Problem: Dual Problem:
max z = 3x1+ 4x2 min w = 6y1+ 40y2 + 7y3
subject to subject to
y1: -2x1+ 3x2 ≤ 6 x1: -2y1+ 5y2 + y3 ≥ 3
y2: 5x1 - x2 ≤ 40 x2: 3y1 - y2 + y3 ≥ 4
y3: x1 + x2 ≤ 7 y1 , y2 , y3 ≥ 0
x1 , x2 ≥ 0
Dual problem – example 3
Primal Problem: Dual Problem:
max : z = c1x1 + c2x2 + …+ cnxn min : w = b1y1 + b2y2 + …+ bmym
Subject to Subject to
a11x1 + a12x2 + …+ a1nxn ≤ b1 a11y1 + a21y2 + …+ am1ym ≥ c1
a21x1 + a22x2 + …+ a2nxn ≤ b2 a12y1 + a22y2 + …+ am2ym ≥ c2
⋮ ⋮
am1x1 + am2x2 + …+ amnxn ≤ bm a1ny1 + a2ny2 + …+ amnym ≥ cn
x1, x2,…, xn ≥ 0 y1, y2,…, ym ≥ 0
Dual problem – example 4
Primal Problem: Dual Problem:
max z = 7x1+ 10x2 - x3 min w = 24y1+ 13y2 + 5y3 + 10y4
subject to subject to
y1: 5x1+ 4x2 ≤ 24 x1: 5y1 + 2y2 + y3 ≥ 7
y2: 2x1 +5x2 + 3x3 = 13 x2: 4y1 + 5y2 - 2y3 + y4 ≤ 10
y3: x1 - 2x2 + x3 ≥ 5 x3: 3y2 + y3 + 2y4 = -1
y4: x2 + 2x3 ≤ 10 y1≥0 , y2 unrestricted, y3≤0 , y4≥0
x1≥0, x2≤0 , x3 unrestricted
Dual problem in general

Primal Dual
max min
ith constraint ≥ type yj ≤ 0
ith constraint ≤ type yj ≥ 0
ith constraint = type yi unrestricted
xj ≥ 0 jth constraint ≥ type
xj ≤ 0 jth constraint ≤ type
xj unrestricted jth constraint = type
Significance of dual problem
1. Mathematically very important
2. Computationally
One model (with fewer constraints) is easy to solve

Primal Dual

3. Economic interpretation of the dual variable (shadow price)


• Shadow price of constraint I gives the rate of change in the objective function per unit
change in the RHS value of the constraints. That is,
• Shadow price of constraints i = δz/ δbi = Dual variable yi
Properties of primal and dual problems
1. Dual of the dual is primal
2. Any feasible value of max z ≤ any feasible value of min w
3. Optimal of z = optimal value of w
4. If primal is unbounded then dual has no solution
5. If dual is unbounded then primal has no solution
Properties of primal and dual problems
(cont’d)
6. From the final tableau of the primal, the optimal solution of the dual can be obtained

• The value of the slack or artificial coefficient in the objective function row in the final optimal primal tableau
gives the optimal value of the associated dual variable.

• Complementary slackness
• Product of the jth decision variable and jth dual slack = 0
• ith slack variable × ith dual variable = 0 at optimal
• If si > 0 then yi = 0
• If yi > 0 then si = 0
Sensitivity analysis
Sensitivity analysis is to answer the following question:

How does the optimal solution change as a coefficient is varied from its
given value?

Why sensitivity analysis is important?


• Many coefficients are estimated
• Want to know the sensitivity of the optimal solution with respect to
these coefficients.
Sensitivity analysis (cont’d)
There are three kinds of such analysis:
• Objective function ranging (coefficient ranging)
• RHS value ranging
• Constraint coefficient ranging

In this course, we shall discuss the first two types of sensitivity analysis
only.
Range of objective function coefficients
Case 1: Non-basic variable
What happens if the coefficient of a non-basic objective function, cj, is changed by an amount of δ?

What range of values for δ is the current solution remains optimal?

Consider the following LP problem:


max z = 20x1+ 10x2
subject to
5x1+ 4x2 ≤ 24
2x1+ 5x2 ≤ 13
x1 , x2 ≥ 0
Range of objective function coefficients (cont’d)
Initial simplex tableau:
Basic x1 x2 s1 s2 RHS
s1 5 4 1 0 24
s2 2 5 0 1 13
Z -20 -10 0 0 0

Final simplex tableau:


Basic x1 x2 s1 s2 RHS
x1 1 4/5 1/5 0 24/5
s2 0 17/5 -2/5 1 17/5
Z 0 6 4 0 96
Range of objective function coefficients (cont’d)

If c2= 10 + δ, what would happen to the coefficients in the objective function row?

We note that in applying the Simplex algorithm, the Row(0) are updated from tableau to tableau in the
following manner:

Row(0) ←Row(0)+ ΣλiRow(i)

That is, Row(0) values are determined solely by row operations of adding multiples of the other rows to
Row(0). Therefore, the term δ should remain unchanged in the final tableau.
Range of objective function coefficients (cont’d)
It follows that the final simplex tableau is given by:

• Hence, the existing basic will remain optimal as


Basic x1 x2 s1 s2 RHS long as 6 – δ ≥ 0 à δ ≤ 6
x1 1 4/5 1/5 0 24/5 • In other words, the solution will remain optimal
as long as c2 ≤ 16
s2 0 17/5 -2/5 1 17/5
• If c2 > 16, then Row(0) coefficient for x2 becomes
Z 0 6-δ 4 0 96 negative and x2 would enter the solution and s2
would become non-basic
Range of objective function
coefficients (cont’d)

Basic x1 x2 s1 s2 RHS
• Case 2: Basic variable
x1 1 4/5 1/5 0 24/5
• What happens if the coefficient of a basic
objective function, cj, is changed by an
amount of δ? s2 0 17/5 -2/5 1 17/5
• If c1 = 20+δ, what would happen to the Z -δ 6 4 0 96
coefficients in the objective function row?
• The final Simplex tableau now becomes
Range of objective function
coefficients (cont’d)

Basic x1 x2 s1 s2 RHS

x1 1 4/5 1/5 0 24/5


• Note that the coefficient in column x1and Row(0)
s2 0 17/5 -2/5 1 17/5 should be eliminated through the following row
operations:
Z 0 6+(4/5) δ 4+ δ/5 0 96+(24/5) δ • Row(0) ←Row(0)+ δ×Row(1)
• This reduces to the following Simplex tableau:
Range of objective function coefficients (cont’d)

Hence, in order for the current solution to remain optimal, we need


6+(4/5)δ ≥ 0
4+δ/5 ≥ 0

It follows that
δ ≥ -7.5
δ ≥ -20

This gives δ ≥ -7.5 or c1 ≥ 12.5.


Range of RHS values
What happens if bi, is changed by an amount of δ?
If b1 = 24+δ, then the final Simplex tableau now becomes

Basic x1 x2 s1 s2 RHS
x1 1 4/5 1/5 0 24/5+ δ/5
s2 0 17/5 -2/5 1 17/5-(2/5)δ
Z 0 6 4 0 96+4δ

That is, the RHS column is replaced by the sum of the


RHS column and δ times the s1 column.
Range of RHS values (cont’d)

Now, in order for the current solution remains


optimal, it must be feasible. That is
24/5 + δ/5 ≥ 0
17/5 – (2/5)δ ≥ 0

This gives -24 ≤ δ ≤ 8.5 or 0 ≤ b1 ≤ 32.5.


Range of RHS values (cont’d)
Similarly, if b2 = 13+δ, then the final Simplex tableau now becomes

Basic x1 x2 s1 s2 RHS
x1 1 4/5 1/5 0 24/5
s2 0 17/5 -2/5 1 17/5+δ
Z 0 6 4 0 96

It follows that
δ ≥ -17/5 or b2 ≥ 9.6
Range of RHS values (cont’d)

In general, for bi ≥ 0, the new RHS col in the final


simplex tableau becomes

• For the ≤ type constraint: RHS + δ ×col of si


• For the ≥ type constraint: RHS - δ ×col of si
• For the = type constraint: RHS + δ ×col of ri

The range of δ can be determined by solving a set of simple linear


inequalities associated with the new RHS values in rows 1 to m.
Soal 1
Tabel berikut merupakan hasil iterasi dari sebuah model
Tugas 3
maksimasi:
a. Untuk setiap kondisi berikut, tentukan nilai dari
paramater c1, c2, dan a sehingga pernyataan berikut
menjadi benar. Basic x1 x2 x3 x4 x5 RHS
b. Tabel simpleks di atas bukan merupakan solusi optimal, x3 -1 1 1 0 0 4
nilai dari fungsi tujuan dapat diperbaiki dengan cara
x4 -2 2 0 1 0 1
menggantikan salah satu basic variable dengan non-
basic variable. Variabel non-basic manakah yang akan x5 a 3 0 0 1 2
keluar sebagai solusi dan variabel basic manakah yang Z c1 2 c2 0 0 10
posisinya akan tergantikan?
c. Jika LP tersebut adalah unbounded, parameter mana
yang menyebabkannya?
d. Jika solusi saat ini adalah optimal dan terdapat beberapa
alternative optimal solutions lainnya, tentukan
alternative optimal solution tersebut!
e. Solusi optimal tunggal telah tercapai.
f. Berapakah nilai opportunity cost untuk variable x2?
Bagaimanakah intepretasi anda terhadap opportunity
cost varible x2 ini?
Sebuah perusahaan menggunakan 3 jenis mesin untuk membuat 3 jenis produk. Soal 2
Setiap unit produk A (x1) harus diproses di mesin 1 (s1) selama 3 jam, mesin 2 (s2)
selama 2 jam, dan mesin 3 (s3) selama 1 jam. Setiap unit produk B (x2) harus
diproses di mesin 1 selama 4 jam, mesin 2 selama 1 jam, dan mesin 3 selama 3
jam. Setiap unit produk C (x3) harus diproses di mesin 1 selama 2 jam, mesin 2
selama 2 jam, dan mesin 3 selama 2 jam. Kontribusi keuntungan tiap produk A, B,
C berturut-turut adalah $30, $40, dan $35. Kapasitas mesin yang tersedia untuk
mesin 1, 2, dan 3 berturut-turut adalah 90, 54, dan 93 jam.
a. Formulasikan permasalahan ini ke dalam Linear Programming!
b. Tabel berikut menunjukkan tabel simpleks optimal dari permasalahan ini. Basic x1 x2 x3 s1 s2 s3 RHS
c. Tentukan optimal production schedule dari permasalahan ini! Apakah ada x2 1/3 1 0 1/3 -1/3 0 12
kemungkinan optimal schedule yang lain selain yang ditunjukkan di tabel x3 5/6 0 1 -1/6 2/3 0 21
tersebut? Jelaskan!
s3 -5/3 0 0 -2/3 -1/3 1 15
d. Berapakah marginal value untuk penambahan 1 jam mesin 1? Pada kisaran
berapakah marginal value ini tetap valid? z 12,5 0 0 7,5 10 0 1215
e. Berapakah nilai opportunity cost untuk produk A? Bagaimanakah intepretasi
anda terhadap opportunity cost produk A ini?
f. Misalkan kontribusi produk A terhadap fungsi tujuan naik dari $30 menjadi
$43, apakah optimal production plan ini akan berubah? Jelaskan!
g. Berapa kisaran perubahan kontribusi margin produk B sehingga solusi optimal
saat ini tetap menjadi optimal?
h. Buatlan model dual untuk kasus ini dan tentukan solusi model dual ini dengan
menggunakan tabel simpleks optimal untuk model primalnya!
Soal 3

Diketahui Tabel simpleks optimal sebagai berikut.


Jika table tersebut adalah solusi optimal untuk permasalahan
berikut,

Basic x1 x2 s1 s2 s3 RHS
Memaksimumkan z = 3x1 + 5x2 s1 0 0 1 1/3 -1/3 2
Terbatas pada x1 £ a
x2 0 1 0 1/2 0 6
2x2 £ b x1 1 0 0 -1/3 1/3 2
3x1 + 2x2 £ c
z 0 0 0 3/2 1 36
x1, x2 ³ 0
a. Tentukan nilai a, b, dan c
b. Buatlah model dual untuk linear programming tersebut!
c. Tentukan kisaran nilai koefisien x1 pada fungsi tujuan
sehingga solusi saat ini tetap menjadi solusi optimal!
Diketahui permasalahan sebagai berikut:
Soal 4
Memaksimumkan z = 3x1 + x2 + 4x3
Terbatas pada 6x1 + 3x2 + 5x3 £ 25
3x1 + 4x2 + 5x3 £ 20
x1, x2, x3 ³ 0
Sedangkan berikut adalah persamaan-persamaan yang terbentuk berdasarkan nilai pada Tabel simpleks
optimal untuk kasus tersebut:
! ! ! #
x1 - "x2 + s -
" 1 " 2
s = "
! $
x2 + x3 - #
s 1 + # 2
s =3
! "
z + 2x2 + s + s = 17
# 1 # 2

a. Tentukan nilai x1, x2, x3, dan z pada kondisi optimal!


b. Susunlah model dual untuk kasus tersebut!
c. Berdasarkan nilai optimal model primalnya, tentukan solusi optimal untuk model dualnya!
d. Tentukan kisaran perubahan koefisien x1 pada fungsi tujuan sehingga solusi saat ini tetap merupakan solusi
optimal!
Thank you

You might also like