Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CONCURRENT SIMULATION: A TUTORIAL Christos G. Cassandras Dept. of Manufacturing Engineering Boston University Boston, MA 02215 Scope of."— Presentation transcript:

1

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

3 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

4 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

5 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

6 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

7 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

8 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

9 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

10 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,

11 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

12 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

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

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

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

16 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

17 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

18 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

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

20 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

21 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,...

22 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

23 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

24 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

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

26 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

27 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 = 3 1 2 3 1 2 3 A D Christos G. Cassandras CODES Lab. - Boston University D A

28 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:

29 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

30 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

31 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:

32 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:

33 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 

34 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

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

36 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: http://cad.bu.edu/cgc


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

Similar presentations


Ads by Google