Professional Documents
Culture Documents
https://doi.org/10.1007/s10729-023-09630-x
Received: 11 February 2022 / Accepted: 5 January 2023 / Published online: 11 March 2023
© The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2023
Abstract
In recent years, companies that operate pharmacy store chains have adopted centralized and automated fulfillment systems,
which are called Central Fill Pharmacy Systems (CFPS). The Robotic Dispensing System (RDS) plays a crucial role by
automatically storing, counting, and dispensing various medication pills to enable CFPS to fulfill high-volume prescriptions
safely and efficiently. Although the RDS is highly automated by robots and software, medication pills in the RDS should
still be replenished by operators in a timely manner to prevent the shortage of medication pills that causes huge delays in
prescription fulfillment. Because the complex dynamics of the CFPS and manned operations are closely associated with the
RDS replenishment process, there is a need for systematic approaches to developing a proper replenishment control policy.
This study proposes an improved priority-based replenishment policy, which is able to generate a real-time replenishment
sequence for the RDS. In particular, the policy is based on a novel criticality function calculating the refilling urgency
for a canister and corresponding dispenser, which takes the inventory level and consumption rates of medication pills into
account. A 3D discrete-event simulation is developed to emulate the RDS operations in the CFPS to evaluate the proposed
policy based on various measurements numerically. The numerical experiment shows that the proposed priority-based
replenishment policy can be easily implemented to enhance the RDS replenishment process by preventing over 90% of
machine inventory shortages and saving nearly 80% product fulfillment delays.
Keywords Central fill pharmacy system · Robotic dispensing system · Prescription fulfillment ·
Medication replenishment · Priority-based policy · 3D discrete-event simulation
Austin Marcus
amarcus6@binghamton.edu 1 Introduction
Lubna Altarawneh
ltarawn1@binghamton.edu Mail-order pharmacy is used to fill and dispense licensed
prescription drugs and provide delivery service to patients.
1
Under the COVID-19 pandemic, mail-order pharmacy has
Department of Systems Science and Industrial Engineering,
Binghamton University, 4400 Vestal Parkway East,
been accelerated by large pharmacy companies due to
Binghamton, 13902, New York, USA contactless medication delivery to home, especially for
2 Department of Industrial Engineering, Yonsei
regular medication needs [1, 2]. In recent decades, Central
University, 50 Yonsei-ro, Seodaemun-gu, Fill Pharmacy System (CFPS) has become a popular
Seoul, 03722, Republic of Korea solution to process heavy volume prescription demand
13
Priority-based replenishment policy for robotic dispensing... 345
in large-scale mail-order pharmacy enterprises, such as runs out of pills before the canister is reattached, “Rundry
Amazon Pharmacy [3]. According to BBC Research, the Error”, which indicates that the dispenser cannot continue
pharmacy automation market will grow from 5.1 billion filling due to the medication shortage, will be triggered
dollars in 2019 to 7.8 billion dollars by 2024 [4]. To satisfy by operational delays; this contributes to most machine
the needs of various medication types and the number of errors. The rundry error can last hours before a canister is
items per order required by different customers as well as replenished, which causes a decreased throughput of the
the needs of significantly increased prescription demand, RDS and impacts on downstream machine performances.
the CFPS has been highly customized and automated. Therefore, the RDS requires timely replenishment of
Each CFPS, which is dynamic and flexibly designed, various medications by human operators to fully utilize the
is a pharmacy automation solution tailored to the local CFPS.
pharmacy and puts the highest priority on the unique To guarantee the high productivity of RDS, the proper
personalized prescription filling to maintain patient safety replenishment strategy is required to be uniquely designed
and satisfaction. Besides, pharmacy automation is a key while considering prescription mixtures, human operation
factor in fulfilling growing prescription demand while complexity, and the CFPS dynamic, and there is a need
decreasing prescription errors in the process of CFPS [5, 6]. to develop an RDS replenishment policy designed for
In the CFPS, the Robotic Dispensing System (RDS) inventory control to prevent rundry error. Although the
is a critical automated facility that realizes pharmacy significance of replenishment process optimization has been
automation and assures a high rate of fulfilling productivity realized, there is still little research due to several challenges
of a pharmacy [7]. Quickly developed in recent years, the in the analysis of the replenishment process. One challenge
RDS is widely applied to storing, counting, dispensing, is the complex decision-making for the replenishing priority
and bottling countable pills by a robot arm, dispenser, of canisters while considering the mixture of prescriptions.
and canister. RDSs allow the CFPS to store and dispense For instance, which canister should be refilled first if
the most commonly prescribed medications, which ensures several canisters become empty? Another challenge is
convenience, accuracy, and agility in the dispensing process. that complex interactions between automated systems and
One type of RDS machine is shown in Fig. 1. Currently, operators are difficult to be formally formulated. For
RDSs have become a general solution for millions of instance, the cart operator needs to shuttle between RDS
medication errors occurring during the dispensing process machines and replenishment stations as well as collaborate
and filling over 90,000 patient prescriptions per day [8, 9]. with replenishment technicians.
To guarantee the high filling productivity and software To overcome these challenges and deal with the urgent
operation accuracy of RDSs, medication pills in the RDS need to model the replenishment process, this paper
should be manually replenished in time to avoid medication develops an improved priority-based replenishment policy
inventory shortage and system performance reduction. [10] for RDSs. In order for the CFPS to prioritize the real-
conclude that replenishment optimization of the automated time sequence of refilling canisters, the policy defines a
dispensing cabinet by clinical pharmacists can decrease the criticality function that returns the refilling urgency for
number of stockouts and the number of dispenses from each canister and corresponding dispenser based on the
a central pharmacy. Each RDS machine contains multiple inventory level and pill consumption rates. In particular, a
dispensers connected with one canister that contains 3D discrete-event simulation model is developed to analyze
different medications to fill the dispenser. If the dispenser the system performance under the proposed strategy while
emulating the RDS human operations and reflecting real-
world practice and settings of the replenishment process in
the CFPS. A 3D simulator, which is able to support both
the logical and physical process designs, can help designers
0 Robot arm 0
Canister verify the rationality and implementability of the system
Dispenser design before the practice system installation [11]. Besides,
0 0 the 3D simulation software can help enterprises train new
operators and enable users to comprehend the CFPS as it’s
whole more thoroughly by providing a good visualization
0 0
for realistic feedback [12]. The simulation-based approach
has proved successful in addressing CFPS optimization
problems, which are hard to formulate mathematically and
obtain exact solutions due to the complex dynamic. It can
also represent, track, and analyze the detailed interactions
Fig. 1 RDS machine schematic diagram and sequence of replenishment events in the RDS, which
13
346 N. Cao et al.
can help to evaluate the practical replenishment strategy, order priority policies and scheduling orders accordingly
quantify the effects of different tailored strategies based on can benefit system workload balancing and maximum RDS
multiple key performance indicators, and be extended to utilization. Besides, as input for collation machines, the
meet more specific needs. Multiple performance metrics are RDS throughput can also make an impact on downstream
used to numerically analyze systems performance. Insights line system performance according to [16].
for practitioners are provided to design and manage efficient Due to the restriction of production by rundry errors, the
replenishment operations with limited resources to help RDS replenishment process has been brought into focus in
prevent medication shortages and reduce fulfillment delays. recent years. [8] propose an RDS replenishment strategy
The remainder of the paper is organized as follows: through a mixed integer programming method to help
The literature review that pertains to the robotic dispensing determine the reorder point and backup canisters, which
and RDS replenishment process studies is presented in can restrain inventory and operation costs while boosting
Section 2. The detailed RDS replenishment process is the efficiency of pharmacy inventory management. [17]
defined in Section 3. The priority-based replenishment exploit a real-time optimization strategy using the receding
policy with a criticality function is described in Section 4. horizon control mechanism that has a fast response to
Experiments and results are given in Section 5. Finally, real-time dispenser replenishment and helps plan dynamic
conclusions and suggestions of future works are offered in inventory optimization. The replenishment operators have
Section 6. been considered in RDS replenishment cost optimization
in [18]. The detailed system configurations and working
modes of the RDS are combined and determined through
2 Literature review mixed integer linear programming models. In literature
[19], the decision robustness that applies a receding
Given the importance of fulfilling increasing prescriptions horizon control strategy with robust optimization has been
for daily demand and maintaining medication safe within enhanced against the stochastic variables to avoid dispenser
the pharmacy, robotic dispensing has become an active inventory shortages and reduced throughput. [20] also
research topic in the area of pharmacy automation. Many model the stochastic behavior of the replenishment process
studies now focus on RDS performance optimization. by considering a probability distribution for lead time and
Dispenser allocation optimization in the RDS unit has the uncertainty rate that dispensers count NDCs (National
been considered. [13] extract strong associations among the Drug Code) and fill prescriptions using a continuous-time
purchased drugs through association rule mining, which Markov Chain. However, there exists minimal literature
can help pharmacists properly allocate dispensers among that considers detailed human operations and develops a
multiple robotic units and the efficient number of drugs priority-based inventory policy for RDS replenishment.
distributed inside the dispenser. [14] put forward an efficient Table 1 summarizes the pharmacy replenishment-related
planogram strategy to determine the suitable number of literature review.
medications for each dispenser while balancing medication Priority rule is one of the key factors that can influence
associations, drug filling demand, and robot arm travel healthcare inventory problems and can be considered for
distance. In addition, optimization of the filling time of RDS replenishment. The priority rules, which are developed
multi-item prescriptions is another aspect of the RDS and well-applied in pharmacy inventory management, can
study. [15] identify that the disordered filling process be used to determine the criticality of inventory items and
of RDS has become a bottleneck that limits system resolve the order or replenishment processing sequence [15,
productivity performance. The paper shows that setting 21]. The priority-based policy has proved its superiority in
Wang and Yoon [8] Minimize total costs for dispensing machine replenishment that Mixed integer programming
considers multiple factors
Dauod et al. [17] Minimize replenishment costs for real-time dispenser replen- Mixed integer programming
ishment with a receding horizon control mechanism
Serhan et al. [18] Minimize operational costs for determining optimal replenish- Mixed integer linear programming
ing settings of mail-order pharmacy automation systems
Dauod et al. [19] Propose a robust receding horizon control strategy for RDS Mixed integer programming
replenishment decisions
O’Connor et al. [20] Minimize costs for determining optimal replenishing settings Markov Chain
13
Priority-based replenishment policy for robotic dispensing... 347
efficiency and low cost in the literature, which can alleviate can dispose of different sizes of canisters for replenishment
stock shortages the disordered replenishment process that slides on the top of each dispenser. The dispenser and
causes. The replenishment decision can also become canister schematic diagram is shown in Fig. 2.
robust by applying appropriate prioritization strategies Dispensers are used for storing, counting, and dispensing
against demand uncertainty and over-forecast probability. tablet and capsule medications. Canisters are applied to
In addition, manual operations performed by technicians replenish connected dispensers. In the dispenser, if the
and operators, which can be affected by undesired factors inventory level is less than a critical value tested by a sensor,
and complex interactions between automated systems and which can also be considered as a reorder point, the canister
operators, are crucial to secure the practical and desired will be triggered by the smart software system to release its
throughput and are difficult to be formally formulated. medications to the connected dispenser for refilling. After
Therefore, there is an urgent need to adopt a systematic all the available drugs are released, the canister’s status and
approach that is tailored for RDSs with the priority-based replenishing priority will be changed in the system and need
replenishment control policy, while considering the com- to be replenished by human operators. When the canister
plex dynamics of the CFPS and manual operations by needs to be replenished, it can be detached and reattached
reflecting the real-world practice and ensuring desired per- for replenishment. Therefore, the predefined reorder point
formance. This study proposes a criticality priority function of the dispenser, canister size, and replenishing priority
and exploits a discrete-event simulation model to emulate value are critical concerns in the canister replenishment
and test it. The major originality and contributions that this process.
study provides from existing literature are as follows: (1) The general replenishment process is considered in this
a priority based replenishment strategy designed for RDSs study, which means that there is an extra canister in the
is proposed to help manage pharmacy inventory control; workbenches for each dispenser, except the one connected
(2) a tailored criticality priority function is developed to to the dispenser in the RDS machines. A replenishment
eliminate medication shortages and fulfillment delays; (3) station is properly equipped near RDS machines for quick
detailed human operations for three types of operators are response to the canister replenishment. There are three
modeled and analyzed to be close to real-world practice; types of operators, who are stock clerks, replenishment
and (4) RDS configurations, i.e., canister size, the num- technicians, and cart operators. Stock clerks work on
ber of backup canisters, reorder points, and the number searching for medications used in the replenishment
of operators, are considered controllable variables in the process. Replenishment technicians go in to refill canisters
replenishment process. with drugs in the bottles found by stock clerks. Cart
operators engage in the transport of empty and refilled
canisters between RDS machines and the replenishment
3 RDS replenishment process analysis station. In the replenishment process, when one canister
becomes empty, its information will be highlighted and
One RDS unit contains a robot arm and several automated shown in the operating system interface for each operator.
dispensing cabinets controlled by a smart software system. The stock clerk processes the work sequentially according
The robot arm is used to pick up, move, and drop off vials. to the canister priority value. Following the canister and
The slid dispensers in cabinets can be positioned as required drug information indicated by the system, the stock clerk
and also can be customized with different medications that should get the right medicine and the number of medicine
conform to individual pharmacy solutions and align with bottles required from the inventory racks. After receiving
the specific prescription volume. There is also a vertical gap the bottles from the clerk, the replenishment technician
between lower-storied dispensers and upper shelves, which can slide the extra corresponding canister to the docking
800cc 800cc
chamber chamber
Dispenser Dispenser
13
348 N. Cao et al.
station on the workbench, refill it using the verified tablets return time, and rundry error can be shown in Fig. 4. This
or capsules, and place it at the pickup window of the study focuses mainly on designing a replenishment policy
replenishment station. When the refilled canister is ready to prevent the rundry error that occurs when canister and
for picking on the operating system, the cart operator will dispenser replenishment is not done properly.
deliver it to RDS machines by a trolley cart, switch the
empty canister for the refilled one, and reattach it until it
confirms that the canister status comes online again. Priority 4 Priority-based replenishment policy based
values are also used to determine which canister should be on criticality function
reattached first if there are multiple refilled canisters waiting
for attachment. The detailed replenishment process is shown This section introduces the main contribution of our
in Fig. 3. study, a replenishment policy based on criticality function.
Rundry error is a key terminology that is used in After introducing the basic concept of the priority-based
RDS replenishment process for dispenser unavailability replenishment policy, Section 4.1 describes the criticality
caused by the medication shortage. The refilled canister’s function based on reasonable assumptions of CFPS goals.
return time determines the dispenser’s availability status. Section 4.2 emphasizes the advantages of our designed
If the dispenser can be replenished by the canister replenishment policy compared with the “Low-Medium-
before it becomes empty and stops filling orders, the High” policy, which is widely used in current CFPS.
replenishment process will not make an impact on the auto A priority strategy specifies the sequence in which
streamline productivity; otherwise, the dispenser cannot canisters should be processed; in this case, canisters with
complete the filling work caused by the rundry errors on the highest priority values are operated first. When staff
time and therefore causes the delay in customer order in the replenishment process align their selection with the
delivery. With the rundry errors, the working time of RDS priority order, the goals addressed by the priority (e.g.,
machines will be prolonged under the same demands, reduction in rundry errors) are more likely to be realized,
and filling interruptions may also easily lead to robot provided that the priority approach represents a sufficiently
failure. In addition, various rundry errors also reflect accurate model of the system. Incorporating a priority
the low work efficiency of replenishment operators and strategy is more challenging for a cart operator owing to
required replenishing workflow optimization to mitigate the extra complication of how to improve path efficiency.
work accumulation. Apparently, delays from RDS machines In the current paradigm, the cart operator will leave the
will have an influence on downstream performance, such replenishment station when no filled canisters are available,
as vials’ collation time in the same order and packing will fill the cart in priority order, and will visit RDSs in
time. The relationship between dispenser inventory level, priority order regardless of distance. The priority order is
Fig. 3 General replenishment process for dispensers. Canister A is first attached to the RDS dispenser and Canister B is the backup canister at the
replenishment station
13
Priority-based replenishment policy for robotic dispensing... 349
utilized by each worker in the model in the same manner still has enough pills to fill orders. The last one is that
whether the proposed priority strategy or current default when the dispenser has encountered a rundry error, the
priority strategy is used. priority of refilling the corresponding canister cj should be
higher than the other cases. This is because it is typically
4.1 Proposed replenishment policy based important to address rundry canisters first to maintain
on criticality function system performance. Here, a constant value β (i.e., β = 1
in our case) is added to distinguish dispensers with rundry
One of the important purposes of the priority-based as a separate group while preserving relative replenishment
replenishment process is to maintain a level of pill inventory sequence information for the dispensers with rundry and
in RDS dispensers to prevent interruption in filling (the corresponding canisters by the criticality function. Figure 5a
occurrence of a rundry error). Therefore, our replenishment shows a typical domain region of priority ρj . Volumetric
system aims to avoid rundry errors in dispensers. Moreover, units, considering medication types and sizes, are used to
if multiple dispensers have rundry errors, our system needs enable comparison across NDCs.
to decide the order for which the corresponding canister To develop the criticality function, specifically, the goal
should be refilled first. is to obtain an estimated time when a dispenser will have a
Main Idea: We first predict the time of rundry error rundry error, which is approximated by considering at what
for each dispenser based on the future filling demand, time it will become completely empty (i.e., zero pills left).
which is usually given in advance. We then determine the This is modeled by
optimal replenishment order of canisters directly based tj
dIj
on the predicted time of rundry error. Ij − dt = 0, (2)
0 dt
Equation 1 is the proposed priority-based replenishment
policy ρj with the criticality function f , representing the where Ij is the initial available inventory in dispenser dj
priority that a canister, denoted as cj , needs to be refilled. and its attached canister cj , and tj is the estimated time
ρcj takes Ij and r̄j as input and outputs a priority value until rundry for dispenser j . One intuitive way to estimate
dI
ranging from 0 to 2, where Ij is the initially available this is to let dtj = r̄j , which is the inventory consumption
inventory in dispenser dj and its attached canister cj (in rate of dispenser dj and its attached canister cj . Because it
units of either pills or volume), and r̄j is the inventory is desirable for dispensers with earlier rundry times to have
consumption rate of dispenser dj and its attached canister higher priority, Eq. 2 can be rearranged to give
cj . 1 r̄j
= , (3)
⎧ tj Ij
⎨0 ⇐⇒ not Empty(cj )
ρcj ≡ f (Ij , r̄j ) ⇐⇒ Empty(cj ) & not Rundry(dj ) (1) which has the range (0, ∞). In order to make the priority
⎩ f (I , r̄ ) + β ⇐⇒ Rundry(d )
j j j value in a range of continuous and numerical manner to
represent the refilling urgency of the canister, Eq. 3 is
Where the function Empty means the canister cj is empty, 1
plugged into 1+1/x producing, which produces Eq. 4 that
the function Rundry represents the dispenser dj has a rundry has the bounded range (0, 1]; this also has the benefit of
error, β is a constant value. obviating special handling of the case where Ij = 0.
In the equation, we model the priority value of refilling
Ij −1 tj
canister cj in three cases. The first case is that when a f (tj ) = f (Ij , r̄j ) = (1 + ) = (1 + )−1 . (4)
canister is not yet empty, the priority value of refilling m̄r̄j m̄
canister cj is 0, which indicates there is nothing to replenish. Here, f is the developed criticality function, and m̄ is
The second case is that the priority value of canister cj the typical makespan of the replenishment process. This
is f (Ij , r̄j ), when the canister is empty but the dispenser has the effect of tuning the sensitive region of f so that
13
350 N. Cao et al.
differences in priority reflect the ratio between estimated corresponding canister cj since the start of the simulation
time to rundry and the time it typically takes to replenish run divided by the current simulation time. Note that the
t
a canister (i.e., m̄j ). Figure 5 shows how m̄ scales f so estimation of the consumption rate utilizes only information
that a priority above 0.5 indicates the dispenser is expected from the current shift/day. An estimation method that
to rundry before the typical replenishment makespan. Note produces a priority ordering closer to their true deadlines
that this scaling effect does not change the relative order may possibly be obtained by incorporating historical data
of the canisters. Lastly, f is utilized to define the final for each NDC/dispenser.
proposed priority-based replenishment policy, which is used
in the simulation. 4.2 Proposed policy with criticality function vs.
In the simulation, Ij is available by keeping a pill “low-medium-high” policy
count for every canister, which is already done as part of
the replenishment process, and r̄j is currently computed Theoretically, comparisons between the proposed and typi-
as the cumulative inventory used by dispenser dj and cal priority strategies are made in this section. The proposed
priority-based policy with criticality function developed in
Section 4.1 is intended to make an improvement over the
current priority strategy used in practicing CFPS. The cur-
rent typical priority strategy used in practice is defined by
Eq. 5: the “Low-Medium-High” policy.
⎧
⎨ Low ⇐⇒ not Empty(cj )
φj ≡ Medium ⇐⇒ Empty(cj ) & not Rundry(dj ) (5)
⎩
High ⇐⇒ Rundry(dj )
13
Priority-based replenishment policy for robotic dispensing... 351
Canister Time Emptied Avg. consumption rate r̄j Inventory level Ij Estimated rundry time tj ρj φj
13
352 N. Cao et al.
represents their travel time. After each reattach, the cart the dispenser has been replenished and comes online
operator determines the next destination and references the again.
distance matrix accordingly. • Each cart operator can handle only one specific cart.
Configurable settings in the replenishment model are • The cart operator returns the refilled canister first and
determined below according to the whole CFP scale, the then retrieves the empty canister in the RDS machine.
number of RDS units, and system prescription demand. • Whenever the cart operator is available and sees refilled
canisters at the replenishment pickup window, he or she
• Staff arrangement: 1 cart operator, 3 stock clerks, and 3
will react.
replenishment technicians;
• Reattachment sequence also follows the priority strat-
• Cart setting: total 1 cart that contains no more than 24
egy.
canisters;
• The walking speed of cart operators is 55 inches/sec.
• Canister setting: 75% 2000 cc canisters (including a
1500 cc chamber and 500 cc chamber) and 25% 500 cc
A specialized 3D simulation solution approach is
canisters (including a 500 cc chamber);
developed to reflect the dynamic replenishment model for
• Dispenser setting: 800 cc dispenser;
RDS units. Emulate3D simulation solver [22], an industry-
• When releasing pills from canister to dispenser, the
leading dynamic digital software designed for virtual
door between canister and dispenser will remain open
commissioning and throughput simulation, is utilized
until all the pills drop into the dispenser, which
to keep tracking the dynamic replenishing operations
can continuously dispense medication with the door
and recording the movement data and status changes.
opening.
The implementation of the replenishment model and
• ROP in dispenser: When the dispenser inventory
proposed priority-based replenishment policy are described
becomes or is lower than 100 cc, the system will trigger
in Algorithm 1 in the appendix. There are four main entities
the connected canister to release its available chamber;
in this aspect of the simulation: Auto-Fill stations, Stock
• Backup canister setting: Each canister has one other
Clerks, Replenishment Technicians, and Cart Operators.
backup canister at the replenishment station;
QuickLogic tables are used to track the necessary simulation
• Priority strategy: Current three-stage priority strategy
state relevant to replenishment: each canister’s inventory
determined by rundry errors and timestamps.
level; its consumption rate and priority; the canister’s
In general, for the purpose of system layout design, prob- position in the replenishment process; and transactional
ability distributions well-reflecting the targeted processing demand data. When an entity completes a process on a
time with less variability are supposed to be considered canister, it updates a shared data structure to which the
for the simulation model to reflect system operations with other entities respond as appropriate. First, the Auto-Fill
stabilized workstations and skilled operators. Because cen- stations read the transactional demand data and begin filling
tral fill pharmacy systems are highly automated with robots vials accordingly while tracking pill levels in each canister.
and machines, operations can be well-controlled to result When a canister becomes empty, the Stock Clerks will see
in targeted performance. Moreover, in the case of manual the corresponding change in the shared data structure and
processes supposed to be done by the operators, operations will begin delivering the appropriate bottles, which updates
would be simplified, standardized, and done repeatedly, and the shared data structure accordingly. The Replenishment
the process can be well-controlled to result in performance Technician and Cart Operator react to changes in the shared
within the targeted range. Therefore, in our study, triangu- data structure in a similar manner. Once the Cart Operator
lar distribution is adopted to simulate the processing times has switched and attached the refilled canister, the Auto-
of various processes as shown in Table 6. Note that the tri- Fill station will recognize the updated inventory level and, if
angular distribution can be defined in terms of mode and there had been a rundry error, can then begin to dispense the
lower/upper limit, which can be considered as the targeted blocked item. Each entity incorporates the priority function
processing time and the range for variability, respectively. into its routine when selecting a canister to be worked on
Additional system assumptions and restrictions considered next, as can be seen in Algorithm 1. Note that the priority
for the simulation model are listed below. for a canister Cx is updated exactly when Cx has been used
to fill an item x. This means that the priority for a canister
• Each RDS machine can hold up to 80 different could change mid-replenishment, which could affect the
medications. selection of entities further down the pipeline, which allows
• The RDS machine cannot deal with and needs to delay for quicker adaptation to demand. More details of the
the prescription if the dispenser has a rundry error until simulation model can be found in Table 7 in the appendix.
13
Priority-based replenishment policy for robotic dispensing... 353
5.2 Simulation model verification and validation developed to test system performance before physical
facilities building, it is difficult to obtain local real demand
Model verification is essential to ensure that the simulation data in advance. For model validation, therefore, the
model operates as intended. For model verification, the replenishment simulation model and outcomes are validated
assumptions and processing time utilized in the simulation by professionals with experience operating physical CFPSs.
model are defined in accordance with the designer-
provided design workbook, which was created by CFPS 5.3 Case study
designers in accordance with the machines’ specifications
and observations from actual CFPSs. According to the In this research, a practical pharmacy-based prescription
3D CAD layout design drawing, the simulation facility’s database is employed in the simulation model, which
location and conveyor system elevation are designed. To can reflect the actual pharmacy situation where rundry
verify that the model is functioning as intended, activity logs errors occur frequently. The database consists of 36,925
are kept for each entity (e.g., operator, dispenser, canister, transactions of single and multiple prescription orders
and product), including route tracking and operation time that needed to be filled with medications. There are
recording. For instance, we design simple demand data 20,735 preparatory vials for single-item orders and 16,190
to verify whether a specific RDS machine works as we preparatory vials for multiple-item orders. The demand data
designed. Figure 7 shows how the RDS machine operates is uniformly distributed during a 7.5-hour shift from 16
with simply designed demand data. The first vial is to be RDS machines. One thousand two hundred eighty types of
filled as scheduled. For the second vial, although the order medications, which are tagged as a unique product NDC for
arrival time, i.e., scheduled time, is earlier, the start filling each medication to indicate the drugs with specific dosage
time of this vial still begins after the previous vial finishing strengths and manufacturers, are uniformly assigned to the
filling due to the robot arm being busy filling the first item. demand order. Table 8 in the appendix shows an example
For the fourth vial, it begins to start filling when the order of the transactional demand data of dispensed drugs. Each
arrives. There exists a time gap between the third and fourth event log represents the specific information for one vial,
vial because of the designed unevenly distributed demand which includes the knowledge of the drug, the assigned
data; the RDS robot arm would be in idle status during the filling RDS machine, order type, processing time, canister
gap time. From the sample results in the figure, we can or dispenser information, and the number of pills required
conclude that the model works well following the rules we to fill the vial.
designed. Due to the conflict between volume and quantity used
Model validation is important for evaluating if the in the inventory capacities of canisters or dispensers and
simulation model accurately represents the real system. Due the dispensing process, the basic unit “Quantity/100cc” is
to the fact that the CFPS is highly tailored based on local utilized to transform volume and quantity. The distributions
demand and size, and the CFPS simulation model is usually of quantity/100cc and the number of drugs needed for one
13
354 N. Cao et al.
13
Priority-based replenishment policy for robotic dispensing... 355
Fig. 9 Inventory trajectory of the top two highest-frequency rundry drug inventory of the specific NDC attached to the RDS unit. The
NDCs. The y-axis indicates the total available dispensing inventory lower dash line manifests the moment that the connected canister emp-
level, which includes the inventory in the dispenser and connected can- ties its final chamber, and operators are notified of the empty status of
ister. The upper dash line shows the maximum capacity of the total the canister
13
356 N. Cao et al.
value based on the consumption estimation from previous extended in Case 1 model. The prolonged collation delay
consumption patterns. As a result, the total replenishment indicates that the resources in collation stations need to
work of the canister in Case 2 can be completed earlier be occupied longer by one order, which is contrary to the
several hours than in Case 1 and no rundry error happens. effective utilization of the collation stations. However, by
For the second example NDC in Fig. 9c and d, the canister reorganizing the canister refilling process in Case 2, the
can be replenished quickly at the first two times in both sequence of filling vials in the RDS units has also been
cases due to adequate staff. Five rundry errors appear in rearranged as a consequence, and the collation stations can
Case 1 during the peak workload period and the reattached be exploited more smoothly and adequately. With only a few
canister would release its chamber immediately and become rundry errors, the results of the proposed priority strategy
empty again. In Case 2, the anticipation of rundry time helps can be close to the ideal case that has no inventory shortage
eliminate rundry errors even in a highly utilized canister. and replenishment.
For both NDCs with high-frequency rundry, the smaller size Figure 11 exploits two examples to reflect the impact of
of the canister and larger pill size are also the reason that collation delay in different cases. The length of the blue
causes rundry to happen. bars indicates the processing time of one item from the
filling start point to collating start point, while the length
5.3.2 Overall system performance analysis of the red bars represents the collation delay of the multi-
item order. In the two-item prescription example, the time
The different filling sequences will also have an influence required to complete the collation of Case 1 is over 40
on the collation delay in the collation station. Figure 10 times that of Case 2. This is caused by the filling delay
shows how the maximum collation delay change under in the RDS machines that the second item cannot start
two cases. From the results, we can find that the collation processing immediately due to the suspended dispenser
time to finish collating one order has been significantly with medication shortage when the order arrives. The time
Table 3 Measurement
comparisons in Case 1 and Evaluation indicator Case 1 Case 2
Case 2 under 95% confidence
interval Num. of rundry errors 134.14 ± 0.28 11.43 ± 0.40
Num. of uncompleted items during shift 29.43 ± 1.20 1.00 ± 0.86
Makespan of RDS machines 7.97 ± 0.02 h 7.56 ± 0.00 h
Avg. collation delay 1.58 ± 0.02 min 1.49 ± 0.02 min
Max. collation delay 58.64 ± 0.26 min 8.55 ± 0.19 min
13
Priority-based replenishment policy for robotic dispensing... 357
Table 4 System performance comparisons under different distributions of operator processing time
Num. of rundry errors 127.67 ± 10.02 13.43 ± 4.50 134.43 ± 0.73 11.14 ± 0.90
Num. of uncompleted items during shift 28.83 ± 11.42 1.29 ± 1.26 31.43 ± 2.49 1.00 ± 0.43
Makespan of RDS machines 8.07 ± 0.10 h 7.57 ± 0.02 h 7.99 ± 0.02 h 7.56 ± 0.00 h
Avg. collation delay 1.59 ± 0.03 min 1.49 ± 0.02 min 1.59 ± 0.01 min 1.49 ± 0.01 min
Max. collation delay 53.59 ± 13.77 min 9.46 ± 0.91 min 59.96 ± 2.48 min 8.43 ± 0.16 min
between two blue bars in Case 1 represents the blank the 95% confidence interval by using the exponential
time quantum of the occupied tube in the collation station distribution, which represents the unstable output generated
without any operations, which indicates inefficient tube by operators. With a large variance in the working rate
utilization with workload reduction and liquidity dulling. of operators, for instance, more than 40 vials may be
In the three-item prescription example, the collation delay unable to be filled within a shift hour due to more rundry
is still prolonged due to the filling dispenser interruption, errors, necessitating more time to finish filling tasks. One
which may happen in previous orders even though there is collation tube may be occupied for more than an hour,
no disruption during the RDS filling in this order. which would have a severe impact on production line
Table 3 summarizes the measurement comparisons mobility and consume collation resources. The normal
between Case 1 and Case 2. In Case 1, with the distribution can also result in a somewhat wide variation
increment of rundry errors, RDS units cannot complete for the rundry times, number of uncompleted products,
the prescription demands as specified during the 7.5-hour and the collation delay time when compared to triangular
shift and need an extra half an hour to finish filling distribution.
the same demand that there is much ineffective time at Results from Table 4 suggest that the proposed replenish-
the end of the shift. One thing that should be noted is ment method illustrated by Case 2 outperforms the present
that although the gap between average collation times default replenishment method illustrated by Case 1 even
in the two cases has not significantly widened, some when the replenishment operators cause considerable vari-
individual samples with enlarged collation delays can ances. In addition, results under Case 2 demonstrate that
cause a huge problem of system performance degradation. fluctuations in system performance can also be controlled
The impact of priority rules on system performance within a small acceptable range, even with uncertainties
is shown more distinctly in Case 2. Only 11 rundry happening from the staff side. With the proposed priority
errors happen that have not had a huge influence on method, over 90% of rundry errors can be avoidable. Near
the RDS and downstream performance in the complex 80 % fulfillment delay time can be saved to complete all
CFPS operations. This means that the pre-estimated rundry infilling works in 10 minutes after shift hours. Moreover,
time acts more on the filling sequence optimization downstream stations’ resources, e.g., collation stations, can
compared with the post-time after the change of canister be utilized in an efficient way.
status.
Due to the fact that variances and unanticipated events may This research proposes a priority-based replenishment
exist among operators with varying individual working per- control policy to optimize the canister refilling sequence in
formances, the triangular distribution cannot fully reflect the RDS machines to minimize medication shortages and
the occurrences in actuality when applied to operator pro- fulfillment delays that happen during the filling process
cessing time. Consequently, the research additionally inves- in the CFPS without changing any configurable settings.
tigates the robustness of the model by applying exponential The proposed strategy estimates the time that a dispenser
and normal distributions to the processing time of operators becomes rundry by multiple factors, which involve the
with potentially unstable performance while working. average consumption rates and current inventory levels,
In comparison to Table 3’s results, Table 4 reveals instead of considering only the time that the canister status
that there are substantial performance variations under changes. In addition, the complex manual replenishment
13
358 N. Cao et al.
operations for each type of operator and the dynamics to determine the proper level of parameters and configurable
of the CFPS are developed by a discrete-event simulation parameters to optimize the system performance. Besides,
model. Three types of operators are under their own logic the entire CFPS performance has not been checked with
procedure so that the model can achieve and control the the change of replenishment policy. In addition, the
dynamic and complex operations close to reality. A large- practical happenings, such as the cart operator routing
scale pharmacy-based system has been developed with way, unforeseen downtime of RDS, and the scheduled
real machine configurations that consider the mixture of maintenance, have not been considered in the paper.
prescriptions. The simulated system has been evaluated Future work of this research will focus on the potential
from RDS and downstream performance aspects. Case ways to improve the system’s performance. With current
studies with and without the priority-based replenishment resources and configurations, the priority strategy and
policy are compared with the performance indicators. different operation strategies can be optimized further
Compared to the Case 1 model with the default “Low- regarding the entire CFPS performance improvement. The
Medium-High” priority strategy, the proposed priority estimated future demand with statistical information can
strategy in Case 2 model is a strong performer in eliminating be considered as one of the indicators in the priority
the rundry errors during the refilling process. The proposed strategy. Besides, the cart operator’s travel distance and
system can perform close to the reference model without pick-up way can be optimized as a strategy. The resources
any inventory shortage and replenishment, which has and configurable settings can also be optimized to give
proven that the consumption rate and current inventory better reasonable suggestions while considering costs.
level play an important role in optimizing the refilling Additionally, more NDC information can be gathered from
sequence. actual prescriptions in the CFPS to generate the demand
One limitation is that the current simulation model distribution.
in the paper cannot provide the optimal settings, like
the optimal number of canisters and operators. The
simulation-based optimization framework can be expanded Appendix
Table 5 Distance matrix for travel time computations of the cart operator (unit: inch)
Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 R1
1 − 150 300 450 1057 1207 1357 1507 1458 1308 1158 1008 397 247 97 53 982
2 − − 150 300 907 1057 1207 1357 1308 1158 1008 858 247 97 53 203 832
3 − − − 150 757 907 1057 1207 1158 1008 858 708 97 53 203 353 682
4 − − − − 607 757 907 1057 1008 858 708 558 53 203 353 503 532
5 − − − − − 150 300 450 1449 1299 1149 999 660 810 960 1110 973
6 − − − − − − 150 300 1599 1449 1299 1149 810 960 1110 1260 1123
7 − − − − − − − 150 1749 1599 1449 1299 960 110 1260 1410 1273
8 − − − − − − − − 1899 1749 1599 1449 1110 1260 1410 1560 1423
9 − − − − − − − − − 150 300 450 1061 1211 1361 1511 654
10 − − − − − − − − − − 150 300 911 1061 1211 1361 504
11 − − − − − − − − − − − 150 761 911 1061 1211 354
12 − − − − − − − − − − − − 611 761 911 1061 204
13 − − − − − − − − − − − − − 150 300 450 585
14 − − − − − − − − − − − − − − 150 300 735
15 − − − − − − − − − − − − − − − 150 885
16 − − − − − − − − − − − − − − − − 1035
R1 − − − − − − − − − − − − − − − − −
13
Priority-based replenishment policy for robotic dispensing... 359
Algorithm 1 Pseudocodes for the simulation model. Each procedure runs in parallel with the specified number of instances of each one. The three
replenishment worker procedures respond to the changes in the shared data structures, Cn and f illQueue.
13
360 N. Cao et al.
Purpose of the model Analyze the system performance under different priority-based replenishment strategies.
Model outputs RDS performance evaluation: Total number of rundry errors Total number of uncompleted items during shift
Trajectory of the number of dispensers suffered from rundry error Trajectory of number of blocked items
waited for fixing rundry error Inventory trajectory for each dispenser and canister Makespan of RDS machines
Downstream performance evaluation: Avg. collation delay, Max. collation delay
Experimentation aims Emulating the RDS human operations and reflecting real-world dynamic practice and settings of
replenishment process in the CFPS.
Base model overview diagram Shown in Fig. 6.
Base model logic Shown in Section 5.1 and Fig. 6.
Algorithm Shown in Algorithm 1.
Components Entities: Shown in Section 5.1. Activities: Shown in Section 5.1. Resources: 3D CAD file layout, design
workbook data used for parameter settings, and technical book used for configuration settings are provided by
the designer of CFPS. Queues: Vial filling queue: First in First Out Canister refilling queue: Priority strategy
is shown in Section 4. Staff working sequence: The next staff will only work if previous staff is busy. Entry
/ Exit points: Entities’ entry points are related to the order arrival time and queue. Entities’ exit points are
dependent on the activities that are all finished.
Data sources Amount of demand data are provided by the designer of CFPS, which is related to the CFPS scale and
historical data from other CFPSs.
Input parameters Shown in Table 6.
Pre-processing Demand data is uniformly distributed during a 7.5-hour shift from 16 RDS machines.
Assumptions Shown in Section 5.1.
Initialisation Warm-up period is 10 min.
Run length The model has a run length of 24 hours including the 7.5-hour shift time and remaining time for finishing the
filling and refilling work.
Estimation approach All point estimates are based on the average of 50 replications of a model run.
Software or programming language Emulate3D simulation solver is used for building the simulation model by enterprises license. The software
provides QuickLogic simulation language to help program C languages.
Model execution Model run time is 5 hours per replication.
System specification The model is run on Dell XPS 8940, with a 3.6Ghz Intel Core i7 processor and 32 GB of memory under
Windows 10 Pro.
Computer model sharing statement The simulation model is built by the enterprise version of Emulator3D and cannot be shared due to
confidential reasons.
13
Priority-based replenishment policy for robotic dispensing... 361
13
362 N. Cao et al.
system. In: IIE Annual conference, proceedings institute of 21. Wang H, Serhan DM, Yoon SW, Lashier A (2016) Collation
industrial and systems engineers (IISE), pp 828–833 delay optimization using discrete event simulation in mail-order
17. Dauod H, Wang H, Khader N, Yoon SW, Srihari K (2017) Real- pharmacy automation systems. In: Proceedings of the 2016
time dispenser replenishment optimization based on receding industrial and systems engineering research conference
horizon control. Procedia Manufacturing 11:1782–1789 22. Rockwell Automation lnc (2022) Emulate3d by rockwell automa-
18. Serhan D, Dauod H, Yoon SW (2018) Sequential modeling tion https://www.demo3d.com/
and optimization for resources in mail-order pharmacy automa- 23. Monks T, Currie CS, Onggo BS, Robinson S, Kunc M, Taylor
tion systems. In: IIE Annual conference, proceedings insti- SJ (2019) Strengthening the reporting of empirical simulation
tute of industrial and systems engineers (IISE), pp 1223– studies: Introducing the stress guidelines. J Simul 13(1):55–67
1228
19. Dauod H, Serhan D, Wang H, Khader N, Yoon SW, Srihari K Publisher’s note Springer Nature remains neutral with regard to
(2019) Robust receding horizon control strategy for replenishment jurisdictional claims in published maps and institutional affiliations.
planning of pharmacy robotic dispensing systems. Robot Comput
Integr Manuf 59:177–188 Springer Nature or its licensor (e.g. a society or other partner) holds
20. O’Connor R, Yoon SW, Kwon S (2021) Analysis and optimization exclusive rights to this article under a publishing agreement with the
of replenishment process for robotic dispensing system in a central author(s) or other rightsholder(s); author self-archiving of the accepted
fill pharmacy. Comput Ind Eng 154(107):116 manuscript version of this article is solely governed by the terms of
such publishing agreement and applicable law.
13