GoldSim Workshop

GoldSim Workshop

Basic Discrete Event Modeling in GoldSim Rick Kossik Outline o What Do We Mean by Discrete Event Modeling? o Basic Concepts o Generating a Timed Event o Understanding Triggering o Responding to an Event: Causing a Change to a Quantity o Complex Triggering o Tracking the State of a System Using Status and Milestone

elements o Using Status Elements for Feedback Control o Delaying Events and Simulating Processes and Queues o Interrupting a Simulation o Advanced Discrete Event Applications What is Discrete Event Modeling? o Dynamic behavior can be conceptualized in two different ways: continuously or discretely. o Things that move continuously can be thought of as flowing (e.g., water). o Other things move or happen discretely. Examples of this include financial transactions or the movement of items through a factory.

o 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. o 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? o 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. o 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. o Rather, GoldSim is most effective at superimposing instantaneous discrete events on continuous systems: o Accidents, failures, sudden events o State changes o Financial transactions Examples of Discrete

Events Note: Definition of instantaneous is relative Representing Events in GoldSim 1. You generate events in four different ways: o 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"); o When a specified condition (e.g., X > Y) becomes true or false; o When a specified output in the model changes; or

o At a specified calendar or elapsed time. 2. 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 Lets create an event that occurs once every 20 days We use the Timed Event element to do this Understanding Triggering o In order for events to be consequential, they must trigger

other elements o 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 o 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. o We just looked at one such element, the Stochastic o 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. o Quantities are state variables

o Generally represented by a Stock element (Reservoir, Pool, Integrator) Changing the Volume in a Pond Start with a leaky pond Lets 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 o In many models, the state of the system changes

discretely (suddenly) during a simulation in a binary manner: o o o o 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). o It is useful for the state of the system to then be

referenced by other elements o 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. o 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 o Status elements can be used to properly model a feedback control system o In the absence of Status elements, it is common to see models that result in (unrealistic) oscillations o Lets experiment with a simple example: o A pond starts empty o Stochastic Inflow represented by a truncated Normal, with Mean 100 m3/day, SD of 50 m3/day, Min of 0 m3/day (changes hourly) o We want to try to keep the volume at 300 m3 by using a pump that operates at 200 m3/day

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

Using Status Elements for Feedback Control (cont.) o Turn the heat on when the temperature reaches 68; turn it off when it reaches 70 Heat off 70 Heat off Heat off

68 Heat on Heat on Heat on o The thermostat monitors two things: temperature and Is system on? o Pond example: turn the pump on when the volume reaches 310 m3, turn it off when it reaches 290 m3 o To do this, we actually need to track two state variables

o Volume and Pump State (On or Off) Delaying Events and Simulating Processes and Queues o 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. o The term process here to mean something that operates on a discrete item or instance, and takes a specified amount of time to complete: o moving a widget through a machine (that operates on or processes it in some way) o transporting an item from one location to another

o 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 o Lets model the security checkpoint at the airport o Model 1: o People arrive at the checkpoint o The number of stations changes depending on the number of people in line

o Model 2: o Add fast line to where x% of arrivals are randomly routed o Model 3: o Airport has two checkpoints o People are directed to whatever checkpoint has the shortest line Interrupting a Simulation o 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. o The Interrupt element is triggered by an event, and responds by interrupting the simulation. o 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?

o 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. o 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. o 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 o Modeling failures using the Reliability Module o Relies heavily on discrete event modeling, since failures (and repairs) are sudden events. o Modeling Projects using Conditional Containers o Containers are turned on and off via events

Learn More o Model Library o Past Webinars o Modeling Projects (May 2015) o Introduction to Reliability Module (May 2017) o Contact us with questions o [email protected]

Recently Viewed Presentations



    Run Phone Bank Wizard. Enable Advocates. Email Advocates. Go to Search>List Manager. Select you list of volunteers. Click the lightening bolt icon, and click the icon for Individuals. Enable Advocates. Click the link on the right "Enable as Advocate(s)
  •  Mark E. Damon - All Rights Reserved  Mark

    Mark E. Damon - All Rights Reserved Mark

    Scores The Future Final Jeopary Question What Our Next Project Will Be Final Jeopardy A School News Article Final Jeopardy Scores © Mark E. Damon - All Rights ...
  • Multiple Measure Assessment Project (MMAP) Caada Pilot Study

    Multiple Measure Assessment Project (MMAP) Caada Pilot Study

    Other measures that may comprise multiple measures include, but are not limited to, interviews, holistic scoring processes, attitude surveys, vocational or career aptitude and interest inventories, high school or college transcripts, specialized certificates or licenses, education and employment histories, and...
  • Infections nosocomiales

    Infections nosocomiales

    Définitions . Infection acquise à l'hôpital par un patient admis pour une raison autre que cette infection. Infection survenant chez un patient à l'hôpital ou dans un autre établissement de santé et chez qui cette infection n'était ni présente ni...
  • The Cardiovascular System

    The Cardiovascular System

    causing R/D which lowers BP. 26-Alpha, Beta, and Adrenergic Blockers. Learning Outcomes. 26.4 Compare the pharmacologic actions of the different classes of drugs that reduce sympathetic nervous system activity. The alpha-blockers doxazosin, prazosin, and terazosin selectively block the alpha-1 receptors...
  • Gestalt Psychology - Southeastern Louisiana University

    Gestalt Psychology - Southeastern Louisiana University

    Pragnanzand brain field theory. Pragnanz is the central Gestalt law of perception. It states that the brain has a natural tendency to construct meaning that (given nature of the sensory inputs) represents the simplest, most stable, most regular and symmetrical...
  • Introduction to Male Sexual Dysfunction

    Introduction to Male Sexual Dysfunction

    PE (lifelong and acquired) is a male sexual dysfunction characterised by the following: 1.Ejaculation that always or nearly always occurs prior to or . within about 1 minute. of vaginal penetration (lifelong PE) or a clinically significant and bothersome reduction...
  • Volcanoes and Igneous Activity Earth - Chapter 4

    Volcanoes and Igneous Activity Earth - Chapter 4

    • Maritime tropical air is the source of much, if not most, of the precipitation received in the eastern two-thirds of the United States. Weather in North America 20.1 Air Masses Maritime Polar Air Masses • Maritime polar air masses...