You are on page 1of 27

Operations Research

Industrial engineering
DYNAMIC
PROGRAMMING

12/07/2021 Operations Research 2


Characteristics of dynamic
programming problem
1. The problem can be divided into stages,
with a policy decision required at each
stage
2. Each stage has a number of states
associated with it
3. The effect of the policy decision at each
stage is to transform the current state
into a state associated with the next
stage (possibly according to a probability
distribution)
12/07/2021 Operations Research 3
Characteristics of dynamic
programming problem
4. The solution procedure is designed to find
an optimal policy for the overall problem, i.e.,
a prescription of the optimal policy decision
at each stage for each of the possible states
5. Given the current state, an optimal policy for
the remaining stages is independent of the
policy adopted in precious stages (this is the
principle of the optimality for dynamic
programming)
6. The solution procedure begins by finding the
optimal policy for the last stage
12/07/2021 Operations Research 4
Characteristics of dynamic
programming problem
7. A recursive relationship that identifies
the optimal policy for stage n, given
the optimal policy for stage (n + 1), is
available

12/07/2021 Operations Research 5


n
Xn

f  S   min cSX n  f
* *
n 1  X n 
N = number of stages
n = label for current stage (n = 1, 2,
…, N)
Sn = current state for stage n
Xn = decision variable for stage n
Xn* = optimal value of Xn (given Sn)

12/07/2021 Operations Research 6


n
Xn

f  S   min cSX n  f
* *
n 1  X n 
 f n  S n , X=n  contribution of stage n, n +
1, …, N to the objective function if the
system starts in state Sn at stage n,
the immediate decision id Xn, and
optimal decisions are made thereafter

n
*

f  Sn   f n Sn , X *
n 

12/07/2021 Operations Research 7


n
Xn

f  S   min cSX n  f
* *
n 1  X n 
The recursive relationship will always
be of the form

f  S n   max f n  S n , X n 
n
*
Xn

atau
f  S n   min f n  S n , X n 
n
*
Xn

12/07/2021 Operations Research 8


Characteristics of dynamic
programming problem
8. When we use this recursive
relationship, the solution procedure
moves backward stage by stage –
each time finding the optimal policy
for that stage – until it finds the
optimal policy starting at the initial
stage
Xn fn(Sn, Xn)
Sn X1 X2 X3 fn*(Sn) Xn*
S1
S2
S3
12/07/2021 Operations Research 9
Contoh 1
Sebuah perusahaan mempunyai usulan
dari ketiga pabriknya untuk
kemungkinan mengembangkan sarana
produksi. Perusahaan tersebut
menyediakan anggaran $5 juta untuk
alokasi pada ketiga pabrik. Setiap
pabrik diminta untuk menyampaikan
usulannya yang memberikan jumlah
biaya (c) dan jumlah pendapatan (R)
untuk setiap usulan.
12/07/2021 Operations Research 10
Contoh 1
Pabrik 1 Pabrik 2 Pabrik 3
Usulan c1 R1 c2 R2 c3 R3
1 0 0 0 0 0 0
2 1 5 2 8 1 3
3 2 6 3 9
4 4 12

12/07/2021 Operations Research 11


Contoh 1 P2
U1

P1 P3
U1 U1

P2
U2

P1
P E
U2

P2
U3

P1 P3
U3 U2

P2
U4
12/07/2021 Operations Research 12
Contoh 1: stage 1
X1 f1(S1, X1)
S1 0 1 2 f1*(S1) X1*
0 0 0 0
1 0 5 5 1
2 0 5 6 6 2
3 0 5 6 6 2
4 0 5 6 6 2
5 0 5 6 6 2

12/07/2021 Operations Research 13


Contoh 1: Stage 2
X2 f2(S2, X2)
S2 0 2 3 4 f2*(S2) X2*
0 0 0 0
1 5 5 0
2 6 8 8 2
3 6 13 9 13 2
4 6 14 14 12 14 2 atau 3
5 6 14 15 17 17 4

12/07/2021 Operations Research 14


Contoh 1: Stage 3
X3 f3(S3, X3)
S3 0 1 f3*(S3) X3*
5 17 17 17 0 atau 1

Dana yang tersedia $5 juta dimanfaatkan semua


Alokasi dana pabrik 1 – pabrik 2 – pabrik 3
◦1–4–0
◦1–3–1
◦2–2–1
Total pendapatan = $17 juta

12/07/2021 Operations Research 15


Contoh 1: Rekursif Mundur
X3 f3(S3, X3)
S3 0 1 f3*(S3) X3*
0 0 0 0
1 0 3 3 1
2 0 3 3 1
3 0 3 3 1
4 0 3 3 1
5 0 3 3 1

12/07/2021 Operations Research 16


Contoh 1: Rekursif Mundur
X2 f2(S2, X2)
S2 0 2 3 4 f2*(S2) X2*
0 0 0 0
1 3 3 0
2 3 8 8 2
3 3 11 9 11 2
4 3 11 12 12 12 3 atau 4
5 3 11 12 15 15 4

12/07/2021 Operations Research 17


Contoh 1: Rekursif Mundur
X1 f1(S1, X1)
S1 0 1 2 f1*(S1) X1*
5 15 17 17 17 1 atau 2

Dana yang tersedia $5 juta dimanfaatkan semua


Alokasi dana pabrik 1 – pabrik 2 – pabrik 3
◦1–3–1
◦1–4–0
◦2–2–1
Total pendapatan = $17 juta

12/07/2021 Operations Research 18


Contoh 2
Suatu organisasi kesehatan dunia
menyelenggarakan program peningkatan
kepedulian pada kesehatan dan memberikan
pendidikan kesehatan di beberapa negara
terbelakang
Organisasi tersebut memiliki 5 tim medis yang
siap ditugaskan di 3 negara
Satu negara paling tidak harus didatangi 1 tim
medis
Performansi diukur dengan penambahan
umur hidup
12/07/2021 Operations Research 19
Contoh 2
Thousands of Additional Person-
Years of Life
Number of Country
Medical Teams 1 2 3
1 45 20 50
2 70 45 70
3 90 75 80
4 105 110 100
5 120 150 130

12/07/2021 Operations Research 20


Contoh 2: Stage 3
X3 f3(S3, X3)
S3 1 2 3 f3*(S3) X3*
1 45 45 1
2 45 70 70 2
3 45 70 90 90 3

12/07/2021 Operations Research 21


Contoh 2: Stage 2
X2 f2(S2, X2)
S2 1 2 3 f2*(S2) X2*
2 65 65 1
3 90 90 90 1 atau 2
4 110 115 120 120 3

12/07/2021 Operations Research 22


Contoh 2: Stage 1
X1 f1(S1, X1)
S1 1 2 3 f1*(S1) X1*
5 170 160 145 170 1

Alokasi Tim Medis


◦1–3–1
◦ Total additional person-years of life =
170.000

12/07/2021 Operations Research 23


Contoh 2: asumsi suatu negara boleh
tidak dikunjungi tim medis sama sekali
X3 f3(S3, X3)
S3 0 1 2 3 4 5 f3*(S3) X3*
0 0 0 0
1 0 45 45 1
2 0 45 70 70 2
3 0 45 70 90 90 3
4 0 45 70 90 105 105 4
5 0 45 70 90 105 120 120 5

X2 f2(S2, X2)
S2 0 1 2 3 4 5 f2*(S2) X2*
0 0 0 0
1 45 20 45 1
2 70 65 45 70 1
3 90 90 90 75 90 0 atau 1 atau 2
4 105 110 115 120 110 120 3
5 120 125 135 145 155 150 155 4

12/07/2021 Operations Research 24


Contoh 2: asumsi suatu negara boleh
tidak dikunjungi tim medis sama sekali
X1 f1(S1, X1)
S1 0 1 2 3 4 5 f1*(S1) X1*
5 155 170 160 150 145 130 170 1

Alokasi tim medis


◦1–3–1
◦ Total additional person-years of life =
170.000

12/07/2021 Operations Research 25


Soal 1
A college student has 7 days remaining before final
examinations begin in her four courses, and she wants
to allocate this study time as effectively as possible.
She needs at least 1 day on each course, and she
likes to concentrate on just one course each day, so
she wants to allocate 1, 2, 3, or 4 days to each course.
Having recently taken an operations research course,
she decides to use dynamic programming to make
these allocations to maximize the total grade points to
be obtained from four courses. She estimates that the
alternative allocations for each course would yield the
number of grade points shown in the table. Solve this
problem by dynamic programming.

12/07/2021 Operations Research 26


Soal 1
estimated grade points
number of courses
study days 1 2 3 4
1 3 5 2 6
2 5 5 4 7
3 6 6 7 9
4 7 9 8 9

12/07/2021 Operations Research 27

You might also like