SlideShare une entreprise Scribd logo
1  sur  26
Real
System
Pemodelan
System
Model
Simulasi
Pemrograman
Simulasi
Experiment/
Running
Y
output
input
Validasi
Terbagi 2 :
- Program Programming
- Program Modeling
N
SIMULASI SISTEM
Simulasi sistem terdiri dari :
1. Simulasi Sistem Diskrit, bila hanya didefinisikan pd titik-titik
waktu tertentu :
a. Kejadian Diskrit (Event Based Simulation)
b. Pendekatan Aktivitas (Activity Based Simulation)
c. Process Interaction Approach
d. Three Phase Approach
2. Simulasi Sistem Kontinyu, merupakan fungsi kontinyu dari
waktu :
a. Model Sistem Kontinyu :
- Sistem Statis  state variables independen terhadap waktu
- Sistem Dinamis  state variables merupakan fungsi waktu
b. Sistem umpan balik
c. Metode analog
Software Simulasi
Secara kasar software tools utk membangun discrete event
simulation dapat dikategorikan kedlm empat kategori :
1. General purpose languages
– C, Pascal, FORTRAN, C++, ADA, Java, dll.
2. Event Scheduled Simulation Languages
– SLAM, SIMAN, SIMPAS, SIM++, JAVASIM, dll,
3. Process Oriented Simulation Languages
– CSIM, EZSIM, GPSS, SIMAN, SLAM, GASP, JAVASIM dll.
4. Application Oriented Simulators
– Opnet, Comnet III, Tangram II, ns-2, Qualnet, Jade, dll.
Software tools utk membangun kontinyu simulation dapat
dikategorikan kedlm : VENSIM, SEESIM, Dynamo dll
Bagaimana Simulasi Diskrit Berjalan……..
(Programming Simulation)
– Time-driven: simulasi berjalan pd interval waktu
tertentu/fixed (mis. state ditentukan pada saat t, t + ∆t,
t + 2 ∆t, …)
 Time-based simulation
– Event-driven: simulasi berjalan dari event-ke-event
(mis. state ditentukan pd titik waktu dari event
berikutnya)
 Event-based simulation
1. Simulasi Diskrit
Contoh :
Mensimulasikan Discrete Event System (Event Approach) 
pendekatan kejadian yakni pengembangan model simulasi didasarkan
pd adanya kejadian yg terjadi pd sistem
• States
Kumpulan variabel-variabel yg diperlukan utk karakterisasi sistem pada
sembarang titik waktu
• Entities
Objek-objek yg diproses dalam simulasi – mis. packet atau panggilan
telepon
• Attributes
Karakteristik dari entities (mis., panjang paket, tipe dan tujuan)
• Resources
Substansi/items dimana entities menduduki atau menggunakan (mis., buffer
space pd router, tokens pd FDDI network, bandwidth pd suatu link)
• Activities
Durasi waktu dimana panjangnya diketahui saat dimulai. Misalnya, waktu
transmisi dari suatu paket pd suatu link
• Delay
Durasi waktu dg panjang yg tdk terspesifikasi yg tdk diketahui sebelum
selesai. misalnya – waktu perjalanan suatu paket dari node A ke node B dlm
suatu jaringan
• Utk mengimplementasikan suatu event scheduling simulasi
perlu membangun suatu event list, secara tdk langsung perlu
membangun suatu deretan events
• Perhatikan contoh antrian Single Server (M/M1) – misalnya
pada proses permesinan.
• Ada EVENT bila ada job Datang dan Pergi (selesai di proses)
• Ada ACTIVITY bila job tsb di Proses`
A M
Job in servise
Job AntriArrive
Departure
Batas Sistem
Mesin/Proses
D
• Model
– IID Exponential interarrival time dg mean 1/λ
– IID Exponential service time dg mean 1/µ
• Ingin mendapatkan mean job delay dlm antrian
– Solusi analitis  mean waiting time = ρ/ (µ - λ)
Adapun representasi komputasinya sbb :
Misal data waktu kedatangan (A) dan waktu permesinan (M) :
A1=55 A2=32 A3=24 A4=40 A5=12 A6=29 …… dstnya
S1=43 S2=36 S3=34 …..dstnya
Catatan :
data2 tsb diperoleh dari hasil Pembangkitan Bilangan Random
(Random Number Generator) berdasarkan distribusi kedatangan
dan proses (pelayanan)  Minggu depan akan di jelaskan !!!
0 t1 t2 t3C1 C2 time
s1 s2 s3s0 s4 s5
A1 A2 A3
S1 S2
Illustrasi sistem antrian M/M/1 dengan pendekatan event time
Keterangan :
ti : wkt kedatangan customer ke i (to = 0)
Ai = ti – ti-1 = antar wkt kedatangan antara (i-1) dan customer ke I
Si : time server actually spends serving customer ke i (termasuk customer
delay pd antrian)
Di : delay in queue customer ke I
Ci : ti + Di + Si = wkt selesai melayani customer ke i dan pergi dari sistem
A1 datang pd wkt simulasi menit ke 55
A2 datang pd wkt simulasi menit ke 32 kemudian atau menit ke 87 (55 + 32) dst
A1 dilayani selama 43 menit (S1), selesai pd menit 98 (55 + 43) sehingga A2 yg
datang pd menit ke 87 menunggu hingga menit 98 (selama 11 menit) atau
menunggu hingga A1 selesai dilayani
A2 mulai dilayani pada menit ke 98 selama 36 menit (S2) dan selesai pd menit ke
134 (98 + 36) …..dstnya
Time = 0
System
System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
0
55
0 (8.00)
0 0 0
0 0 0
S
Time = 55
System
System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
Time = 87 System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
S
S
1
1
0
1
55
87
55
1
87
1
0
0
0
0
98
87
98
111
87
1
customer
2
customer
1
Time = 98
System
System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
98
111
134
2 11 11
1 0 98
S
Time = 111 System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
Time = 134
System
System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
S
S
1
1
1
0
11
1
134
11
1
2
134
3
11
34
11
34
111 134
151
168
151
2
customer
3
customer
2
customer
3
Time =
System
System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
S
Time = System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
Time =
System
System State
Status Number in Time of Last
Queue Event
Time of Arrival
A
D
Clock Event List
Statistical Counters
Number Total Area
delay delay under Q(t)
S
S
customer
customer
customer
Pemrograman Simulasi Diskrit
Komponen & Pengorganisasian Model Pemrograman
• System State
menggambarkan keadaan sistem pd suatu waktu tertentu
• Simulation Clock
Jam simulasi yang menentukan waktu terjadinya event
• Even List
Daftar yg memuat kejadian berikutnya
• Statistical Counter
variabel2 yg dipakai utk menghitung statistik (memberikan informasi
statistik tentang performance sistem)
• Initialization Routine
sub-rutin untuk memulai/menolkan waktu simulasi
• Timing Routine
sub-rutin utk menentukan event berikutnya dan melanjutkan jam
simulasi untuk event berikutnya
• Event Routine
sub-rutin utk meng-update state (keadaan) sistem ketika suatu
event terjadi
• Report Generator
sub-rutin estimasi perhitungan (dari statistical counter) dan mencetak
laporan
• Main Program
sub-program untuk memanggil timing routin untuk menentukan event
berikutnya dan meng-update keadaan sistem
Hubungan logical (flow control) dari masing-masing
komponen tersebut sebagai berikut :
Hubungan Logical (Flow Chart)
1. Set simulation clock = 0
2. Initialize system state and
statistical counters
3. Initialize event list
1. Call the timing routine
2. Call event routine i
1. Update system state
2. Update statistical counters
3. Generate future events and
add to the event list
1. Compute estimates of interest
2. Print Report
1. Determine the next
event type, misal i
2. Advance the
simulation clock
Is simulation
over ?
No
Yes
Initialization
Routine
Main
Program
Event
Routine i
Report
Generator
Timing Routine
Generate random
variates
Library Routine
Pemrograman (Bahasa Program FORTRAN) :
Beberapa asumsi tentang single-server queueing system yaitu waktu antar
kedatangan konsumen berdistribusi exponential, misal rata-rata 1 menit &
waktu pelayanan berdistribusi eksponential dgn rata-rata 0,5 menit. Simulasi
berhenti jika jumlah konsumen yg dilayani n = 1000 orang.
a. Event Deskripsi :
- Kedatangan / Arrival (A) = 1
- Kepergian / Departure (D) = 2
b. Sub – Routine :
Sub - Program Purpose
INIT
TIMING
ARRIVE
DEPART
REPORT
EXPON (RMEAN)
Initialisasi routine
Timing routine
Event routine (1)
Event routine (2)
Laporan simulasi (dipanggil ketika simulasi
selesai n = 1000)
Distribusi eksponential dgn rata-rata RMEAN
(λ = 1 dan μ = 0,5)
Definisi
MARRVT
MSERVT
TOTCUS
Waktu rata-rata antar kedatangan
Waktu pelayanan rata-rata
Jumlah total n yang selesai dilayani
c. Input Parameter :
d. Modeling variables :
Definisi
ANIQ
DELAY
NEVNTS
NEXT
NIQ
NUMCUS
RMEAN
RMIN
STATUS
TARRVL(1)
TIME
TLEVNT
TNE(1)
TOTDEL
U
Fungsi dari grafik jumlah dalam antrian
Lamanya customer dalam antrian
Jumlah event dalam simulasi (2 event yakni datang & pergi)
Jenis event yg terjadi berikutnya
Jumlah customer dalam antrian
Jumlah customer yg telah menyelesaikan waktu tunggunya
Rata-rata dari distribusi eksponential yg digunakan
Utk menyatakan event yg akan terjadi utk jangka yg masih lama
Status = 0 jika server idle dan staus = 1 jika sibuk
Waktu kedatangan customer ke I
Jam simulasi
Waktu kejadian terakhir
Wkt perubahan dari waktu sekarang ke waktu berikutnya
Total customer yg mengalami antrian
Variabel random berdistribusi uniform antara 0 dan 1 (utk
pembangkitan bilangan random)
Definisi
AVGDEL
AVGNIQ
Waktu antrian rata-rata
Panjang antrian rata-rata
e. Output Variables :
PEMROGRAMAN FORTRAN :
1. SUB-ROUTINE PROGRAM UTAMA
*** MAIN PROGRAM
INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS
REAL ANIQ, MARRVT, MSERVT, TARRVL(100), TIME, TNE(2), TOTDEL
COMMON /MODEL/ ANIQ, MARVT, MSERVT, NEVNTS, NEXT, NIQ,
NUMCUS, STATUS, TIME, TLEVNT, TNE, TOTCUS, TOTDEL
*** SPECIFY THE NUMBER OF EVENT TYPES FOR THE TIMING ROUTINE
NEVNTS=2
*** READ INPUT PARAMETERS
REALD 10, MARRVT, MSERVT
10 FORMAT (2F, 10.0)
READ 20, TOTCUS
20 FORMAT (I 10)
Deklarasi
*** INITIALIZE THE SIMULATION
CALL INIT
*** DETERMINE THE NEXT EVENT
30 CALL TIMING
*** CALL THE APPROPRIATE EVENT ROUTINE
GO TO (40, 50), NEXT
40 CALL ARRIVE
GO TO 60
50 CALL DEPART
*** IF THE SIMULATION IS OVER, CALL THE REPORT GENERATOR AND END THE
*** SIMUALTION, IF NOT, CONTINUE THE SIMULATION
60 IF(NUMCUS.LT. TOTCUS) GO TO 30
CALL REPORT
STOP
END
2. SUB-ROUTINE INITIALISATION :
SUBROUTINE INIT
INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS
REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL
COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS,
1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL
*** INITIALIZE THE SIMULATION CLOCK
TIME=0
.
*** INITIALIZE THE ATATE VARIABLES
STATUS=0
NIQ=0
TLEVNT=0
*** INITIALIZE THE STATISTICAL COUNTERS
NUMCUS=0
TOTDEL=0
ANIQ=0
*** INITIALIZE THE EVENT LIST. SINCE NO CUSTOMERS ARE PRESENT, THE TIME OF THE
*** NEXT DEPARTURE (SERVICE COMPLETION) IS SET TO ‘INFINITY.’
TNE(1)=TIME+EXPON(MARRVT)
TNE(2)=1.E+30
RETURN
END
3. SUB-ROUTINE TIMING :
SUBROUTINE TIMING
INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS
REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL
COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS,
1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL
RMIN=1.E+29
NEXT=0
*** DETERMINE THE EVENT TYPE OF THE NEXT EVENT TO OCCUR
DO 10 I=1.NEVNTS
IF (TNE(I).E.RMIN) GO TO 10
RMIN=TNE(I)
NEXT=I
10 CONTINUE
.
*** IF THE EVENT LIST IS EMPTY (1.E., NEXT=0), STOP THE SIMULATION
*** OTHERWISE, ADVANCE THE SIMULATION CLOCK
IF (NEXT, GT.0) GO TO 30
PRINT 20
20 FORMAT (1h1, 5X, ‘EVENT LIST EMPTY’)
STOP
30 TIME=TNE(NEXT)
RETURN
END
FLOWCHART SUBROUTINE ARRIVE
Subroutine
ARRIVE
Schedule the next arrival
event
Set DELAY = 0 for this
customer and gather statistics
Add 1 to the number of
customers delayed
Make server busy
Schedule a departure
event for this customer
Return
Update area under the
number in queue function
Add 1 to the number in
queue
Store the time of arrival
of this customer
Return
4. SUB-ROUTINE ARRIVE :
SUBROUTINE ARRIVE
INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS
REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL
COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS,
1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL
***
FLOWCHART SUBROUTINE DEPART
Subroutine
DEPART
Update area under the
number in queue function
Subtract 1 from the number in
queue
Compute delay of
customer entering service
and gather statistics
Add 1 to the number of
customers delayed
Schedule a departure
event for this customer
Return
Make server busy
Set the time of the next
departure to infinity
Return
5. SUB-ROUTINE DEPART :
SUBROUTINE DEPART
INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS
REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL
COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS,
1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL
***
6. SUB-ROUTINE REPORT :
SUBROUTINE REPORT
INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS
REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL
COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS,
1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL
***
7. SUB-ROUTINE FUNGSI EXPONENTIAL :
FUNCTION EXPON(RMEAN)
REAL RMEAN, U
*** GENERATE A U(0,1) RANDOM VARIABLE, THE FORM OF THIS STATEMENT DEPENDS
*** ON THE COMPUTER USED
U=RANUN (Z)
*** GENERATE AN EXPONENTIAL RANDOM VARIABLE WITH MEAN RMEAN
EXPON=-RMEAN*ALOG (U)
RETURN
END
8 . OUTPUT HASIL SIMULASI :
-------------------------------------------------------------------------
SINGLE-SERVER QUEUEING SYSTEM
REAL RMEAN, U
MEAN INTERARRIVAL TIME : 1.000 MINUTES
MEAN SERVICE TIME : .500 MINUTES
NUMBER OF CUSTOMERS : 1000
AVERAGE DELAY IN QUEUE : .497 MINUTES
AVERAGE NUMBER IN QUEUE : .500

Contenu connexe

Tendances

Go Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital Moka
Go Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital MokaGo Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital Moka
Go Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital MokaFahmiZulmeinidar1
 
SILABUS STATISTIKA DASAR
SILABUS STATISTIKA DASARSILABUS STATISTIKA DASAR
SILABUS STATISTIKA DASARrizka_safa
 
PPT RANCANGAN PENELITIAN
PPT RANCANGAN PENELITIAN PPT RANCANGAN PENELITIAN
PPT RANCANGAN PENELITIAN CutMeutia3
 
Modul 11 Model Matematika
Modul 11 Model MatematikaModul 11 Model Matematika
Modul 11 Model MatematikaArif Rahman
 
Simulasi Sistem Antrian Kasir Supermarket - Final Project
Simulasi Sistem Antrian Kasir Supermarket - Final ProjectSimulasi Sistem Antrian Kasir Supermarket - Final Project
Simulasi Sistem Antrian Kasir Supermarket - Final ProjectSiti Farida
 
Metode Simpleks - Riset Operasional
Metode Simpleks - Riset OperasionalMetode Simpleks - Riset Operasional
Metode Simpleks - Riset OperasionalLelys x'Trezz
 
Scm 05 strategi supply chain
Scm 05   strategi supply chainScm 05   strategi supply chain
Scm 05 strategi supply chainAbrianto Nugraha
 
Pengukuran waktu kerja
Pengukuran  waktu kerjaPengukuran  waktu kerja
Pengukuran waktu kerjaAmsori Alians
 
Makalah Angka Indeks Tertimbang & Tak Tertimbang
Makalah Angka Indeks Tertimbang & Tak TertimbangMakalah Angka Indeks Tertimbang & Tak Tertimbang
Makalah Angka Indeks Tertimbang & Tak Tertimbangnaufals11
 
Pengertian dasar dalam_statistika(1)
Pengertian dasar dalam_statistika(1)Pengertian dasar dalam_statistika(1)
Pengertian dasar dalam_statistika(1)rizka_safa
 
Laporan Pratikum analisis regresi linier sederhana
Laporan Pratikum analisis regresi linier sederhanaLaporan Pratikum analisis regresi linier sederhana
Laporan Pratikum analisis regresi linier sederhanagita Ta
 
Pengukuran kerja tidak langsung
Pengukuran kerja tidak langsungPengukuran kerja tidak langsung
Pengukuran kerja tidak langsungDeni Irawan
 
Pengantar probabilitas
Pengantar probabilitasPengantar probabilitas
Pengantar probabilitasniar100
 
RPL 1 (Lama) - Pengujian Perangkat Lunak
RPL 1 (Lama) - Pengujian Perangkat LunakRPL 1 (Lama) - Pengujian Perangkat Lunak
RPL 1 (Lama) - Pengujian Perangkat LunakAdam Mukharil Bachtiar
 

Tendances (20)

Ukuran Keruncingan
Ukuran KeruncinganUkuran Keruncingan
Ukuran Keruncingan
 
Go Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital Moka
Go Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital MokaGo Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital Moka
Go Digital 2 - Tutorial Penggunaan Aplikasi Pembukuan Digital Moka
 
SILABUS STATISTIKA DASAR
SILABUS STATISTIKA DASARSILABUS STATISTIKA DASAR
SILABUS STATISTIKA DASAR
 
PPT RANCANGAN PENELITIAN
PPT RANCANGAN PENELITIAN PPT RANCANGAN PENELITIAN
PPT RANCANGAN PENELITIAN
 
Modul 11 Model Matematika
Modul 11 Model MatematikaModul 11 Model Matematika
Modul 11 Model Matematika
 
6.1. PENGUKURAN WAKTU KERJA TIDAK LANGSUNG METODE MTM
6.1. PENGUKURAN WAKTU KERJA TIDAK LANGSUNG METODE MTM6.1. PENGUKURAN WAKTU KERJA TIDAK LANGSUNG METODE MTM
6.1. PENGUKURAN WAKTU KERJA TIDAK LANGSUNG METODE MTM
 
Teori antrian
Teori antrianTeori antrian
Teori antrian
 
Model antrian
Model antrianModel antrian
Model antrian
 
Simulasi Sistem Antrian Kasir Supermarket - Final Project
Simulasi Sistem Antrian Kasir Supermarket - Final ProjectSimulasi Sistem Antrian Kasir Supermarket - Final Project
Simulasi Sistem Antrian Kasir Supermarket - Final Project
 
Metode Simpleks - Riset Operasional
Metode Simpleks - Riset OperasionalMetode Simpleks - Riset Operasional
Metode Simpleks - Riset Operasional
 
Scm 05 strategi supply chain
Scm 05   strategi supply chainScm 05   strategi supply chain
Scm 05 strategi supply chain
 
Pengukuran waktu kerja
Pengukuran  waktu kerjaPengukuran  waktu kerja
Pengukuran waktu kerja
 
Makalah Angka Indeks Tertimbang & Tak Tertimbang
Makalah Angka Indeks Tertimbang & Tak TertimbangMakalah Angka Indeks Tertimbang & Tak Tertimbang
Makalah Angka Indeks Tertimbang & Tak Tertimbang
 
Pengertian dasar dalam_statistika(1)
Pengertian dasar dalam_statistika(1)Pengertian dasar dalam_statistika(1)
Pengertian dasar dalam_statistika(1)
 
Laporan Pratikum analisis regresi linier sederhana
Laporan Pratikum analisis regresi linier sederhanaLaporan Pratikum analisis regresi linier sederhana
Laporan Pratikum analisis regresi linier sederhana
 
Pengukuran kerja tidak langsung
Pengukuran kerja tidak langsungPengukuran kerja tidak langsung
Pengukuran kerja tidak langsung
 
PPT SPSS-Statistika
PPT SPSS-StatistikaPPT SPSS-Statistika
PPT SPSS-Statistika
 
Pengantar probabilitas
Pengantar probabilitasPengantar probabilitas
Pengantar probabilitas
 
RPL 1 (Lama) - Pengujian Perangkat Lunak
RPL 1 (Lama) - Pengujian Perangkat LunakRPL 1 (Lama) - Pengujian Perangkat Lunak
RPL 1 (Lama) - Pengujian Perangkat Lunak
 
Teori antrian
Teori antrianTeori antrian
Teori antrian
 

Similaire à iv. minggu keempat

Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
 
A calculus of mobile Real-Time processes
A calculus of mobile Real-Time processesA calculus of mobile Real-Time processes
A calculus of mobile Real-Time processesPolytechnique Montréal
 
Foundations and methods of stochastic simulation
Foundations and methods of stochastic simulationFoundations and methods of stochastic simulation
Foundations and methods of stochastic simulationSpringer
 
Discrete Event Simulation.ppt
Discrete Event Simulation.pptDiscrete Event Simulation.ppt
Discrete Event Simulation.pptvinukorekar
 
Analysis of algorithn class 2
Analysis of algorithn class 2Analysis of algorithn class 2
Analysis of algorithn class 2Kumar
 
Unit i basic concepts of algorithms
Unit i basic concepts of algorithmsUnit i basic concepts of algorithms
Unit i basic concepts of algorithmssangeetha s
 
Time advance mehcanism
Time advance mehcanismTime advance mehcanism
Time advance mehcanismNikhil Sharma
 
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Srinath Perera
 
Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...saidzaghloul
 
Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Roberto Franchini
 
5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.ppt5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.pptaboma2hawi
 
FFWD - Fast Forward With Degradation
FFWD - Fast Forward With DegradationFFWD - Fast Forward With Degradation
FFWD - Fast Forward With DegradationRolando Brondolin
 
Chapter 2 variety of modelling
Chapter 2 variety of modellingChapter 2 variety of modelling
Chapter 2 variety of modellingTigabu Yaya
 
[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...
[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...
[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...Matteo Ferroni
 
Introduction to embedded computing and arm processors
Introduction to embedded computing and arm processorsIntroduction to embedded computing and arm processors
Introduction to embedded computing and arm processorsRAMPRAKASHT1
 

Similaire à iv. minggu keempat (20)

2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
A calculus of mobile Real-Time processes
A calculus of mobile Real-Time processesA calculus of mobile Real-Time processes
A calculus of mobile Real-Time processes
 
Foundations and methods of stochastic simulation
Foundations and methods of stochastic simulationFoundations and methods of stochastic simulation
Foundations and methods of stochastic simulation
 
Sample final report
Sample final reportSample final report
Sample final report
 
DES
DES DES
DES
 
Unit i
Unit iUnit i
Unit i
 
Discrete Event Simulation.ppt
Discrete Event Simulation.pptDiscrete Event Simulation.ppt
Discrete Event Simulation.ppt
 
Unit 3 des
Unit 3 desUnit 3 des
Unit 3 des
 
Analysis of algorithn class 2
Analysis of algorithn class 2Analysis of algorithn class 2
Analysis of algorithn class 2
 
Unit i basic concepts of algorithms
Unit i basic concepts of algorithmsUnit i basic concepts of algorithms
Unit i basic concepts of algorithms
 
Time advance mehcanism
Time advance mehcanismTime advance mehcanism
Time advance mehcanism
 
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
 
Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...Design and Performance Optimization of Authentication, Authorization, and Acc...
Design and Performance Optimization of Authentication, Authorization, and Acc...
 
Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite Java application monitoring with Dropwizard Metrics and graphite
Java application monitoring with Dropwizard Metrics and graphite
 
5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.ppt5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.ppt
 
FFWD - Fast Forward With Degradation
FFWD - Fast Forward With DegradationFFWD - Fast Forward With Degradation
FFWD - Fast Forward With Degradation
 
Chapter 2 variety of modelling
Chapter 2 variety of modellingChapter 2 variety of modelling
Chapter 2 variety of modelling
 
[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...
[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...
[EUC2016] FFWD: latency-aware event stream processing via domain-specific loa...
 
Introduction to embedded computing and arm processors
Introduction to embedded computing and arm processorsIntroduction to embedded computing and arm processors
Introduction to embedded computing and arm processors
 

Plus de Isna Aryanty

Plus de Isna Aryanty (15)

Materi 6 sistematika
Materi 6 sistematikaMateri 6 sistematika
Materi 6 sistematika
 
Materi 8 pengolahan dan analisa data
Materi 8 pengolahan dan analisa dataMateri 8 pengolahan dan analisa data
Materi 8 pengolahan dan analisa data
 
Materi 7 pengumpulan data
Materi 7 pengumpulan  dataMateri 7 pengumpulan  data
Materi 7 pengumpulan data
 
Materi 5 studi pustaka
Materi 5 studi pustakaMateri 5 studi pustaka
Materi 5 studi pustaka
 
Materi 4
Materi 4Materi 4
Materi 4
 
Materi 3
Materi 3Materi 3
Materi 3
 
Materi 2
Materi 2Materi 2
Materi 2
 
Materi 2
Materi 2Materi 2
Materi 2
 
Materi 9 penulisan laporan
Materi 9 penulisan laporanMateri 9 penulisan laporan
Materi 9 penulisan laporan
 
Materi 1
Materi 1Materi 1
Materi 1
 
Vi. minggu keenam
Vi. minggu keenamVi. minggu keenam
Vi. minggu keenam
 
iii. minggu ketiga
iii. minggu ketigaiii. minggu ketiga
iii. minggu ketiga
 
ii. minggu kedua
ii. minggu keduaii. minggu kedua
ii. minggu kedua
 
i. minggu pertama
i. minggu pertamai. minggu pertama
i. minggu pertama
 
Probabilitas konsepsi peluang
Probabilitas konsepsi peluangProbabilitas konsepsi peluang
Probabilitas konsepsi peluang
 

Dernier

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Dernier (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

iv. minggu keempat

  • 2. Simulasi sistem terdiri dari : 1. Simulasi Sistem Diskrit, bila hanya didefinisikan pd titik-titik waktu tertentu : a. Kejadian Diskrit (Event Based Simulation) b. Pendekatan Aktivitas (Activity Based Simulation) c. Process Interaction Approach d. Three Phase Approach 2. Simulasi Sistem Kontinyu, merupakan fungsi kontinyu dari waktu : a. Model Sistem Kontinyu : - Sistem Statis  state variables independen terhadap waktu - Sistem Dinamis  state variables merupakan fungsi waktu b. Sistem umpan balik c. Metode analog
  • 3. Software Simulasi Secara kasar software tools utk membangun discrete event simulation dapat dikategorikan kedlm empat kategori : 1. General purpose languages – C, Pascal, FORTRAN, C++, ADA, Java, dll. 2. Event Scheduled Simulation Languages – SLAM, SIMAN, SIMPAS, SIM++, JAVASIM, dll, 3. Process Oriented Simulation Languages – CSIM, EZSIM, GPSS, SIMAN, SLAM, GASP, JAVASIM dll. 4. Application Oriented Simulators – Opnet, Comnet III, Tangram II, ns-2, Qualnet, Jade, dll. Software tools utk membangun kontinyu simulation dapat dikategorikan kedlm : VENSIM, SEESIM, Dynamo dll
  • 4. Bagaimana Simulasi Diskrit Berjalan…….. (Programming Simulation) – Time-driven: simulasi berjalan pd interval waktu tertentu/fixed (mis. state ditentukan pada saat t, t + ∆t, t + 2 ∆t, …)  Time-based simulation – Event-driven: simulasi berjalan dari event-ke-event (mis. state ditentukan pd titik waktu dari event berikutnya)  Event-based simulation 1. Simulasi Diskrit
  • 5. Contoh : Mensimulasikan Discrete Event System (Event Approach)  pendekatan kejadian yakni pengembangan model simulasi didasarkan pd adanya kejadian yg terjadi pd sistem • States Kumpulan variabel-variabel yg diperlukan utk karakterisasi sistem pada sembarang titik waktu • Entities Objek-objek yg diproses dalam simulasi – mis. packet atau panggilan telepon • Attributes Karakteristik dari entities (mis., panjang paket, tipe dan tujuan) • Resources Substansi/items dimana entities menduduki atau menggunakan (mis., buffer space pd router, tokens pd FDDI network, bandwidth pd suatu link) • Activities Durasi waktu dimana panjangnya diketahui saat dimulai. Misalnya, waktu transmisi dari suatu paket pd suatu link • Delay Durasi waktu dg panjang yg tdk terspesifikasi yg tdk diketahui sebelum selesai. misalnya – waktu perjalanan suatu paket dari node A ke node B dlm suatu jaringan
  • 6. • Utk mengimplementasikan suatu event scheduling simulasi perlu membangun suatu event list, secara tdk langsung perlu membangun suatu deretan events • Perhatikan contoh antrian Single Server (M/M1) – misalnya pada proses permesinan. • Ada EVENT bila ada job Datang dan Pergi (selesai di proses) • Ada ACTIVITY bila job tsb di Proses` A M Job in servise Job AntriArrive Departure Batas Sistem Mesin/Proses D • Model – IID Exponential interarrival time dg mean 1/λ – IID Exponential service time dg mean 1/µ • Ingin mendapatkan mean job delay dlm antrian – Solusi analitis  mean waiting time = ρ/ (µ - λ)
  • 7. Adapun representasi komputasinya sbb : Misal data waktu kedatangan (A) dan waktu permesinan (M) : A1=55 A2=32 A3=24 A4=40 A5=12 A6=29 …… dstnya S1=43 S2=36 S3=34 …..dstnya Catatan : data2 tsb diperoleh dari hasil Pembangkitan Bilangan Random (Random Number Generator) berdasarkan distribusi kedatangan dan proses (pelayanan)  Minggu depan akan di jelaskan !!! 0 t1 t2 t3C1 C2 time s1 s2 s3s0 s4 s5 A1 A2 A3 S1 S2 Illustrasi sistem antrian M/M/1 dengan pendekatan event time
  • 8. Keterangan : ti : wkt kedatangan customer ke i (to = 0) Ai = ti – ti-1 = antar wkt kedatangan antara (i-1) dan customer ke I Si : time server actually spends serving customer ke i (termasuk customer delay pd antrian) Di : delay in queue customer ke I Ci : ti + Di + Si = wkt selesai melayani customer ke i dan pergi dari sistem A1 datang pd wkt simulasi menit ke 55 A2 datang pd wkt simulasi menit ke 32 kemudian atau menit ke 87 (55 + 32) dst A1 dilayani selama 43 menit (S1), selesai pd menit 98 (55 + 43) sehingga A2 yg datang pd menit ke 87 menunggu hingga menit 98 (selama 11 menit) atau menunggu hingga A1 selesai dilayani A2 mulai dilayani pada menit ke 98 selama 36 menit (S2) dan selesai pd menit ke 134 (98 + 36) …..dstnya
  • 9. Time = 0 System System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) 0 55 0 (8.00) 0 0 0 0 0 0 S Time = 55 System System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) Time = 87 System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) S S 1 1 0 1 55 87 55 1 87 1 0 0 0 0 98 87 98 111 87 1 customer 2 customer 1
  • 10. Time = 98 System System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) 98 111 134 2 11 11 1 0 98 S Time = 111 System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) Time = 134 System System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) S S 1 1 1 0 11 1 134 11 1 2 134 3 11 34 11 34 111 134 151 168 151 2 customer 3 customer 2 customer 3
  • 11. Time = System System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) S Time = System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) Time = System System State Status Number in Time of Last Queue Event Time of Arrival A D Clock Event List Statistical Counters Number Total Area delay delay under Q(t) S S customer customer customer
  • 12. Pemrograman Simulasi Diskrit Komponen & Pengorganisasian Model Pemrograman • System State menggambarkan keadaan sistem pd suatu waktu tertentu • Simulation Clock Jam simulasi yang menentukan waktu terjadinya event • Even List Daftar yg memuat kejadian berikutnya • Statistical Counter variabel2 yg dipakai utk menghitung statistik (memberikan informasi statistik tentang performance sistem) • Initialization Routine sub-rutin untuk memulai/menolkan waktu simulasi • Timing Routine sub-rutin utk menentukan event berikutnya dan melanjutkan jam simulasi untuk event berikutnya • Event Routine sub-rutin utk meng-update state (keadaan) sistem ketika suatu event terjadi
  • 13. • Report Generator sub-rutin estimasi perhitungan (dari statistical counter) dan mencetak laporan • Main Program sub-program untuk memanggil timing routin untuk menentukan event berikutnya dan meng-update keadaan sistem Hubungan logical (flow control) dari masing-masing komponen tersebut sebagai berikut :
  • 14. Hubungan Logical (Flow Chart) 1. Set simulation clock = 0 2. Initialize system state and statistical counters 3. Initialize event list 1. Call the timing routine 2. Call event routine i 1. Update system state 2. Update statistical counters 3. Generate future events and add to the event list 1. Compute estimates of interest 2. Print Report 1. Determine the next event type, misal i 2. Advance the simulation clock Is simulation over ? No Yes Initialization Routine Main Program Event Routine i Report Generator Timing Routine Generate random variates Library Routine
  • 15. Pemrograman (Bahasa Program FORTRAN) : Beberapa asumsi tentang single-server queueing system yaitu waktu antar kedatangan konsumen berdistribusi exponential, misal rata-rata 1 menit & waktu pelayanan berdistribusi eksponential dgn rata-rata 0,5 menit. Simulasi berhenti jika jumlah konsumen yg dilayani n = 1000 orang. a. Event Deskripsi : - Kedatangan / Arrival (A) = 1 - Kepergian / Departure (D) = 2 b. Sub – Routine : Sub - Program Purpose INIT TIMING ARRIVE DEPART REPORT EXPON (RMEAN) Initialisasi routine Timing routine Event routine (1) Event routine (2) Laporan simulasi (dipanggil ketika simulasi selesai n = 1000) Distribusi eksponential dgn rata-rata RMEAN (λ = 1 dan μ = 0,5)
  • 16. Definisi MARRVT MSERVT TOTCUS Waktu rata-rata antar kedatangan Waktu pelayanan rata-rata Jumlah total n yang selesai dilayani c. Input Parameter : d. Modeling variables : Definisi ANIQ DELAY NEVNTS NEXT NIQ NUMCUS RMEAN RMIN STATUS TARRVL(1) TIME TLEVNT TNE(1) TOTDEL U Fungsi dari grafik jumlah dalam antrian Lamanya customer dalam antrian Jumlah event dalam simulasi (2 event yakni datang & pergi) Jenis event yg terjadi berikutnya Jumlah customer dalam antrian Jumlah customer yg telah menyelesaikan waktu tunggunya Rata-rata dari distribusi eksponential yg digunakan Utk menyatakan event yg akan terjadi utk jangka yg masih lama Status = 0 jika server idle dan staus = 1 jika sibuk Waktu kedatangan customer ke I Jam simulasi Waktu kejadian terakhir Wkt perubahan dari waktu sekarang ke waktu berikutnya Total customer yg mengalami antrian Variabel random berdistribusi uniform antara 0 dan 1 (utk pembangkitan bilangan random)
  • 17. Definisi AVGDEL AVGNIQ Waktu antrian rata-rata Panjang antrian rata-rata e. Output Variables : PEMROGRAMAN FORTRAN : 1. SUB-ROUTINE PROGRAM UTAMA *** MAIN PROGRAM INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS REAL ANIQ, MARRVT, MSERVT, TARRVL(100), TIME, TNE(2), TOTDEL COMMON /MODEL/ ANIQ, MARVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TIME, TLEVNT, TNE, TOTCUS, TOTDEL *** SPECIFY THE NUMBER OF EVENT TYPES FOR THE TIMING ROUTINE NEVNTS=2 *** READ INPUT PARAMETERS REALD 10, MARRVT, MSERVT 10 FORMAT (2F, 10.0) READ 20, TOTCUS 20 FORMAT (I 10) Deklarasi
  • 18. *** INITIALIZE THE SIMULATION CALL INIT *** DETERMINE THE NEXT EVENT 30 CALL TIMING *** CALL THE APPROPRIATE EVENT ROUTINE GO TO (40, 50), NEXT 40 CALL ARRIVE GO TO 60 50 CALL DEPART *** IF THE SIMULATION IS OVER, CALL THE REPORT GENERATOR AND END THE *** SIMUALTION, IF NOT, CONTINUE THE SIMULATION 60 IF(NUMCUS.LT. TOTCUS) GO TO 30 CALL REPORT STOP END
  • 19. 2. SUB-ROUTINE INITIALISATION : SUBROUTINE INIT INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS, 1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL *** INITIALIZE THE SIMULATION CLOCK TIME=0 . *** INITIALIZE THE ATATE VARIABLES STATUS=0 NIQ=0 TLEVNT=0 *** INITIALIZE THE STATISTICAL COUNTERS NUMCUS=0 TOTDEL=0 ANIQ=0 *** INITIALIZE THE EVENT LIST. SINCE NO CUSTOMERS ARE PRESENT, THE TIME OF THE *** NEXT DEPARTURE (SERVICE COMPLETION) IS SET TO ‘INFINITY.’ TNE(1)=TIME+EXPON(MARRVT) TNE(2)=1.E+30 RETURN END
  • 20. 3. SUB-ROUTINE TIMING : SUBROUTINE TIMING INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS, 1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL RMIN=1.E+29 NEXT=0 *** DETERMINE THE EVENT TYPE OF THE NEXT EVENT TO OCCUR DO 10 I=1.NEVNTS IF (TNE(I).E.RMIN) GO TO 10 RMIN=TNE(I) NEXT=I 10 CONTINUE . *** IF THE EVENT LIST IS EMPTY (1.E., NEXT=0), STOP THE SIMULATION *** OTHERWISE, ADVANCE THE SIMULATION CLOCK IF (NEXT, GT.0) GO TO 30 PRINT 20 20 FORMAT (1h1, 5X, ‘EVENT LIST EMPTY’) STOP 30 TIME=TNE(NEXT) RETURN END
  • 21. FLOWCHART SUBROUTINE ARRIVE Subroutine ARRIVE Schedule the next arrival event Set DELAY = 0 for this customer and gather statistics Add 1 to the number of customers delayed Make server busy Schedule a departure event for this customer Return Update area under the number in queue function Add 1 to the number in queue Store the time of arrival of this customer Return
  • 22. 4. SUB-ROUTINE ARRIVE : SUBROUTINE ARRIVE INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS, 1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL ***
  • 23. FLOWCHART SUBROUTINE DEPART Subroutine DEPART Update area under the number in queue function Subtract 1 from the number in queue Compute delay of customer entering service and gather statistics Add 1 to the number of customers delayed Schedule a departure event for this customer Return Make server busy Set the time of the next departure to infinity Return
  • 24. 5. SUB-ROUTINE DEPART : SUBROUTINE DEPART INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS, 1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL ***
  • 25. 6. SUB-ROUTINE REPORT : SUBROUTINE REPORT INTEGER NEVNTS, NEXT, NIQ, NUMCUS, STATUS, TOTCUS REAL ANIQ, MARRVT, MSERVT, TARRVL(1000), TIME, TLEVNT, TNE(2), TOTDEL COMMON /MODEL/ ANIQ, MARRVT, MSERVT, NEVNTS, NEXT, NIQ, NUMCUS, STATUS, 1TARRVL, TIME, TLEVNT, TNE, TOTCUS, TOTDEL ***
  • 26. 7. SUB-ROUTINE FUNGSI EXPONENTIAL : FUNCTION EXPON(RMEAN) REAL RMEAN, U *** GENERATE A U(0,1) RANDOM VARIABLE, THE FORM OF THIS STATEMENT DEPENDS *** ON THE COMPUTER USED U=RANUN (Z) *** GENERATE AN EXPONENTIAL RANDOM VARIABLE WITH MEAN RMEAN EXPON=-RMEAN*ALOG (U) RETURN END 8 . OUTPUT HASIL SIMULASI : ------------------------------------------------------------------------- SINGLE-SERVER QUEUEING SYSTEM REAL RMEAN, U MEAN INTERARRIVAL TIME : 1.000 MINUTES MEAN SERVICE TIME : .500 MINUTES NUMBER OF CUSTOMERS : 1000 AVERAGE DELAY IN QUEUE : .497 MINUTES AVERAGE NUMBER IN QUEUE : .500