1/66
Looks like no tags are added yet.
Simulation
Imitation of the operation of a real-world process or system over time. It generates an artificial history of the system, observes that history, and draws inferences about system characteristics.
Two roles of simulation (analysis vs. design tool)
Analysis tool: predicts the effect of changes to existing systems. Design tool: predicts performance of new systems.
Why simulate instead of solving mathematically?
Many real-world systems are too complex to solve mathematically, so numerical, computer-based simulation is used to imitate system behavior.
Why is simulation used?
Quick and easy without disrupting ongoing operation; captures system dynamics and variation; versatile; shows behavior over time; animation aids communication; forces you to think through operational details.
Uses of simulation (when to use it)
Study internal interactions of a complex system; observe effects of system alterations; gain system knowledge; teach/verify analytic solutions; test new designs or policies before implementation; determine machine requirements; training; animation; model complex systems.
How is a flight simulator like simulation?
It improves skilled decision-making, reduces time and cost of experimenting on the real system, and minimizes the risk of mistakes on the actual system.
When NOT to use simulation
Problem solvable by common sense or analytically; direct experiments are easier; costs exceed savings; no time or resources; no data (not even estimates); not enough time or people to verify/validate; managers have unreasonable expectations; system behavior too complex or cannot be defined.
Advantages of simulation
Explore new policies without disrupting operations; test new hardware without committing to acquisition; test hypotheses; study speed-up or slow-down of phenomena; study variable interactions; bottleneck analysis; understand how the system operates; "what if" and sensitivity analysis.
Disadvantages of simulation
Model building requires special training; results can be difficult to interpret; modeling and analysis can be time consuming and expensive; sometimes used when an analytical solution is possible or even preferable.
Simulation vs. optimization models
Optimization models are solved; simulation models are "run".
Areas of application of simulation
Manufacturing; construction and project management; military; logistics, supply chain and distribution; transportation and traffic; business process simulation; healthcare; computer and communication systems.
General trends in simulation applications
Risk analysis (pricing, insurance); call-center analysis; large-scale systems (internet backbone, wireless networks); automated material handling systems as test beds for control-system software.
Winter Simulation Conference
An excellent way to learn about the latest in simulation applications and theory.
System
A group of objects joined together in some regular interaction or interdependence to accomplish some purpose (e.g., machines, parts and workers on an assembly line).
System environment
Everything "outside the system". Defining the boundary between the system and its environment is important because the system is affected by changes occurring outside it.
Entity (system component)
An object of interest in the system, e.g., computing jobs in a queue.
Attribute (system component)
A property of an entity, e.g., priority class or a vector of resource requirements.
Activity (system component)
Represents a time period of a specified length, e.g., a job receiving service.
State of a system (state variables)
The collection of variables necessary to describe the system at any time, relative to the study objectives, e.g., number of busy servers, number of jobs in queue.
Event
An instantaneous occurrence that may change the system state. Can be endogenous or exogenous, e.g., a new job arrival or service completion.
Fast-food restaurant: entity, attributes, activities, events, state variables
Entity: customer. Attributes: size of order, items required. Activities: placing the order, paying. Events: customer arrival, completion of purchase. State variables: number of customers waiting, number of positions operating.
Automobile assembly line: entities, attributes, activities, events, state variables
Entities: robot, welder, worker. Attributes: type of welding, machine breakdown rate, speed. Activities: spot welding, quality inspection. Event: machine breakdown. State variables: machine availability, machine productivity, worker experience.
Discrete system
A system in which state variable(s) change only at a discrete set of points in time, e.g., number of jobs in queue changes only on an arrival or service completion.
Continuous system
A system in which state variable(s) change continuously over time, e.g., the head of water behind a dam.
Call center (FCFS calls, follow-ups): discrete or continuous? Objective?
Discrete system. Objective: identify staffing level, caller wait time, and customer service level.
Viral infection progress in the human body: discrete or continuous? Objective?
Continuous system. Objective: identify effectiveness of drug intervention and cure time.
Model
A representation of a system for the purpose of studying it. It is a simplification, detailed enough to permit valid conclusions about the real system, and containing only components relevant to the study.
Two types of models
Mathematical or physical.
Mathematical model
Uses symbolic notation and mathematical equations to represent a system. Simulation is a type of mathematical model.
Three ways to classify simulation models
Static or dynamic; deterministic or stochastic; discrete or continuous.
Focus of this course's models
Discrete, dynamic, and stochastic models.
Four phases of a simulation study
(1) Problem formulation, objectives and overall design (steps 1-2); (2) Model building and data collection (steps 3-7); (3) Running the model (steps 8-10); (4) Implementation (steps 11-12). It is an iterative process.
The 12 steps in a simulation study
1 Problem formulation; 2 Setting objectives and overall project plan; 3 Model conceptualization; 4 Data collection; 5 Model translation; 6 Verified?; 7 Validated?; 8 Experimental design; 9 Production runs and analysis; 10 More runs?; 11 Documentation and reporting; 12 Implementation.
Challenges of modern industrial systems
Shorter life cycles (frequent, radical product changes and upgrades); greater complexity (sophisticated technologies, vertical/horizontal integration); higher performance requirements (customer expectations on quality, delivery, price; global competition).
Course assessment weights (ENIN 331)
Quizzes 10%, Class Project 25%, Midterm 20%, Lab Assignments 15%, Final Exam 30%. Must pass project, labs and final exam; must write the midterm. No make-up for quizzes.
Simple processing system (Topic 3 example)
Blank parts arrive, wait in a FIFO queue, are processed by one machine (server), and depart as finished parts. Goal: estimate expected production, waiting time in queue, queue length, and proportion of time the machine is busy.
Base time units
The declared time unit used for internal calculations and outputs. Different units may be used in different places, but they must be declared and checked when specifying inputs (watch interpretation and roundoff error).
Initial conditions and stopping rule of the example model
Initially (time 0) the system is empty and idle. Base time unit is minutes. The run stops when 20 minutes of simulated time have passed.
Output performance measures for the simple processing system
Total production (P); average and maximum waiting time in queue; time-average and maximum number in queue; average and maximum total time in system (cycle time); machine utilization.
Average waiting time in queue (formula)
Sum of WQi for i = 1 to N, divided by N. N = number of parts completing the queue wait; WQi = waiting time in queue of the ith part.
Why is WQ1 = 0?
The first part arrives to an empty and idle system, so it goes straight into service without waiting.
Why is N at least 1?
The first part always completes its (zero-length) queue wait, so at least one part has gone through the queue.
Maximum waiting time in queue
The maximum of WQi over i = 1,…,N.
Time-average number of parts in queue
Integral of Q(t) dt from 0 to 20, divided by 20, where Q(t) is the number of parts in queue at time t.
Maximum number of parts in queue
The maximum of Q(t) for 0 <= t <= 20.
Average and maximum time in system (cycle time)
Average = sum of TSi (i = 1 to P) divided by P; maximum = max of TSi. TSi = time in system of part i.
Machine utilization
Proportion of time the machine is busy: integral of B(t) dt from 0 to 20, divided by 20, where B(t) = 1 if busy and 0 if idle.
Educated guessing: example data for the simple processing system
Average interarrival time = 4.08 min; average service time = 3.46 min. Parts are processed faster than they arrive on average, so the system might be stable in the long run. With no variability there would be no queue, but the data vary so a queue can form. If mean interarrival < mean service time and persisted, the queue would explode.
Queueing theory: M/M/1 queue assumptions
Interarrival times exponential; service times exponential and independent of interarrivals; E(service) < E(interarrival); steady-state (long-run) analysis. Gives exact analytic results.
M/M/1 average waiting time in queue
muS squared divided by (muA minus muS), where muA = E(interarrival time) and muS = E(service time).
Problems and use of queueing theory
Problems: validity of assumptions, estimating means, time frame (steady-state only). Often useful as a first-cut approximation.
Mechanistic simulation
A concrete, "brute-force" approach in which individual operations (arrivals, service times) occur as in reality, changes occur at the right times in the right order, pieces interact, and "observers" collect output measures. Nothing subtle, but lots of bookkeeping that software handles.
Entities (simulation model piece)
"Players" that move around, change status, and affect/are affected by other entities. Dynamic objects: created, move, and (maybe) leave. Usually represent real things (parts in our model); "fake" entities can model tricks (breakdown demon). Identifying entity types is usually the first step in building a model.
Attributes (simulation model piece)
Characteristics of all entities that describe and differentiate them. All entities share the same attribute slots but have different values (arrival time, due date, priority, color). Like local variables tied to a specific entity.
Global variables (simulation model piece)
Characteristics of the whole model, not specific entities (e.g., travel times between stations, number of parts in system, simulation clock). Only one copy for the whole model; entities can access and change them ("writing on the wall").
Resources (simulation model piece)
What entities compete for: people, equipment, space. An entity seizes a resource, uses it, and releases it. Think of a resource being assigned to an entity. A resource can have several units of capacity, which can change during simulation.
Queues (simulation model piece)
Places for entities to wait when they cannot move on (e.g., resource unavailable). Have names, often tied to a resource; can have finite capacity (must model what happens when full). Usually track queue length and waiting time.
Statistical accumulators
Passive variables that "watch" what is happening and depend on the desired output measures. Used at the end of the run to compute final output performance measures. Many are automatic in Arena; some must be set up and maintained.
Statistical accumulators for the simple processing system
Number of parts produced; total waiting time in queue; number of parts through the queue; max time in queue; total time in system; max time in system; area under Q(t); max of Q(t); area under B(t).
Event-scheduling world view
Identify characteristic events; define logic for each event type (state changes, observe statistics, update future event times); keep a simulation clock and a future event calendar; jump from event to event; specify a stopping rule. Usually coded in general-purpose languages (C++, Java, Matlab, FORTRAN).
Events in the simple processing system
Arrival, Departure (service completion), and The End.
Arrival event logic
Update time-persistent accumulators (area under Q(t), max Q(t), area under B(t)); mark the part with the current time; if machine idle: start service (schedule departure), make machine busy, tally wait of 0; else put part at end of queue and increase queue length; schedule the next arrival.
Departure event logic
Increment number produced; compute and tally time in system (now minus arrival time); update time-persistent statistics; if queue non-empty: take first part, tally its wait, begin service (schedule departure); else make machine idle (no departure scheduled).
The End event
Update time-persistent statistics up to the end of simulation, then compute final output performance measures from the final accumulator values.
Event calendar and event records
A list of event records [Entity No., Event Time, Event Type], kept ranked in increasing order of Event Time so the next event is always the top record. Initially schedule the first arrival and The End.
State variables of the simple processing system
Server status B(t) (1 = busy, 0 = idle); number of customers in queue Q(t); arrival times of each customer currently in queue (a list of random length).
Simulation by hand
Manually track state variables, statistical accumulators, and the event calendar using given interarrival and service times, "lurching" the clock from one event to the next.