Simulasi Komputer
Simulasi Komputer
A. PENGANTAR
A.1 Definisi
Simulasi adalah imitasi dari proses/sistem riil pada durasi/jangka waktu tertentu
untuk meningkatkan kinerja dan mengurangi risiko kondisi riil
(2) OUTPUT
- Keluaran dan ukuran kinerja
LANGKAH SIMULASI
Step 1 : Tentukan karakteristik input
Step 2 : buat tabel simulasi (kolom input, respons, replikasi)
Step 3 : untuk tiap replikasi i, bangkitkan nlai untuk input → evaluasi fungsi
Contoh
(1) Inventory system
● Yang random : (1) demand atau (2) LT
● Fixed input: inventory
● Input: lot size (Q) dan reorder level (R)
● output(ukuran kinerja): total ongkos per satuan waktu
● Tentukan interval random number
● Buat tabel (model)
SIMULASI
Contoh
- Sistem manufaktur: waktu menunggu pada suatu stasiun kerja, waktu
proses
- Bank: waktu menunggu per nasabah pada jam sibuk
- Klinik gigi: waktu menunggu
MINGGU KE-2
( 27 Januari 2021 )
B. SIMULATION BASICS
● Random Behavior
○ Natural behavior
○ Probability distributions may be either discrete or continuous
(2) acceptance-rejection
→ gaada inverse (beta, gamma)
● Spreadsheet Simulation
MINGGU KE-3
( 18 Januari 2021 )
C.1 Uniform
→ generate U ~ U(0,1)
→ return X = a + (b-a)U
C.2 Exponential
→ generate U ~ U (0,1)
→ return X = -(beta)ln(1-U)
C.3 Weibull
X ~ Weibull
→ generate U ~ U(0,1)
→ Return X = beta(-lnU)^(1/alpha)
C.4 Normal
C.5 Lognormal
→ Y: umur pakai suatu sistem sehingga > 0
C.6 Bernoulli
→ generate U ~ U(0,1)
→ if U <= p, return X = 1, otherwise, return X = 0
→ contoh: koin dilempar
C.7 Binomial
→ Generate Y1, Y2, Y3, …, dst
→ Return X = Y1 + Y2 + … + YT (nilai Y 0 atau 1)
C.8 Poisson
Contoh:
Sistem Antrian
→ asumsi:
● Gaada antrian pada sistem di awal
● Waktu perpindahan dari antrian ke ATM sangat kecil sehingga diabaikan
● Proses FIFO (first-in first-out)
● ATM never experiences failure
E. GPSSH
E.1 Introduction
● Language: FORTRAN (ribet, butuh banyak line), C++, ...
● General Purpose Simulation Language:
○ SIMSCRIPT
○ GASP
○ GPSS/H
○ …
● Simulation Software
○ ARENA
○ FlexSim
○ ProModel (ini yang digunakan untukmatkul simkom)
→ memudahkan dengan kemampuan yang sama
○ AutoMoD
○ Simul8
● GPSS/H World View
○ Sistem dimodelkan dengan viewpoint dari entitas yang bergerak dalam
sistem
○ Transaction: dynamic moving entities
○ Entities are moving through the system from block to block
→ ada blok menunggu, blok dilayani, dll
Contoh:
(1) Generate
→ kedatangan entities
(2) Advance
→ menghentikan entity yang bergerak (misal, sedang melayani
selama 5 menit)
(3) Terminate
→ meninggalkan sistem
→ men-destroy entities
Contoh lain
○ Control statements
SIMULATE
START 100
END
■ SIMULATE: memerintah
■ START 100: berapa banyak entitas yang disimulasi? (100)
■ Output: divide into two
● GPSS/H model listing
→ hasil compiling
→ mengecek tata bahasa
● Simulation results
○ Compiler directives
○ Standard numerical attributes
Questions:
(1) Berapa waktu untuk 100 bundle?
(2) Berapa lama waktu sibuknya?
STEPS:
F.1 Introduction
● The queue entity is implemented with pair of blocks QUEUE and DEPART
● The SEIZE block causes transactions to be delayed and form waiting lines, but
the QUEUE block does not
● Contoh:
QUEUE LINE
SEIZE SERVER
DEPART LINE
( To record amount of time in QUEUE LINE )
● Output:
G.1 Introduction
● Storage entity provides a way t o model multiple, parallel servers
● Each server is called a unit of storage
● Another use of storage is to model a group of identical
● Storage is a resource (tidak bergerak) having capacity to service multiple
transactions simultaneously
● Implemented in a model with the ENTER-LEAVE pair of blocks
H. Simulation Procedure
Define objective → collect and analyse system data → build the model → validate the
model → conduct experiments → present the result
●Questionnaire
●Steps for gathering data
Determine data requirements > identify data resources > collect the data > make
assumptions > analyze the data > document and approve data
H.5 collecting the data
● Sequence of data collection
Define overall entity flow → develop deskripsi operasi → define incidental details
MINGGU KE-6
( 25 Februari 2021 )
I. Model Building
I.1 Introduction
→ modeling is more than knowing how to use simulation software tool
→ we should construct the conceptual model first
→ yang memodelkan bukan pengambil keputusan
I.2 Conceptual Model
→ usaha pengumpulan data
● Converting a conceptual model to simulation model
○ Result of data gathering: conceptual model
● Berbagai hal perlu dipertimbangkan, antara lain:
○ Monitor