Introduction to Computer Simulation



Documenti analoghi
Single-rate three-color marker (srtcm)

A.A. 2006/2007 Laurea di Ingegneria Informatica. Fondamenti di C++ Horstmann Capitolo 3: Oggetti Revisione Prof. M. Angelaccio

User Guide Guglielmo SmartClient

Graphs: Cycles. Tecniche di Programmazione A.A. 2012/2013

REGISTRATION GUIDE TO RESHELL SOFTWARE

LABORATORIO ELETTROFISICO YOUR MAGNETIC PARTNER SINCE 1959

WELCOME. Go to the link of the official University of Palermo web site Click on the box on the right side Login unico

Quando mi collego ad alcuni servizi hosting ricevo un messaggio relativo al certificato di protezione del sito SSL, come mai?

A Solar Energy Storage Pilot Power Plant

INTERNET & MARKETING INNOVATIVE COMMUNICATION.

Java. Traditional portability (ideal)

Scheduling. Scheduler. Class 1 Class 2 Class 3 Class 4. Scheduler. Class 1 Class 2 Class 3 Class 4. Scheduler. Class 1 Class 2 Class 3 Class 4

Copyright 2012 Binary System srl Piacenza ITALIA Via Coppalati, 6 P.IVA info@binarysystem.eu

College Algebra. Logarithms: Denitions and Domains. Dr. Nguyen November 9, Department of Mathematics UK

Estendere Lean e Operational Excellence a tutta la Supply Chain

Data Alignment and (Geo)Referencing (sometimes Registration process)

Manutenzione del software

Algoritmi e strutture di dati 2

Constant Propagation. A More Complex Semilattice A Nondistributive Framework

Corso di Laurea in FISICA Dispositivi di calcolo II

TECNICHE DI SIMULAZIONE

Le cellule staminali dell embrione: cosa possono fare Embryonic stem cells are exciting because they can make all the different types of cell in the

General info on using shopping carts with Ingenico epayments

UNIVERSITÀ DI PISA FACOLTÀ DI INGEGNERIA

ISAC. Company Profile

U Corso di italiano, Lezione Quindici

WELCOME UNIPA REGISTRATION:

API e socket per lo sviluppo di applicazioni Web Based

Finite Model Theory / Descriptive Complexity: bin

100% Italiana «Lo stile ha una nuova via!» «Style has got a new way!»

GstarCAD 2010 Features

Ammissibilità di co.co.co. e AdR in H2020. Laura Fulci Dirigente Area Ricerca Politecnico di Torino

Compatibilità del Portale Piaggio con Internet Explorer 10 e 11. Internet Explorer 10

U Corso di italiano, Lezione Diciassette

Le piccole cose che fanno dimagrire: Tutte le mosse vincenti per perdere peso senza dieta (Italian Edition)

U Corso di italiano, Lezione Ventinove

We take care of your buildings

Algoritmi Priority-Driven RT. Corso di Sistemi RT Prof. Davide Brugali Università degli Studi di Bergamo

Probability Distributions T O P I C # 1

Sommario. Esempio di Modellazione mediante DASM: Grid OGSA. Grid secondo OGSA. Definizione Grid per OGSA. Stati di un Job e Requisiti DASM

Teoria ed esercitazioni di Automazione Industriale

La qualità vista dal monitor

Combinazioni serie IL-MIL + MOT

ELCART. Manuale di istruzioni/scheda tecnica SPECIFICATION

How to use the WPA2 encrypted connection

CODI/21 PIANOFORTE II // CODI/21 PIANO II

Newborn Upfront Payment & Newborn Supplement

U Corso di italiano, Lezione Ventidue

Ministero della Salute Direzione Generale della Ricerca Scientifica e Tecnologica Bando Giovani Ricercatori FULL PROJECT FORM

Canti Popolari delle Isole Eolie e di Altri Luoghi di Sicilia (Italian Edition)

Corsi di Laurea Magistrale/ Master Degree Programs

Appendice E - Appendix E PANNELLI FOTOVOLTAICI - PHOTOVOLTAIC PANELS

Sezione 1 / Section 1. Elementi d identità: il marchio Elements of identity: the logo

Scritto da DEApress Lunedì 14 Aprile :03 - Ultimo aggiornamento Martedì 26 Maggio :34

DICHIARAZIONE DI RESPONSABILITÀ

Solutions in motion.

La Sua banca dovrá registrare il mandato di addebito nei propri sistemi prima di poter iniziare o attivare qualsiasi transazione

SUPPLIER TECHNICAL DRAWING MANAGEMEMENT GESTIONE DEI DISEGNI TECNICI DA PARTE DEL FORNITORE 1. INTRODUZIONE 1. INTRODUCTION 2. DOCUMENTI APPLICABILI

FRANGISOLE SOLAR SHADING SYSTEM PEШЁTЧATЫE CИCTEМЫ

Portale Materiali Grafiche Tamburini. Grafiche Tamburini Materials Portal

Università degli Studi Roma Tre Dipartimento di Ingegneria Corso di Teoria e Progetto di Ponti A/A Prof. Ing.

Resources and Tools for Bibliographic Research. Search & Find Using Library Catalogues

Unità 2: Presentazione per "I giorni di scuola" Produce a multimedia rich presentation on school life in the United States and Italy.

Introduzione ai Web Services Alberto Polzonetti

Laboratorio di Amministrazione di Sistema (CT0157) parte A : domande a risposta multipla

Estratto dal Cap. 8 di: Statistics for Marketing and Consumer Research, M. Mazzocchi, ed. SAGE, 2008.

Downloading and Installing Software Socio TIS

Sosteniamo le ambizioni del middle market

Self-Calibration Hands-on CASA introduction

IBM Software Demos WebSphere Software Development WSStudio

Quadrature. Emma Perracchione. Corso di Calcolo Numerico per Ingegneria Meccanica - Matr. PARI (Univ. PD)

Visual communication in hospital

Corso di Ottimizzazione MODELLI MATEMATICI PER IL PROBLEMA DELLO YIELD MANAGEMENT FERROVIARIO. G. Di Pillo, S. Lucidi, L. Palagi

UNIVERSITÀ DEGLI STUDI DI TORINO

How to apply for the first issue of the residence permit for study. Come fare domanda di primo rilascio di permesso di soggiorno per studio

Debtags. Dare un senso a pacchetti. 16 settembre slides Enrico Zini enrico@debian.org

WEB OF SCIENCE. COVERAGE: multidisciplinary TIME RANGE: DOCUMENT TYPES: articles, proceedings papers, books

Accesso Mul*plo - modelli

LA SACRA BIBBIA: OSSIA L'ANTICO E IL NUOVO TESTAMENTO VERSIONE RIVEDUTA BY GIOVANNI LUZZI

Gocce d'anima (Italian Edition)

LA SACRA BIBBIA: OSSIA L'ANTICO E IL NUOVO TESTAMENTO VERSIONE RIVEDUTA BY GIOVANNI LUZZI

Think Sustainability The millennials view

shared bytes -> shared good A geek proposal for the Sharing Economy survival

Luca Dei Cas Centro di Monitoraggio Geologico ARPA Lombardia

Dr Mila Milani. Comparatives and Superlatives

Metodologie di progettazione

Novità versione 10 News release 10

100 consigli per vivere bene (Italian Edition)

Decode NGS data: search for genetic features

Maps. a.k.a, associative array, map, or dictionary

Introduzione Kerberos. Orazio Battaglia

Posta elettronica per gli studenti for the students

I CAMBIAMENTI PROTOTESTO-METATESTO, UN MODELLO CON ESEMPI BASATI SULLA TRADUZIONE DELLA BIBBIA (ITALIAN EDITION) BY BRUNO OSIMO

ESPERIENZA ITALIA GUIDELINES

SOA!= OO. Andrea Saltarello Software Managed Designs S.r.l. andrea.saltarello@manageddesigns.it

Prova finale di Ingegneria del software

CONFIGURATION MANUAL

Introduzione al Semantic Web Linguaggi per la rappresentazione di ontologie. L idea del Semantic Web.

SANTE PELLEGRINO

Transcript:

Introduction to Computer Simulation

Simulation Simulation means reproducing with a given accuracy how a system works in given conditions. A system may be: Input - a business process; - a manufacturing plant -anhospital; - a military mission; - etc. SYSTEM Ouput

Simulation Asimulation model aims at evaluating a performance indicator of a given system configuration or policy. It does not optimize i (i.e. does not determine the best configuration or policy) although it can play a role in a larger optimization algorithm.

Stochastic Simulation The conditions i in which h the system works can be deterministically known or may be characterized in a probabilistc fashion.

Discrete Event Simulation The state of some systems change only a discrete time instants. State changes when a new part arrives or a part service is completed

Example: simulating a new production process Comparison of alternative designs and policies before starting building the physical plant.

Some other applications Transportationsystems Plan large passenger air terminal Road traffic simulation Supply chain management Simulation of movement of crude and refined oil around the world Defence Logistics operations Simulation of battles

Simulation Simulation means reproducing how a system works in given conditions. In order to study the above mentioned system, another system (called simulator) isused. A quite common simulator is based on software (computert simulation). ) Other simulators include plastics.

Why simulate Simulation can be used to study the behavior of a system which does not exist yet; compare alternative designs of a new system compare alternative policies of an existing i system study the response of an existing system subject to unusual or extreme conditions (e.g., what if the market grows by 150% next year? )?)

Drawbacks of computer simulation In computer simulation, each part of the system is represented by a procedure/subroutine which reproduces its input/output behavior. Realistic simulations may require long computer programs of some complexity. There are special purpose simulation languages to ease this task but it is rarely simple. In addition, running a computer simulation can be very time consuming.

Approaches alternative to simulation Direct experimentation Mathematical modelling

Simulation vs direct experimentation Real experiments may be more expensive that computer simulation. Once the computer program has been written, we can simulate weeks, months or even years in seconds of computer time. When reproducing the effect of extreme conditions, it may be safer using simulation. Simulation allows to evaluate the effects of changes in legislation.

Simulation vs mathematical modelling Most mathematical models are not able to cope with dynamic and transient effects and operate instead on average values. Some mathematical models (e.g., queuing models) permit only certain probability distributions. Simulation does NOT indicate what is the best system design or policy. It simply reproduces the response a specific system or policy.

G/G/ c queue c serventi

M/M/c - Steady state expected system time where: W Intensità di traffico c 1 p0 λ ρ 1 = + 2 λ c! μ (1 ρ ) c μ p 0 j 1 c 1 c 1 λ ( λ/ μ) = j = 0 j! μ + c!(1 ρ) Determine the minimum number c of servers such that W is less than or equal to 10 minutes: easy

How to perform a simulation study

An example I should improve my operations in some way. Customers often complain. Service is quite poor especially around midday and during late evening IT manager: Where are system s bottlenecks? Should I buy additional resources? What is the optimal system configuration?

A simulation study: main steps Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation

A simulation study: main steps Firstly, I should try to determine my current bottleneck(s). Then I should simulate alternative system s configurations Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation

A simulation study: main steps What is the arrival rate of each class of customers requests? Are these arrival rates varying during the day/week/month/year/in / the long run? Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation I should estimate these parameters. Maybe interarrival times are independent I should test this hypothesis

A simulation study: main steps I think it is reasonable tomodel my system as a network of queues Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation I should use the principle of parsimony start with a very simple model, test it, then add some more details (if necessary)

A simulation study: main steps Should Iuseaspreadsheet/and h add-in/a / VIMS (Visual Interactive Modelling System)? Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation Or should I write a code in a general purpose (C/C++/ ) or tailored (SIMAN) programming language? I hope this is not the case!!!!!

A simulation study: main steps Let me see if my simulation model reproduces my current system behaviour Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation

A simulation study: main steps Let s run my simulation model. Since my system is stochastic, maybe I need to perform several runs for each alternative system configuration or policy in order have accurate performance estimates Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation

A simulation study: main steps Now I have to estimate my KPIs. Oh my god, I have to process a huge amount of data Problem structuring Design of experiments Model building Data collection and parameter estimation (Implementation) Verification Validation Simulattion Run(s) Output analysis Implementation

Simulazione ad eventi discreti

Definizioni Sistema ad eventi discreti (= tempo-discreti) Sistema il cui stato varia soltanto in istanti di tempo discreti (non in modo continuo) al verificarsi di determinati eventi. Es: I sistemi modellabili come code o reti di code Simulazione ad eventi discreti (Discrete Event Simulation, SED) Simulazione di un sistema ad eventi discreti

Pseudocodice dello schema di avanzamento del tempo Gli eventi sono gli accadimenti che possono produrre un cambiamento di stato del sistema: C lista eventi futuri Il k-mo evento A k è possiede diversi attributi tra cui: il tempo di realizzazione t k la tipologia (arrivo di un cliente, fine del servizio di un cliente, ). Insieme degli eventi conseguenti ad A k :E k + Insieme degli eventi resi impossibili da A k : E - k

Pseudocodice dello schema di avanzamento del tempo Lo stato del sistema dopo l arrivo della richiesta k-ma: x k Legge di transizione di stato (peculiare del sistema): s k = φ(s k-1, A k )

Esempio: coda G/G/1 Eventi esogeni: arrivi clienti agli istanti 0, 2, 4, 7, 8 Durate del servizio:5,1,3,3,1,rispettivamente

Esempio: coda G/G/1 t = 0: arrivo cliente 1. Stato servente = occupato; lunghezza coda = 1; t = 2: arrivo cliente 2. Stato servente = occupato; lunghezza coda = 2; T1 = 2; t = 4: arrivo cliente 3. Statot servente = occupato; lunghezza coda =3; T1 = 2; T2 = 2; t = 5: partenza cliente 1. Stato servente = occupato; lunghezza coda = 2; T1 =2;T2=2;T3=1;W1=5; t = 6: partenza cliente 2. Stato servente = occupato; lunghezzacoda=1;t1 =2;T2=3;T3=1;W1=5;W2=4; t = 7: arrivo cliente 4. Stato servente = occupato; lunghezza coda = 2; T1 = 3; T2 = 3; T3 = 1; W1 = 5; W2 = 4; t = 8: arrivo cliente 5. Stato servente = occupato; lunghezza coda = 3; T1 = 3; T2 = 4; T3 = 1; W1 = 5; W2 = 4; t = 9: partenza cliente 3. Stato servente = occupato; lunghezza coda = 2; T1 = 3; T2 = 4; T3 = 2; W1 = 5; W2 = 4; W3 = 5; t = 12: partenza cliente 4. Stato servente = occupato; lunghezza coda = 1; T1=3;T2=7;T3=2;W1=5;W2=4;W3=5;W4=5; t = 13: partenza cliente 5. Stato servente = occupato; lunghezza coda = 0; T1 = 4; T2 = 7; T3 = 2; W1 = 5; W2 = 4; W3 = 5; W4 = 5; W5 = 5.

Esempio: coda G/G/1

Compito sostitutivo della lezione di venerdì SSJ: Stochastic Simulation in Java http://www.iro.umontreal.ca/~simardr/ssj/indexe.html Comprendere la struttura del codice che consente di simulare una coda M/M/1 Siate preparati a discuterne nella lezione di lunedì 15 novembre.