Lecture 5: Simulation Technology and Manufacturing System Simulation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

Lecture 5 : Simulation technology and

manufacturing system simulation

He Yanli
(heyl@nwpu.edu.cn)

School of Mechanical Engineering


Key Lab. Contemporary Design& Integrated
Manufacturing, Ministry of Education
content
• Modeling and Simulation: concepts and application
• Simulation technology
• Manufacturing system simulation and the software
What Do You Do with a Logical Model?
• If model is simple enough, use traditional mathematics to
get ―answers‖ — analytical solution
– A heuristic or analytical approximation
(queueing theory, differential equations,
linear programming) has been developed
– Nice in the sense that you get ―exact‖
answers to the model
– But might involve many simplifying
assumptions/ approximation to make the
model analytically tractable — validity??
– The conjecture is that the analytical
model is still a reasonable representation
of the real system.
– Simulation is being used to support or
refute this conjecture.
What Do You Do with a Logical Model?
• Many complex systems require complex models (to be
valid)— simulation needed
– Example: Manufacturing company
considering extending its plant
– For complex queuing systems, it is
not possible to develop analytical
formulas, and simulation is often
the only means of analysis.
– Must be studied via simulation —
evaluate model numerically and
collect data to estimate model
characteristics
Simulation v.s. Symbolic & Analytical Tools
 Strengths
+ Provides a quantitative measure
+ Flexible – can handle any kind of complex system or statistical
interdependencies
+ Capable of finding inefficiencies otherwise not detected until the
system is in operation
 Weaknesses
– Can take a long time to build
 Usually requires a substantial amount of data gathering
– Easy to misrepresent reality and draw faulty conclusions
– Generally not suitable for optimizing system parameters

 A simulation model is primarily descriptive while an optimization


model is by nature prescriptive
Simulation concepts
• System: The real thing!
– System state variables: All information required to characterize the
system.
– Event: An occurrence which changes the state of the system.
• Model: A representation of the system.
– Discrete Event vs Continuous Models: Can the ―state‖ change
continuously or only at discrete time points ?
– Dynamic vs. Static Models: Does time have a role ?
– Deterministic vs. Stochastic: Is everything for sure ?
• Entity: An object in the simulation.
• Attributes: Entity characteristics.
• Resources: A servicing entity.
• Lists and list processing: Queues.
Definition:

“Simulation is the process of designing


a model of a real system and conducting
experiments with this model for the
purpose of either understanding the
behavior of the system and/or
evaluating various strategies for the
operation of the system.”

- Introduction to Simulation Using SIMAN


(2nd Edition)
(Computer) Simulation
• Simulation is a mathematical and computer modeling
technique for replicating real-world problem situations.
• Methods for studying a wide variety of models of real-world
systems
– Use numerical evaluation on computer
– Use software to imitate the system’s operations and characteristics,
often over time
• In practice, is the process of designing and creating
computerized model of system and doing numerical
computer-based experiments
• It does not normally provide a solution; instead it provides
information that is used to make a decision.
(Computer) Simulation

• Real power — application to complex systems


• Simulation can tolerate complex models
• Simulation is popular because it can be applied to virtually
any type of problem.
When to use Simulation
• The real system does not exist, or it is expensive, time
consuming, hazardous or impossible to experiment with
prototypes
• Need to investigate past, present and future performance in
compressed, or expanded time.
• When mathematical modelling is impossible or they have no
solutions
– For complex stotacsitc queuing systems, no analytical formulas
• Satisfactory validation is possible
• Expected accuracy meets requirements
Some Application Areas
• Manufacturing — scheduling, Materials Handling ,inventory, Designing and
analyzing manufacturing systems
• Health care system— emergency, operating rooms
• Transportation
• Staffing personal-service operations
– Banks, fast food, theme parks, Post Office, ...
– Designing and operating transportation systems such as airports, freeways, ports,
and subways
– Evaluating designs for service organizations such as call centers, fast-food
restaurants, hospitals, and post offices
• Distribution and logistics
• Computer systems: determining hardware and software requirements for a
computer system
• Telecommunications
• Military: evaluating military weapons systems or their logistics requirements
• Public policy
– Emergency planning
– Courts, prisons, probation/parole
Areas of Simulation Application
• Logistics
– This typically includes numerous random variables, such as
distance, different modes of transportation, shipping rates, and
schedules.
– Simulation is used to analyze different distributions channels to
determine the most efficient logistics system.
Areas of Simulation Application
• Environmental and Resource Analysis
– Simulation models have been developed to ascertain the impact of
projects such as manufacturing plants, waste-disposal facilities, and
nuclear power plants.
• In most cases, these models include measures to
analyze the financial feasibility of such projects.
content
• Modeling and Simulation: concepts and application
• Simulation technology
• Manufacturing system simulation and the software
Building a Simulation Model

• General Principles
– The system is broken down into suitable components or
entities
– The entities are modeled separately and are then connected
to a model describing the overall system
 A bottom-up approach!
Steps

1. Problem formulation Phase 1


Problem Definition
2. Set objectives and overall project plan

4. Data Collection
Phase 2
3. Model conceptualization
Model Building
5. Model Translation

No Phase 3
6. Verified
Yes Experimentation
No No
7. Validated
Yes
8. Experimental Design
Phase 4
Implementation
9. Model runs and analysis

Yes No 11. Documentation, reporting and


10. More runs
implementation
Types of Simulation
• Static vs. Dynamic
– Does time have a role in the model?
• Continuous vs. Discrete-event
– Can the ―state‖ change continuously or only at discrete points in
time?
• Deterministic vs. Stochastic
– Is everything for sure or is there uncertainty? Stochastic - represents
uncertainties
• Most operational models:
– Dynamic, Discrete-change, Stochastic
Discrete Event Simulation(DES)
• Discrete-event simulation: Modeling of a system as it
evolves over time by a representation where the state
variables change instantaneously at separated points in
time
– More precisely, state can change at only a countable number of
points in time
– These points in time are when events occur
• Event: Instantaneous occurrence that may change the
state of the system
– Sometimes get creative about what an ―event‖ is … e.g., end of
simulation, make a decision about a system’s operation
• Can in principle be done by hand, but usually done on
computer
Discrete Event Simulation(DES)
• Clock: Asynchronous clock
• Between events: Assumes nothing interesting happens
between events
• This type of simulation most frequently used for simulating
manufacturing systems
• Queuing networks in which the effects of capacity
limitations and routing strategies often studied using DES
Example
• One teller bank
• Customers arrive between 1 and 10 minutes apart with
uniform probability.
• Teller service times are between 1 and 6 minutes with
uniform probability.
• Goal: Simulate the bank’s operation until 20 customers are
served.
Single-server queue
– Estimate expected average delay in queue (line, not
service)
– State variables
• Status of server (idle, busy) – needed to decide
what to do with an arrival
• Current length of the queue – to know where to
store an arrival that must wait in line
• Time of arrival of each customer now in queue –
needed to compute time in queue when service
starts
– Events
• Arrival of a new customer
• Service completion (and departure) of a customer
• Maybe – end-simulation event (a ―fake‖ event) –
whether this is an event depends on how
simulation terminates (a modeling decision)
Types of Discrete Event Simulation
• Event scheduling
• Process interaction
• Object orientated
• Activity scanning
Event Scheduling Approach
• Event scheduling binds actions associated with individual
events into event routines.
• The monitor selects event for execution, processing a time
ordered agenda event notices.
• Event notices contain a time and a reference to an event
routine.
• Each event can schedule another event, which is placed in
the correct position of the agenda.
• The clock is always set to the time of the next immanent
event
Time-Advance Mechanisms
• Simulation clock: Variable that keeps the current value of
(simulated) time in the model
– Must decide on, be consistent about, time units
– Usually no relation between simulated time and (real) time needed
to run a model on a computer
• Two approaches for time advance
– Next-event time advance (usually used) … described in detail below
– Fixed-increment time advance (seldom used) …
• Generally introduces some amount of modeling error in terms of
when events should occur vs. do occur
• Forces a tradeoff between model accuracy and computational
efficiency
Time-Advance Mechanisms
• More on next-event time advance
– Initialize simulation clock to 0
– Determine times of occurrence of future events – event list
– Clock advances to next (most imminent) event, which is executed
• System state updated
• Event execution may involve updating event list
– Continue until stopping rule is satisfied (must be explicitly stated)
– Clock ―jumps‖ from one event time to the next, and doesn’t ―exist‖
for times between successive events … periods of inactivity are
ignored
Time-Advance Mechanisms
• Next-event time advance for the single-server queue
ti = time of arrival of ith customer (t0 = 0)
Ai = ti – ti-1 = interarrival time between (i-1)st and ith customers
(usually assumed to be a random variable from some probability
distribution)
Si = service-time requirement of ith customer (another random
variable)
Di = delay in queue of ith customer
Ci = ti + Di + Si = time ith customer completes service and departs
ej = time of occurrence of the jth event (of any type), j = 1, 2, 3, …

– Possible trace of events (detailed narrative in text)


Components and Organization of a Discrete-Event
Simulation Model
• Each simulation model must be customized to target
system
• But there are several common components, general
organization
– System state – variables to describe state
– Simulation clock – current value of simulated time
– Event list – times of future events (as needed)
– Statistical counters – to accumulate quantities for output
– Initialization routine – initialize model at time 0
– Timing routine – determine next event time, type; advance clock
– Event routines – carry out logic for each event type
– Library routines – utility routines to generate random variates, etc.
– Report generator – to summarize, report results at end
– Main program – ties routines together, executes them in right order
Verification
• Is the computer implementation of the conceptual model
correct?
– Is the model correctly built/programmed?
– Is it doing what it is intended to do?
• Procedures
– Structured programming
– Self-document
– Peer-review
– Consistency in input and output data
– Use animation

15
Model Verification Methods
• Find alternative ways of describing/evaluating the system and
compare the results
– Simplification enables testing of special cases with predictable
outcomes
 Removing variability to make the model deterministic
 Removing multiple job types, running the model with one
job type at a time
 Reducing labor pool sizes to one worker
• Build the model in stages/modules and incrementally test each
module
– Uncouple interacting sub-processes and run them separately
– Test the model after each new feature that is added
– Simple animation is often a good first step to see if things are
working as intended
Validation
• Can the conceptual model be substituted, at least
approximately for the real system?
– Is the right model built?
– Does the model adequately describe the reality you want to
model?
– Does the involved decision makers trust the model?
• Procedures
– Standing to criticism/Peer review (Turing)
– Sensitivity analysis
– Extreme-condition testing
– Validation of Assumptions
– Consistency checks
– Validating Input-Output transformations
– Validating using historical input data
Validation

Model qualification

CONCEPTUAL
Analysis
REALITY MODEL

Model Model
validation verification

Computer
Model
Example: problem Statement
• Recall single-server queueing model
• Assume interarrival times are independent
and identically distributed (IID) random
variables
• Assume service times are IID, and are
independent of interarrival times
• Queue discipline is FIFO
• Start empty and idle at time 0
• First customer arrives after an interarrival
time, not at time 0
• Stopping rule: When nth customer has
completed delay in queue (i.e., enters service)
… n will be specified as input
Example: problem Statement
• Quantities to be estimated
– Expected average delay in queue (excluding service time) of the n
customers completing their delays
 Why ―expected?‖
– Expected average number of customers in queue (excluding any in
service)
 A continuous-time average
 Area under Q(t) = queue length at time t, divided by T(n) = time
simulation ends
– Expected utilization (proportion of time busy) of the server
 Another continuous-time average
 Area under B(t) = server-busy function (1 if busy, 0 if idle at time
t), divided by T(n)
– Many others are possible (maxima, minima, time or number in
system, proportions, quantiles, variances …)
• Important: Discrete-time vs. continuous-time statistics
Intuitive Explanation
• Given (for now) interarrival times (all times are in minutes):
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
• Given service times:
2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
• n = 6 delays in queue desired
• ―Hand‖ simulation:
– Display system, state variables, clock, event list, statistical counters
… all after execution of each event
– Use above lists of interarrival, service times to ―drive‖ simulation
– Stop when number of delays hits n = 6, compute output performance
measures
Intuitive Explanation
Status
shown is
after all
changes
have
been
made in
each
case …

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
Intuitive Explanation

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
Final output performance measures:
Average delay in queue = 5.7/6 = 0.95 min./cust.
Time-average number in queue = 9.9/8.6 = 1.15 custs.
Server utilization = 7.7/8.6 = 0.90 (dimensionless)
content
• Modeling and Simulation: concepts and application
• Simulation technology
• Manufacturing system simulation and the software
Characteristics of Manufacturing Systems
• Physical layout • Production Control
• Labor • Supplies
• Equipment • Storage
• Maintenance • Packing and Shipping
• Work centers
• Product
• Production Schedules
Performance Measures
in Manufacturing Modeling
• Throughput under average and peak loads
• Utilization of resources, labor and machines
• Bottlenecks
• Queueing
• WIP storage needs
• Staffing requirements
• Effectiveness of scheduling and control
• Time in system for parts/Times parts spend in queues
• Timeliness of deliveries
Definition of Objective
• Performance analysis
• Capacity analysis
• Configuration comparisons
• Optimization
• Sensitivity analysis
• Visualization
Definition of Scope
• Breadth (model scope)
• Depth (level of detail)
• Data gathering responsibilities
• Planning the experimentation
• Required format of results
Definition of Requirements
• The 90-10 rule
• Size of project (data readily available)
– small (2-4 weeks)
– large (2-4 months)
• Data gathering (50% of time)
• Model building (20% of time)
Basic Principles of Modeling
• To conceptualize a model use
– System knowledge
– Engineering judgement
– Model-building tools
• Remodel as needed
• Regard modeling as an evolutionary process

Care must be exercised to preserve only those chracteristics that are


essential. This depends upon the purpose of the model

It is necessary to abstract from the real system all those components


(and their interactions that are considered to be important
Statistical issues in simulating
manufacturing systems
• Sources of randomness in simulated manufacturing
systems:
– Arrivals of orders, parts, or raw materials
– Processing, assembly, or inspection times
– Machine times to failure
– Machine repair times
– Loading/unloading times
– Setup times
• Modeling System Randomness
– In general, each source of system randomness needs to be modeled
by an appropriate probability distribution
– Not what is perceived to be the mean value.
– Note that sources of randomness encountered in practice are rarely
normally distributed.
Statistical issues in simulating
manufacturing systems
• A simulation run produces a statistical estimate of the (true)
performance measure, not the measure itself
– Because of the random nature of simulation input
• Design and Analysis of Simulation Experiments
– Length of each simulation run
– Number of independent simulation runs
– Length of the warmup period, if one is appropriate
Some Key Modeling Issues
• Alternatives for Modeling Downtimes and Failures
– Ignore them
– Do not model directly but adjust processing time accordingly
– Use constant values for failure and repair times
– Use statistical distributions
Key Modeling Issues
• Time to failure
– By wall clock time
– By busy time
– By number of cycles
– By number of widgets
• Time to repair
– As a pure time delay
– As wait time for a resource
Key Modeling Issues
• What to do with an item in the machine when machine
downtime occurs?
– Scrap
– Rework
– Resume processing after downtime
– Complete processing before downtime
Example
• Single server resource with processing time exponential
(mean = 7.5 minutes)
• Interarrival time also exponential (mean = 10 minutes)
• Time to failure, exponential (mean=100 min)
• Repair time, exponential (mean 50 min)
• Queue lengths for various cases
– Breakdowns ignored
– Service time increased to 8 min
– Everything random
– Random processing, deterministic breakdowns
– Everything deterministic
– Deterministic processing, random breakdowns

You might also like