Transcript Document

ARENA
1 - ARENA DISCRETE EVENT
SIMULATION SOFTWARE
The Arena modeling system is a flexible and
powerful tool that allows analysts to create
animated simulation models that accurately
represent virtually any system.
Arena employs an object-oriented design for
entirely graphical
modelparadigm
development.
Simulation
A programming
that uses "objects"
to
design
applications
and computer programs.
analysts place
graphical
objects—called
modules—
on a layout in
order
to
define
components
In Classical
Arena, modules
terms:
class,
are system
the
object,
flowchart
method…
and data
objects
that define
process handling
to be
such as machines,
operators,
andthe
material
simulated. All information required to simulate a
devices.
process is stored in modules.
1
ARENA
2 - THE CORE OF THE
SOFTWARE
The core technology of Arena is the SIMAN
simulation language.
Arena is a Microsoft® Windows® compliant
product. The entire product is written in objectoriented Visual C++™. This allows users to
leverage Microsoft’s open architecture to integrate
external data and applications with Arena models.
Other possible connections: Microsoft Office,
ActiveX, ODBC, Visual Basic.
2
ARENA
3 - FLOWCHART MODEL
DEVELOPMENT
Arena was designed to make creating simulation
models an entirely graphical process. All system
behaviors are represented by using graphical
modules. For system logic such as IF/THEN/ELSEtype branching and queue selection rules, the user
Visualize
- Analyze
creates a flowchart Model
of his– Simulate
system –by
placing
the
appropriate graphical modules on the Arena layout
and directly connecting these modules.
Before opening the program (which will
approximately happen in Slide 10), let us speak
about SOME components: entities, resources,
queues, variables, processes.
3
ARENA
3.1 - Entities
Entities are dynamic elements that pass through
we build the flowchart, it’s helpful to think of
theAs
system.
the process from the perspective of the entity.
The trigger
for an action to be
is
Entities
are distinguished
byaccomplished
their attributes.
the arrival of an entity.
Entities must be created to get them into the
module and are disposed when they leave.
Attributes must be numerical values.
You may have different types of entities in the
same model.
4
ARENA
3.2 - Resources
Resources have a name and a capacity (number
of identical units of the resource).
Resources may have a schedule (how many of
them are available and when).
Resources are automatically defined by some
modules (e.g., Process).
Resources can be defined manually, and the
properties of all resources can be edited in the
same way.
5
ARENA
3.3 - Queues
Entities queue when they need processing
An entity tries to seize a resource.
The time the entity uses the resource is the delay.
If the resource is not available, the entity waits in a
queue.
The entity releases the resource when processing
is complete.
Queues are created automatically by some modules
(e.g., Process), and can be defined manually.
6
ARENA
3.4 - Variables
Arena allows the user to work with simulation
variables.
They
contain
information
about
particular
dimensions
of the model.
See the
“Variables Guide”
Many of them are built-in.
Time Attribute Variables, Cost Attribute Variables…
Variables can be referenced in modules, can be
reassigned a new value with a particular module,
and can be used in any expression.
7
ARENA
3.5 - Processes
Entity must be processed.
This activity is performed by one or more resources
and requires some time to complete.
8
ARENA
3.6 – Until Now
An Entity
Generator…
The Output
…And The Resource
9
…The Entity
…Its Queue…
A Process…
ARENA
4 - OPENING THE PROGRAM
(Turn on the PC ) Start  Programs  Rockwell
Software  Arena
Project Bar
Flowchart View
Spreadsheet View
10
ARENA
4.1 – The Three Regions
The Project Bar hosts panel with the primary
types of object to work with.
Basic Process, Advanced Process, Advanced Transfer Panels
Reports Panel
Navigate Panel
The Flowchart View is the real environment and it
Here theall
objects
are connected
by a particular
will contain
of your
model graphics,
including the
instrument:
there isanimation,
no difference between
data drawing
process
flowchart,
and other
connectors and logical connectors.
elements.
The Spreadsheet View displays model data, such
as times, costs, and other parameters.
11
ARENA
4.1.1 – THE PROJECT BAR
We will mainly work with Basic Process modules.
The modules are the classes.
Esempio Classe:
ASTRONAVE
As you drag a module to the Flowchart View, you
create an instance of that module; thus, you have
Esempio Oggetto:
an object.
MILLENNIUM FALCON
It is a “visual representation” of object-oriented
programming language (such as Java or VB.NET).
12
ARENA
4.1.1.1 – The Main Modules /1
Push (possibly) batches of entities
into the model with a (possibly)
random time between.
Models Queue-Seize-Delay-Release of
Resource, or any part of this (like
pure Delay).
Make decisions about where to go
next based on conditions or chance.
Take entities out of the model and
(perhaps) record statistics.
13
ARENA
4.1.1.1 – The Main Modules /2
Assign values (especially Attributes)
when an entity passes through.
Record information when entities
pass through, typically statistics on
entities.
Combine multiple
single entity.
Split multiple
combined, or
entity.
14
entities
into
a
entities that were
duplicate a single
ARENA
4.1.2 – THE SPREADSHEET VIEW
Each time you create an instance of an object, you
have to define its attributes, in order to completely
definite it.
These attributes can be set in the prompt window
obtained by double-clicking on the object itself.
You can see all the attributes of the modules
watching the spreadsheet in the corresponding
window.
There are elements not represented by modules:
their attributes can only be set via spreadsheet.
15
ARENA
4.2 – Probability
Distributions
Working with ARENA, you will have to spend very
much time with probability distributions. Luckily,
the software
contains
a set oflet
built-in
functions.
Probability
distributions
you generate
random
numbers. The correct distribution can be known a
These distributions
appear
on pull-down
menus in
priori or can
be obtained
from an analyzer.
many Arena modules where they’re likely to be
used.
To see them all together, you have to look for the
filed “Expression” and follow the hints given by the
program.
16
Beta, Continuous, Discrete, Erlang, Exponential,
Johnson, Lognormal, Normal, Poisson, Triangular,
Weibull
Gamma,
Uniform,
ARENA
4.3 - Analyzers
The Input Analyzer is useful for determining an
appropriate distribution for input to an Arena
model. The Input Analyzer allows the user to take
raw data and fit it to a statistical distribution which
can be incorporated directly into your model.
The Output Analyzer is used to display and
analyze model data after the simulation run (or
runs) has been performed. The Output Analyzer
also provides analysis features such as confidence
intervals.
17
Both the Input and Output Analyzers are directly
available on the Arena Tools menu.
ARENA
4.4 – Internal Variables
Arena keeps a number of internal variables
continually updated.
Create – Name.NumberOut
Process – Name.NumberIn, Name.NumberOut, Name.WIP,
Name.WaitTime
Decide - Name.NumberOut True, Name.NumberOut False
Assign – Name.NumberOut
Batch – Name.NumerOut
Separate – Name.NumberOut Orig, Name.NumberOut Dup
Record – Name.NumberOut
Dispose – Name.NumberOut
The time on the simulation clock is accessible
through the Arena variable TNOW.
18
ARENA
4.5 – The Menus
• File – Classic Windows File Menu
• Edit – Classic Windows Edit Menu
• View – Zoom, grid, layers, toolbars
• Tools – Input/Output Analyzer, Add-Ins, VBA
• Arrange – Drawing, group, rotate
• Module – Connections, panel, breakpoint
• Run – Run, check, pause step through
• Windows – Classic Windows Windows Menu
19
• Help – Help about Arena
ARENA
4.6 - Running
Go Step Fast-Forward Pause Start Over End
Check Model Like compiling
Review Errors For most recent check
View Results Summary for most recent run
SIMAN See, save underlying SIMAN files
Command Interactive command-line window
Break Set times, conditions to interrupt
Trace Generate detailed history
Watch Watch a variable or expression during run
Report See a numerical status when paused
Setup Alter run conditions
Speed Control speed of animation display
20
ARENA
5 - AN EXERCISE /1
The first model we are going to build is a single
server queuing model. The underlying system
can be defined as follows.
- Customers arrive in the system one at a time.
- The inter-arrival times,
probability distribution.
follow
a
certain
Further assumptions of the arrival process are not
made at this point.
- There is a single server that can serve one
customer at a time.
21
ARENA
5 - AN EXERCISE /2
- The processing times follow a certain probability
distribution.
Further assumptions of this distribution are not
made yet.
- If the server is busy at the time when a customer
arrives in the system, the customer is placed in a
queue to wait for the server to become free.
- The customers in the queue are served according
to FIFO queuing discipline, i.e. the first of the
customers to arrive in the queue is served first.
22
ARENA
5.1 – Performance Figures /1
Expected average queuing time of a customer
D is the delay in queue of the ith
customer.
Expected average number of customers in the
queue
Q(t) is the number of customers in
queue at time t and T(n) the total
simulation time when simulating
the passage of n customers
through the system.
23
ARENA
5.2 – Performance Figures /2
Utilization of the server
Let B(t) be 0, if the server is idle
at time t and 1, if it is working.
24
ARENA
5.3 – The Model With Arena
Now, your model should look like the following
picture.
The create-module represents the arrival of
customers into the system. The process module
represents customer service and the disposemodule represents the departure of customers from
the system.
25
ARENA
5.3.1 – THE CREATE MODULE
Correct naming
Name-field: Customer arrivals
Entity type-field: Customer
Distribution of inter-arrival time of customers
Constant inter-arrival time of 1 hour
26
Parameters
- Entities per arrival: 1 – It states that each
customer arrives alone.
- Max arrivals: 3 – Defines the maximum number
of customers created during the simulation.
- First creation: 0 – The first customer is created at
time 0.
ARENA
5.3.2 – THE PROCESS MODULE /1
The process-module defines, what happens during
customer service.
Correct naming
Name-field: Customer service
Entity type-field: Standard
27
Define the logic of the process
Action-field: Seize-Delay-Release
This
that
anand
entity
thatThe
is activity
being isprocessed
The means
resource is
seized
released.
delayed.
As we takes
selected the
Seize-Delay-Release,
a queue named
first
control of (seizes)
the Customer
required
service.Queue Then,
was automatically
created byexperiences
Arena to handle a
resources.
the entity
entities that wait for service.
processing delay and, when done, releases the
control of the resources it has held.
ARENA
5.3.2 – THE PROCESS MODULE /2
Selecting the Seize-Delay-Release option opens
another field named Resources to define what
resources are required to complete the task. Click
Add and define in the opening dialogue box:
Type 
Resource,
Server and
Quantity 
This
value is theName
number
of resources
simultaneously
used by the resource.
1.
The
and
The capacity of the resource (how many resource-items
are in the
system)takes
must be
edited
the spreadsheet
Server
resource
care
of in
customer
service
serves 1 customer at field.
a time.
Lastly, define a constant 2 hour processing delay.
Still, make sure that the Report statistics option
is selected and leave the dialogue box.
28
ARENA
5.3.3 – THE DISPOSE MODULE
Correct naming
Name-field: Departures
Check that the Record entity statistics -option is
selected.
29
ARENA
5.4 - Simulation
Our model is now complete and we can start
simulating. The specifics of the simulation run are
defined by selecting from the Run-menu Setup.
Our simulation ends when the three entities leave
the system. So, we don’t need to make
specifications. Usually, it is possible to specify the
run simulation length.
Start the simulation by selecting Go from the Runmenu and wait.
30
ARENA
5.5 – Viewing The Results /1
The type of report that Arena will show is by default
the Category overview –report. It basically lists
the values of all performance indicators for which
the statistics collection option was activated.
Remember that we used constant inter-arrival (1
hour) and processing times (2 hours) as input data
and created only 3 customers.
31
This allows us to say, without simulating the
system, that the expected average queuing
delay for a customer is 1 hour, the expected
average queue length is 0.5 and that the
server utilization is 1.
ARENA
5.5 – Viewing The Results /2
The simulation results should tell us exactly the
same thing and allow us to be a little more
confident about the implementation of the model.
Now, go through the report and locate the values of
Wait time in the Entity-category, Number
waiting in the Queue-category as well as
Instantaneous utilization in the Resourcecategory.
32
ARENA
BIBLIOGRAPHY
• Arena Software Tutorial; David A. Takus, David
M. Profozich
• Simulation with Arena, Chapter 4; Working
with Arena
• Mat-2.170 Simulation Spring 2006, Exercise 3 –
Introduction to Arena Software
• Arena Basics; ISyE 6644; Seong-Hee-Kim
(Georgia Tech), Barry Nelson (Nortwestern)
• Arena User’s Guide; Doc ID ARENA-UM001A-EN-P
33