Parallel and Distributed Simulation

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

1. We use models in an attempt to gain understanding and insights about some aspect of the real world. Attempts to model reality assume a priori the existence.
Parallel and Distributed Simulation
Lookahead. Outline Null message algorithm: The Time Creep Problem Lookahead –What is it and why is it important? –Writing simulations to maximize lookahead.
CS 111: Introduction to Programming Midterm Exam NAME _________________ UIN __________________ 10/30/08 1.Who is our hero? 2.Why is this person our hero?
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Concurrency: monitors & condition synchronization1 ©Magee/Kramer 2 nd Edition COMP60611 Fundamentals of Parallel and Distributed Systems Lecture 8b Monitors.
 1  Outline  performance measures for a single-server station  discrete-event simulation  hand simulation  process-oriented simulation approach.
Parallel and Distributed Simulation Time Warp: Other Mechanisms.
Event-drive SimulationCS-2303, C-Term Project #3 – Event-driven Simulation CS-2303 System Programming Concepts (Slides include materials from The.
Simulation. Example: A Bank Simulator We are given: –The number of tellers –The arrival time of each customer –The amount of time each customer requires.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Operational Semantics ICS.
RAIDs Performance Prediction based on Fuzzy Queue Theory Carlos Campos Bracho ECE 510 Project Prof. Dr. Duncan Elliot.
Components and Organization of Discrete-event Simulation Model
Simulation with ArenaChapter 2 – Fundamental Simulation Concepts Discrete Event “Hand” Simulation of a GI/GI/1 Queue.
Discrete Event Simulation Event-Oriented Simulations By Syed S. Rizvi.
Parallel and Distributed Simulation Object-Oriented Simulation.
Visual Basic: An Object Oriented Approach 3 – Making Objects Work.
Execution Control with If/Else and Boolean Functions Example: Single Condition Alice.
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
Fundamentals of Python: From First Programs Through Data Structures
Location Models For Airline Hubs Behaving as M/D/C Queues By: Shuxing Cheng Yi-Chieh Han Emile White.
Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes:
Christopher D. Carothers
Execution Control with If/Else and Boolean Functions
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Data Structures Using C++ 2E Chapter 8 Queues. Data Structures Using C++ 2E2 Objectives Learn about queues Examine various queue operations Learn how.
Parallel and Distributed Simulation Process Oriented Simulation.
Threaded Programming in Python Adapted from Fundamentals of Python: From First Programs Through Data Structures CPE 401 / 601 Computer Network Systems.
Parallel and Distributed Simulation Distributed Virtual Environments (DVE) & Software Introduction.
Simulation & Confidence Intervals COMP5416 Advanced Network Technologies.
Chapter 2 Fundamental Simulation Concepts
Scenario on airport works Session 5 Presentation 1.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Object Oriented Simulation with OOSimL Conditional Waiting.
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Basics of register-transfer design: –data paths and controllers; –ASM.
Dr. Anis Koubâa CS433 Modeling and Simulation
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation ---- Discrete Event Simulation (DES) TexPoint fonts used in EMF.
Alice in Action with Java Chapter 4 Flow Control.
CS433 Modeling and Simulation Lecture 09 – Part 02 Discrete Events Simulation Dr. Anis Koubâa 27 Dec 2008 Al-Imam.
Parallel and Distributed Simulation Process Oriented Simulation.
1 Chapter 11 Global Properties (Distributed Termination)
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation ---- Discrete Event Simulation (DES) TexPoint fonts used in EMF.
Discrete-Event System Simulation in Java. Discrete Event Systems New dynamic systems New dynamic systems Computer and communication networks Computer.
Simulation Modeling & Simulation 33.  Simulation: It is a numerical technique for conducting experiments with certain types of mathematical models.
Chapter 1 What is Simulation?. Fall 2001 IMSE643 Industrial Simulation What’s Simulation? Simulation – A broad collection of methods and applications.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Introduction to Simulation What is a simulation? A system that represents or emulates the behavior of another system over time; a computer simulation is.
PDES Introduction The Time Warp Mechanism
Threaded Programming in Python
Data Structures Using C++ 2E
Parallel and Distributed Simulation
OPERATING SYSTEMS CS3502 Fall 2017
Scenario on airport works
ADVANTAGES OF SIMULATION
Discrete Event Simulation
TexPoint fonts used in EMF.
Discrete Event “Hand” Simulation of a GI/GI/1 Queue
Discrete Event Simulation
Chapter 4: Simulation Designs
Parallel Discrete-Event Simulations
Where real stuff starts
Parallel Exact Stochastic Simulation in Biochemical Systems
Lecture 11 – Stochastic Processes
Presentation transcript:

Parallel and Distributed Simulation Event Oriented Simulation

Outline Discrete Event Simulation Basics DES systems Simulation application and simulation executive Data structures: state variables, pending event list, simulation time clock Code: event loop, event procedures Example

Discrete Event Simulation Discrete event simulation: computer model for a system where changes in the state of the system occur at discrete points in simulation time. Fundamental concepts: system state (state variables) state transitions (events) A DES computation can be viewed as a sequence of event computations, with each event computation is assigned a (simulation time) time stamp Each event computation can modify state variables schedule new events

Discrete Event Simulation Computation example: air traffic at an airport events: aircraft arrival, landing, departure arrival 8:00 schedules processed event current event unprocessed event departure 9:15 arrival 9:30 landed 8:05 schedules simulation time Unprocessed events are stored in a pending event list Events are processed in time stamp order

Outline Discrete Event Simulation Basics DES systems Simulation application and simulation executive Data structures: state variables, pending event list, simulation time clock Code: event loop, event procedures Example

Discrete Event Simulation System Simulation Application state variables code modeling system behavior I/O and user interface software Simulation Executive event list management managing advances in simulation time calls to schedule events calls to event handlers model of the physical system independent of the simulation application

Event-Oriented World View state variables Integer: InTheAir; Integer: OnTheGround; Boolean: RunwayFree; Event handler procedures Simulation application Arrival Event { … } Landed Event Departure Event Pending Event List (PEL) 9:00 9:16 10:10 Now = 8:45 Simulation executive Event processing loop While (simulation not finished) E = smallest time stamp event in PEL Remove E from PEL Now := time stamp of E call event handler procedure

Example: Air traffic at an Airport Model aircraft arrivals and departures, arrival queueing Single runway for incoming aircraft, ignore departure queueing R = time runway is used for each landing aircraft (constant) G = time required on the ground before departing (constant) State: Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Events: Arrival: denotes aircraft arriving in air space of airport Landed: denotes aircraft landing Departure: denotes aircraft leaving

Arrival Events New aircraft arrives at airport. If the runway is free, it will begin to land. Otherwise, the aircraft must circle, and wait to land. R = time runway is used for each landing aircraft G = time required on the ground before departing Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Arrival Event: InTheAir := InTheAir+1; If (RunwayFree) RunwayFree:=FALSE; Schedule Landed event @ Now + R;

Landed Event An aircraft has completed its landing. R = time runway is used for each landing aircraft G = time required on the ground before departing Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Landed Event: InTheAir:=InTheAir-1; OnTheGround:=OnTheGround+1; Schedule Departure event @ Now + G; If (InTheAir>0) Schedule Landed event @ Now + R; Else RunwayFree := TRUE;

Departure Event An aircraft now on the ground departs for a new destination. R = time runway is used for each landing aircraft G = time required on the ground before departing Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Departure Event: OnTheGround := OnTheGround - 1;

Execution Example R=3 G=4 State Variables InTheAir OnTheGround Simulation Time State Variables RunwayFree InTheAir 1 2 3 4 5 6 7 8 9 10 11 true R=3 G=4 Time Event 1 Arrival F1 3 Arrival F2 Now=0 Processing: false 1 Time Event 4 Landed F1 3 Arrival F2 Arrival F1 Now=1 2 Time Event 4 Landed F1 Arrival F2 Now=3 Time Event Depart F2 Now=11 1 Time Event 11 Depart F2 Depart F1 Now=8 2 true Time Event 8 Depart F1 11 Depart F2 Landed F2 Now=7 1 Landed F1 Now=4 Time Event 8 Depart F1 7 Landed F2

Summary DES computation: sequence of event computations Modify state variables Schedule new events DES System = model + simulation executive Data structures Pending event list to hold unprocessed events State variables Simulation time clock variable Program (Code) Main event processing loop Event procedures Events processed in time stamp order