CONCURRENT SIMULATION: A TUTORIAL Christos G. Cassandras Dept. of Manufacturing Engineering Boston University Boston, MA 02215 Scope of.

Slides:



Advertisements
Similar presentations
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics.
Advertisements

Dialogue Policy Optimisation
Introduction into Simulation Basic Simulation Modeling.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Queueing Models and Ergodicity. 2 Purpose Simulation is often used in the analysis of queueing models. A simple but typical queueing model: Queueing models.
Experimental Design, Response Surface Analysis, and Optimization
 1  Outline  Model  problem statement  detailed ARENA model  model technique  Output Analysis.
Statistical Probabilistic Model Checking Håkan L. S. Younes Carnegie Mellon University.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
1 Complexity of Network Synchronization Raeda Naamnieh.
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
Classification of Simulation Models
An Introduction to Input/Output Automata Qihua Wang.
Discrete Event Simulation How to generate RV according to a specified distribution? geometric Poisson etc. Example of a DEVS: repair problem.
Job Release-Time Design in Stochastic Manufacturing Systems Using Perturbation Analysis By: Dongping Song Supervisors: Dr. C.Hicks & Dr. C.F.Earl Department.
Components and Organization of Discrete-event Simulation Model
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
Planning operation start times for the manufacture of capital products with uncertain processing times and resource constraints D.P. Song, Dr. C.Hicks.
Module C9 Simulation Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas --
Algorithms For Inverse Reinforcement Learning Presented by Alp Sardağ.
1 Simulation Methodology H Plan: –Introduce basics of simulation modeling –Define terminology and methods used –Introduce simulation paradigms u Time-driven.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
CHAPTER 15 S IMULATION - B ASED O PTIMIZATION II : S TOCHASTIC G RADIENT AND S AMPLE P ATH M ETHODS Organization of chapter in ISSO –Introduction to gradient.
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
Planning and Verification for Stochastic Processes with Asynchronous Events Håkan L. S. Younes Carnegie Mellon University.
 1  Outline  stages and topics in simulation  generation of random variates.
Generalized Semi-Markov Processes (GSMP)
Automata. Summary Deterministic Automata  Languages Stochastic Automata Other Automata Formalisms  Automata with input and output Protocol Representation.
Time Parallel Simulations II ATM Multiplexers and G/G/1 Queues.
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Algorithms and Algorithm Analysis The “fun” stuff.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Michael Baron. Probability and Statistics for Computer Scientists,
+ Simulation Design. + Types event-advance and unit-time advance. Both these designs are event-based but utilize different ways of advancing the time.
Parallel and Distributed Simulation Memory Management & Other Optimistic Protocols.
Practical Dynamic Programming in Ljungqvist – Sargent (2004) Presented by Edson Silveira Sobrinho for Dynamic Macro class University of Houston Economics.
Modeling and Simulation Discrete-Event Simulation
Lexical Analysis: Finite Automata CS 471 September 5, 2007.
A Method for Transparent Admission Control and Request Scheduling in E-Commerce Web Sites S. Elnikety, E. Nahum, J. Tracey and W. Zwaenpoel Presented By.
Generalized Semi- Markov Processes (GSMP). Summary Some Definitions The Poisson Process Properties of the Poisson Process  Interarrival times  Memoryless.
CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko ( )
Chapter 2 Fundamental Simulation Concepts
Parallel computation Section 10.5 Giorgi Japaridze Theory of Computability.
CUHK Learning-Based Power Management for Multi-Core Processors YE Rong Nov 15, 2011.
Time Parallel Simulations I Problem-Specific Approach to Create Massively Parallel Simulations.
CHAPTER 17 O PTIMAL D ESIGN FOR E XPERIMENTAL I NPUTS Organization of chapter in ISSO –Background Motivation Finite sample and asymptotic (continuous)
Parallel and Distributed Simulation Time Parallel Simulation.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Monte-Carlo based Expertise A powerful Tool for System Evaluation & Optimization  Introduction  Features  System Performance.
A Formalism for Stochastic Decision Processes with Asynchronous Events Håkan L. S. YounesReid G. Simmons Carnegie Mellon University.
2005 Unbinned Point Source Analysis Update Jim Braun IceCube Fall 2006 Collaboration Meeting.
Sunpyo Hong, Hyesoon Kim
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
Non-parametric Methods for Clustering Continuous and Categorical Data Steven X. Wang Dept. of Math. and Stat. York University May 13, 2010.
Christos G. Cassandras CODES Lab. - Boston University ELEVATOR DISPATCHING PASSENGER QUEUES COMPLEXITY: Huge state space, Movement constraints, non-stationary.
Discrete-Event System Simulation in Java. Discrete Event Systems New dynamic systems New dynamic systems Computer and communication networks Computer.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics B: Michael Baron. Probability and Statistics for Computer Scientists,
OPERATING SYSTEMS CS 3502 Fall 2017
Prepared by Lloyd R. Jaisingh
CPU Scheduling G.Anuradha
Hidden Markov Models Part 2: Algorithms
Discrete Event Simulation - 4
Slides for Introduction to Stochastic Search and Optimization (ISSO) by J. C. Spall CHAPTER 15 SIMULATION-BASED OPTIMIZATION II: STOCHASTIC GRADIENT AND.
Presented By: Darlene Banta
Programming with Shared Memory Specifying parallelism
CS 416 Artificial Intelligence
Generalized Perturbation and Simulation
Presentation transcript:

CONCURRENT SIMULATION: A TUTORIAL Christos G. Cassandras Dept. of Manufacturing Engineering Boston University Boston, MA Scope of Concurrent Simulation Modeling Foundations The Sample Path Constructability Problem The Time Warping Algorithm (TWA) Christos G. Cassandras CODES Lab. - Boston University OUTLINE:

SCOPE OF CONCURRENT SIMULATION SIMULATOR Design Parameters Design Parameters Operating Policies, Control Parameters Operating Policies, Control Parameters Performance Measures Performance Measures Christos G. Cassandras CODES Lab. - Boston University CONVENTIONAL SIMULATION ANALYSIS Repeatedly change parameters/operating policies Test different conditions Answer multiple WHAT IF questions

SCOPE OF CONCURRENT SIMULATION Christos G. Cassandras CODES Lab. - Boston University CONTINUED SIMULATOR Design Parameters Design Parameters Performance Measures Performance Measures Operating Policies, Control Parameters Operating Policies, Control Parameters CONCURRENCY ENGINE WHAT IF… Parameter p 1 = a were replaced by p 1 = b Parameter p 2 = c were replaced by p 2 = d WHAT IF… Parameter p 1 = a were replaced by p 1 = b Parameter p 2 = c were replaced by p 2 = d Performance Measures under all WHAT IF Questions Performance Measures under all WHAT IF Questions ANSWERS TO MULTIPLE “WHAT IF” QUESTIONS AUTOMATICALLY PROVIDED

SCOPE OF CONCURRENT SIMULATION TYPICAL OPTIMIZATION PROCESS FOR COMPLEX SYSTEMS: Repeated Trial and Error Christos G. Cassandras CODES Lab. - Boston University CONTINUED SEARCH SPACE SIMULATE SYSTEM ESTIMATE PERFORMANCE CHOOSE NEW POINT SIMULATE SYSTEM CHOOSE NEW POINT ESTIMATE PERFORMANCE etc…etc…etc

SIMULATE SYSTEM SCOPE OF CONCURRENT SIMULATION Christos G. Cassandras CODES Lab. - Boston University CONTINUED ESTIMATE PERFORMANCE Estimate performance over many points from simulation at a single point CONCURRENT SIMULATION CHOOSE NEW POINT SEARCH SPACE SIMULATE SYSTEM ESTIMATE PERFORMANCE CONCURRENT SIMULATION CHOOSE NEW POINT RAPID LEARNING

TERMINOLOGY: IMPORTANT DISTINCTIONS 1. BRUTE-FORCE SIMULATION: sequentially simulate a system N times -- each time under a different setting 2. PARALLEL/DISTRIBUTED SIMULATION: distribute simulation code over N processors or a network of N workstations 3. CONCURRENT SIMULATION: use data from simulation of one system to concurrently simulate the system under N different settings Christos G. Cassandras CODES Lab. - Boston University 1 processorN runsN input-output data N processors1 run1 input-output data 1 processor1 runN input-output data

TERMINOLOGY: IMPORTANT DISTINCTIONS Christos G. Cassandras CODES Lab. - Boston University 1. CONCURRENT SIMULATION in SEQUENTIAL COMPUTER PROCESSING Sequential processing, N simulation threads unfolding in parallel Main benefit: Sharing of data and some data structures CONTINUED 2. CONCURRENT SIMULATION in PARALLEL COMPUTER PROCESSING One processor for each simulation thread Additional benefit: All state updates parallelized

BACKGROUND: PERTURBATION ANALYSIS Christos G. Cassandras CODES Lab. - Boston University “Brute Force” Sensitivity Estimation:  DES  ] Finite Perturbation Analysis (FPA):   ] DES FPA Infinitesimal or Smoothed Perturbation Analysis (IPA, SPA):  DES IPA/SPA

MODELING FOUNDATIONS Christos G. Cassandras CODES Lab. - Boston University DISCRETE EVENT SIMULATION: The process of generating a sample path of a Stochastic Timed Automaton AUTOMATON: (E, X, , f, x 0 )  : Event Set X  : State Space  (x) : Set of feasible or enabled events at state x f : State Transition Function (undefined for events ) x 0 : Initial State,

TIMED AUTOMATON Christos G. Cassandras CODES Lab. - Boston University Add a Clock Structure V to the Automaton: (E, X, , f, x 0, V) where: and v i is a Clock or Lifetime Sequence: one for each event i NEXT EVENT Need an internal mechanism to determine NEXT EVENT e’ and hence NEXT STATE Need an internal mechanism to determine NEXT EVENT e’ and hence NEXT STATE

HOW THE TIMED AUTOMATON WORKS... Christos G. Cassandras CODES Lab. - Boston University CURRENT STATE CURRENT EVENT CURRENT EVENT TIME Associate a CLOCK VALUE/RESIDUAL LIFETIME y i with each feasible event

HOW THE TIMED AUTOMATON WORKS... Christos G. Cassandras CODES Lab. - Boston University NEXT/TRIGGERING EVENT e’ : NEXT EVENT TIME t’ : CONTINUED NEXT STATE x’ :

HOW THE TIMED AUTOMATON WORKS... Christos G. Cassandras CODES Lab. - Boston University CONTINUED Detemine new CLOCK VALUES for every event

TIMED AUTOMATON - AN EXAMPLE Christos G. Cassandras CODES Lab. - Boston University QUEUE SERVER Customer Arrivals Customer Departures

TIMED AUTOMATON - AN EXAMPLE Christos G. Cassandras CODES Lab. - Boston University CONTINUED t0t0 x 0 = 0 a e 1 = a x 0 = 1 t1t1 a d e 2 = a x 0 = 2 t2t2 a d A Typical Sample Path... e 3 = a x 0 = 3 t3t3 a d x 0 = 2 e 4 = d t4t4

STOCHASTIC TIMED AUTOMATON Same idea with the Clock Structure consisting of Stochastic Processes Associate with each event i a Lifetime Distribution based on which v i is generated Generalized Semi-Markov Process (GSMP) In a simulator, v i is generated through a pseudorandom number generator Christos G. Cassandras CODES Lab. - Boston University

THEORETICAL FOUNDATIONS Christos G. Cassandras CODES Lab. - Boston University THE CONSTRUCTABILITY PROBLEM: Consider a Discrete Event System (DES) operating under parameter settings INPUT:  = all event lifetimes u 1 = a parameter setting OUTPUT: PROBLEM: Construct sample paths under all based only on The input  The observed sample path Observed state history

CONSTRUCTABILITY PROBLEM Christos G. Cassandras CODES Lab. - Boston University  DES u1u1 u2u2 umum  OBSERVED CONSTRUCTED

CONSTRUCTABILITY PROBLEM Christos G. Cassandras CODES Lab. - Boston University CONTINUED OBSERVABILITY: A sample path is observable with respect to if for all k = 0,1,... INTERPRETATION: For every state visited in the constructed sample path, all feasible events are also feasible in the corresponding observed state x k Ref: Cassandras and Strickland, 1989

CONSTRUCTABILITY PROBLEM Christos G. Cassandras CODES Lab. - Boston University CONTINUED AGE CLOCK zizi yiyi t Define the conditional cdf of an event clock given the event age: CONSTRUCTABILITY: A sample path is constructable with respect to if AND for all k = 0,1,...

CONSTRUCTABILITY PROBLEM Christos G. Cassandras CODES Lab. - Boston University CONTINUED Two simple cases of constructability: Theorem: If all event processes are Markovian (generated by Poisson processes), then OBSERVABILITY  CONSTRUCTABILITY NOTE: Observability is a simple-to-check structural condition NOTE: Observability is a simple-to-check structural condition Theorem: CONSTRUCTABILITY

CONSTRUCTABILITY: AN EXAMPLE Christos G. Cassandras CODES Lab. - Boston University A simple design/optimization problem ADMISSION CONTROL d a Reject if Queue Length > K PROBLEM: How does the system behave under different choices of K? What is the optimal K? CONCURRENT SIMULATION APPROACH: Choose any K Simulate (or observe actual system) under K Apply Concurrent Simulation to LEARN effect of all other feasible K

CONSTRUCTABILITY: AN EXAMPLE NOMINAL SYSTEM K = 3 NOMINAL SYSTEM K = 3     aaa ddd a PERTURBED SYSTEM K = 2 PERTURBED SYSTEM K = 2   a aa dd AUGMENTED SYSTEM: Check for OBSERVABILITY  Christos G. Cassandras CODES Lab. - Boston University CONTINUED a  d  a d a   a a d d a d

CONSTRUCTABILITY: AN EXAMPLE Christos G. Cassandras CODES Lab. - Boston University CONTINUED    a a d d    a a d d a a d OBSERVABILITY satisfied! However, if roles of NOMINAL and PERTURBED are reversed, then OBSERVABILITY is not satisfied...

SOLVING THE CONSTRUCTABILITY PROBLEM Christos G. Cassandras CODES Lab. - Boston University Constructability is not easily satisfied, in general However, the CONSTRUCTABILITY PROBLEM can be solved at some cost SOLUTION METHODOLOGIES: STANDARD CLOCK (SC) methodology for Markovian systems AUGMENTED SYSTEM ANALYSIS (ASA) for systems with at most one non-Markovian event The TIME WARPING ALGORITHM (TWA) for arbitrary systems Ref: Vakili, 1991 Ref: Cassandras and Strickland, 1989 Ref: Cassandras and Panayiotou, 1996

CONCURRENT SIMULATION FOR ARBITRARY SYSTEMS MAIN IDEA: MAXIMAL SAMPLE PATH COUPLING Observe event in a sample path under setting  0 Save the lifetime of this event Wait until ALL sample paths constructed under  2,…,  M have used the lifetime at the right time EXAMPLE: Queueing System with capacity K Observed sample path: K = 2 Constructed sample path: K = A D Christos G. Cassandras CODES Lab. - Boston University D A

CONCURRENT SIMULATION FOR ARBITRARY SYSTEMS Christos G. Cassandras CODES Lab. - Boston University CONTINUED OBSERVED event sequence under  0 after n events: CONSTRUCTED event sequence under any after k events: Define the SCORE of event i after n total events:

CONCURRENT SIMULATION FOR ARBITRARY SYSTEMS Christos G. Cassandras CODES Lab. - Boston University CONTINUED Lifetime sequence of event i on OBSERVED sample path: Lifetime sequence of event i on CONSTRUCTED sample path: A subsequence of V i (n): LIFETIMES ALREADY OBSERVED, BUT NOT YET USED IN CONSTRUCTED PATH

CONCURRENT SIMULATION FOR ARBITRARY SYSTEMS Christos G. Cassandras CODES Lab. - Boston University CONTINUED AVAILABLE Event Set: EVENTS ALREADY OBSERVED IN  n) WITH LIFETIMES YET UNUSED IN CONSTRUCTED SAMPLE PATH MISSING Event Set: EVENTS NEEDED TO CONTINUE CONSTRUCTION EVENTS AVAILABLE FROM LAST STATE TRANSITION NOTE: Constructed sample path is ACTIVE as long as MISSING Event Set is contained in AVAILABLE Event Set

CONCURRENT SIMULATION: STEP 1 Christos G. Cassandras CODES Lab. - Boston University CONTINUED When event e n+1 is observed: 1. Store observed event lifetime: 2. Add event to AVAILABLE Event Set: 3. No change to MISSING Event Set: 4. Check if constructed sample path is ACTIVE:

CONCURRENT SIMULATION: STEP 2 Christos G. Cassandras CODES Lab. - Boston University CONTINUED If constructed sample path is ACTIVE: 1. Discard “used up” observed event lifetime: 2. Delete from AVAILABLE Event Set: 3. Update MISSING Event Set: 4. Check if constructed sample path is still ACTIVE:

TIME WARPING ALGORITHM (TWA) Observe event e n+1 and check ACTIVE condition: If ACTIVE condition holds, then “Time Warp”: Construct desired state trajectory for events j = k, k+1,… as long as: When ACTIVE condition no longer satisfied, wait for next observed event and repeat Observed sample path Constructed sample path n k Christos G. Cassandras CODES Lab. - Boston University k+1 

TWA PERFORMANCE: SPEEDUP FACTORS Christos G. Cassandras CODES Lab. - Boston University Simulation time for OBSERVED sample path (N events) Simulation time for OBSERVED sample path (N events) + TWA for CONSTRUCTED sample path (K events) Simulation time for CONSTRUCTED sample path (N events) SPEEDUP FACTOR: NOTE: In conventional simulation, every event processed is discarded from the Event List In Concurrent Simulation, the event is saved and discarded only at the right time

TWA PERFORMANCE: SPEEDUP FACTORS Christos G. Cassandras CODES Lab. - Boston University CONTINUED TYPICAL NUMERICAL RESULTS: For simple event lifetime distributions: S ~ 2 For complex event lifetime distributions: S > 20 Ref: Cassandras and Panayiotou, 1996 The TWA is particularly efficient for the class of systems that satisfy the following REGULARITY condition: NUMBER OF NEW EVENTS TRIGGERED WHEN AN EVENT TAKES PLACE REGULARITY: NOTE: A surprisingly large class of systems satisfies the REGULARITY condition...

THE END ACKNOWLEDGEMENTS: NSF, AFOSR, ARPA, NRL, United Technologies, Rome Lab ( Al Sisti) Copies of these slides can be obtained by request and will be made available on the web: