1 An Introduction into Modelling and Simulation 4. A Series of Labs to Learn Simio af&e Prof. Dr.-Ing. Andreas Rinkel andreas.rinkel@hsr.ch Tel.: +41 (0) 55 2224928 Mobil: +41 (0) 79 3320562 Lab 1 Lab Objectives Understand the basics of symbols and the default object instance symbol list Lean about: How to Build the Basic Model of a line process Adding additional symbols How to make decisions in the event flow How to change the graphical appearance of events during the simulation More statistical features 2 Model: Manufacturing Line Machine Grind Package Parts arrive at the rate of 60/hour. Machining requires approximately 45 seconds/part. 10% of machined parts require remachining Grinding requires approximately 55 seconds/part. 10% of ground parts are deemed bad and are disposed of. Packaging requires approximatel y 63 seconds/part. 3
2 ToDo Raw verification or estimation of the system behavior Realize an experiment and build responses for Server utilization (Machine, Grind, Package) Average time in system (for the population of Parts entities) Average number in system (for the population of Parts entities A response is a Simio expression that is evaluated at the end of a replication. Responses can have: Units (e.g., Time) Objective (minimize or maximize) Lower and Upper bounds 4 Assignment Lab 1 Add Inspection and Rework steps after Grinding After the grinding process, all parts go through an inspection step. There is a single inspector and the inspection takes between 30 and 50 seconds (uniformly distributed). 20% of the inspected parts are found to need rework (the remaining 80% go to packaging). There are two rework operators and rework takes between 5 and 10 minutes (uniformly distributed). 50% of the parts are still bad after rework and are scraped. The remaining 50% are sent to packaging. Modify the model based on the system changes. Create responses for the following: Server utilizations (Machine, Grind, Inspect, Rework, Packaging) Time in system for the entire part population Time in system for good parts Time in system for scrapped parts Number of parts in the system Number of parts in the Input Buffer for the Packaging station (hint you will need to use the expression editor to explore the Package server object components to determine the appropriate expression) 5 Lab 2 Lab Objectives Learn the event mode for the Source object about buffer capacities for the Server Object about reference properties the basics of dynamic pie charts and status plots about the differences of blocking and starving about throughput and delay 6
3 Model: Manufacturing Line M1 M2 M3 M4 Capacity Analysis Parts are continuously available (infinite supply) and there is infinite demand (i.e., we can sell all that we can make) Processing times at each station are exponential with mean of 1 minute. The buffers between stations are finite (make experiments!) we re interested in determining the impact of the buffer size on system capacity throughput, starvation, blocking utilization and time in system 7 ToDo build the model in Simio verify the system behavior add buffer capacities, introduce and use reference properties describe Resource States and add pie charts study the impact of different buffer capacities 8 Assignment Lab 2 1. Create experiment responses for the average numbers of parts in the buffers between M1 and M2, M2 and M3, and M3 and M4. 2. Create a status plot showing the average numbers of parts in the same buffers. 3. For the following three configurations, assume that you have 20 total buffer slots to distribute between the three buffers (i.e., (7, 3, 10) has a capacity 7 buffer between M1 and M2, a capacity 3 buffer between M2 and M3, and a capacity 10 buffer between M3 and M4). Find the buffer allocation that maximizes throughput of the line. 4. Supposed that there is a 5% probably of fallout at each machine. In other words, 5% of parts processed at each machine are bad and exit the system without proceeding to the next machine in the system. Modify your model to reflect this change. 5. Determine whether the optimal buffer configurations from question 3 change as a result of the part fallout. 9
4 Lab 3 Lab Objectives Learn Different methods to route entities Link selection Weights Dynamic routing node lists 10 Model: Conditional Routing Arival Adjust Inspect Depart TV final adjustment and inspection process TVs arrive at the rate of 20/hour (exponential interarrival times) Adjustment takes approximately 2 minutes (uniformly distributed between 1.75 and 2.25) Inspection takes approximately 1.75 minutes (exponentially distributed) 20% of inspected TVs are found to need re-adjustment Interested in Time In System Number In System, Utilizations of Adjust and Inspect 11 ToDo build the model in Simio verify the system behavior Make Experiments modify the retransmission probability p At what probability p gets the system instable 12
5 Model: Dynamic Routing using Node Lists Server 1 Arival: Interarrival time is random exponential distributed with a mean of 30 sec. Server 2 Server 3 Depart Service Times: Server 1: constant processing time of 20 minutes Server 2: random processing time with a triangular distribution, min of 1, mode of 3 and a max of 8 minutes Server 3: random processing time with exponential distribution of 1 minute 13 ToDo build the model in Simio verify the system behavior Learn the different routing mechanisms Objectivs: What is the utilization of each server? How many packets does each server process? Find a rooting schema that the time in system is minimized! What is the average time in system. 14 Assignment Lab 3 a. Using the TV Adjust/Inspect model: Fix the issue where the TV s are adjusted the 4 th (and inspected) time even though we know that they will be rejected after inspection. Hint: Start by inserting a Basic Node in the path from the Inspect server back to the Adjust server. Create a reference property for the maximum number of adjustments allowed and develop an experiment that compares the configurations with values 1, 2, 3, 4, 5, 100. b. Using the dynamic routing model: Develop an experiment with 25 replications using a run length of 500 hours with a 250 hour warm-up and responses for the three server utilizations, the entity time in system (TIS) and entity number in system (NIS) Using the base model, compare the 5 performance metrics using the following routing alternatives: 1. Probabilistic routing using the selection weights 6/78, 12/78, and 60/78 2. Preferred order with capacity 5 buffers at each server 3. Using AssociatedStationOverload with no buffers (capacity 0 buffers) 4. Using AssociatedStationOverload with capacity 5 buffers 5. Using the shortest queue length with infinite capacity buffers 15
6 Lab 4 Lab Objects Learn about free-space entity travel Learn about routing entities with sequences 16 Model I Walk-in healthcare clinic with the following stations/offices: Registration Triage Treatment Lab Xray MRI EKG Accounting Patient types Walk-in Lab-only Xray MRI EKG 17 Healthcare Clinic Patient Types Patient Routing Sequence Reg. Triage Treat. Lab Xray MRI EKG Acct Walk-in 1 2 3 4 Lab-only 1 2 XRay 1 2 3 MRI 1 2 3 EKG 1 2 3 18
7 Assignment Suppose the patient arrival rate increases by 5%. Can the current system handle the increase? What about 7%? 10%? Compare the expected time patients spend in the system (by patient type) and the waiting times at each station for the baseline, +5%, +7%, and +10% cases. Add an additional patient type (registration, lab, treatment, accounting, depart). These patients arrive at the rate of 3 per hour. Can new system handle these new patients (under the 4 scenarios above)? If not, what is your recommendation (be specific)? Replace the free-space movement with paths and "layout" for a clinic (starting with the single-source model). You can find a suitable layout on the internet or just make one up (using reasonable distances between stations). 19 Lab 5 Lab Objectives Learn about processes and add-on processes how to use stations as detached queues for model entities 20 Simio Processes A process is a set of actions that take place over time that may change the state of the system. In Simio a process is defined using a flowchart including steps that are executed by tokens and may change the state of one or more elements. Steps perform actions such as: Delay by a specified time. Seize or release an object. Wait for an event to occur. Decide based on a probability or condition. Transfer an entity into a station..
8 Tokens A token may have properties and states. A token carries a reference to both its parent object and associated object. The attributes of the associated object may be referenced using the class name; e.g. ModelEntity.TimeCreated The attributes of the parent object may be referenced by name; e.g. ProcessTime In the case of entity visits the associated object is the visiting entity. If the process is being executed inside the Server, then the Server would be the parent Associated object. Object Parent Object Tokens Process Types A standard process is a Simio-defined process that is automatically executed by the Simio engine. For example OnRunInitialized is executed by Simio for each object on initialization. A decision process is a standard process used by the engine to ask the object to return a True/False decision (e.g., Will you pick me up?). Decision processes cannot have time delays. An add-on process is a user-defined process that is incorporated into the model of an object to allow the user of that object to insert special logic. An event-triggered process is a user-defined process that is triggered by an event that fires within the model (e.g., Output@Server1.Entered). Using Stations With Add-on Processes Decoupling entity arrivals from availability for processing In this example, random arrivals are stored and periodically made available for processing. Key Concepts: Stations Add-on processes Search step User-defined events 24
9 Video 3 Building a Process-Model A standard process is a Simio-defined process that is automatically executed by the Simio engine. For example OnRunInitialized is executed by Simio for each object on initialization. A decision process is a standard process used by the engine to ask the object to return a True/False decision (e.g., Will you pick me up?). Decision processes cannot have time delays. An add-on process is a user-defined process that is incorporated into the model of an object to allow the user of that object to insert special logic. An event-triggered process is a user-defined process that is triggered by an event that fires within the model (e.g., Output@Server1.Entered). Assignment 1 Assignment 1 Modify the TV Adjust/Inspect Model so that: 5% of the TVs that fail inspection are immediately rejected (regardless of the number of adjustments). When a TV is rejected, record a tally (to count) and destroy the entity from within the add-on process (i.e., there is no need to transfer to the Bad sink). Animate the model to make it look like a TV adjust/inspect operation. 26 Assignment 2: Amusement Park Ride Model Passengers arrive at the rate of 9.6/minute and wait in line (of course). Every 10 minutes, up to 100 passengers move from the line to a room to watch a 7-minute video (the actual time is between 6 and 8 minutes, counting the startup and shutdown time for the video). After the movie, the passengers line up (of course) and are loaded into the ride. Two passengers can load at a time and loading takes between 8 and 10 seconds per passenger. After loading, the passengers start the ride. The ride has capacity of 50 passengers and takes 5 minutes. The first video should start 15 minutes after the park opens (passengers start arriving immediately). You are interested in: Average group size (for the video); Load process utilization Ride process utilization Waiting time from when a passenger arrives until s/he starts the load process Run your model for 10 replications of length 160 hours for your experimentation 27