Professional Documents
Culture Documents
Problem Description
Problem Statement
Library management is considering improving the service at their closed stack library by adding
additional clerks to improve the time borrowers take to check out a book (that is the time from
which the borrower arrives at the service desk to the time the borrower leaves with the book). In
addition, management is also interested in ensuring that clerks are sufficiently busy.
SUI Details
The diagram shows the setup of the library with a
close stack policy.
C
Library Clerks
Library Stacks
C
Checkout Slips
Service Desk
B
Depositing Checkout Slip
Receiving book
Project Goal
The main goal of this study is to find the effect of changing the number of clerks on the
utilization of the clerks and the average turnaround time for borrowers (time it borrowers stay in
the library after submitting a slip).
A steady-state study is to be used to study the operation of the library during the busy period
using the number of customers served for terminating the simulation (note that although the busy
period is of finite time, for the purposes of the study, the busy period is being extended). A single
parameter has been defined the number of clerks servicing borrowers (from the current 3 to 4
and 5).
Parameters
Experimentation
Output
Checkout slips are not explicitly modelled. Instead, the Customer entities serve as surrogates
for the slips.
Structural View
Q.ClerksIdle
RQ.Clerk[numClerks]
1
Q.Slips
Legend
iC.
iC.
iC.
iC.Borrower
Behavioural View
BorrowerArrival
FindBooks
CheckOut
CheckOut
FindBooks
b) Clerk Lifecycle
Library Behaviour Diagram
Variable
uFindBooksTime
uCheckOutTime
RVP.DuBorrowerArr()
Range Sequence
N/A 1 borrower arrives at
each arrival time.
Name
MAX_SLIPS
Parameters
Description
Name
numClerks
Value
4
Value
3, 4 and 5
Attributes
arrivalTime
Description
Time the person arrived at the desk to check out a book. Used to compute the
response time.
Attributes
status
n
list
servicing
Description
Set to IDLE when waiting for Borrowers (i.e. placed the Q.ClerksIdle), and
BUSY otherwise. This attribute is required to observe the amount of time the
Clerk is busy.
Number of borrowers being serviced when Status is set to Busy (one to
MAX_SLIPS).
List of iC.Borrower's being serviced. Slips are not explicitly modeled. Instead a
reference to the iC.Borrower is attached to the RQ.Clerk member.
This attributes reflects the phase of servicing in which the Clerk is involved. It
is only significant when the Status attribute is set to BUSY. I can have one of
two values:
FINDBOOKS - when searching for books in the stacks
READYCHECKOUT - ready to check out a book with a borrower
CHECKINGOUT - checking out a book with a borrower.
Attributes
n
list
Description
Number of borrowers waiting to give a slip to a clerk.
List of references to iC.Borrower's waiting to give a slip to a clerk.
Attributes
n
list
Description
The number of idle clerks.
The list of identifiers to RG.Clerk members that are idle.
Behavioural components
Time units: minutes
Observation interval: Steady state study.
Action: Initialise
TimeSequence
Event SCS
<0>
Q.Slips.n 0
num 0
WHILE(num < numClerks)
RQ.Clerk[num].status IDLE
SP.InsertQue(Q.ClerksIdle, num)
num num+1
END
Output
OUTPUTS
Trajectory Sets
Name
Description
TRJ[RQ.Clerk[id].status]
Sample Sets
Name
Description
PHI[responseTime]
Name
Collects the times it takes the response times for borrowers to check out a
book (from the time the borrower arrives at the checkout desk to the time he
or she leaves with the book). When the checkout procedure is completed for a
borrower, the time is computed as (t-iC.Borrower.arrivalTime).
AvgResponseTime
ClerkUtil[id]
Operator
PHI[responseTime]
AVG
TRJ[RQ.Clerk[id].Status]
AVG
Input Constructs
Name
DuBorrowerArr()
uFindBooksTime(n)
uCheckOutTime()
{tk: k = 0, 1, 2, ----}
with t0 = EXP(ARRIVAL_MEAN) and for k>0,
tk = t(k-1) + EXP(ARRIVAL_MEAN)
where ARRIVAL_MEAN = 2 minutes
n=1: Normal(MEAN_ONE,STD_DEV_ONE)
n=2: Normal(MEAN_TWO, STD_DEV_TWO)
n=3: Normal(MEAN_THREE, STD_DEV_THREE)
n=4: Normal(MEAN_FOUR, STD_DEV_FOUR)
where:
MEAN_ONE = 4 min.,STD_DEV_ONE = 0.8 min
MEAN_TWO = 7 min.,STD_DEV_ TWO = 1.4 min
MEAN_ THREE = 9 min.,STD_DEV_ THREE = 1.8 min
MEAN_ FOUR = 12 min.,STD_DEV_ FOUR = 2.4 min
UNIFORM(CHECK_OUT_MIN, CHECK_OUT_MAX)
where
CHECK_OUT_MIN = 1 min., CHECK_OUT_MAX = 3 min.
Action: BorrowerArrival
The arrival of a borrower with a slip to borrow a book.
TimeSequence RVP.DuBorrowerArr()
Event SCS
iC.Borrower SP.Derive(Borrower)
iC.Borrower.arrivalTime t
SP.InsertQue(Q.Slips, iC.Borrower)
Behavioural Constructs
Activity: FindBooks
Pickup slips and find the books in the stack.
Precondition (Q.Slips.n > 0) AND (Q.ClerksIdle.n > 0)
Event SCS
clerkId SP.RemoveQu(Q.ClerksIdle)
IF(Q.Slips.n > MAX_SLIPS)
numSlips MAX_SLIPS
ELSE
numSlips Q.Slips.n
ENDIF
num 0
WHILE (num < numSlips)
iC.Borrower SP.RemoveQu(Q.Slips)
SP.InsertQu(RQ.Clerk[clerkId], iC.Borrower)
num num+1
ENDWHILE
RQ.Clerk[clerkId].status BUSY
RQ. Clerk[clerkId].servicing FINDBOOKS
Duration
RVP.uFindBooksTime(RQ.Clerk[clerkId].n)
Event SCS
RQ.Clerk[clerkId].servicing READYCHECKOUT
where the xxxs are replaced with the current value of the clock and designated attribute values.
Simulation Model
Design of Simulation Model and Program
The simulation model is implemented in the class Library (an extension of the ABSmod/J class
AOSimulationModel) and a number of other classes used to implement the various constructs
from the ABCmod conceptual model. All Java classes that make up the Java Library simulation
model are placed in the Java package librarySimModel.
The following table shows how the various ABCmod entity structures are mapped to Java
classes and how objects instantiated from these classes are reference by the Library class.
Entity Structures
Java Class
ABCmod
Construct
iC.Borrower
Borrower
RQ.Clerk
Clerk
Library.rqClerk
ArrayList<Borrower>
Object References
Library.qSlips
Q.ClercksIdle
ArrayList<Integer>
Library.qClerksIdle
clerkId = qClerksIdle.remove(0)
The following table provides mapping between the conceptual model Action/Activities to Java
classes.
Actions/Activities
ABCmod Constructs
Java Classes
BorrowerArrival
BorrowerArrival
FindBooks
FindBooks
CheckOut
CheckOut
Other classes that make up the Library ABSmod/J simulation model include:
Output (referenced by Library.output): Contains the Trajectory sets and methods for
computing the DSOVs.
RVPs (referenced by Library.rvp): Contains the Java methods used to implement the CM
RVPs.
UDPs (referenced by Library.udp): Contains the Java methods used to implement the CM
UDPs.
Seeds: The class used to pass seeds for random number generators used in implementing the
various RVPs.
The package librarySimModel provides public access to the following:
The constructor Library to allow creation and initialisation of a Manufacturing object,
The methods getAverageResponseTime(),getClerkUtil(),access the value of the output
variables avgResponseTime, clerkUtil[id] respectively.
The methods clearAllOutput() and clearResponseTimeOutput() to support the warm
up time.
All public methods provided by the class AOSimulation (e.g. runsimulation) for
supporting experimentation.
Mean
(min)
4
7
9
12
Standard
Deviation
(min)
0.8
1.4
1.8
2.4
3) Check out time: The time to check out 1 book is uniformly distributed between 1 and 3
minutes.