You are on page 1of 13

Simulation Modeling and Discrete Event Simulation

Project report
Staffing Simulation of Save-a-lot Drug Store
Using Promodel
Pengju Kang
12/19/22
1
!ontents
Problem statement...............................................................3
Model development..............................................................4
One operator two queue model........................................................................................4
Two Operator Two Queue Model ...................................................................................6
Three Operator Two Queue Model .................................................................................7
Performance Optimization..................................................9
Conclusions.......................................................................12
Appendix............................................................................13
2
Staffing Simulation of Save-a-lot Drug Store Using
Promodel
Pengju Kang
Problem statement
In a recent business plan, it was proposed that a drustore be built on the !ar" #treet.
$ccordin to the plan, the store has wal"%in entrance and a dri&e%in entrance. The store is
intended to ser&e the needs o' customers li&in in local area. It is e(pected that the 'uture
store should ha&e a sta''in plan that will uarantee minimum customer lost, which is
dependent on the time customer waitin 'or ser&ice. The time a customer spent in the
drustore is dependent on the time, which a pharmacist 'ills a prescription, which, in turn,
is determined b) the number o' items in a prescription &ar)in 'rom customer to
customer.
It is the ob*ecti&e o' the present pro*ect to model the operation o' the dru store to
pro&ide the data reardin &arious per'ormances o' the dru store responsi&e to the
sta''in plan. The 'ollowin measures are used to assess per'ormance o' the business
operation o' the store.
1. The a&erae number o' customers waitin 'or ser&ice at the dru store.
2. The a&erae time o' a customer spends at the dru store.
+. The utili,ation rate o' the pharmacists.
I' the a&erae time a customer waitin 'or ser&ice is too lon, it ma) be necessar) to add
one or more pharmacists to the store. Throuh simulation, the optimal number o'
pharmacist added to the dru store will be identi'ied. I' dedicated pharmacists are
assined to wal"%in and dri&e%in customers, a comparison will be made on the
per'ormance di''erences o' this arranement 'rom the pre&ious one. $s a matter o' 'act,
there will be errors in the estimation o' process models due to the limited number o' data
are used to 'it the distribution 'unction. $ number o' e(periments will be run to enerate
a pro'ile, which can be used to ad*ust the business plan in accordance with the model
parameter chanes -model uncertainties.. This is "nown as the robust desin. Model
based simulation techniques ma"e it possible to accomplish the robust desin o' the
sta''in plan 'or the store.
It is decided that !romodel pac"ae be selected as simulation plat'orm. #tatistical models
are to be de&eloped 'or the processes in&ol&ed in the drustore business. The deri&ation
o' the models comes 'rom the anal)sis o' the historical data collected b) a store located in
+
a di''erent area. /ased on the statistical model, di''erent scenarios o' sta''in plan will be
in&estiated to identi') the optimal plan 'or the present store.

The present section i&es an introduction o' the problem the author is stud)in. In
#ection 2, the statistical nature o' this problem is anal),ed, which includes the process
data collection and processin. #ection + is dedicated to the description to the
implementation o' the model de&eloped 'or the dru store usin !romodel. In #ection 4,
the numerical results are i&en reardin &arious issues listed abo&e. The 'inal section is
the conclusion o' the present wor". 0isted in the appendi( are the te(t 'iles o' !romodel
prorams used in this pro*ects.
Model development
One operator two queue model
#tartin with one pharmacist wor"in in the store, the drustore is modeled as a process
with one operator and two queues, one 'or wal"%in customers and one 'or dri&e%in
customers. To describe the statistical propert) o' the ser&er, we need to "now the ser&ice
time o' the operator, more e(actl) the time required b) a pharmacist to 'ill a prescription,
which depends on the number o' items in a prescription. The historical records o' a
similar store located in a di''erent area were used to identi') a statistical model 'or the
time spent b) a pharmacist on 'illin up a prescription. The data was anal),ed usin the
#tat11'it utilit) o' !romodel, and the statistic, time required to 'ill up a prescription, was
'ound to be best described with a uni'orm distribution. The 'itted distribution 'unction is
shown in 2i. 1. To in&estiate the utili,ation rate o' the operator, we need to "now the
arri&al rates o' the dri&e%in and wal"%in customers. 3istorical data o' the same store were
used to identi') the statistical models 'or these two statistics. It has been shown usin the
#tat11'it that the) can be modeled as two e(ponential processes. The 'ittin results are
i&en in 2is. 2 and +.
4
2i.1 The 'itted distribution 'or the ser&ice time o' pharmacist.
2i.2 The 'iited distribution 'or the interarri&al time o' wal"4in customers.
2i. + The 'itted distribution 'or the interarri&al time o' dri&e4in customers.

Three locations were selected to model the sa&e%a%lot drustore. The la)out o' the
drustore is i&en in 2i. 4. Two queues were used to model the entrances o' wal" in
customers and dri&e in customers respecti&el). The queues ha&e limited capacities to
emulate the realistic situation that when there are too man) people linin in the queue,
incomin customer ma) lea&e 'or a di''erent store. The capacit) o' the wal" in queue is
15, and the capacit) 'or the dri&e in queue is 6. The te(t 'ile 'or the model la)out is
pro&ided in the $ppendi(. To e&aluate the per'ormance o' the drustore, two lobal
&ariables are used to trac" the customers lost due to the o&ercrowded queues. The
pharmacist is modeled as an operator, whose ser&ice time &aries accordin to uni'orm
distribution.
6
2i. 4 The la)out o' the sa&e a lot dru store.
To reduce the &ariance on the estimates o' per'ormance measures, random numbers o' the
same strin were used 'or simulation. The number o' replication is 15 'or each simulation
presented in this report, unless speci'ied. The simulation lenth is 2555 hours, which
corresponds one )ear business period. The simulation results 'or the la)out shown in
2i.4 are i&en in Table 1. 7ith onl) one pharmacist wor"in in the drustore, it is
ob&ious that the store will not be able to deli&er a satis'actor) ser&ice to its customers.
2irst o' all, the waitin times 'or the customers are too lon. #econdl) the pharmacist is
o&erwhelminl) bus), and thirdl) too man) customers will be lost due to the lon queue.

Table 1. !er'ormance measures 'or one pharmacist scenario
$&erae time in
store 'or wal"%in
customer 8min9
$&erae time in
store dri&e%in
customer 8min9
:tili,ation rate
-pharmacist.
8;9
7al"%in
customer lost
<ri&e%in
customer lost
+5+ 161 155 7=67 1=>1
Two Operator Two Queue Model

2rom the simulation results o' the pre&ious section, we "now the store needs additional
sta'' to impro&e the waitin time o' the customer. 2or that reason, an additional
pharmacist is included into the simulation. The !romodel te(t 'ile is pro&ided in the
$ppendi( o' this report. The presumption made in this simulation is that the two
pharmacists ha&e identical prescription 'ilin time distribution. The results o' two
pharmacists scenario is pro&ided in Table 2.

6
Table 2. !er'ormance measures 'or two%pharmacist scenario.
$&erae time in
store 'or wal"%in
customer 8min9
$&erae time in
store dri&e%in
customer 8min9
:tili,ation rate
-pharmacist.
8;9
7al"%in
customer lost
<ri&e%in
customer lost
== 44 ==; 2564 71
2rom Table 2, it is obser&ed that the customer waitin time has been reduced a'ter addin
one more pharmacist. $lso reduced is the number o' customers lost. The utili,ation rate is
basicall) the same as the one pharmacist scenario. 3owe&er this sta''in arranement is
still not ood enouh to satis') the customers, due to lon queuin time, and the business
interest the store, due to a lare number o' customers went to other stores 'or business.
Three Operator Two Queue Model
To 'urther impro&e the per'ormance o' the store, another pharmacist is added into the
simulation. The !romodel te(t 'ile is i&en in the $ppendi(. The ser&ice time
distributions o' the three pharmacists are considered identical. The simulation results are
i&en in Table +.
Table +. !er'ormance measures 'or three%pharmacist scenario.
$&erae time in
store 'or wal"%in
customer 8min9
$&erae time in
store dri&e%in
customer 8min9
:tili,ation rate
-pharmacist.
8;9
7al"%in
customer lost
<ri&e customer
lost
21.7 25 76; 6 1
2rom Table +, it is obser&ed that the customer waitin time has been reduced
sini'icantl) a'ter the addin two e(tra pharmacists. There are &irtuall) no customers lost
due to the sini'icantl) reduced queuin time. The utili,ation rate is has been reduced to
76;. It is belie&ed that this sta''in arranement is ood enouh to satis') the customer,
due to the 'act that customer wait time is reasonable, and the business interest o' the
store, due to 'act that the store does not lose an) customers. The utili,ation rate o' the
pharmacists is considered to be acceptable, since 76; utili,ation rate means that a
pharmacist is totall) bus)in ser&in the customers 6 hours a da). The remainin two
hours are enouh to co&er the lunch brea" time and mornin and a'ternoon co''ee time.
It is e(pected that addition o' more pharmacists will not be help'ul to the impro&ement o'
the store business operation. Instead, more mone) will be spent on pa)in the wor"ers
with low utili,ation rates. Table 4 i&es the simulation results o' 'our pharmacists
wor"in in the store. $s e(pected, there are no sini'icant chanes in customer waitin
times, but the utili,ation rate o' the wor"ers has been reduced to 65;, which is
apparentl) not ood to ha&e pharmacists sta)in idle 'or 45; part o' a )ear. It is
7
there'ore concluded that the three%pharmacist sta''in arranement is the best choice 'or
this store.
Table 4. !er'ormance measures 'or 'our%pharmacist scenario.
$&erae time in
store 'or wal"%in
customer 8min9
$&erae time in
store dri&e%in
customer 8min9
:tili,ation rate
-pharmacist.
8;9
7al"%in
customer lost
<ri&e%in
customer lost
1>.24 1>.5 65; 5 5
?onsiderin the 'act wal"%in and dri&e%in customers ha&e two di''erent arri&in rates,
simulation was also conducted to compare the scenario o' three pharmacists ser&in the
customers b) turn, and the scenario o' two pharmacists dedicated to wal"%in customers
and one pharmacist dedicated to dri&e%in customers. The !romodel te(t 'ile is pro&ided in
the $ppendi(. The simulation results are i&en in Tables 6. It is obser&ed that there ma)
be a sini'icant di''erence between the two sta''in plans. To 'urther con'irm the
di''erence, a h)pothesis test was conducted.
Table 6. !er'ormance measures 'or dedicated pharmacist scenario.
$&erae time
in store 'or
wal"%in
customer 8min9
$&erae time
in store dri&e%
in customer
8min9
:tili,ation rate
-;. o' ser&er
'or wal"%in
customer
:tili,ation rate
-;. o' ser&er
'or dri&e%in
customer
7al"%in
customer
lost
<ri&e%in
customer
lost
26.1 +6.1 76; 74; 15 66
Two models 'or the two scenarios were mered toether, and 15 replications o'
simulations were run. The results are shown in Table 6, in which the =6; con'idence
inter&als 'or the di''erence -. in customer arri&al times are calculated. /ecause the
con'idence inter&al does not contain 5, it is asserted with =6; con'idence that there is a
statisticall) sini'icant di''erence between the two scenarios. It is suested that the
dedicated pharmacist arranement should not be used.

>
Table 6. The results o' h)pothesis test 'or two di''erent sta''in scenarios.
Walk-in Drive in
Scenario 1 Scenario 2
(D-

)^2 Scenario 1 Scenario 2

(D-

)^2
23.98011 21.78467 2.195445 0.109904 34.96908 21.60459 13.36449 0.145798
24.51343 21.3518 3.161626 0.000805 34.95903 22.15908 12.79994 0.324922
25.05688 21.52622 3.530657 0.116047 36.76688 20.04892 16.71796 0.541678
25.83777 22.4179 3.419874 0.052842 34.51466 19.98993 14.52473 2.41E-05
25.59524 21.8097 3.785537 0.354664 35.25138 20.18548 15.06589 0.034335
25.20082 21.69891 3.501914 0.09729 34.71155 20.3703 14.34125 0.003164
25.68196 22.28685 3.395115 0.042072 34.83501 19.91889 14.91612 0.018326
25.42603 22.50528 2.920747 0.072497 36.29225 20.1979 16.09435 0.278905
24.45226 21.75792 2.694331 0.245688 33.76848 20.42942 13.33906 0.152345
24.96743 21.67911 3.28832 0.009667 34.72336 20.71888 14.00448 0.028394

3.189357 14.51683
s(D) s(D)
0.349838 0.412026
s(

) s(

)
0.110628 0.130294
h h
0.229842 0.270699
95% ! 95% !
2.959515 3.419198 14.24613 14.78753
#cenario 11 three pharmacists, two dedicated to wal"%in customers, and one dedicated to
dri&e%in customers.
#cenario 21 three pharmacists ser&in both t)pes o' customers b) turn.

Performance Optimization
The sta''in plans in&estiated in the pre&ious section are based on the assumption that
the ser&ice times o' all pharmacists are the same. It is possible that the pharmacist ma) be
better trained, or supported with sortin equipment, the ser&ice time ma) be reduced. The
manaement wants to "now i' the ser&ice time is reduced into the rane o' + and 16 with
a uni'orm distribution, what will be the optimal plan. @ee(aminin the per'ormance
measures o' the store, the e(pected sta''in plan would be one that has acceptable
queuin time and at the same time the utili,ation rate o' the operators should not be less
than 76;. This sta''in plannin procedure is modeled as a multi%ob*ecti&e optimi,ation
problem. The ob*ecti&e 'unction terms that were measured are1
Min1 1 A 7al" Bin customer -$& Time in #)s.
Min1 1 A <ri&e Bin customer -$& Time in #)s.
Ma(1 5.> A #er&ice%time -operator 1. -; :tili,ation.
Ma(1 5.> A #er&ice%time -operator 2. -; :tili,ation.
=

<i''erent weihts are assined to the ob*ecti&e 'unctions. :nit weiht is assined to the
customer wait time in the s)stem, while 5.> is assined to the utili,ation rate. The
&ariable in the ob*ecti&e 'unction is the ser&ice time o' the operator. #tartin with two%
pharmacist plan, the optimi,ation results are partiall) shown in Table 7, which shows that
i' the mean ser&ice time is reduced to appro(imatel) 15 minutes, the customer waitin
time can be reduced sini'icantl) compared with a mean ser&ice time o' 16 minutes,
while a 76; utili,ation rate is ensured. 7ith the mean ser&ice time bein less than 15,
althouh the customer waitin time is reduced, the utili,ation becomes too low. #ince the
ser&ice time o' a pharmacist depends on the number o' prescription items, as well as the
time to locate and sort the drus. It is enerall) di''icult to reduce the ser&ice time
considerabl). 3owe&er the optimi,ation results pro&ide the manaement a pro'ile on
which the optimal sta''in plan can be established, i' the store decides to e(plore the
option o' reducin ser&ice time.
Table >. The multi%ob*ecti&e optimi,ation o' the two%operator sta''in plan.
#er&ice time 7al"%in
customer a&.
time in s)s.
<ri&e%in
customer a&.
time in s)s.
Ob*ecti&e
'unction
:tili,ation
rate
-pharmacist 1.
:tili,ation
rate
-pharmacist 2.
16 =>.>> 44.56 16.> ==.21 ==.21
14 76.2= +7.+4 42.> =7.7> =7.76
1+ 64.+ +5.64 66.47 =4.62 =4.6+
12 +6.46 24.67 >1.6= >=.26 >=.26
11 24.>6 1=.67 >7.2= >2.41 >2.+6
1 1"#91 1$#"$ %&#'" "$#& "(#99
= 1+.>4 12.=1 >1.16 67.44 67.4+
> 11.52 15.6= 74.6= 65.17 65.5>
0
20
40
60
80
100
120
8 10 12 14 16
Mean Service Time [min]
A
v
e
r
a
g
e

w
a
i
t

t
i
m
e

[
m
i
n
]
0
20
40
60
80
100
120
u
t
i
l
i
z
a
t
i
o
n

r
a
t
e

&

o
b
j
e
c
t
i
v
e

f
u
n
c
t
i
o
n

v
a
l
u
e
"erva#e $ai% %i&e ($alk-in) "erva#e $ai% %i&e ('rive-in)
()*ec%ive +,nc%ion -%ili.a%ion ra%e
2i.6 The optimi,ation results.
The detailed optimi,ation results are shown in 2i. 6, which shows how the total
ob*ecti&e 'unction, utili,ation rate, and a&erae time in s)stem chane with the &ariations
15
in ser&ice time. $t a ser&ice time appro(imatel) 15%11 min, the ob*ecti&e 'unction
reaches its pea", which is rearded as the optimal solution. It also obser&ed that is the
ser&ice time is reduced below 15 min, the wait time 'or both customers are rouhl) the
same.
The per'ormance optimi,ation was also in&estiated 'rom a di''erent anle. Instead o'
considerin the customer wait time in the s)stem as the ob*ecti&e 'unction terms, the
number o' both t)pes o' customers and the ser&er utili,ation rates are selected as the
ob*ecti&e 'unctions terms. The ob*ecti&e 'unction terms that were measured are1
Min1 1 A total e(its o' wal"%in%customer
Min1 1 A total number o' dri&e%in%customer
Ma(1 5.> A ser&er 1 utili,ation rate -;.
Ma(1 5.> A ser&er 2 utili,ation rate -;.
$ number o' e(periments were run to e(amine the sensiti&it) o' those terms in response
to the chane o' ser&ice times. The results are pro&ided in 2i. 6. It is interestin to
obser&e that 'rom the perspecti&e o' number o' customer ha&in been ser&ed, the total
number o' dri&e%in customers is not sensiti&e to the &ariations o' ser&ice time. I' the
ser&ice time is below 15 minutes, the total number o' wal"%in customers ser&ed is also
insensiti&e to the chane o' the ser&ice time. It is concluded that the optimal mean ser&ice
time is 15 minutes. ?ontinued reduction o' ser&ice time below 15 will not impro&e the
operational per'ormance much instead o' incurrin additional cost required to accomplish
the reduction.
0
2000
4000
6000
8000
10000
12000
14000
8 10 12 14 16
Mean service time [min]

u
s
t
o
m
e
r

n
u
m
b
e
r
0
20
40
60
80
100
120
!
t
i
l
i
z
a
t
i
o
n

r
a
t
e

"
#
$
Walk-in ,/%o&er Drive-in ,/%o&er -%li.a%ion (1) -%ili.a%ion (2)
2i. 6 Optimi,ation results o' alternati&e ob*ecti&e 'unction terms.

11
onclusions
This report describes the !romodel simulations carried out 'or a drustore to be built on
the !ar" #treet. The 'ocus o' simulation has been on the sta''in arranement 'or the
store. The data collected 'or a drustore located in a di''erent neihborhood were used to
establish a !romodel 'or the present drustore. <i''erent scenarios o' simulations were
carried out to in&estiate the e''ect o' number o' pharmacists to be hired in the store on
the per'ormance o' the business. It has been 'ound that the plan, three pharmacists
wor"in in the store will deli&er the best operation per'ormance in terms o' customer
waitin time and operator utili,ation rate, based on the e(istin data.
#imulations were also conducted to in&estiate the sensiti&it) o' the ser&ice time
&ariation on the per'ormance on the store. It has been 'ound that i' the mean ser&ice time
could be reduced, the number o' wor"in pharmacists in the store could be reduced to 2,
while ensurin an acceptable business operatin per'ormance. #ensiti&it) simulation is
necessar), since there are alwa)s model uncertainties in&ol&ed in the model deri&ation,
no mentionin that 'act that the primar) data are 'rom a another store. Throuh
simulation e(periments, &arious business plans can be established in response to possible
parameters &ariations,
It has been demonstrated throuh this simple pro*ect that discrete simulation supported
with the 'le(ibilit) pro&ided b) !romodel is &aluable technique 'or business operation
plannin.
12
Appendi%
The te(t 'iles and model 'iles used in this pro*ect.
The 'iles are sa&ed under the director) o' 'inal pro*ect.
The model and te(t 'ile 'or 1%operator scenario
2inal pro*ect414operator.mod
2in!*t414operator.TCT
The model and te(t 'ile 'or 2%operator scenario
2inal pro*ect424operator.mod
2in!*t414operator.TCT
The model and te(t 'ile 'or +%operator scenario
2inal pro*ect4+4operator.mod
2in!*t414operator.TCT
The model and te(t 'ile 'or 4%operator scenario
2inal pro*ect444operator.mod
2in!*t414operator.TCT
The model and te(t 'ile 'or 2%operator optimi,ation scenario
2inal pro*ect424operator4optimi,ation
2in!*t424operator4optimi,ation.TCT

The model and te(t 'ile 'or h)pothesis test o' two +%operator scenarios
2inal pro*ect4mere4model.mod
2in!*t4+4operator4MeredModel.TCT
1+