Basic Discrete Event Modeling in GoldSim

Slides:



Advertisements
Similar presentations
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Advertisements

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:
Modeling and Simulation
Copyright GoldSim Technology Group LLC, 2005 Slide 1 Introduction to the GoldSim Reliability Module GoldSim Technology Group Issaquah, Washington USA.
GoldSim 2006 User Conference Slide 1 Vancouver, B.C. Event-Driven Models.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
GoldSim Technology Group LLC, 2006 Slide 1 Introduction to the New Features in the Upcoming Glacier Release Glacier Peak, Washington 3,213 Meters (10,541.
GoldSim Technology Group LLC, 2006 Slide 1 Water Balance Modeling Techniques.
Simulation Chapter 16 of Quantitative Methods for Business, by Anderson, Sweeney and Williams Read sections 16.1, 16.2, 16.3, 16.4, and Appendix 16.1.
(C) J. M. Garrido1 Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that.
56 Resources u Icons represent resources u Dynamic resources must be assigned a path network u Resources position at nodes, not locations u “Specs” field.
Introduction to Simulation Chapter 12. Introduction to Simulation  In many spreadsheets, the value for one or more cells representing independent variables.
SPiiPlus Training Class
CE 3372 Water Systems design
Real-time Software Design
Chapter 19: Network Management
OPERATING SYSTEMS CS 3502 Fall 2017
Known Probability Distributions
Unit 1: Matter, Measurement, and unit conversions
Hardware & Software Reliability
Prepared by Lloyd R. Jaisingh
Software Architecture in Practice
Chapter 13 Solver .out File and CCL
Control Structures II Chapter 3
Designing For Testability
Models of Traffic Flow 1.
Topics Introduction to Repetition Structures
Modeling and Simulation (An Introduction)
System Design and Modeling
How SCADA Systems Work?.
NATCOR Stochastic Modelling Course Inventory Control – Part 1
Cse 373 May 15th – Iterators.
Lecture 07 More Repetition Richard Gesick.
ENGR 201: Statistics for Engineers
Real-time Software Design
The Electrical Diagram
Lecture 4B More Repetition Richard Gesick
Chapter 10 Verification and Validation of Simulation Models
Chapter 12 © 2011, The McGraw-Hill Companies, Inc.
SAD ::: Spring 2018 Sabbir Muhammad Saleh
CSCI1600: Embedded and Real Time Software
Material Requirements Planning (MRP)
Overview of Models & Modeling Concepts
World-Views of Simulation
MARIE: An Introduction to a Simple Computer
Process Capability.
Process & its States Lecture 5.
Scenario Modeling in GoldSim
Tonga Institute of Higher Education
CSCI1600: Embedded and Real Time Software
Training Module Introduction to the TB9100/P25 CG/P25 TAG Customer Service Software (CSS) Describes Release 3.95 for Trunked TB9100 and P25 TAG Release.
Introduction to Work Measurement
Using Use Case Diagrams
System Testing.
Why Background Processing?
1004 Enclosure and Life Support Management
Lecture 11: Binomial and Poisson Distributions
Topics Introduction to Repetition Structures
Discrete Event Simulation
Chapter 4: Simulation Designs
How to Use i2b2 URL to i2b2: Questions?
Basic Concepts of Algorithm
MECH 3550 : Simulation & Visualization
Simple Sequencing Part 2
Simulation Supplement B.
Chapter 1: Creating a Program.
and Forecasting Resources
Modeling Water Treatment Using the Contaminant Transport Module
Presentation transcript:

Basic Discrete Event Modeling in GoldSim Rick Kossik

Outline What Do We Mean by Discrete Event Modeling? Basic Concepts Generating a Timed Event Understanding Triggering Responding to an Event: Causing a Change to a Quantity Complex Triggering Tracking the State of a System Using Status and Milestone elements Using Status Elements for Feedback Control Delaying Events and Simulating Processes and Queues Interrupting a Simulation Advanced Discrete Event Applications

What is Discrete Event Modeling? Dynamic behavior can be conceptualized in two different ways: continuously or discretely. Things that move continuously can be thought of as flowing (e.g., water). Other things move or happen discretely. Examples of this include financial transactions or the movement of items through a factory. Just because something is considered to flow (like water), it does not mean that all of the dynamics for that system can be treated as being continuous. For example, if water is flowing from one pond to another (via a pump), and the pump suddenly breaks down, that is a “discrete event”, and must be treated in an appropriate manner. As a result, most real-world systems are best described using a combination of continuous and discrete dynamics (i.e., hybrid systems).

What is Discrete Event Modeling? You should not confuse GoldSim with Discrete Event Simulators. These highly-specialized tools are designed for simulating processes such as call centers, assembly lines, various types of queues, and shipping facilities. If the system you are trying to model resembles something like that, a pure discrete event simulator would typically be a more appropriate tool than GoldSim. Rather, GoldSim is most effective at superimposing “instantaneous” discrete events on continuous systems: Accidents, failures, sudden events State changes Financial transactions

Examples of Discrete Events Note: Definition of “instantaneous” is relative

Representing Events in GoldSim You generate events in four different ways: Based on a specified rate of occurrence, which can be treated as regular or random ("occur exactly once a week" or "occur, on average, once a week"); When a specified condition (e.g., X > Y) becomes true or false; When a specified output in the model changes; or At a specified calendar or elapsed time. Events can then be specified to instantaneously trigger various elements to take a particular action (e.g., instantaneously change their value).

Generating a Timed Event Let’s create an event that occurs once every 20 days We use the Timed Event element to do this

Understanding Triggering In order for events to be consequential, they must trigger other elements All elements that can be triggered share the same triggering dialog

Some Simple Triggers Triggering a Stochastic using a Timed Event Triggering a Stochastic using a condition Recall you can generate an event when a specified condition (e.g., X > Y) becomes true or false; Triggering multiple element simultaneously using a Triggered Event element

Responding to an Event: Changing a Quantity A variety of GoldSim elements can be triggered by events, with each element responding to the event (taking a particular action) in a different manner. We just looked at one such element, the Stochastic One of the most powerful (and common) ways a model can respond to an event is to cause a discrete (i.e., sudden) change to a quantity. Quantities are state variables Generally represented by a Stock element (Reservoir, Pool, Integrator)

Changing the Volume in a Pond Start with a leaky pond Let’s assume that what we want to simulate is someone adding (instantaneously) 25 m3 of water at 65 days. What about removing water? What about “replacing” the current value? What about multiple changes?

Complex Triggers Start Time of 1/1/2018, an End Time of 1/1/2019, and a one day timestep. A pond starts empty and has a constant inflow rate of 1 m3/day. There is a discrete addition of 60 m3 every month. There is a discrete withdrawal that occurs randomly once every 50 days, but only in July through December (the withdrawal does not occur January through June). The amount withdrawn is sampled from a Normal distribution with a Mean of 200 m3 and a Standard Deviation of 40 m3.

Responding to an Event: Changing the State of a System In many models, the state of the system changes discretely (suddenly) during a simulation in a binary manner: A piece of equipment fails (i.e., changes its state from operating to failed); An object (e.g., a pump or a light) turns on or off; A business opens and closes for the day; and A task or activity is completed (i.e., it changes from unfinished to finished). It is useful for the state of the system to then be referenced by other elements To support this, GoldSim provides two elements that can be used to track the state of the system: the Status element and the Milestone element. Both of these elements can respond to discrete signals.

Status Element Simulate a conveyor belt that moves soil from one location to another, where it is subsequently stockpiled. The conveyor belt is modeled using a Material Delay. The stockpile at the end of the conveyor belt is a Reservoir. When the conveyor belt is operating, it moves at a constant rate and is loaded at a contant rate. The conveyor belt, however, only operates from 8AM to 5PM. Outside of that time, the conveyor belt stops (and is no longer loaded). The model uses a Status element to track the state of the conveyor belt (on or off).

Milestone Element We want to record when the stockpile gets to a certain size (e.g., 20,000 kg). Moreover, at that point we want to shut down the entire process. We will use a Milestone element to represent this.

Using Status Elements for Feedback Control Status elements can be used to properly model a feedback control system In the absence of Status elements, it is common to see models that result in (unrealistic) oscillations Let’s experiment with a simple example: A pond starts empty Stochastic Inflow represented by a truncated Normal, with Mean 100 m3/day, SD of 50 m3/day, Min of 0 m3/day (changes hourly) We want to try to keep the volume at 300 m3 by using a pump that operates at 200 m3/day What should our logic be for turning on and off the pump?

Using Status Elements for Feedback Control (cont.) This is not representative of how a real feedback control system would typically work. As an analogy, consider a thermostat: A thermostat monitors the temperature (a proxy for the heat in the house, which is the state variable) The heat does not turn on when temperature exceeds X and turn off when it drops below X Rather, it uses a deadband

Using Status Elements for Feedback Control (cont.) Turn the heat on when the temperature reaches 68; turn it off when it reaches 70 The thermostat monitors two things: temperature and Is system on? Pond example: turn the pump on when the volume reaches 310 m3, turn it off when it reaches 290 m3 To do this, we actually need to track two state variables Volume and Pump State (On or Off) 70 68 Heat off Heat on

Delaying Events and Simulating Processes and Queues In some cases, we will want to delay discrete signals in order to realistically represent a system. In particular, we can use Event Delays to model a “process”. The term “process” here to mean something that operates on a discrete item or instance, and takes a specified amount of time to complete: moving a widget through a machine (that operates on or processes it in some way) transporting an item from one location to another As a general rule, GoldSim was not specifically designed to do this (other tools are specifically designed to model things like this), but it can sometimes be useful to do so.

Modeling Processes and Queues Let’s model the security checkpoint at the airport Model 1: People arrive at the checkpoint The number of stations changes depending on the number of people in line Model 2: Add “fast line” to where x% of arrivals are randomly routed Model 3: Airport has two checkpoints People are directed to whatever checkpoint has the shortest line

Interrupting a Simulation The Interrupt element is another element that can be triggered by events. However, it is not used to actually represent a feature or a process in a model. Rather, it is used to help you debug and test complex models as you build them. The Interrupt element is triggered by an event, and responds by interrupting the simulation. When the simulation is interrupted, you can display a user- defined message dialog with options for continuing or pausing (and subsequently aborting) the simulation and/or you can specify that the message is written to the run log.

Why Use an Interrupt? To alert you to error conditions that indicate a logical problem in a model. For example, if a certain variable should not go below 0 (if it does, it indicates a logic error in the model), you could use an Interrupt element to check for this condition. To help you debug a model that is producing a fatal error or showing unusual behavior. For example, if a model produces a fatal error (or starts behaving unusually) when certain conditions are met or at a particular time in a simulation, you could use an Interrupt element to pause the simulation at that point so that you can browse the model and/or save the results up to that point in time. To terminate (skip to the end of) a simulation when a certain set of conditions are met. For example, if you were carrying out a Monte Carlo simulation of a project, the project may actually complete at a different time each realization. When the project completes, you could use an Interrupt element to skip to the end of the realization.

Advanced Discrete Event Applications Modeling failures using the Reliability Module Relies heavily on discrete event modeling, since failures (and repairs) are sudden events. Modeling Projects using Conditional Containers Containers are turned on and off via events

Learn More Model Library Past Webinars Contact us with questions Modeling Projects (May 2015) Introduction to Reliability Module (May 2017) Contact us with questions support@goldsim.com