S Intro ARENA
S Intro ARENA
Operations Research
https://rossetti.github.io/RossettiArenaBook/
Introduction to
ARENA
September 1, 2024
1. Example: The Pharmacist
2. Definition of variables and how to obtain
statistics on variables
3. Extended Example: The Pharmacist
Continued
Module
connector
Drag and
drop from
Basic
process
panel
= 10 cl/60min = 1/6 1/ = 6
• RESOURCE module
– An element demanded by entities with finite capacity
– Edit the new entry by clicking in the spreadsheet window
Choose
expression
Fast forward:
Run without animation (Batch mode)
Start over:
Stops the run and starts it again
Animation slider:
To slow down or speed up
Grado en Ingeniería en Tecnologías Industriales/de Telecomunicación Discrete Event Simulation Modeling 14
Operations Research/Investigación Operativa
Implementing the demo model in Arena (v)
• RUN Setup
51% busy
G
F
How to collect
statistics on a
Time-based
variable?
When the entity passes the RECORD module (of Type: Time Interval):
The module records the difference between the current time, TNOW, and the specified
attribute (myArriveToMakeRingTime)
This represents the elapsed time interval for the entity to move from F to the RECORD.
Time Between: The difference between the current time, TNOW, and the last time an
entity passed through this RECORD module
Extended Example:
The Pharmacist Continued
Extending/modifying the demo example
File: Pharmacist_chapter2.doe
In order to collect
time-based statistics
Click here to enter
initial values
Grado en Ingeniería en Tecnologías Industriales/de Telecomunicación Discrete Event Simulation Modeling 28
Operations Research/Investigación Operativa
Implementing the demo model in ARENA
• Arrival Process
– CREATE module: with a defined distribution of the number of customers
– We limit to 30 arrivals (cars, not customers)
DISC(cp1,v1,cp2,v2,…)
Discrete probability function
with probabilities:
𝑃(𝑋 = 𝑣 ) = 𝑐𝑝 − 𝑐𝑝
In this module:
• We assign to this entity an attribute: the number of prescriptions (1, 2, or 3) with a
probability
• We add to the counter the overall number of prescriptions in the system and the
number of prescriptions associated with this entity
• We also assign to this entity the current simulation time (NOW) as his initial time in
the system
• We specify this is an arrival event (type 1)
• Finally, we compute in the vector vNP (clients with X prescriptions) in row “myNP” the
counter +1
Grado en Ingeniería en Tecnologías Industriales/de Telecomunicación Discrete Event Simulation Modeling 31
Operations Research/Investigación Operativa
PROCESS module
In this module:
• We adapt the process module for getting the medicine with a delay time
depending on the number of prescriptions of the entity
• We go to the vector “vServiceMean” and read the “myNP” value
In this module:
• We decrease the variable of the overall number of prescriptions, the number of
prescriptions of the entity that is leaving the system (“myNP”)
• We also decrease 1 from the overall counter of the number of clients with NP
prescriptions in the corresponding position
• We specify this is a leaving event (type 2)
Sequential File: A text file whose records will be in the same sequence as
they are written
Free format: each value in the file is separated by a space
Written Information
TNOW: Current Simulation Time
vEventType: Type of Event
IDENT: Entity identity number
Entity.SerialNumber
myNP: number of prescriptions
for the customer
www.comillas.edu
www.comillas.edu