Professional Documents
Culture Documents
1
3/7/2017
2
3/7/2017
3
3/7/2017
Example 2 :
•B
A•
4
3/7/2017
Given a directed, weighted graph, G(V, E), start node s, end node v,
Find the minimum total weight path from s to v
kt
4 hh Legend:
tko
4 Edge direct road
1 weight road length
6 2 tkw 3 3 nodes road intersections
2
ust 4 ust = HKUST
7 tko = Tseung Kwan O
pe
3
kt = Kowloon Tong
ch = Choi Hung
ch
tkw = To Kwa Wan
pe = Prince Edward
hh = Hung Hom
Strategy:
Find shortest path to one node;
[all other nodes remain]
Find shortest path to one of the remaining nodes;
Repeat … until done
How?
Upper bound on distance from s to u: d[u]
If Node k has the MIN upper bound
d[k] is the shortest distance from s to k
Select node k to update upper bounds on remaining nodes
5
3/7/2017
Relaxation..
Two cases of relaxation
x 4 y x 4 y
10 18 10 12
Relax( x, y) Relax( x, y)
x 4 y x 4 y
10 14 10 12
Dijkstra’s method..
no yes
Q={} DONE
6
3/7/2017
kt hh
4
4
tko
1
2 tkw 3 3
6
2
ust 0 4
7 pe
3
ch
7
3/7/2017
8
3/7/2017
9
3/7/2017
10
3/7/2017
11
3/7/2017
12
3/7/2017
• Example:
The United Chemical Company is a small producer
of pesticides and lawn care products.
One production area contains a huge drum that
holds up to 100,000 gallons of a poisonous
chemical used in making various insecticides.
The drum is routinely filled to a level somewhere
between 80,000 and 90,000 gallons.
13
3/7/2017
14
3/7/2017
15
3/7/2017
16
3/7/2017
From Node 1 to Node 2, The net flow is 7,000 gallons per minute.
From Node 1 to Node 3, The net flow is 10,000 gallons per minute.
From Node 2 to Node 4, The net flow is 7,000 gallons per minute.
From Node 3 to Node 5, The net flow is 8,000 gallons per minute.
From Node 3 to Node 6, The net flow is 2,000 gallons per minute.
From Node 4 to Node 7, The net flow is 7,000 gallons per minute.
From Node 5 to Node 7, The net flow is 8,000 gallons per minute.
From Node 6 to Node 7, The net flow is 2,000 gallons per minute.
17
3/7/2017
3 2
1 4
1 4
3 5
5
18
3/7/2017
3 2
4
1
1 4
5
3
5
Mathematical Programming
Inputs: n = number of customers including the depot
cij = cost of traveling from customer i to j
Decision variables:
19
3/7/2017
x
(1)
s.t. ij 1 for all j
i 1
n (2)
x
j 1
ij 1 for all i
3 2
1 4
1 4
3 5
5
minimize 2x12+3x13+2x14+3x15+3x23+4x24+...+5x45
20
3/7/2017
2 3
1 4
x
iS jS
ij 1 for every subset S
x
iS jS
ij S 1 for every subset S
2 3
1 4
21
3/7/2017
2 3
S 1,2,3, S 4,5
x13 x14 x23 x24 x53 x54 1 1 4
S 1,4, S 2,3,5 2 3
1. Construction Heuristics
22
3/7/2017
Nearest Neighbor
3 2
1 4
Nodes added Tour
1 4
3 5
2 2
5 2-5 5
1 2-5-1
4 2-5-1-4
2 3 3
3 2-5-1-4-3
2-5-1-4-3-2 2
1
2 4
1
3
5
23
3/7/2017
24
3/7/2017
25
3/7/2017
3. Identify the node pair (i,j) that gives the highest saving sij
26
3/7/2017
2. Improvement Heuristics
1 2
3 4
1 2
3 4
27
3/7/2017
3 2 4
1 4 1
1 4
5 3 5
3
5 5
28
3/7/2017
1 4 4
1
3 5 5
3
5 Remove 1-2 and 3-4 5
3
2 3
1 4 4
1
3 5 5
3
5 Remove 1-2 and 4-5 5
3
2 3
1 2
29
3/7/2017
30
3/7/2017
31
3/7/2017
32
3/7/2017
33
3/7/2017
34
3/7/2017
penggambaran umum:
mesin
1 2 ... n
1 1 ... 1
model matematis:
0, jk pekerjaan ke-i tidak ditugaskanpd mesin ke-j
xij =
35
3/7/2017
berdasar pembatas:
n
xij = 1, i = 1,2,…,n
j=1
n
xij = 1, j = 1,2,…,n
i=1
xij = 0 atau 1
mesin
1 2 3
5 7 9
1 1
14 10 12
Pekerja 2 1
15 13 16
3 1
1 1 1
36
3/7/2017
solusi awal
mesin
1 2 3
5 7 9
1 1
1
14 10 12
pekerjaan 2 1
1
15 13 16
3 1
1
1 1 1
Elemen-elemen nol dibuat dgn mengurangkan
elemen terkecil masing-masing baris (kolom) dr baris
(kolom) yang bersangkutan. Dengan demikian,
matriks cij’ yg baru:
1 2 3
1 0 2 4 p1 = 5
2 4 0 2 p2 = 10
3 2 0 3 p3 = 13
1 2 3
1 0 2 2
2 4 0 0
3 2 0 1
37
3/7/2017
Eksekusi Win QSB, pilih Network Pilih Menu Edit - Node Names,
Modelling – pilih Assigment kemudian edit nama pekerja
Problem. Isi sebagai berikut : dan nama mesin
38
3/7/2017
Klik menu Solve & Analyze – Solve Problem, maka akan tampil sbb. :
39
3/7/2017
40
3/7/2017
41
3/7/2017
42
3/7/2017
Contoh :
Terdapat 2 buah pabrik dengan kapasitas supply masing-masing S1 = 600
dan S2 = 800. Untuk mendistribusdikan produk ke konsumen digunakan
pusat distribusi (T), T1 membutuhkan 200 dan T4 membutuhkan 100
sedangkan T2 memiliki supply 350 dan T3 = 200. Retail di daerah
pemasaran (D), membutuhkan D1 = 500, D2 = 350, D3 = 900. Biaya
transportasi tertera di setiap busur.
43
3/7/2017
44