The proposed framework optimizes the system based on the decision related to the lost customers, which affects the business’s reputation, and it considers a more realistic case: the customer may decide to cancel his/her order and abandon the system. In order not to cause the loss of impatient customers, we focused on performance measures, the most important of which is when to order and how much to order under the random behavior of customers and when is the best inventory position to restore the stock level in the fastest time and service, through a calculation of the average inventory level, the average number of new orders, lost sales for new customers and impatient customers, quality of service for new customers and impatient customers, the effective arrival rate, the average number of customers in the queuing system, the average waiting time for a customer, and the waiting time in queue before the departure.
3.1. Stochastic Processes and Queuing Models
Stochastic processes are mechanisms for quantifying complex relationships in random event chains [
24]. Stochastic models have a significant role in describing many aspects of natural and engineering sciences. They can also be used to examine the uncertainty inherent in biological and medical systems, resolve inconsistencies surrounding management decisions and the dynamics of psychological and social relationships, and provide new observations to assist other mathematical and statistical studies. A stochastic process is a sequence of random variables that vary over time. Examples of stochastic processes include the Poisson process, birth and death processes, continuous (discreet) Markov time chains, queuing theory, and random walk.
Based on the definition that we described for stochastic processes, this mathematically follows a family of random variables denoted by where is a parameter running over an appropriate index set of T. (Where possible, we can write instead of .) In a typical case, the t-index refers to discrete-time units, and the index set is . In this case, may represent the effects of successive coin tosses, the repeated reactions of a subject in a learning experiment, or the successive observations of certain characteristics of a population. Stochastic processes for which are especially important for applications. T mostly reflects time here, but various circumstances occur as well. For example, t can be the distance from an arbitrary origin, and can count the number of defects in the interval along the thread or the number of cars in the interval along a highway.
Stochastic processes are described by their state-space or the range of possible values for the random variables , their index set T, and the dependency connection between the random variables . The most used classes of stochastic processes are systematically and extensively discussed for review in the following pages, along with the most valuable mathematical measurement and analysis techniques for these processes. Examples are demonstrated in the use of these processes as models. A preview of technologies from many and varied areas of interest are integral to the display.
A stochastic process with possible values (state-space) is called a Markov chain. A continuous time stochastic process with state-space T is called a Markov process.
3.1.1. Markov Chain
The Markov process
is a stochastic process with the property that, given the value of
, the values of
for
are not affected by the values of
for
. In other words, the mechanism’s likelihood of some specific future action, since its current state is well known, is not altered by additional awareness of its past attitude. A discrete-time Markov chain is a Markov process whose state-space is a finite or countable set and whose (time) index set is
. In formal terms, the Markov property is that:
For all time points n and all states, .
It is considered appropriate to label the state-space of the Markov chain by the nonnegative integers {0,1,2, …}, which we do, except if the inversion is explicitly stated, and it is usual to speak of as being in state i if .
The probability of
being in state
j given that
is in state
i is called the one-step transition probability and is denoted by
, that is,
The notation emphasizes that, in general, the transition probabilities are functions not only of the first and final states, but of the transition time as well. The Markov chain has stationary transition probabilities if the one-step transition probabilities are independent of the time variable
n. Since most Markov chains that we shall be meeting have stationary transition probabilities, we limit our discussion to this status. Then,
is independent of
n, and
is the conditional probability that the state value undergoes a transition from
i to
j in one trial. It is customary to arrange these numbers
in a matrix, in the infinite square array:
and we refer to
as the Markov matrix or transition probability matrix of the process.
The
ith row of
P, for
is the probability distribution of the values of
under the condition that
. If the number of states is finite, then
P is a finite square matrix whose order (the number of rows) is equal to the number of states. Clearly, the quantities
satisfy the conditions:
The condition merely expresses that some transition occurs at each trial (For convenience, one says that a transition has occurred even if the state remains unchanged).
A Markov process is wholly defined once its transition probability matrix and initial state (or, more generally, the probability distribution of ) are specified. We shall now prove this fact.
3.1.2. Long-Run Distribution (Stationary Distribution)
Consider an irreducible Markov chain. If the chain is positive recurrent, then the long-run proportions are the unique solution of the equations:
Moreover, if there is no solution to the preceding linear equations, then the Markov chain is either transient or null recurrent, and all .
3.2. Single-Server Markovian Queuing Model with Impatient Customers
A queuing system consists of “customers” arriving at random times to some facility where they receive a service of some type and then depart. We use “customer” as a generic term. It may point, for example, to customers demanding service or a product at a time, to ships entering a port, to batches of data flowing into a computer subsystem, to broken machines awaiting repair, and so on. Queuing models are classified according to:
The input process, the probability distribution of the type of arrivals of customers in time;
The service distribution, the probability distribution of the random time to serve a customer (or group of customers in the case of a batch service);
The queue discipline, the number of servers, and the customer service order.
In this research, we propose an M/M/1/N queuing scheme for impatient customers. Customers arrive according to the Poisson method at a rate of
per unit of time. The service is offered by a single server serving customers on a first-come, first-served (FCFS) basis. Service times are followed by an exponential distribution with a service rate of
per unit of time. During the waiting time, consumers become frustrated, that is once the customer arrives at the service during the queue, the customer exits the queue. Abandon means that the abandonment process begins once the arriving customer notices one or more waiting customers in the queue. A waiting customer abandons the queue if he/she waits an exponential amount of time before quitting the service with rate
per unit of time, assuming the impatient times are independent of all others. For example, if the system is in State 3, it means that there is one customer in service and two are waiting; every customer will wait for an exponential time with rate
, and the second customer in the queue will spend another independent exponential time before leaving the system; so, the system will move from State 3 to State 2 by three streams: the first customer in the service departs the system, or the first customer in the queue abandons the system, or the second customer in the system in the queue abandons the system with rate
. The customer in the service with rate
or the first customer in the queue abandons the system with rate
or the second customer in the queue abandons the system with rate
, so the total rate for the system from State 3 to State 2 is
. In general, the transition rate of the system is as follows:
The rate diagram in M/M/1/N with impatient customers is given in
Figure 1.
3.2.1. Balance Equations
Based on the information above, the balance equations of M/M/1/N with impatient customers present a stationary analysis for the model described as follows:
The average rates at which the process is left (state n) = the average rates at which the process is entered (state n):
3.2.2. Solution of the Balance Equations
Solving the balance equations of M/M/1/N from the information above is as follows:
Since the variables represent a steady-state distribution, then they must satisfy the assumptions of the probability as follows:
;
From Equations (
11) and (
12) we find that:
We can take
as a common factor:
3.2.3. Performance Measures
The average number of customers in the queuing system:
The average number of customers waiting in line (or in the queue):
Average waiting time in the system
Average waiting time in the queue
The waiting time in Q before the departure
3.3. Finite Queuing–Inventory Models with Impatient Customers under a Deterministic Order Size
We propose a queuing scheme with inventory for impatient customers under a deterministic order size. In queuing during the waiting time, consumers become frustrated. Once the customer arrives at the service during the queue, the customer exits the queue. Abandonment means that the abandonment process begins once the arriving customer notices one or more waiting customers in the queue. For example, in e-commerce, the customer submits an order for some electronic services. When the order is delayed, the customer withdraws and cancels the request.
We found that when the percentage of departures increases, it affects the overall flow of customers because the customers begin to transmit the information that the procedure is long in this place. Furthermore, the real influx decreases, especially with evaluation methods such as customer evaluation for this place or measuring customer satisfaction on the Internet or social media, which makes this phenomenon spread quickly, as to whether the wait is long or the customer is impatient.
Our work took the case where the customer is actually in the system waiting for the fulfillment of his/her order, but he/she will decide to cancel the order and leave due to the long waiting time, and that is why he/she is called an impatient customer. The proposed framework focuses on those in the system and those that leave, as this type of customer has a more substantial effect on the business’s reputation. Therefore, the two models are different. In addition, we considered the case when the replenishment order quantity is either fixed or could be random following a uniform distribution.
The proposed model suggests an M/M/1/N queuing scheme with inventory for impatient customers under a deterministic order size. Customers arrive according to the Poisson process at a rate of customers per unit of time. The service is offered by a single server serving customers on a first-come, first-served (FCFS) basis. Service times are followed by an exponential distribution with a service rate per unit of time. During the waiting time, consumers become frustrated. Once the customer arrives at the service and waits in the queue, the customer may exit the queue due to the long waiting time. This means that the abandonment begins once the arriving customer finds one or more customers waiting in the queue. Any waiting customer abandons the queue if he/she waits an exponential amount of time before quitting the service with a rate of per unit of time. It was assumed that the impatient customers are independent of all other.
Based on the description of the system, we use the following notations:
average number of arrivals per unit of time.
average number of customers served per unit of time.
time to deliver new orders as a random variable that follows the exponential distribution with parameter .
average time for the customer to wait in a queue before abandonment.
M: the maximum quantity order.
The description mentioned above of the previously known system and assumptions can be modeled using the birth and death stochastic process with a two-dimensional state for the system (n, k). The first dimension
n represents the number of customers in the system, and the second dimension
k represents the number of items in inventory. Then, we can denote this birth and death process as follows:
3.3.1. Steady-State Distribution for Queuing Inventory Models with Impatient Customers
Let us assume that the order size is fixed. We have
. Then,
for all
, and
otherwise.
Rate Diagram
If there are customers in the system, we assume that each waiting customer is independent of the other. Each one of them has a particular waiting period. For example, if there are four customers in the system, then this means that one is in the service and three of them are waiting. Thus, we find that any of the three is qualified to leave the system after a waiting time following the exponential distribution. The rate diagram for finite queuing inventory models with impatient customers under a deterministic order size is given in
Figure 2.
3.3.2. Performance Measure
We were interested in the stationary characteristics of the queuing–inventory system with impatient customers under a deterministic order size. Having determined the stationary distribution, we can compute several measures of the operating characteristics for the system explicitly. We introduced the following measures of the system performance for the stationary system:
Denote
as the average inventory level of the system when the system is in a steady-state. We can compute the average inventory level as follows:
When the average inventory level is very high, this means we may have to change the order quantity. If it is completely low, then this means that we will lose more customers;
is the average number of new orders placed by the distributor or the number of cycles per unit time when the system is in a steady-state. We can compute the average number of new orders as follows:
Regarding the number of times to repeat the issuance of orders, if there are costs associated with issuing the order, then this means that we must reduce this quantity, or the maker will have to reduce it or take the necessary action and choose the appropriate M that does not make the process of issuing the order repetitive. Therefore, this will be a focus area for the decision-maker;
is the number of cycles when the order size is k when the system is in a steady-state. We can compute the number of cycles as follows:
is the expected lost sales per unit time for the new customers when the system is in the steady-state. We can compute the lost sales for new customers as follows:
Lost sales for new customers happen for two reasons. First, it may happen when the customer comes and finds a wait space, but there is not enough inventory. Second, it may happen when the customer comes and finds the waiting space is full and is unable to enter, but there is enough inventory.
Its role is to make decisions, if the quantity is high, meaning the customer’s reception space is very narrow, or the amount of orders issued is very high;
is the expected lost sales per unit time for the impatient customers when the system is in a steady-state. We can compute the lost sales for the impatient customers as follows:
Lost sales for the impatient customers are another type of customer loss that differ from the previous loss, which is the length of waiting and is calculated by the number of customers who leave the system without obtaining the service or before arriving at receiving the service;
is the expected lost sales per cycle for the new customer when the system is in a steady-state. We can compute the lost sales per cycle for new customers as follows:
Denote
as the expected lost sales per cycle for the impatient customers when the system is in a steady-state. We can compute the lost sales per cycle for the impatient customers as follows:
is the quality of service measure of the new customer when the system is in a steady-state. We can compute the quality of service for new customers as follows:
The quality of service is provided to the new customers well when it is closer to one, and the quality of service is provided to the new customers badly when it is closer to zero;
is the quality of service measure for the impatient customers when the system is in a steady-state. We can compute the quality of service for impatient customers as follows:
The quality of service is provided to new customers well when it is closer to one, and the quality of service is provided to the new customers badly when it is closer to zero;
is the effective arrival rate, the average number of customers entering the system per unit of time when the system is in steady-state. We can compute the effective arrival rate as follows:
is the average number of customers in the queuing system when the system is in a steady-state. We can compute the average number of customers in the queuing system as:
is the average number of customers waiting in line when the system is in a steady-state. We can compute the average number of customers waiting in line as:
is the average waiting time for a customer when the system is in a steady-state. We can compute the average waiting time for a customer as:
This is the average time customer waits in the queue until he/she obtains the service;
is the sojourn time when the system is in a steady-state. We can compute the sojourn time as:
This means the time of entering the system until the departure time from the system after service is complete;
is the waiting time in Q before the departure when the system is in a steady-state. We can compute the waiting time in Q before the departure: empirical analysis with impatient customers under a deterministic and random order size reveals the average number of customers:
Balance Equations
The balance equations are such that the flow process of any system situation is equal to the flow outside the system. To find the steady-state distribution (long-run distribution), we have to satisfy the stationary condition for each state in the system. This condition can be defined in general as follows:
Rate of change in state n (at time t) = rate into state n (at time t) − rate out of state n (at time t).
average rate into state
n (at time
t) − average rate out of state
n (at time
t):
Algorithm for Solving Balance Equations
Balance equations in queuing inventory systems with impatient customers under a deterministic order size have a particular structure in each n equation and are connected to the adjacent cases or the corresponding cases. Therefore, each equation may be written within the context of the previous or subsequent variable. The algorithm we used in solving the balance equations was the linear algebra method and linear equations. These linear equations are converted into matrices due to the difficulty of solving them manually. However, if the size of the matrix is small, they can be solved manually. If the size of the matrix is large, then we solve them using linear algebra. The matrix size is the states of the two-dimensional system (
n,
k). Therefore, n represents the number of customers in the system, and
k represents the number of items in the inventory; when the number of rows equals the number of columns, it is a square matrix. After describing the system through linear equations in the square matrix, it is called the traditional matrix
A. The determinant of matrix
A = 0 can easily prove that A’s determinant is equal to zero. Then, we have a vector
B, which is the balance condition. Moreover, since the equations are not linear independent, we deleted the last row and replaced the whole row with the number one. It is now a matrix whose inverse we can find. Then, to find the values of
, we multiply the inverse
A by the vector
B.
3.3.3. Finite Queuing–Inventory Models with Impatient Customers under a Random Order Size
Further, we propose an M/M/1/N queuing scheme with inventory for impatient customers under a random order size as the system previously described, such as the arrival and service of customers, service providers, their waiting customers, and leaving, either by the occurrence of the service or before obtaining the service, but under a random order size. Furthermore, we use the same notations, but we use the notation for the random order size.
Balance Equations
To find a steady-state distribution, we must satisfy the stationary condition for each state in the system. This condition can be defined in general as follows:
Rate of change in state n (at time t) = rate into state n (at time t) − rate out of state n (at time t)
average rate into state
n (at time
t) − average rate out of state
n (at time
t):
We used the same algorithm to solve balance equations under a random order size through the linear algebra method.