Klas 1 - Teknik Simulasi - Materi 1 - Pendahuluan

download Klas 1 - Teknik Simulasi - Materi 1 - Pendahuluan

of 76

description

Materi teknik simulasi

Transcript of Klas 1 - Teknik Simulasi - Materi 1 - Pendahuluan

  • *Teknik Simulasi

    Jurusan Statistika FMIPAITS - Surabaya

  • *Tujuan Perkuliahan

    Menjelaskan teknik-teknik yang digunakan untuk melakukan simulasi / membuat tiruan atas operasi-operasi dari berbagai macam fasilitas / proses yang ada pada kehidupan sehari-hari dengan menggunakan komputer.

  • *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)

  • *Penilaian

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

  • *ReferensiMaria, 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.

  • *Objek, System, Model dan SimulasiObjek ?System ?Model ?Simulasi ?

  • *Latar Belakang

    SistemEksperimenpada sistem yang adaEksperimen melalui model dari sistem ModelFisikModelMatematikPenyelesaian secara analitik Penyelesaian dengan simulasi

  • *Filosofi Menjadi Orang BijakDataInformasiKnowledgeUnderstandingWisdom

  • *Fact/data/practiceConjecture/hypothesis/theory/modelDesign experimentProblem formulationTesting

  • *SYSTEMA 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!!!

  • *DefinisiModeling / pemodelan adalah proses untuk menghasilkan suatu model (Maria 1997).

    Definisi modelis 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).

  • *ModelModel 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 hasil yang mendekati keadaan senyatanya.

  • *MATHEMATICAL MODELAn abstract and simplified representation of a systemSpecifiesImportant componentsAssumptions/approximations about how the system worksNot 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!!!

  • *GETTING ANSWERS FROM MODELS MODELOperating PoliciesSingle queue, parallel serversFIFOInput ParametersNo of serversInter-arrival Time DistributionService Time Distributions

    Output ParametersWaiting TimesSystem SizeUtilizations(X)(Y)Y = f (X)ACTUAL SYSTEM

  • *STOCHASTIC MODELSRandomness or uncertainty is inherentExample: Bank with customers and tellersACTUAL SYSTEMmmmQUEUEING MODELlIE325

  • *The use of Data in Decision MakingValidReliableConsisten

  • *Valid vs Reliable vs Consistent

  • *SimulasiDefinisi

    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.

  • *Precision vs. AccuracyGood Precision Good Accuracy

  • *Precision vs. AccuracyGood Precision Poor AccuracyBias Error ?

  • *Precision vs. AccuracyPoor Precision Good AccuracyResolution Error ?

  • *Precision vs. AccuracyPoor Precision Poor Accuracy

  • *Accuracy vs PrecisionPrecision (RR)Describes Variation and SpreadThe Extent to Which the Instrument Repeats its results when Making Repeat Measurements on the Same Unit of Output

    Accuracy (Bias)Describes Average and LocationCloseness to the True ValueThe 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 ValueSystematic Error: Contribution to the Total Error Comprised of all Sources of Variation that Tends to Offset Consistently the ResultsPrecision and Accuracy are Independent of Each OtherGenerally, Separate Actions are Required for ImprovementTrue ValueAverageBiasRRTrue ValueAverageBiasRRPrecise, but not AccurateAccurate, but not PreciseAccurate, and Precise

  • *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 ).

  • *Manfaat SimulasiSimulasi 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.

  • *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.

  • *BackgroundYang 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)

  • *Network Of Distribution

  • *HOW TO SIMULATEBy handBuffon Needle and Cross Experiments (see Kelton et al.)SpreadsheetsProgramming in General Purpose LanguagesJavaSimulation LanguagesSIMANSimulation PackagesArenaIssue: Modeling Flexibility vs. Ease of Use

  • *Komponen penyusun simulatorObjekMerupakan 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 PermanenObjek permanen selalu ada dalam sistem selama simulasi berlangsung.

    Objek SementaraObjek sementara biasanya datang dari luar sistem kemudian diproses dalam sistem dan akhirnya meninggalakan sistem.

  • *Komponen penyusun simulatorSebuah sistemMerupakan sekumpulan objek yang bergabung menjadi satu yang mempunyai beberapa 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.

  • *Komponen penyusun simulatorState dari sebuah sistem adalah kumpulan variabel yang diperlukan untuk menggambarkan suatu keadaan sebuah sistem pada waktu 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.

    Model

  • *Macam-macam pembagian jenis sistemBerdasarkan Perubahan Nilai Variabel-Variabel State-nya.

    DiskritSistem di mana state variables berubah pada titik-titik waktu yang berbeda.

    Contoh : Antrian di ATM.

    kontinyuSistem dimana state variables berubah secara kontinyu sejalan dengan waktu.

    Contoh : Aliran fluida, posisi pesawat terbang dari take off sampai landing.

  • *Macam-macam pembagian jenis sistemBerdasarkan random/tidaknya perubahan variabel state-nya

    DeterministikJika perubahan nilai variabel state-nya tetap/pasti mengikuti aturan/fungsi tertentu. Output ditentukan dari input dan hubungan dalam model.

    Y= SQRT(X)

  • *Macam-macam pembagian jenis sistemProbabilistik / 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 +

  • *Macam-macam pembagian jenis sistemBerdasarkan pada perubahan variabel sistem terhadap perubahan waktu

    DinamisKondisi state sistem pada setiap saat dapat berubah sesuai dengan perubahan waktunya.

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

    StatisTidak 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.

  • *Macam-macam pembagian jenis sistemBerdasarkan apakah output sistem akan mempunyai kepastian untuk kembali lagi ke dalam sistem sebagai input atau tidak.

    Close loopOutput kembali jadi input.

    Open loopOutput pergi tidak kembali.

  • *Macam-macam pembagian jenis sistemBerdasarkan ada/tidaknya kekuasaan peneliti terhadap sistem untuk melakukan penelitian dan mendesain penelitiannya sehingga harus merubah struktur dan susunan sistem.

    PreskriptifPeneliti punya kebebasan untuk merubah struktur dan susunan sistem.

    DeskriptifPeneliti tidak punya kebebasan untuk merubah struktur dan susunan sistem.

  • *Discrete Event Simulation Models.Model simulasi yang akan dibahas pada perkuliahan :

    Diskrit, Dinamis,Stokastik Preskriptif.

    Model ini kemudian dikenal sebagai discrete event simulation models.

  • *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 models 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.

  • *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.

  • *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.

  • *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 advised.

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

  • *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 cant be defined, simulation is not appropriate.

  • *ADVANTAGES OF SIMULATION 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

  • *DISADVANTAGES OF SIMULATIONFor a stochastic model, simulation estimates the output while an analytical solution, if available, produces the exact outputOften expensive and time consuming to developAn invalid model may result with confidence in wrong results.

  • *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.

  • *Tahapan Simulasi

    Formulate problem and plan the study

    Collect data and define a model

    no

    Valid ?

    yes

    Construct a computer program and verify

    Make pilot runs

    no

    Valid ?

    yes

    Design Experiments

    Make production runs

    Analyze output data

    Document, present and implement results

  • *STEPS IN A SIMULATION STUDYProblemformulationSetting ofobjectivesand overallproject planModelconceptualizationDatacollectionModeltranslationVerified?NoValidated?NoNoExperimentalDesignProduction runsand analysisMore runs?Documentationand reportingNoImplementationYesYesYesYes

  • *MODEL CONCEPTUALIZATIONAssumed systemConceptual modelReal World SystemLogical model

  • *CONCEPTUAL MODELAbstract essential featuresEvents, activities, entities, attributes, resources, variables, and their relationshipsPerformance measures Data requirementsSelect correct level of details (assumptions)

  • *COMPONENTS OF A SYSTEMEntity: 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 aroundCan have different types of entities concurrently

    Example: Health CenterPatientsVisitors

  • *COMPONENTS OF A SYSTEMAttribute: is a characteristic of all entities, but with a specific value local to the entity that can differ from one entity to another.

    Example: PatientType of illness,Age,Sex, Temperature,Blood Pressure

  • *COMPONENTS OF A SYSTEMResources: what entities compete forEntity seizes a resource, uses it, releases itThink of a resource being assigned to an entity, rather than an entity belonging to a resourceA resource can have several units of capacity which can be changed during the simulation

    Example: Health CenterDoctors, NursesX-Ray Equipment

  • *COMPONENTS OF A SYSTEMVariable: A piece of information that reflects some characteristic of the whole system, not of specific entities Entities can access, change some variables

    Example: Health CenterNumber of patients in the system,Number of idle doctors,Current time

  • *State: A collection of variables that contains all the information necessary to describe the system at any timeExample: 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

  • *COMPONENTS OF A SYSTEMActivity: represents a time period of specified length.

    Example: Health CenterSurgery,Checking temperature, X-Ray.

  • *Event: An instantaneous occurrence that changes the state of the systemExample: Health CentreArrival of a new patient, Completion of service (i.e., examination)Failure of medical equipment, etc.COMPONENTS OF A SYSTEM

  • *STEPS IN A SIMULATION STUDYProblemformulationSetting ofobjectivesand overallproject planModelconceptualizationDatacollectionModeltranslationVerified?NoValidated?NoNoExperimentalDesignProduction runsand analysisMore runs?Documentationand reportingNoImplementationYesYesYesYes

  • *MODEL TRANSLATIONSimulation model executes the logic contained in the flow-chart model CodingGeneral Purpose LanguageSpecial Purpose Simulation Language/SoftwareJAVA, C++, Visual BASICExamples:SIMAN, ARENA, EXTENDExamples:

  • *ARENA EXAMPLE

  • *JAVA EXAMPLEpublic static void main(String argv[]){Initialization();

    //Loop until first "TotalCustomers" have departedwhile (NumberofDepartures < TotalCustomers){Event evt = FutureEventList[0]; //get imminent eventremovefromFEL(); //be rid of itClock = evt.get_time(); //advance in timeif (evt.get_type() == arrival) ProcessArrival();else ProcessDeparture();}

    ReportGeneration();}

  • *STEPS IN A SIMULATION STUDYProblemformulationSetting ofobjectivesand overallproject planModelconceptualizationDatacollectionModeltranslationVerified?NoValidated?NoNoExperimentalDesignProduction runsand analysisMore runs?Documentationand reportingNoImplementationYesYesYesYes

  • *VERIFICATION AND VALIDATIONVerification: 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

  • *VERIFICATION AND VALIDATION Conceptual model Logical model Simulation modelReal World SystemVERIFICATIONVALIDATION

  • *STEPS IN A SIMULATION STUDYProblemformulationSetting ofobjectivesand overallproject planModelconceptualizationDatacollectionModeltranslationVerified?NoValidated?NoNoExperimentalDesignProduction runsand analysisMore runs?Documentationand reportingNoImplementationYesYesYesYes

  • *EXPERIMENTAL DESIGNAlternative scenarios to be simulatedType of output data analysis (steady-state vs. terminating simulation analysis) Number of simulation runsLength of each runThe manner of initializationVariance reduction

  • *

    ANALYSIS OF RESULTS

    Statistical tests for significance and rankingPoint EstimationConfidence-Interval EstimationInterpretation of resultsMore runs?

  • *STEPS IN A SIMULATION STUDYProblemformulationSetting ofobjectivesand overallproject planModelconceptualizationDatacollectionModeltranslationVerified?NoValidated?NoNoExperimentalDesignProduction runsand analysisMore runs?Documentationand reportingNoImplementationYesYesYesYes

  • *

    DOCUMENTATION & REPORTING

    Program DocumentationAllows future modificationsCreates confidenceProgress ReportsFrequent reports (e.g. monthly) are suggestedAlternative scenariosPerformance measures or criteria usedResults of experimentsRecommendations

  • *

    IMPLEMENTATION

  • *Demo MINITABGenerate data normal dan uji kenormalan data

  • *Kolmogorov-Smirnov

  • *Design ExperimentTesting Hypothesis, ANOVA, dan Respon Surface Methodology

  • *Testing Hypothesis (1)

  • *Testing Hypothesis (2)

    *******************For this and the next 3 slides, ask the students to identify good or poor precision and good or poor accuracy as a review.*Continuation of the review. Possible bias error here also.*Continuation of the review. Possible resolution error here also.*Continuation of the review.*References:Juran, Quality Planning and Analysis, p. 391

    Accuracy and Precision:Even when correctly used, a measuring instrument may not give a true reading on a characteristic. The difference between the true value and the measured value can be due to problems of accuracy and precision.

    The accuracy of an instrument is the extent to which the average of a long series of repeat measurements made by the instrument on a single unit of product differs from the true value. This difference is usually due to a systematic error in the measurement process. In this case, the instrument is said to be out of calibration.

    The precision of an instrument is the extent to which the instrument repeats its results when making repeat measurements on the same unit of product. The scatter of these measurements is called the standard deviation of measurement error. The scatter is usually due to random error. The smaller the standard deviation the more precise the measurement instrument.*****************************************************