P. 1
Klas 1 - Teknik Simulasi - Materi 1 - Pendahuluan

# Klas 1 - Teknik Simulasi - Materi 1 - Pendahuluan

|Views: 27|Likes:
Materi teknik simulasi
Materi teknik simulasi

Categories:Types, School Work

See more
See less

01/03/2015

pdf

text

original

## Sections

• Tujuan Perkuliahan
• Materi Perkuliahan (lama)
• Penilaian
• Referensi
• Latar Belakang
• Definisi
• Model
• MATHEMATICAL MODEL
• STOCHASTIC MODELS
• Valid vs Reliable vs Consistent
• Simulasi
• Accuracy vs Precision
• Why Simulation ?
• Manfaat Simulasi
• Penerapan simulasi (Law 2000)
• Background
• HOW TO SIMULATE
• CONCEPTUAL MODEL
• JAVA EXAMPLE
• Kolmogorov-Smirnov
• Testing Hypothesis (2)

# 1

Teknik Simulasi

Jurusan Statistika FMIPA
ITS - Surabaya
2
Tujuan Perkuliahan

digunakan untuk melakukan simulasi /
membuat tiruan atas operasi-operasi
dari berbagai macam fasilitas / proses
dengan menggunakan komputer.
3
Materi Perkuliahan (lama)

 Introduction to Simulation (1)
 Simulation examples (1)
 Queueing Models (2)
 Inventory (2)
 Discrete Event Simulation (3-4)
 Statistical models in simulation (5-6)
 Random number generator (5-6)
 Random variable generation (5-6)
 Input modeling (7)
 Output analysis (8-9)
 Alternative system (10-11)
 Model validation and verification (12)
 Model optimization (13-14)
4
Penilaian

UTS = 35%
UAS = 35%
Tugas & Projek Simulator = 30%

5
Referensi
 Maria, A. (1997) Introduction to Modeling and Simulation. Proceedings
of the 1997 Winter Simulation Conference. Available from :
http://www.informs-cs.org/wsc97papers/0007.pdf [Accessed 4 July
2006].

 Hughes, H. D. (2003) Introduction to Modeling and Simulation.
Michigan State University. Available from :
www.cse.msu.edu/~cse808/note/lecture1.ppt [Accessed 4 July 2006].

 Banks, J. ; Carson II, J.S. ; Nelson, B.L. ; Nicol, D.M. (2001) Discrete
Event System Simulation. Third edition. Pretice Hall Inc.

 Banks, J. (2000) Introduction to Simulation. Proceedings of the 2000
Winter Simulation Conference. Available from : http://www.informs-
cs.org/wsc00papers/003.pdf [Accessed 4 July 2006].

 Law, A.M. ; Kelton, W.D. (2000) Simulation Modeling and Analysis.
Third Edition. McGraw-Hill, Inc.
6
Objek, System, Model dan Simulasi
 Objek ?
 System ?
 Model ?
 Simulasi ?
7
Latar Belakang
Sistem
Eksperimen
Eksperimen
melalui
model dari
sistem

Model
Fisik

Model
Matematik

Penyelesaian
secara
analitik

Penyelesaian
dengan
simulasi
8
Data
Informasi
Knowledge
Understanding
Wisdom
9
Fact/data/practice
Conjecture/hypothesis/theory/model
Design
experiment
Problem
formulation
Testing
10
SYSTEM
 A set of interacting components or entities
operating together to achieve a common
goal or objective.
 Examples:
 A manufacturing systems with its machine
centers, inventories, conveyor belts,
production schedule, items produced.
 A telecommunication system with its
messages, communication network servers.
 A theme park with rides, workers, …
REAL WORLD SYSTEMS OF INTEREST ARE HIGHLY COMPLEX!!!
11
Definisi
Modeling / pemodelan adalah proses untuk menghasilkan
suatu model (Maria 1997).

Definisi model
 is a representation of the construction and working of
some system of interest (Maria 1997).
 A representation of an object, a system, or an idea in
some form other than that of the entity it self (Hughes
2003).
 A representation of a system for the purpose of
studying the system (Banks et al. 2001).
 A representation of an actual system (Banks 2000).
12
Model
Model yang bagus adalah model valid yang realistik
(menyerupai sistem yang diwakilinya) dan sederhana.

Kata sederhana mempunyai arti :
 Model tidak boleh terlalu komplek sehingga sulit dimengerti
dan sulit digunakan untuk eksperimen, sehingga :
 hanya faktor-faktor yang mendominasi / mengendalikan
sistem saja yang diperhitungkan sedangkan yang lainnya
diabaikan.
 diberlakukan batasan dan asumsi-asumsi yang diperlukan.

Kompleksitas model dapat ditingkatkan secara berlahan-
lahan.

 Model harus cukup komplek sehingga dapat memberikan
13
MATHEMATICAL MODEL
 An abstract and simplified representation of a system
 Specifies
 Important components
 Assumptions/approximations about how the system works
 Not an exact re-creation of the original system!
 If model is simple enough, study it with Queueing Theory,
Linear Programming, Differential Equations...
 If model is complex, Simulation is the only way!!!

14
MODEL
Operating Policies
• Single queue, parallel servers
• FIFO
Input Parameters
• No of servers
• Inter-arrival Time Distribution
• Service Time Distributions

Output Parameters
• Waiting Times
• System Size
• Utilizations
(X)
(Y)
Y = f (X)
ACTUAL SYSTEM
15
STOCHASTIC MODELS
 Randomness or uncertainty is inherent
 Example: Bank with customers and
tellers
ACTUAL SYSTEM
m
m
m
QUEUEING MODEL
l
IE325
16
The use of Data in Decision Making
 Valid
 Reliable
 Consisten
17
Valid vs Reliable vs Consistent
reliable
consisten
not valid
18
Simulasi
Definisi

 is the imitiation of the operation of a real world
process or system over time (Banks 2000, Banks et.
al. 2001).

 is a tool to evaluate the performance of a system,
existing or proposod under different configurations of
interest and over long periods of real time (Maria
1997).

Hasil simulasi disebut simulator.
19
Precision vs. Accuracy
Good Precision
Good Accuracy
20
Precision vs. Accuracy
Good Precision
Poor Accuracy
Bias Error ?

21
Precision vs. Accuracy
Poor Precision
Good Accuracy
Resolution Error
?
22
Precision vs. Accuracy
Poor Precision
Poor Accuracy
23
Accuracy vs Precision
 Precision (RR)
 The Extent to Which the Instrument Repeats its
results when Making Repeat Measurements on
the Same Unit of Output

 Accuracy (Bias)
 Describes Average and Location
Closeness to the True Value
 The Extent to Which the Average of a Long
Series of Repeat Measurements Made by the
Instrument on a Single Unit of Output Differs
from the True Value
 Systematic Error: Contribution to the Total Error
Comprised of all Sources of Variation that Tends
to Offset Consistently the Results
 Precision and Accuracy are Independent of Each
Other
 Generally, Separate Actions are Required for
Improvement
True Value
Average
Bias
RR
True Value
Average
Bias
RR
True Value
Average
Bias
RR
Precise, but not Accurate
Accurate, but not Precise
Accurate, and Precise
24
Why Simulation ?
Alasan digunakannya simulasi

Dengan sistem yang ada sulit bahkan tidak mungkin /
terlalu mahal / tidak praktis untuk :

 Mengimplementasikan/mencobakan desain- desain
baru yang sedang dirancang.

 Sarana latihan (operator mesin , sopir, penerbang, dll ).

 Mempelajari perilaku suatu sistem (yang biasanya
membutuhkan perulangan dari sistem tersebut ).
25
Manfaat Simulasi
Simulasi digunakan sebelum sebuah sistem yang ada
diubah atau dibangun dengan manfaat :

 to reduce the chances of failture to meet specifications,

 to eliminate unforeseen bottlenecks,

 to prevent under or over utilization of resources,

 to optimize system performance.
26
Penerapan simulasi (Law 2000)

 Designing and analyzing manufacturing systems,
 Evaluating hardware and software requirements for a
computer system,
 Evaluating a new military weapons system or tactic,
 Determining ordering policies for a inventory system,
 Designing communications system and message
protocols for them,
 Designing and operating transportation facilities such
as freeways, airports, subways, or port,
 Evaluating designs for service organizations such as
hospitals, post offices, or fast food restaurant,
 Analyzing financial or economic systems.
27
Background
Yang dibutuhkan untuk belajar simulasi :

 Kemampuan menganalisis sistem real

 Pengetahuan tentang metode-metode statistik :
 Probabilitas,
 Jenis-jenis distribusi data,
 Teknik untuk membandingkan, seperti : uji hipotesis,
desain eksperimen,
 Optimasi.

 Kemampuan pemrograman komputer (untuk
membuat simulator)
28
Network Of
Distribution
29
HOW TO SIMULATE
 By hand
 Buffon Needle and Cross Experiments (see
Kelton et al.)
 Programming in General Purpose Languages
 Java
 Simulation Languages
 SIMAN
 Simulation Packages
 Arena
Issue: Modeling Flexibility vs. Ease of Use

30
Komponen penyusun simulator
1. Objek
Merupakan komponen terkecil dari suatu sistem yang mempunyai
volume sehingga memerlukan lokasi dan punya karakteristik
tertentu. Dengan operasi tertentu, objek dapat mempunyai
aktifitas sehingga dapat berpindah dari satu tempat ke tempat
lainnya juga dapat berinteraksi satu dengan yang lainnya.

Contoh : Orang, Barang, Mesin ……

Objek terbagi menjadi 2 jenis :
 Objek Permanen
Objek permanen selalu ada dalam sistem selama simulasi
berlangsung.

 Objek Sementara
Objek sementara biasanya datang dari luar sistem kemudian
diproses dalam sistem dan akhirnya meninggalakan sistem.
31
Komponen penyusun simulator
2. Sebuah sistem
Merupakan sekumpulan objek yang bergabung
bentuk aksi dan interaksi yang teratur dalam
mencapai suatu tujuan (Definisi dari Schmidt
and Taylor 1970 dikutip dari Law 1991).

Contoh : Tim Sepakbola, Proses Produksi
mobil, Swalayan, dll.

Sistem yang digunakan dalam sebuah
penelitian dapat merupakan subset dari sistem
lain yang lebih besar.
32
Komponen penyusun simulator
State dari sebuah sistem adalah kumpulan variabel yang diperlukan
tertentu tergantung dari tujuan penelitian.

Contoh :

 Tujuan penelitian : menentukan jumlah teller yang mencukupi
untuk melayani konsumen yang ingin menabung, cek saldo
dan mengambil uang.

 Sistem = bagian dari bank uang berisi teller dan konsumen yang
antri / sedang dilayani.

 State = jumlah teller yang sibuk, jumlah konsumen dalam bank,
waktu kedatangan tiap-tiap konsumen dalam bank, dll.

3. Model

33
Macam-macam pembagian jenis
sistem
1. Berdasarkan Perubahan Nilai Variabel-Variabel State-nya.

 Diskrit
Sistem di mana state variables berubah pada titik-titik
waktu yang berbeda.

Contoh : Antrian di ATM.

 kontinyu
Sistem dimana state variables berubah secara kontinyu
sejalan dengan waktu.

Contoh : Aliran fluida, posisi pesawat terbang dari take off sampai
landing.
34
Macam-macam pembagian jenis
sistem
2. Berdasarkan random/tidaknya perubahan
variabel state-nya

 Deterministik
Jika perubahan nilai variabel state-nya
tetap/pasti mengikuti aturan/fungsi
tertentu.

Output ditentukan dari input dan hubungan
dalam model.

Y= SQRT(X)
35
Macam-macam pembagian jenis
sistem
 Probabilistik / Stochastic

Jika perubahan nilai variabel state-nya terjadi secara
acak.

Produce output that is itself random and must therefore
treated as only an estimate of the true characteristics of the
model.

Misal : lama pelayanan kasir di bank, untuk
pelanggan yang sama dengan keperluan
sama, dan kasirnya juga sama, waktu
pelayanan belum tentu sama persis

Misal : Y = 2 + 3X1 + 4X2 + ε
36
Macam-macam pembagian jenis
sistem
perubahan waktu

 Dinamis
Kondisi state sistem pada setiap saat dapat berubah
sesuai dengan perubahan waktunya.

Misal : supermarket, setiap perubahan waktu akan
terlihat jumlah pelanggan yang beda.

 Statis
Tidak ada perubahan waktu dalam sistem, atau suatu sistem
yang diamati hanya pada waktu tertentu saja.

Misal : supermarket, jika diamati pada saat t tertentu maka
sistem tersebut akan merupakan sistem statis.
37
Macam-macam pembagian jenis
sistem
4. Berdasarkan apakah output sistem akan
mempunyai kepastian untuk kembali lagi ke
dalam sistem sebagai input atau tidak.

 Close loop

 Open loop
Output pergi tidak kembali.
38
Macam-macam pembagian jenis
sistem
terhadap sistem untuk melakukan penelitian dan
mendesain penelitiannya sehingga harus merubah
struktur dan susunan sistem.

 Preskriptif
Peneliti punya kebebasan untuk merubah
struktur dan susunan sistem.

 Deskriptif
Peneliti tidak punya kebebasan untuk
merubah struktur dan susunan sistem.
39
Discrete Event Simulation Models.
Model simulasi yang akan dibahas pada
perkuliahan :

 Diskrit,
 Dinamis,
 Stokastik
 Preskriptif.

Model ini kemudian dikenal sebagai discrete
event simulation models.
40
When simulation is the appropriate
tool ? (Banks, et al 2001) -1-
 Simulation enables the study of, and experimentation
with, the internal interactions of a complex system, or of
a subsystem within a complex system.
 Informational, organizational, and environmental
changes can be simulated and the effect of these
alterations on the model’s behavior can be observed.
 The knowledge gained in designed a simulation model
may be of great value toward suggesting improvement
in the system under investigation.
 By changing simulation inputs and observing the
resulting outputs, valuable insight may be obtained into
which variables are most important and how variables
interact.
 Simulation can be used as a pedagogical device to
reinforce analytic solution methodologies.
41
When simulation is the appropriate
tool ? (Banks, et al 2001) -2-
 Simulation can be used to experiment whit new
designs or policies prior to implementation, so as to
prepare for what may happen.
 Simulation can be used to verify analytic solution.
 By simulating different capabilities for a machine,
requirements can be determined.
 Simulation models designed for training allow
learning without the cost and disruption of on the
job learning.
 Animation shows a system in simulated operations
so that the plan can be visualized.
 The modern system (factory, wafer fabrication
plant, service organization, etc.) is so complex that
the interactions can be treated only through
simulation.
42
When simulation is not appropriate
tool ? (Banks, et al 2001) -1-
 Simulation should not be used when the problem can be
solved using common sense.

ex. S = v t, jika v = 10, t = 5, maka s = 50

 Simulation should not be used if the problem can be
solved analytically.

 Simulation should not be used if it is easier to perform
direct experiment.

ex. Mencoba resep masakan yang baru

 not to use simulation, if the costs exceed the savings.
43
When simulation is not appropriate
tool ? -2-
 Simulation should not be performed if the resources
are not available.

 Simulation should not be performed if the time are
not available.

 Simulation takes data, sometimes lots of data. If no
data is available, not even estimates simulation is not

 If there is not enough time or the personnel are not
available, simulation is not appropriate.

44
When simulation is not appropriate
tool ? -3-
 If managers have unreasonable
expectations-say, too much too soon-
or the power of simulation is over
estimated, simulation may not be
appropriate.

 If system behavior is too complex or
can’t be defined, simulation is not
appropriate.
45
• When mathematical analysis methods are not
available, simulation may be the only investigation tool
• When mathematical analysis methods are available,
but are so complex that simulation may provide a
simpler solution
• Allows comparisons of alternative designs or
alternative operating policies
• Allows time compression or expansion

46
 For a stochastic model, simulation
estimates the output while an analytical
solution, if available, produces the exact
output
 Often expensive and time consuming to
develop
 An invalid model may result with
confidence in wrong results.

47
Tahapan Simulasi (Law and Kelton 1991)

 Not all studies will necessarily contain
all these steps and in order stated;
some studies may contain steps that
do not fit neatly into the diagram.

 Moreover, a simulation study is not a
simple sequential process.
48
Tahapan
Simulasi

Formulate problem and plan the study

Collect data and define a model

Construct a computer program and verify

Valid ?
Make pilot runs

Valid ?
Design Experiments

Make production runs

Analyze output data

Document, present and implement results

yes
no
yes
no
49
STEPS IN A SIMULATION STUDY
Problem
formulation
Setting of
objectives
and overall
project plan
Model
conceptualization
Data
collection
Model
translation
Verified?
No
Validated?
No
No
Experimental
Design
Production runs
and analysis
More runs?
Documentation
and reporting
No
Implementation
Yes
Yes
Yes
Yes
50
MODEL CONCEPTUALIZATION
Assumed system
Conceptual model
Real World System
Logical model
51
CONCEPTUAL MODEL
 Abstract essential features
 Events, activities, entities, attributes,
resources, variables, and their
relationships
 Performance measures
 Data requirements
 Select correct level of details
(assumptions)
52
COMPONENTS OF A SYSTEM
Entity: is an object of interest in the system
 Dynamic objects — get created, move around, change
status, affect and are affected by other entities, leave
(maybe)
 Usually have multiple realizations floating around
 Can have different types of entities concurrently

Example: Health Center
Patients
Visitors
53
COMPONENTS OF A SYSTEM
Attribute: is a characteristic of all
entities, but with a specific value “local” to
the entity that can differ from one entity
to another.

Example: Patient
Type of illness,
Age,
Sex,
Temperature,
Blood Pressure
54
COMPONENTS OF A SYSTEM
Resources: what entities compete for
 Entity seizes a resource, uses it, releases it
 Think of a resource being assigned to an entity,
rather than an entity “belonging to” a resource
 “A” resource can have several units of capacity
which can be changed during the simulation

Example: Health Center
Doctors, Nurses
X-Ray Equipment
55
COMPONENTS OF A SYSTEM
Variable: A piece of information that
reflects some characteristic of the whole
system, not of specific entities
 Entities can access, change some variables

Example: Health Center
Number of patients in the system,
Number of idle doctors,
Current time
56
 State: A collection of variables that
contains all the information necessary to
describe the system at any time
Example: Health Center
{Number of patients in the system,
Status of doctors (busy or idle),
Number of idle doctors,
Status of Lab equipment, etc}
COMPONENTS OF A SYSTEM
57
COMPONENTS OF A SYSTEM
Activity: represents a time period of
specified length.

Example: Health Center
Surgery,
Checking temperature,
X-Ray.
58
 Event: An instantaneous occurrence that
changes the state of the system
Example: Health Centre
Arrival of a new patient,
Completion of service
(i.e., examination)
Failure of medical
equipment, etc.
COMPONENTS OF A SYSTEM
59
STEPS IN A SIMULATION STUDY
Problem
formulation
Setting of
objectives
and overall
project plan
Model
conceptualization
Data
collection
Model
translation
Verified?
No
Validated?
No
No
Experimental
Design
Production runs
and analysis
More runs?
Documentation
and reporting
No
Implementation
Yes
Yes
Yes
Yes
60
MODEL TRANSLATION
 Simulation model executes the logic contained in the
flow-chart model
Coding
General Purpose Language Special Purpose Simulation Language/Software
JAVA, C++, Visual BASIC
Examples:
SIMAN, ARENA, EXTEND
Examples:
61
ARENA EXAMPLE
62
JAVA EXAMPLE
public static void main(String argv[])
{
Initialization();

//Loop until first "TotalCustomers" have departed
while (NumberofDepartures < TotalCustomers)
{
Event evt = FutureEventList[0]; //get imminent
event
removefromFEL(); //be rid of it
Clock = evt.get_time(); //advance in time
if (evt.get_type() == arrival) ProcessArrival();
else ProcessDeparture();
}

ReportGeneration();
}
63
STEPS IN A SIMULATION STUDY
Problem
formulation
Setting of
objectives
and overall
project plan
Model
conceptualization
Data
collection
Model
translation
Verified?
No
Validated?
No
No
Experimental
Design
Production runs
and analysis
More runs?
Documentation
and reporting
No
Implementation
Yes
Yes
Yes
Yes
64
VERIFICATION AND VALIDATION
 Verification: the process of determining
if the operational logic is correct.
 Debugging the simulation software

 Validation: the process of determining if
the model accurately represents the
system.
 Comparison of model results with collected
data from the real system
65
VERIFICATION AND VALIDATION
Conceptual model
Logical model
Simulation model
Real World System
VERI FI CATI ON
VALI DATI ON
66
STEPS IN A SIMULATION STUDY
Problem
formulation
Setting of
objectives
and overall
project plan
Model
conceptualization
Data
collection
Model
translation
Verified?
No
Validated?
No
No
Experimental
Design
Production runs
and analysis
More runs?
Documentation
and reporting
No
Implementation
Yes
Yes
Yes
Yes
67
EXPERIMENTAL DESIGN
 Alternative scenarios to be simulated
 Type of output data analysis (steady-
state vs. terminating simulation
analysis)
 Number of simulation runs
 Length of each run
 The manner of initialization
 Variance reduction
68

ANALYSIS OF RESULTS

 Statistical tests for significance and
ranking
 Point Estimation
 Confidence-Interval Estimation
 Interpretation of results
 More runs?
69
STEPS IN A SIMULATION STUDY
Problem
formulation
Setting of
objectives
and overall
project plan
Model
conceptualization
Data
collection
Model
translation
Verified?
No
Validated?
No
No
Experimental
Design
Production runs
and analysis
More runs?
Documentation
and reporting
No
Implementation
Yes
Yes
Yes
Yes
70

DOCUMENTATION & REPORTING

 Program Documentation
 Allows future modifications
 Creates confidence
 Progress Reports
 Frequent reports (e.g. monthly) are suggested
 Alternative scenarios
 Performance measures or criteria used
 Results of experiments
 Recommendations
71

IMPLEMENTATION

72
Demo MINITAB
Generate data normal dan uji
kenormalan data
73
Kolmogorov-Smirnov
74
Design Experiment
Testing Hypothesis, ANOVA, dan
Respon Surface Methodology
75
Testing
Hypothesis (1)
76
Testing Hypothesis (2)

scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->