Anda di halaman 1dari 26

SISTEM TRANSPORTASI

DAN DISTRIBUSI
MINGGU 2
Teori Network dan Graph, Complexity Analysis

Fandi Afrizal, S.T., M.T.


Minggu Lalu
• Permasalahan Transportasi
• Permasalahan Distribusi logistik
• Location problems and models
Input
• Statis: • Determenistik (pasti)
• Input tidak bergantung pada waktu
• Dinamis
• Masalah yang sudah pasti terjadi
pada saat ini. (yang banyak diulas di
• Input bergantung pada waktu termasuk tuntutan,
biaya, dan lokasi fasilitas Pustaka daskin)
• Model harus secara eksplisit mencakup beberapa
periode waktu
• Probabilistik (tidak pasti)
• Hanya menentukan lokasi fasilitas? NO • Contoh : panggilan ambulans di
• Kapan harus berinvestasi masa mendatang
• Kapan harus menutup fasilitas yang ada, atau
mungkin dipindahkan • Membutuhkan forecast
Single VS Multiple

Single Multiple
• Berasal dari satu produk atau • Berasal dari produk atau layanan
layanan yang homogen dan semua yang heterogeny dan tuntutannya
itu tuntutannya identic berbeda
• Contoh : • Contoh :
• Pengiriman dari satu pabrik ke • Panggilan kritis dan non kritis
cabang • Pabrik dan dealer mobil yang berbeda
Private VS Publik sector problem

Private Publik
• Biaya dan manfaat investasi diukur • Banyak biaya nonmeter harus diperhatikan :
dalam satuan moneter dan umumnya • Menentukan lokasi repositori limbah B3
terjadi pada aktor yang sama. • Menentukan biaya lingkungan
• Perusahaan dan manajemen memiliki • Menentukan lokasi layanan darurat
tujuan yang sama • Nilai dolar dari nyawa yang diselamatkan

• Dalam penentuan lokasi sekolah • Dalam penentuan lokasi sekolah umum : banyak
hal
umum : jumlah siswa yang lulus
Elastic VS Inelastic Demand

Elastic Inelastic
• Tingkat layanan dapat berubah • Strict, susah untuk berubah.
ubah menyesuaikan dengan Konsumen yang harus
demand di pasar menyesuaikan
• Perusahaan yang menyesuaikan
konsumen
Typology of Location Models
Shortest Path
For Example
Algorithm for Finding
the Shortest Path from
s to All Other Nodes
When All Link Costs
Are Nonnegative
(Dijkstra’s Algorithm)
Algorithm for Finding
the Shortest Path from
s to All Other Nodes
When All Link Costs
Are Nonnegative
(Dijkstra’s Algorithm)
Example problem with
Network with nodes Network after node F
initial node labels and
labeled from node A. is labeled permanently.
node A scanned.
Network after node Network after node B Network after node G
D is labeled is labeled permanently. is labeled permanently.
permanently.
Network after node Network after Network after
E is labelled node C is labeled node H is labeled
permanently. permanently. permanently.
Complexity Analysis
Complexity Analysis
• Mengembangkan teori tentang masalah dan algoritme serta persyaratan
waktu dan penyimpanan yang diperlukan untuk menyelesaikan masalah
menggunakan algoritma alternatif
• Teori ini memberitahu kita seberapa cepat waktu eksekusi suatu algoritma
dapat meningkat seiring dengan meningkatnya ukuran masalah
Teori Kompleksitas
• Mendeskripsikan dengan jelas apa artinya memecahkan masalah secara
efisien
• Mengelompokkan masalah
• Memperkirakan jumlah waktu yang diperlukan untuk memecahkan
masalah
Computer being used can execute 106
operations per second

Complexity n=10 n=20 n=40


O(n) 10-5 s 2 x 10-5 s 4 x 10-5 s
O(n2) 10-4 s 4 x 10-4 s 0,0016 s
O(n3) 10-3 s 8 x 10-3 s 0,064 s
O(2n) 10-3 s 1,05 s 12,7 days
O(en) 0,022 s 8,088 min 74,6 centuries!!
Time complexity analysis
Rule : Running Time = ∑ Running Time of all fragments

O(1) O(n) O(n2)


int a; for(i=0;i<n;i++) for(i=0; i<n; i++)
a=5 { {
a++; //simple statement for(j=0; j<n; j++)
{
}
//simple statement
single loop }
}
single loop
function()
{ T(n) = O(1) + O(n) +O(n2) = O(n2)
int a;
O(1)
a=5
a++;
for (i=0; i<n; i++)
{
//simple statements
O(n)
}
for(i=0; i<n; i++)
{ Rule : Condition Statement
for(j=0; j<n; j++) Pick Complexity of condition
{ O(n2) which is worst case
//simple statement
}
}
}
Dijkstra’s Algorithm

Given : Cij = non negative link distance or cost


n = nodes
S = a root node
Find : Shortest path yang berawal di titik S
Node (Vj,Pj) Vj : Minimum Cost menuju j
Pj : Node pendahulu sebelum ke
node j pada jalur dari S ke j
Dijkstra’s Algorithm
The classes P and NP
• P = Polynomial
• NP = Nondetermenistic polynomial
• NP must verify to be “yes” in polynomial time. Such like certificate that is
verifiable in polynomial time
Subclasses of algorithm
• Strongly polynomial
• The time is proportional to a polynomial function of the input size only and does not depend on the
magnitude of the input values.
• Polynomial
• The time is proportional to a polynomial function of the input size and also depends on the maximum number
of bits needed to store the largest data inputs. In other words, the complexity is a polynomial function involving
terms like log C or logU.
• Pseudo-polynomial
• The time is proportional to a polynomial function of the input size and the absolute magnitude of the data
inputs. In other words, the complexity may be a function of such terms as C or U, directly, as well as the
number of nodes or links in the problem instance.
TUGAS
• 2.9
• 2.10
• Mind mapping bab 4
• cari contoh di kehidupan sehari hari dari macam2 big O
• O(1), O(n), O(n2), O(2n)

Anda mungkin juga menyukai