outline
play

Outline Simulation modeling characteristics CSCI: 4210/6210 - PDF document

Outline Simulation modeling characteristics CSCI: 4210/6210 Concept of Time A DES computation Simulation & Modeling DES System = model + simulation executive Data structures Program (Code) Event-Oriented Simulations 2


  1. Outline � Simulation modeling characteristics CSCI: 4210/6210 � Concept of Time � A DES computation Simulation & Modeling � DES System = model + simulation executive � Data structures � Program (Code) Event-Oriented Simulations 2 Maria Hybinette, UGA Maria Hybinette, UGA Simulation Model Characteristics Today we will look at: � Static or dynamic models Monte Carlo simulations Stochastic � Stochastic, deterministic or chaotic models � Discrete or continuous change/models Continuous Time � Aggregates or Individuals Deterministic Discrete Time Static Dynamic Computer Art: Brownian Tree - fractal with a dendritic structure. Generated stochastically 3 4 Maria Hybinette, UGA Maria Hybinette, UGA Static or Dynamic Models Deterministic, Stochastic or Chaotic � Dynamic: � Deterministic: » State variables change over time » Predictive behavior. The system is perfectly understood, » System Dynamics, Discrete Event, Agent-Based then it is possible to predict precisely what will happen. » Repeatable � Static: � Stochastic: » Snapshot at a single point in time » behavior cannot be entirely predicted. » Monte Carlo simulation, optimization models � Chaotic: » deterministic model with a behavior that cannot be Inputs Response entirely predicted. Depends so sensitively on the system’s X i, X i, initial conditions so that in effect it cannot be predicted. Repetitions X i,2 … X i,j … X i,p y i 1 3 1 2 3 . . . n 5 6 Maria Hybinette, UGA Maria Hybinette, UGA

  2. Discrete or Continuous Models � Discrete model: State variables State variables » state variables change only at a countable number of points in time. – These points in time are the ones at which the event occurs/change in state. � Continuous model: Time Time » state variables change in a continuous way, and not abruptly from one state to another. Continuous: State variables change Discrete: State variables change at continuously as a function of time discrete times » infinite number of states. State variables = f( t ) 7 8 Maria Hybinette, UGA Maria Hybinette, UGA Simulation outputs (t) One or more inputs (t) random Model allows Actual System system state to parameters Monte Carlo simulations change at any time Stochastic = ? Parameters Fixed inputs yield different Continuous Time outputs Simulated System Deterministic outputs (t) Discrete Time Fixed inputs � Simulated system imitates operations of actual system over time Static Dynamic System state yield fixed � Artificial history of system can be generated and observed changes at distinct outputs times � Internal (perhaps unobservable) behavior of system can be studied System description at � Time scale can be altered as needed System description one point in time � Conclusion about actual system characteristics can be inferred as it changes in time 9 10 Maria Hybinette, UGA Maria Hybinette, UGA What is a Simulation Model? System’s Modeling System Environment inputs (t) outputs (t) System Actual System System Parameters Environment Interactive objects inputs (t) outputs (t) Model Model (simplified) Parameters Environment Placing the system boundary � An abstraction of a real system is the first difficult task in modeling � Simplified assumptions are used to capture (only) important behaviors 11 12 Maria Hybinette, UGA Maria Hybinette, UGA

  3. System’s Modeling Entities, Attributes and Activities... System Environment � An entity is an object of interest in the system System » Example: Customer Manager Cashier Earth? � An attribute is a (relevant) property of an Sun Asteroids? entity » Example: Account balance Gender Skills Moon Pluto � Attributes are state variables Placing the system boundary is the first difficult task in modeling 13 14 Maria Hybinette, UGA Maria Hybinette, UGA Activities & Delays State and State Variables � An activity… … is a duration of a known length � The (system) state » Example: drink coffee, serve customers » Activities form part of the model specification » complete » Inter-arrival time, service time » minimal » Deterministic or stochastic (probabilistic) » contains sufficient information to describe the � A delay… … is a duration of unknown length system at any point in time. » waiting time in queue � Delays form part of the simulation results � A state variable » Example: waiting time in queue » Describes a portion of the state. » Delays form part of the simulation results » Length of a queue, activity of a manager (sleeping, drinking coffee) event delay event activity Begin Arrive Depart Service wait in queue receive service 15 16 Maria Hybinette, UGA Maria Hybinette, UGA Events Conditional and Primary Events � Event: � Primary Events » Occurrence » Scheduled at a certain time » Instantaneous » Arrival of customers » May change the state � Conditional Events � Example single server queue: » triggered by a certain condition becoming TRUE -- a completion of a delay » Arrival -- while the server is busy, so queue length is incremented by 1; » Customers moving from queue to service » Departure -- the completion of service 17 18 Maria Hybinette, UGA Maria Hybinette, UGA

  4. How to Create a DES? A Simulation Example � DES Modeling raises the following questions? � Single-server Queue at a bank » How does each event affect system state and � One possible problem formulation: attributes? » “customer have to wait too long in my bank” » How are activities defined? � Objective: – What events mark beginning and the end? » Determine the effect of an additional cashier – What condition (if any) most hold? � Data needed: » How are delays defined? » How is the simulation initialized? » inter-arrival time of customers » Service times 19 20 Maria Hybinette, UGA Maria Hybinette, UGA Simulation Results Movie Queue Length Moving Image � Series of still images, sufficient to convey recognizable motion Time 21 22 Maria Hybinette, UGA Maria Hybinette, UGA System Snapshots System Snapshots Moving Image System Simulation � Series of system snapshot » system state » activities in progress System Simulation » end time 23 24 Maria Hybinette, UGA Maria Hybinette, UGA

  5. Time Simulation Time � Physical system: actual or imagined system being modeled � Simulation : a system that emulates the behavior of a physical system Simulation time is defined as a totally ordered set of values where each value represents an instant of time in the physical system being modeled. main() { ... double clock; ... � For any two values of simulation time T 1 representing } instant P 1 , and T 2 representing P 2 : � Correct ordering of time instants physical system simulation » If T 1 < T 2 , then P 1 occurs before P 2 » 9.0 represents 9 PM, 10.5 represents 10:30 PM � physical time : time in the physical system � Correct representation of time durations » Noon, December 31, 1999 to noon January 1, 2000 » T 2 - T 1 = k (P 2 - P 1 ) for some constant k � simulation time : representation of physical time within the simulation » 1.0 in simulation time represents 1 hour of physical time » floating point values in interval [0.0, 24.0] � wallclock time : time during the execution of the simulation, usually output from a hardware clock 25 26 » 9:00 to 9:15 AM on September 10, 1999 Maria Hybinette, UGA Maria Hybinette, UGA Modes of Execution Discrete Event Simulation � As-fast-as-possible execution (unpaced): no fixed Discrete event simulation: computer model for a relationship necessarily exists between advances in system where changes in the state of the system simulation time and advances in wallclock time occur at discrete points in simulation time. � Real-time execution (paced): each advance in simulation time is paced to occur in synchrony with an equivalent advance in wallclock time Fundamental concepts: � Scaled real-time execution (paced): each advance in – system state (state variables) simulation time is paced to occur in synchrony with S * an – state transitions (events) equivalent advance in wallclock time (e.g., 2 x wallclock time) A DES computation: can be viewed as a sequence of Converting from wallclock to Simulation Time: event computations , with each event computation is Simulation Time = W2S(W) = T 0 + S * (W - W 0 ) assigned a (simulation time) time stamp. Each event W = wallclock time; S = scale factor computation can W 0 (T 0 ) = wallclock (simulation) time at start of simulation – modify state variables (assume simulation and wallclock time use same time units) – schedule new events 27 28 Maria Hybinette, UGA Maria Hybinette, UGA Discrete Event Simulation Discrete Event Simulation Computation System example : air traffic at an airport events : aircraft arrival, landing, departure Simulation Application model of the • state variables physical • code modeling system behavior system • I/O and user interface software calls to calls to event schedule handlers arrival events schedules processed event 8:00 departure arrival current event Independent schedules 9:15 9:30 landed Simulation Executive unprocessed event 8:05 of the • event list management simulation • managing advances in simulation time application � Unprocessed events are stored in a pending event list � Events are processed in time stamp order 29 30 Maria Hybinette, UGA Maria Hybinette, UGA

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend