Introduction to Computer Simulation EGR 260 R. Van Til Industrial & Systems Engineering Dept. Copyright 2013. Robert P. Van Til. All rights reserved. 1
What s It All About? Computer Simulation involves a collection of methods and applications used to develop computer algorithms that mimic the behavior of real systems. Used on systems that have complex mathematical models. Basically, the system is broken-down into smaller elements.» The elements have simple mathematical models. The computer simulation solves the models of the elements and also handles the interactions between the elements. 2
Systems Some systems that are modeled using computer simulation include: Manufacturing systems containing machines, people, transfer devices (e.g., conveyors, robots), material storage, etc.» For example, an automobile assembly line. Customer-service facilities such as banks, fast-food restaurants, supermarkets, etc. Computer networks containing servers, clients, printers, etc. Roadway system containing roads, intersections, traffic lights, etc. Distribution network of plants, warehouses, transportation links, etc. 3
Categories of Systems 1. Static vs. dynamic systems. The behavior of static systems do not vary with time.» For example, the distribution of forces in a truss. The behavior of dynamic systems vary with time.» For example, the service time of a customers in a bank. Our focus will be on dynamic systems 4
Categories of Systems 2. Continuous vs. discrete systems. The state of continuous systems change continuously over time.» For example, the voltage in a capacitor or the velocity of an automobile. The state of discrete systems only change at distinct points of time.» For example, whether a robot is operational or broken. Our focus will be on discrete systems 5
Categories of Systems 3. Deterministic vs. stochastic systems. The behavior of a deterministic system is not random.» That is, the system s state can be determined by an applied input. For example, Ohm s law (v = ri) or Newton s law (F = ma). The behavior of a stochastic system is random.» That is, the system s state cannot be uniquely determined from an applied input. For example, flip a coin or when will a robot will break-down. Our focus will be on stochastic systems 6
Our Focus EGR 260 will focus on simulation of dynamic, discrete, stochastic systems. Often called Discrete Event Systems or Discrete Event Dynamic Systems. Some computer simulation packages for modeling discrete event systems include:» Plant Simulate (Siemens PLM Software Inc.)» QUEST (DELMIA Corp.)» Arena (Rockwell Automation Inc.)» AutoMod (Brooks Software Inc.) 7
Example Plant Simulate 8
Example - Robcad 9
Example - Jack 10
A Note of Caution! Suppose the system and/or its inputs are random. Then one run of a simulation model only provides a snapshot of the system s behavior.» It does not provide the solution.» Several simulation runs must be completed and the results carefully analyzed using statistical tools. 11
Example - A Note of Caution! Consider a production system with 5 identical machines in parallel and one buffer to feed them. 12
Example - A Note of Caution! System begins production with an empty buffer at 9:00 a.m. and stops production at 5:00 p.m. Parts arrive at the buffer at an average rate of 1 part/ minute (Poisson distribution). The queuing process is FIFO (First In - First Out). Average cycle time for each machine is 4 minutes (exponential distribution). The machines and buffer do not break-down. 13
Example - A Note of Caution! System s daily behavior from 10 different simulation runs are given below. Simulation run 1 2 3 4 5 6 7 8 9 10 Spread # of parts produced 472 476 476 475 473 478 481 479 470 471 11 Ave. # parts in buffer Ave. time in buffer (seconds) 0.94 0.51 0.55 0.29 0.61 0.50 0.55 0.52 0.94 0.61 0.65 57.6 30.6 33.0 17.4 36.6 30.0 33.0 30.6 56.4 36.0 40.2 14
Elements of a Simulation Model 1. Entities. The dynamic objects in a simulation are entities.» Entities may move around, change status, affect other entities, affect the state of the system, and affect the system s performance measures. Entities often arrive, move through the system and then leave the system. Examples.» Parts in a manufacturing system.» Customers in a bank. 15
Elements of a Simulation Model 2. Attributes. An attribute describes the characteristics of an entity. Example: Suppose the entity is a automobile body in a paint shop.» Attributes may include arrival time, time-in-system, color, and quality status (good or bad). An analogy from computer programming is the local variable.» An attribute is local to a specific entity. 16
Elements of a Simulation Model 3. Variables. A variable describes some characteristic of the system.» Variables are not tied to any specific entity, but may depend on the entities.» An analogy from computer science is the global variable. Example: Variables in an automobile paint shop.» Number of automobile bodies (i.e., entities) in the system.» The amount of time the system is down due to broken machines.» The number of painted bodies that have left the system. 17
Elements of a Simulation Model 4. Resources. Entities often compete with each other for service from resources such as personnel or equipment.» An entity seizes a resource when available and releases it when finished.» A resource may contain a single item or several items Called units of the resource. Examples:» A machine in a manufacturing system.» The ticketing counter at an airport. The individual agents are units of this resource. 18
Elements of a Simulation Model 5. Queues. A queue is a place where entities stay when waiting for service from a resource.» Also called buffers or accumulators. Queues usually have a finite capacity. Examples:» The waiting line at a coffee shop.» An accumulating conveyor between machines in an assembly line. 19
Elements of a Simulation Model 6. Parameters. Parameters characterize the behavior of resources and queues. Examples.» A press in an automobile stamping plant: The cycle time of the press. Failure rate (a probability distribution describing the amount of time between break-downs). Repair rate (a probability distribution describing the amount of time to repair press after it breaks-down.» An accumulating conveyor between adjacent stamping presses: The capacity of the conveyor. 20
Elements of a Simulation Model 7. Events. An event is something that happens at an instant of time that may change attributes or variables. Examples:» Arrival of a new entity into the system.» A resource begins service or ends service on an entity.» A resource breaks-down, or becomes available after it s repaired.» A entity completes service in the system and departs.» The simulation ends after a specified event occurs. For example, at the end of an 8 hour shift or after 750 parts are completed. 21