Beruflich Dokumente
Kultur Dokumente
Lecture Notes
Opening Quotation
Frederick W. Smith
Chairman and CEO of Federal Express Corporation
Management
Situation Decisions Implementation Payoff
Analysis
Model Results
Interpretation
Symbolic World
Abstraction
Managerial
Judgement
Real World
Management Intuition
Situation Decisions
Source: Moore et al. (2001), Decision Modeling with Microsoft Excel, 6th ed. (Upper Saddle River, New Jersey: Source: Moore et al. (2001), Decision Modeling with Microsoft Excel, 6th ed. (Upper Saddle River, New Jersey:
Prentice Hall), Figure 1.1, p. 5. Prentice Hall), Figure 1.2, p. 5.
ISYS 2088 Modelling and Simulation 3/25 ISYS 2088 Modelling and Simulation 4/25
ISYS 2088 Modelling and Simulation 5/25 ISYS 2088 Modelling and Simulation 6/25
Page 1
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 7/25 ISYS 2088 Modelling and Simulation 8/25
Disadvantages
• Requires knowledge of simulation and modelling skills
• Model differs from the real system and therefore may not be
valid
ISYS 2088 Modelling and Simulation 9/25 ISYS 2088 Modelling and Simulation 10/25
Page 2
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 13/25 ISYS 2088 Modelling and Simulation 14/25
• Usually easy, cheap, and fast to get answers to a • If model is simple enough, use traditional
wide range of questions about the system that mathematics (queueing theory, differential
the model represents by simply manipulating the equations, linear programming) to get answers
program’s inputs and form − Nice in the sense that ‘exact’ answers to the model can be
obtained
• Can make mistakes on paper or the computer − But might involve many over-simplified assumptions in order
where they don’t count, rather than for real where to make the model analytically tractable hence the issue of
they do model validity
ISYS 2088 Modelling and Simulation 15/25 ISYS 2088 Modelling and Simulation 16/25
The “Black Box” view of a model The three stages of building a model
Variables
(Controllable)
Model
Measure(s) 2. Formulate a selective representation (by
Parameters Consequence specifying the interactions among the variables).
(Uncontrollable) Variables
3. Construct a symbolic (quantitative) model.
How it works and how it generates
the results are not known
Source: Moore et al. (2001), Decision Modeling with Microsoft Excel, 6th ed. (Upper Saddle River, New Jersey:
Prentice Hall), Figure 1.4, p. 14.
ISYS 2088 Modelling and Simulation 17/25 ISYS 2088 Modelling and Simulation 18/25
Page 3
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• A method to develop and study a wide variety of • Flexible to model things as they are (even if
models of real-world systems things are messy and complicated)
− Use numerical evaluation on computer
− Use software to imitate the system’s operation and • Allows uncertainty, nonstationarity in modeling
characteristics, often over time
• Rapid advances in computer hardware and
• In practice, it is the process of designing and software → cheaper, quicker, and easier
creating computerized model of system and simulation
doing numerical computer-based experiments
ISYS 2088 Modelling and Simulation 19/25 ISYS 2088 Modelling and Simulation 20/25
• Involve assumptions and therefore don’t get exact • Static vs. Dynamic
answers, only approximations and estimates − Does time have a role in the model?
• The effect of randomness will propagate through • Most operational models are:
the model’s logic − Dynamic, Discrete-change, Stochastic
ISYS 2088 Modelling and Simulation 21/25 ISYS 2088 Modelling and Simulation 22/25
− Subroutines for list processing, bookkeeping, time advance • High-level simulators (tailor-made software)
− Widely distributed, widely modified − Very easy to use with graphical user interface (GUI)
• Spreadsheets − Domain-restricted (manufacturing, communications, video
game industry, computer animation, etc.)
− Usually used for static models
− Limited flexibility → model validity issues
− Financial scenarios, distribution sampling, etc.
− Narrow focus, e.g., high-resolution realistic animation only
ISYS 2088 Modelling and Simulation 23/25 ISYS 2088 Modelling and Simulation 24/25
Page 4
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Objectives
− To estimate expected production
− To estimate time in queue, queue length, proportion of time when
machine is busy
• Note
− To be consistent about the unit of time used
ISYS 2088 Modelling and Simulation 30/25
Page 5
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
∑ WQ
N
Part Number Arrival Time Interarrival Time Service Time N = no. of parts completing delay in queue
1 0.00 1.73 2.90
2 1.73 1.35 1.76 i WQi = waiting time in queue of i th part
3
4
3.08
3.79
0.71
0.62
3.39
4.52
i =1 Known: WQ1 = 0 (1st part experiences no delay)
5 4.41 14.28 4.46 N > 1 (at least one part in the queue)
6 18.69 0.70 4.36 N
7 19.39 15.52 2.07
8 34.91 3.15 3.36
9 38.06 1.76 2.37
10
11
39.82
40.82
1.00
.
5.38
.
• Maximum waiting time of parts in queue:
.
.
.
.
.
.
.
. max WQi
i =1,…, N
• Stop when 15 minutes of (simulated) time have passed
ISYS 2088 Modelling and Simulation ISYS 2088 Modelling and Simulation 32/25
Terminology:
Two types of statistics in simulation Components of a simulation model
∑ WQ
N
• Tallies i =1
i
• Entities
N − ‘Players’ that move around, change status, affect and are
affected by other entities
− Average queue time − Dynamic objects — Get created, move around, leave the
− Average cycle time 15 system
ISYS 2088 Modelling and Simulation 35/25 ISYS 2088 Modelling and Simulation 36/25
Page 6
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Terminology: Terminology:
Components of a simulation model (cont’d) Components of a simulation model (cont’d)
• Attributes • (Global) Variables
− Characteristics of entities: used to describe or differentiate − Reflects a characteristic of the system, regardless of entities
− Different entities may have the same attributes but different − Each variable has only one copy for the whole model with
values, for example: unique name and value, for example:
• Time of arrival • Travel time between stations
• Due Date • Number of parts in system
• Priority • Simulation clock
• Color − Not tied to entities but entities can access and change variables
− Attribute value is tied to a specific entity − Some global variables are system-generated; some need to be
− Like ‘local’ (to entities) variables defined by modeller
− Many of the attributes need to be defined by modeller
ISYS 2088 Modelling and Simulation 37/25 ISYS 2088 Modelling and Simulation 38/25
Terminology: Terminology:
Components of a simulation model (cont’d) Components of a simulation model (cont’d)
• Resources • Queues
− They are what entities compete for, for example: − Place for entities to wait when they cannot move on
• People (perhaps it is because the resource they want to seize is not
• Equipment available)
• Space − Have names, often tied to a corresponding resource
− Entity seizes a resource, uses it, and releases it − Have finite capacity representing limited space — Have to
− Think of a resource as being assigned to an entity, rather model what to do if an entity arrives at a queue that’s already
than an entity belonging to a resource full
− A resource can represent a group of servers or units
− Usually the length of a queue or the waiting time in a queue
• Seats at a table in a restaurant is closely monitored in a model
• Identical ticketing agents at an airline counter
− The number of units of a resource can change during
simulation, e.g., lunch breaks, breakdowns
ISYS 2088 Modelling and Simulation 39/25 ISYS 2088 Modelling and Simulation 40/25
Page 7
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Page 8
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
X ~ normal (μ, σ)
argument − Estimate of P(W(q) < 0)
RAND() is “volatile” • Ratio of number of days of making a loss to 30 (days in a month)
so regenerates on
any edit, or F9 key
Round to • Histograms of W(q) at bottom
nearest
integer − Vertical red line at 0, separates profits, losses
ISYS 2088 Modelling and Simulation 51/25 ISYS 2088 Modelling and Simulation 52/25
ISYS 2088 Modelling and Simulation 53/25 ISYS 2088 Modelling and Simulation 54/25
Page 9
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Page 10
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 61/25 ISYS 2088 Modelling and Simulation 62/25
ISYS 2088 Modelling and Simulation 63/25 ISYS 2088 Modelling and Simulation 64/25
ISYS 2088 Modelling and Simulation 65/25 ISYS 2088 Modelling and Simulation 66/25
Page 11
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 67/25 ISYS 2088 Modelling and Simulation 68/25
ISYS 2088 Modelling and Simulation 69/25 ISYS 2088 Modelling and Simulation 70/25
ISYS 2088 Modelling and Simulation 71/25 ISYS 2088 Modelling and Simulation 72/25
Page 12
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 73/25 ISYS 2088 Modelling and Simulation 74/25
ISYS 2088 Modelling and Simulation 75/25 ISYS 2088 Modelling and Simulation 76/25
ISYS 2088 Modelling and Simulation 77/25 ISYS 2088 Modelling and Simulation 78/25
Page 13
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 83/25 ISYS 2088 Modelling and Simulation 84/25
Page 14
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
27 42 35 16 24 52 46 49 36 40
37 35 39 43 41 47 44 50 23 31
19 31 47 53 29 42 48 33 30 28
ISYS 2088 Modelling and Simulation 87/25 ISYS 2088 Modelling and Simulation 88/25
16, 19, 23, 24, 27, 28, 29, 30, 31, 31, 33, 35, 35, 36, 37, = {(16 - 37.2)2 + (19 - 37.2)2 + ... + (53 – 37.2)2} /
39, 40, 41, 42, 42, 43, 44, 46, 47, 47, 48, 49, 50, 52, 53 (30 - 1)
= 99.2885
Median = (n + 1) / 2th item = 15.5th item = 38 _
n
_ n Standard Deviation: s = √ { ∑ (xi – x)2 / (n – 1)} = √s2
Mean: x = ∑ xi / n = (16 + 19 + 23 + … + 52 + 53) / 30 = 37.2333 i
i=1
= √ 99.2885 = 9.9644
ISYS 2088 Modelling and Simulation 89/25 ISYS 2088 Modelling and Simulation 90/25
Page 15
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
3. Suppose that the manager of a paint supply store a. Set up a 99% confidence interval estimate of the
wanted to estimate the correct amount of paint true population average amount of paint included in
contained in one-gallon cans purchased from a a one-gallon can. (At 99% c.i., Z = 2.675.)
nationally known manufacturer. It is known from b. Based on your results, do you think that the
the manufacturer’s specifications that the standard storeowner has a right to complain to the
deviation of the amount of paint is equal to 0.02 manufacturer? Why?
gallon. A random sample of 50 cans is selected, c. Does the population amount of paint per can have
and the average amount of paint per one-gallon can to be normally distributed here? Explain.
is 0.995 gallon. d. Tell why an observed value of 0.98 gallon for an
individual can would not be unusual, even though it
is outside the confidence interval you calculated.
ISYS 2088 Modelling and Simulation 91/25 ISYS 2088 Modelling and Simulation 92/25
ISYS 2088 Modelling and Simulation 93/25 ISYS 2088 Modelling and Simulation 94/25
Solution to the statistics exercise 3 (cont’d) Solution to the statistics exercise 3 (cont’d)
c. Does the population amount of paint per can have to be d. Tell why an observed value of 0.98 gallon for an individual can
normally distributed here? Explain. would not be unusual, even though it is outside the confidence
interval you calculated.
Answer
No, since σx is known and n = 50, from the central limit theorem Answer
_ An individual value of 0.98 is only 0.75 standard deviation
we may assume that x is normally distributed regardless of the below the sample mean of 0.995 [(0.98 – 0.995)/0.02 = -0.75].
distribution of the population. This amount of deviation from the mean for an individual data
point is quite common. The confidence interval represents the
estimate of average of a sample of 50, not an individual value.
If we take a sample of 50 cans and the average is 0.98, that’s
another story.
ISYS 2088 Modelling and Simulation 95/25 ISYS 2088 Modelling and Simulation 96/25
Page 16
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
4. A task on an assembly line has, in the past, required a. Is there evidence to suggest that the mean time
30 seconds to complete. An industrial engineer has under the new method is significantly less than 30
developed a new method for performing the task seconds? (Use α = 0.05; t(.05, 14) = -1.7613)
that she believes will speed up the process. A b. What would you recommend to the management
random sample of 15 workers trained under the new concerning the new method?
method is selected and the time they needed to
complete the task is recorded as shown below:
ISYS 2088 Modelling and Simulation 97/25 ISYS 2088 Modelling and Simulation 98/25
Page 17
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 103/25 ISYS 2088 Modelling and Simulation 104/25
ISYS 2088 Modelling and Simulation 105/25 ISYS 2088 Modelling and Simulation 106/25
Page 18
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Status Bar (check, uncheck) — Shows state of operation, • Macro — To record and run macros
coordinates of cursor • Options… — Controls how Arena works and looks
ISYS 2088 Modelling and Simulation 109/25 ISYS 2088 Modelling and Simulation 110/25
ISYS 2088 Modelling and Simulation 111/25 ISYS 2088 Modelling and Simulation 112/25
ISYS 2088 Modelling and Simulation 113/25 ISYS 2088 Modelling and Simulation 114/25
Page 19
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Arena Help — Contents, Index, Search • Collections of buttons for quick access to activities
− Most (not all) of them are proxies of menu items
• What’s This? — Object specific help information
• 10 Toolbars: Standard, Draw, Animate, Integration,
• Arena SMART files — A collection of small example View, Arrange, Run Interaction, Record Macro,
models that demonstrate a variety of modeling Animate Transfer, and Professional
techniques and situations commonly encountered
• View/Toolbars (or right-click in a toolbar area) to
using Arena decide which ones to show up or hide
• Basic Process Panel — Used for model building and • Toolbars can be placed anywhere (i.e., ‘floating’), or
consists of 8 flowchart modules and 6 data modules ‘docked’ to an edge of screen
• Advanced Process Panel — Used for more • Arena remembers new Toolbar configuration during
complicated model building and consists of 13 next startup
flowchart modules and 7data modules
115/25 ISYS 2088 Modelling and Simulation 116/25
• An extensive and comprehensive online system — • Where a model is built, edited, and run on Arena
Replaces traditional manuals • Can have several model windows opened at the
same time
• Interlinked via hypertext for cross referencing
• A ‘window’ shows just a portion of the underlying
• Multiple entry points, including Help menu ‘world’ — (x, y) coordinates in world units
• Button for context-sensitive help • Open… — Displays an existing model (.doe)
• button appears in many dialogs • New — Creates a new (blank) model window
• button (What’s This?) for information on an item • Save, Save As…, Send
• Tool tips — To activate, leave mouse motionless on • To add modelling construct, just click from a panel
an item until a little yellow label appears template and drop module into window
ISYS 2088 Modelling and Simulation 117/25 ISYS 2088 Modelling and Simulation 118/25
Drawing Printing
• Draw via toolbar buttons only (no menu): • Can print directly from Arena
• Supports color printing
• Line, Polyline (hold Shift key for constrained
drawing), Arc, Bezier Curve • Can have many pages for big models
• Box, Polygon, Ellipse (fill, line, shade) • Can also print any Named Views separately
• Text (font, size, style, color) − Use Print Preview to select the desired page before printing
• Visible/Hidden setting — Shows or hides layer • PrintScreen key — Sends screen to clipboard
during animation which can then be pasted to another application
• Can freely change the position, size, and color of an − Alt + PrintScreen — Sends only the active window to clipboard
object
ISYS 2088 Modelling and Simulation 119/25 ISYS 2088 Modelling and Simulation 120/25
Page 20
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 121/25 ISYS 2088 Modelling and Simulation 122/25
• Break on Module — Stop the running of the model • Click Yes in the Arena box at the end of the run
at a particular module to facilitate debugging − Opens up a new reports window (separate from model
window) inside the Arena window
• Highlight Active Module — Highlights a particular − Project Bar shows Reports panel, with different reports (each
module while running a model to provide a visual one would be a new window)
indication of the action during the animation − Remember to close all reports windows before future runs
• Batch Run (No Animation) — Run the model • Default installation shows Category Overview
without animation to speed up the simulation report – summarizes many things about the run
− Reports have “page” to browse ( and )
• SIMAN — Displays the underlying SIMAN .mod
− Also, “table contents” tree at left for quick jumps via ,
and .exp files generated from the opened Arena
model • Times are in Base Time Units for the model
ISYS 2088 Modelling and Simulation 123/25 ISYS 2088 Modelling and Simulation 124/25
Page 21
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Class activity
• Note
− To be consistent about the unit of time used
ISYS 2088 Modelling and Simulation 131/25 ISYS 2088 Modelling and Simulation 132/25
Page 22
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Represent the components of a simulation model • A ‘birth’ node for arrival of entities
• Two basic types: • To open, double-click on module handle — The
− Flowchart modules — Have entities flowing through, box that contains the module name
connected or routed to each other
− Data modules — Have no entity flow, no connections,
pertaining to entire model
• Open an existing module: double-click on it
− Main dialog, several levels of subdialogs
• Place a new module
− (Single-) click from Template toolbar
− Crosshairs, drop (click) at any location desired
ISYS 2088 Modelling and Simulation 135/25 ISYS 2088 Modelling and Simulation 136/25
• Specifies the characteristics of the entities • Represents a ‘service’ station (i.e., machine +
• Shown in spreadsheet view resource + processing time)
ISYS 2088 Modelling and Simulation 137/25 ISYS 2088 Modelling and Simulation 138/25
Page 23
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Specifies the characteristics of the queue at the • Specifies the type of the resources to be used in
process module the process module
• Shown in spreadsheet view • Shown in spreadsheet view
ISYS 2088 Modelling and Simulation 139/25 ISYS 2088 Modelling and Simulation 140/25
• Represents entities leaving the system • Created using the Plot button
ISYS 2088 Modelling and Simulation 141/25 ISYS 2088 Modelling and Simulation 142/25
Page 24
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Created using the Connect button or called from • Make model clearer to understand or more close
the menu bar: Object → Connect to the real system in appearance
• Used to connect the flowchart modules to let • Add drawing objects from the Draw toolbar to
entities move from one module to another represent walls, aisles, potted plants, etc.
• Assume no delay in traveling, i.e., zero travel time. • Add text to annotate things
• Use the Animate Connectors button to see − Font type, size, color, and orientation can be changed
animation of flow of entities along connectors.
ISYS 2088 Modelling and Simulation 145/25 ISYS 2088 Modelling and Simulation 146/25
• Plain-vanilla run: Click button from the Run • A combination of two approaches
toolbar or F5 to run simulation − Event-oriented approach (bookkeeping) vs. process-oriented
approach (flowchart)
− First time running or after making changes: Check (F4)
− Model building uses a process-oriented approach
− Can move objects around when in run mode — But not edit
• ‘flowcharting’ activities - laying out the sequence of activities
− Can speed up (>) or slow down (<) animation display required to move the entity through the system, supplying the
data required to support these entity action
− Can choose to see summary results (via MS Notepad or
other text editor) when simulation completes • Focuses on what happens to entities
• A more natural and easy way of modelling for the modeller
− Click button or Alt+F5 to get out of run mode
− When running, Arena uses an event-oriented approach by
− Can pause run with button, click to resume translating the process view to an event view
• Other run control, viewing, checking options − Translation is taken care of by the software; invisible to user
ISYS 2088 Modelling and Simulation 147/25 ISYS 2088 Modelling and Simulation 148/25
Page 25
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 151/25 ISYS 2088 Modelling and Simulation 152/25
Exercise 3-6
• Modify the Simple Processing model (i.e., Model 3-1) with all
of the following changes:
1. Add a second machine to which all parts go immediately after exiting
the first machine for a separate kind of processing (e.g., cutting and ISYS 2088 Modelling and Simulation
cleaning). Processing times at the second machine are the same as
for the first machine. Gather all the statistics as before, plus the time
Lecture 4 - Basic Operations and Inputs
in queue, queue length, and utilization at the second machine.
2. Immediately after the second machine, there’s a pass/fail inspection
that takes a constant 5 minutes to determine and has a 20% chance
of failure. Queuing rule is FIFO. All parts exit the system regardless of
whether they pass the test. Count the number that fail and the
number that pass, and gather statistics on the time in queue, queue
length, and utilization at the inspection station. (Hint: Try the Decide
flowchart module.)
3 Add plots to track the queue length and number busy at all three
stations.
4. Run the simulation for 8 hours instead of 20 minutes.
155/25
Page 26
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Salvaged
• Interarrival time: EXPO(5) min.
Sealer 80%
TRIA(1,4,8)
9%
EXPO(45)
and
Shipped
− Assuming that there is no waiting for person or cart to
Arrivals transfer, i.e., parts move by themselves
Part B Prep
Part B
Part A
TRIA(1,3,4)
91%
• Go to Part A Prep area
Shipped
Batches of 4
EXPO(30)
Part B
WEIB(2.5,5.3)
− Process time (machine + debur + clean) ~ TRIA(1,4,8) min.
TRIA(3,5,10)
• Go to Sealer
• Two different sealed electronic units: Part A and Part B
− Process time (assemble + test) ~ TRIA(1,3,4) min.
• Arriving parts (A and B) are metal cases machined to accept
− 91% pass the test and go to Shipped; else go to Rework
electronic parts
• Separate preparation areas for Part A and Part B
• Rework: (re-process + testing) ~ EXPO(45) min.
• Both parts go to Sealer for assembly and testing — Then to
− 80% pass, go to Salvaged and Shipped; others go to
Scrapped
Shipped if OK, or else to Rework
• Rework — Salvaged and Shipped or Scrapped
ISYS 2088 Modelling and Simulation 157/25 ISYS 2088 Modelling and Simulation 158/25
Page 27
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 163/25 ISYS 2088 Modelling and Simulation 164/25
Page 28
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 169/25 ISYS 2088 Modelling and Simulation 170/25
ISYS 2088 Modelling and Simulation 171/25 ISYS 2088 Modelling and Simulation 172/25
Page 29
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Three separate exit points for three separate part • Without this, model would run forever – no
disposition (Shipped, Salvaged, Scrapped) defaults for termination rule
− That’s part of modeling, and generally affects results!
• Could have directed all three exit types to a single
• Project Parameters tab:
Dispose module
− Fill in Project Title, Analyst Name
− Separate ones gets animation counts of three dispositions − Defaults for Statistics Collection, but we cleared the check
− Separate Dispose modules allows for differentially checking box for Entities
the boxes to Record Entity Statistics • Not needed for what we want (we installed our own Record
modules), and would slow execution
• Produces flow statistics separated by entity type (if Entities
Statistics Collection is checked in Run > Setup > Project • Replication Parameters tab:
Parameters), not by final disposition of part … so we did need − Replication length: 32, accept Hours default for Time Units
our Record modules and Arrive Time attribute
− Base Time Units: Minutes for inputs without Time Units
option, internal arithmetic, and units on output reports
ISYS 2088 Modelling and Simulation 175/25 ISYS 2088 Modelling and Simulation 176/25
Page 30
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Redefine a “day” to be 16 hours – Run > Setup > • Vary Capacity (no. of units) of a resource over time
Replication Parameters • In Resource Data module (spreadsheet view)
• Change Replication Length to 10 (of these) days − For Rework Resource, change Type from Fixed Capacity to
Based on Schedule
− Two new columns – Schedule Name and Schedule Rule
− Type in a Schedule Name (Rework Schedule)
− Select a Schedule Rule – details of capacity decrease if the
Resource is allocated to an entity
• Wait – Capacity decrease waits until entity releases Resource,
and “break” will be full but maybe start/end late
• Ignore – Capacity goes down immediately for stat collection, but
work goes on until finished … “break” could be shorter or gone
ISYS 2088 Modelling and Simulation 181/25 • Preempt – Processing is interrupted, resumed at end of “break”
182/25
• Define the actual Schedule the Resource will • Alternatively, right-click in the row, select Edit via
follow – Schedule data module Dialog
− Row already there since we defined Rework Schedule − Enter schedule Name
− Format Type is Duration for entries based on elapsed time − Enter pairs for Capacity, Duration … as many pairs as
past simulation start time needed
− Type is Capacity, for Resource schedule (more later on • If all durations are specified, schedule repeats forever
Arrival Type) • If any duration is empty, it defaults to infinity
− Click in Durations column, get Graphical Schedule Editor − Can involve Variables, Expressions
• X-axis is time, Y-axis is Resource Capacity • Another alternative – right-click in the row, select
• Click and drag to define the graph Edit via Spreadsheet
• Options button to control axis scaling, time slots in editor,
whether schedule loops or stays at a final level forever − Enter capacity Value, Duration pairs
• Can use Graphical Schedule Editor only if time durations are
integers, with no Variables or Expressions involved 183/25 ISYS 2088 Modelling and Simulation 184/25
• Usually for unplanned, random downtimes • Attach this Failure to the correct Resource
• Can start definition in Resource or Failure module − Resource module, Failures column, Sealer row – click
− Get pop-up Failures window, pick Failure Name Sealer
(Advanced Process panel) Failure from pull-down list
• Attach Advanced Process panel if needed, single- − Choose Failure Rule from Wait, Ignore, Preempt (as in
click on Failure, get spreadsheet view Schedules)
• To create new Failure, double-click – add new row • Can have multiple Failures (separate names)
acting on a resource
• Name the Failure • Can re-use defined Failures for multiple
• Type – Time-based, Count-based Resources (operate independently if they involve
• Specify Up Time, Down Time, with Units for both random variables)
ISYS 2088 Modelling and Simulation 185/25 ISYS 2088 Modelling and Simulation 186/25
Page 31
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 187/25 ISYS 2088 Modelling and Simulation 188/25
• Get generic default animation for some things • Can be lengthened (click, hold Shift key and drag)
(queues, connector-animation movement) • Can rotate to re-orient for enhanced realism
− Usually sufficient for verification, validation
• Can change the ‘form’ of the queue from Line (the
• Often want to customize, enhance it a bit default) to Point — fixed places for entities
− More realism, impact − Double-click on the queue
• Pull animation away from logic in model window − Select Type to be Point
− Useful for big models, complex animation − Click Points… button
− Named Views for model logic, animation, or close-ups − Successively click Add for points, then OK
• Default animation objects are connected to model − Drag them around on screen
logic and move with the module − Check Rotate box to show entities turning
− Identifiers, physical location (Shift-drag to decouple)
191/25 ISYS 2088 Modelling and Simulation 192/25
Page 32
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
− Clock (TNOW), variety of formats − Transfers take two minutes regardless of distance
• Fix this (unrealistic) assumption in Chapter 8
− Level (thermometer) animation
− Others discussed later
ISYS 2088 Modelling and Simulation 195/25 ISYS 2088 Modelling and Simulation 196/25
Page 33
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Adding the remaining route logic Why not just add delays?
• Add Station modules for entry to each Prep area • Simpler way to get the two-minute transfer times:
− Station names are Prep A Station, Prep B Station,
and are the destination stations for Routes after arrivals − Insert a Process module with Action = Delay for 2 minutes
on each relevant connection
• Process modules for Prep A, Prep B unchanged
− Or, use Delay module from Advanced Process panel
• After prep, entities connected to Route module to
send to next station (sealer) • This would work from modeling, numerical-output
− Don’t need a separate Station module for outgoing side viewpoints
• Similar changes for rest of model • But would not allow animation of part transfers,
− Station modules for incoming parts into sealer, rework, each so we’ll proceed with the Stations and Routes
of three Record modules (entity exit points)
− Route modules for outgoing parts out of sealer inspection,
rework inspection (two for each Decide module – pass/fail)
• Could run model now, get correct results … but
no animation of transfers … 199/25 ISYS 2088 Modelling and Simulation 200/25
• Add animation for Stations and Routes • Route button from Animate Transfer toolbar
• Station button , Animate Transfer toolbar − Options for appearance of entities as they travel the route
− Get cross hairs; click in origin, destination Station Markers
− Attach Identifier to it from pull-down list of station names
• Intermediate clicks for corners along the route
− Get cross hairs, place (click) marker in animation
− Can drag around endpoints, corners later
− Can place several station markers for the same logical
− Alternatively, use Route animation to create both Station
station (e.g., to represent incoming, outgoing sides)
markers and Route animation
− Can drag station markers around later • Click for beginning Station marker
• Intermediate clicks for route corners
• Double-click for ending Station marker
• Then go back and double-click on the two Station markers to
define their logical Identifiers
ISYS 2088 Modelling and Simulation 201/25 ISYS 2088 Modelling and Simulation 202/25
Altering the animation – entity pictures Finding and fixing model errors
• Part B arrivals are in batches of four parts/batch • If error prevents model from running, Arena will
− But constant travel time to Prep B implies they travel “on top try to detect and lead you to it in Check or Run
of each other” so it looks like just one part B − Undefined (or inconsistently spelled) Variables, Attributes,
− Try – change Route time from 2 to EXPO(2), see separation Resources
along the route
− Unconnected modules
• Create a dishonest illusion to animate the batch − Duplicate names
− Assign module just after Part B Arrive − Examples – see text
− Add assignment of Entity Picture to Picture.Batch B
• Highlight Active Module – selects active module
− Edit > Entity Pictures to draw the new picture
during run animation
• Copy Picture.Part B and rename it Picture.Batch B
• Double-click on picture, use Picture Editor to get four circles • View > Layers while running – change what
− When batch arrives to Prep B, change to single circle shows during run animation
• Add Assign module after Prep B Arrival Station 203/25 ISYS 2088 Modelling and Simulation 204/25
Page 34
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 205/25 ISYS 2088 Modelling and Simulation 206/25
Page 35
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• “Best” fit from among several distributions • Generate “fake” data file to play around
211/25 − File > Data File > Generate New 212/25
• Fits distributions, does goodness-of-fit tests • Fit all of Arena’s (theoretical) distributions at
• Fit a specific distribution form once
− Plots density over histogram for visual “test” − Fit > Fit All or
− Gives exact expression to Copy and Paste (Ctrl+C, Ctrl+V) − Returns the minimum square-error distribution
over into simulation model • Square error = sum of squared discrepancies between
histogram frequencies and fitted-distribution frequencies
− May include “offset” depending on distribution
• Can depend on histogram intervals chosen: different intervals
− Gives results of goodness-of-fit tests can lead to different “best” distribution
• Chi square, Kolmogorov-Smirnov tests − Could still be a poor fit, though (check p value)
• Most important part: p-value, always between 0 and 1:
− To see all distributions, ranked: Window > Fit All Summary
– Probability of getting a data set that’s more inconsistent with the
fitted distribution than the data set you actually have, if the the
or
fitted distribution is truly “the truth”
– “Small” p (< 0.05 or so): poor fit (try again or give up)
213/25 ISYS 2088 Modelling and Simulation 214/25
Page 36
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Happens more often than you’d like • Probably most familiar distribution – normal “bell
curve” used widely in statistical inference
• No good solution; some (bad) options:
• But it has infinite tails in both directions … in
− Interview “experts”
particular, has an infinite left tail so can always
• Min, Max: Uniform
(theoretically) generate negative values
• Avg., % error or absolute error: Uniform
− Many simulation input quantities (e.g., time durations) must be
• Min, Mode, Max: Triangular
positive to make sense – Arena truncates negatives to 0
– Mode can be different from Mean – allows asymmetry
− Interarrivals – independent, stationary
• If mean μ is big relative to standard deviation σ,
then P(negative) value is small … one in a million
• Exponential – still need some value for mean
− But in simulation, one in a million can happen
− Number of “random” events in an interval: Poisson
− See text, Model 4-5
− Sum of independent “pieces”: normal (heed left tail ...)
• Moral – probably avoid normal as input distribution
− Product of independent “pieces”: lognormal
217/25 ISYS 2088 Modelling and Simulation 218/25
• Usually assume all generated random • Redevelop Model 4-1 (pp. 115
observations in a simulation are independent – 128) using Arena 10.0
(though from possibly different distributions) installed on the PC.
• Sometimes not true:
• Discuss with your classmates
− A “difficult” part requires long processing in both the Prep
and Sealer operations to overcome any difficulties
− This is positive correlation
during redevelopment, if any.
• Ignoring such relations can invalidate model • Divide the class into groups
• See text for ideas, references and work on Exs. 4-1 – 4-3 on
p. 188 of the textbook.
ISYS 2088 Modelling and Simulation 221/25 ISYS 2088 Modelling and Simulation 222/25
Page 37
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 225/25 ISYS 2088 Modelling and Simulation 226/25
Model 7-1:
A small manufacturing system
Page 38
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Page 39
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Advanced Set data module Run > Setup and Edit > Entity Pictures
• On Advanced Process panel • Run > Setup Dialog
• Needed since Set data module does not have − Replication Parameters Tab
“Sequence” category for Type • Replication Length = 32 Hours
• 24 Hours/Day
− Need to form a set of Sequences to attach the right one to
arriving entities once their part type is determined • Base Time Units = Minutes
ISYS 2088 Modelling and Simulation 237/25 ISYS 2088 Modelling and Simulation 238/25
Page 40
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Page 41
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Animation Verification
• Pull animation away from logic, data modules • System → Model → “Code”
• Move, resize, reorient queues for realism • Validation: Is Model = System?
• Animate Routes (all movement possibilities) • Verification: Is “Code” = Model? (debugging)
− Thick “bundles” of routes — Shift key, Snap to Grid • The Truth: Can probably never completely verify,
− Heed clockwise direction especially for large models
− Draw lines to define route “lanes” • General approaches for model verification:
• Import, modify AutoCAD .dxf file for backdrop and − Allow only one entity to enter the system at a time and watch
resource pictures (see text) how the model performs using the Step ( ) button.
• Fine-tune resource pictures − Replace some or all model data with constants and see if the
deterministic model outcomes are as expected.
− Layers for seize point
− Test the model under extreme conditions, i.e., stressed-out runs.
• In animation, note that entities travel at very − Make long runs to see if there are problems or the performance
different rates, pass each other. Why? (Hint: 2 min.)
247/25 of the model is as expected. 248/25
• Bias can go either way − Make the run so long that bias is overwhelmed
• Usually downward (results are biased low) in queueing-type • Might work if initial bias is weak or dissipates quickly
models that eventually get congested − Let model warm up, still starting empty and idle
• Depending on model, parameters, and run length, the bias can • Run > Setup > Replication Parameters: Warm-up Period
be very severe – Time units!
• “Clears” all statistics at that point for summary report, any Outputs-
type saved data from Statistic module of results across replications
ISYS 2088 Modelling and Simulation 251/25 252/25
Page 42
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Warm up and run length (cont’d) Warm up and run length (cont’d)
• Warm-up and run length times? • No explosions
− Most practical idea: preliminary runs, plots • All seem to be
− Simply “eyeball” them settling into
steady state
− Be careful about variability — make multiple replications,
superimpose plots • Run length
seems
− Also, be careful to note “explosions”
adequate to
• Possibility – different Warm-up Periods for reach steady
different output processes state
− To be conservative, take the max • Difficult to
determine
− Must specify a single Warm-up Period for the whole model
warm-up period
from plots
ISYS 2088 Modelling and Simulation 253/25 254/25
Warm up and run length (cont’d) Warm up and run length (cont’d)
• Create a single overall output performance • In Output Analyzer
measure for Model 7-1 … modify it into Model 7-2 − New data group, Add the file Total WIP History.dat
− Measure is time-average total number of parts in system − Graph > Plot or
− Statistic module − Add Total WIP History.dat, Replications = All, enter
• Time-Persistent type, Name and Report Label Total WIP Title, axis labels
Warmup Period
Page 43
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Page 44
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Use Output Analyzer to analyse data from files Add files to Data Group
saved from Outputs area (cross-replication) of
Statistics module Select files
for confidence
• Define, read in, save Data Group(s) intervals
• In Output Analyzer
− Analyze/Conf. Interval on Mean/Classical… menu (or )
− Add desired files; select Lumped for Replications Can change confidence level
(95% is default)
Select “Lumped”
Replications treatment
to use all replications
ISYS 2088 Modelling and Simulation 267/25 ISYS 2088 Modelling and Simulation 268/25
Page 45
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Half width and number of replications Half width and number of replications (cont’d)
s2
• Prefer smaller confidence intervals — Precision • Set half-width = h, solve for n = t n2−11
, −α / 2
h2
• Notation: n = no. replications • Not really solved for n (t, s depend on n)
X = sample mean
s = sample standard deviation • Approximation:
, −α / 2 = critical value from t tables
t n −11 − Replace t by z, corresponding normal critical value
• Confidence interval: X ± t n −11, −α / 2 s − Pretend that current s will hold for larger samples
n s2
s − Get n ≅ z12−α / 2
h2 s = sample standard deviation from ‘initial’
• Half-width = t n−11
, −α / 2 Want this to be “small,” say
number n0 of replications
n < h where h is prespecified • Easier but different approximation:
• Cannot control t or s h02 n grows quadratically
n ≅ n0 h0 = half width from ‘initial’
• Must increase n to reduce interval — How much? h2 number n0 of replications as h decreases.
ISYS 2088 Modelling and Simulation 271/25 ISYS 2088 Modelling and Simulation 272/25
ISYS 2088 Modelling and Simulation 273/25 ISYS 2088 Modelling and Simulation 274/25
ISYS 2088 Modelling and Simulation 275/25 ISYS 2088 Modelling and Simulation 276/25
Page 46
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Exercise 7-5
Page 47
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
ISYS 2088 Modelling and Simulation 283/25 ISYS 2088 Modelling and Simulation 284/25
The small manufacturing system with The small manufacturing system with
transporters transporters (cont’d)
• Have two carts to transport parts • Create Transporter in Transporter data module
− A cart can carry one part at a time (Advanced transfer panel)
− Carts move at 50 feet/minute − Name = Cart, Number of Units = 2, Velocity = 50
• Will need to specify accurate distances between Stations − Default the Distance Set (later), Units = Per Minute, Initial
− It takes 0.25 minute to load part on a cart, 0.25 minute to Positions
unload it from a cart • Mind the units – consistency here, in Distance Set (later)
• Modify Model 8-1 to Model 8-2 • Animation picture for Cart Transporter
− Transporter button , Animate Transfer toolbar
− Identifier = Cart, pictures for Idle, Busy, Inactive states
− Draw or copy from .plb picture libraries
− Ride point (details in book)
− Drop it anywhere in flowchart view (hidden during run)
ISYS 2088 Modelling and Simulation 287/25 288/25
Page 48
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
The small manufacturing system with The small manufacturing system with
transporters (cont’d) transporters (cont’d)
• Request a Cart – modify existing Leave modules • Free the Cart – modify existing Enter modules
− Delay = 0.25 Minute for load time − Delay = 0.25 Minute for unload time
− Transfer Out = Request Transporter − Transfer In = Free Transporter
− Transporter Name = Cart − Transporter Name = Cart
− Selection Rule = Smallest Distance
− Unit Number = Cart # attribute of part entity
• Applies when > 1 transporter is available
• Others: Cyclic, Random, Preferred Order, Largest Distance (???) • Instead of Enter: Station-Delay-Free
− Save Attribute = Cart # (remember which cart … for later) − More complex, more flexible – book has details, examples
− Connect Type = Transport
• Move Time disappears … determined by Velocity, Distances (later)
− Station Type = By Sequence
• Instead of Leave: Request-Delay-Transport
− More complex, more flexible – details, examples in text
289/25 ISYS 2088 Modelling and Simulation 290/25
ISYS 2088 Modelling and Simulation 293/25 ISYS 2088 Modelling and Simulation 294/25
Page 49
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Model 8-3: Refining the Animation for Model 8-3: Refining the Animation for
Transporters Transporters (cont’d)
• Part Entities disappear from animation when • The trick is to replace all the Leave modules with
waiting to be picked up by a Cart Transporter Queue – Request – Delay – Transport module
after Transporter has been allocated combination available from the Blocks panel.
− Model logic OK … get right answers … animation is flawed • Only needed for better animation; increase model
− Actually, animation is OK when part’s waiting before complexity and is not really necessary.
Transporter is allocated
• Solution – Storage for entity to reside in, be Use the queue button ( ) and the storage
animated, while it waits for something (here, a button ( ) to modify the animation.
Cart Transporter)
− Can get statistics on numbers in Storages
• But Storages not available with modules from
Advanced Transfer panel
− Use lower-level SIMAN modules from Blocks panel … see • The other alternative is to use a Store – Request –
book for specific details 295/25 Delay – Unstore – Transport module combination. 296/25
Page 50
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
• Redevelop Model 8-2 (pp. 333 • Modify Model 4-3 to include the use of a single
– 341) using Arena 10.0 truck to transfer parts from the two prep areas to
installed on the PC. the sealer. Assume that the distance between any
pair of the three stations is 100 feet and that the
• Discuss with your classmates truck travels at a rate of 75 feet per minute.
to overcome any difficulties Animate your solution.
during redevelopment, if any.
Page 51
ISYS2088 Modelling & Simulation 20 January 2009
Lecture Notes
Exercise 8-6
Page 52