Keywords

1 Introduction

In a vacation queueing system, the server may not be available for a period of time due to several reasons like server working on some supplementary jobs or doing some maintenance work, server’s failure that interrupt customer service or simply taking a break. Levy and Yechiali [5] introduced the concept of server vacation. A considerable number of work in this area were surveyed by Doshi in [2]. More studies on vacation models could be found in Takagi [8] and in Tian and Zhang [9]. Kazimirsky [4] studied BMAP/G/1 queue with infinite buffer and service time distribution depending on number of processed items: When customers are absent in the system, the server begins to produce items that are put to the storehouse until the storehouse capacity is reached or a group of customers arrives. When a group of customers arrives, the item processing stopped and the service of the customers begins. Service time of a customer depends on the amount of items at the storehouse at the beginning of the service. After the service of the customer is completed, it departs from the systems and, if its service is begun with nonempty storehouse, the number of items at the storehouse decreases by one unit at a service completion epoch. In this queueing model, he considered the systems with the possibility of preliminary service. An efficient algorithm for calculating the stationary queue length distribution was proposed, and Laplace-Stieltjes transform of the sojourn time was derived. Also he proved Little’s law and an associated optimization problem was analyzed.

The motivation for our work is a paper by Hanukov et al. [3]. In their model, they studied a single server queue in which the service consists of two independent stages. The first stage can be performed even in the absence of customers, whereas the second stage requires the customer to be present. When the system is devoid of customers, the server produces an inventory of first stage called ‘preliminary’ services, which is used to reduce customer’s overall sojourn times. Hence in this model customer will not have to wait for the entire service to be carried out from the beginning, provided processed item is available at the time the customer is taken for service. Such customers have a shorter service time in comparison to those who encounter the system with no processed item when taken for service. Yadin and Naor [10] introduced the concept of N-policy in which the server turns on with the accumulation of N or more customers and turns off when the system is empty. This has the advantage that the length of a busy period becomes larger when server is activated on accumulation of N or more customers, thereby bringing down the expected cost incurred per unit time.

In this paper we consider a single server queueing system in which customers arrive according to Markovian Arrival process. When the system is empty, the server goes for vacation and produces inventory for future use during this period. The maximum inventory level is L. The inventory processing time follows phase type distribution. The server returns from vacation when there are N customers in the system. The service time follows two distinct phase type distributions according to whether there is no processed item or there are processed items at the beginning of service. Each customer requires an item from inventory for service which is exclusively used for the service of that particular customer only.

The rest of the paper is arranged as follows. The mathematical formulation is given in Sect. 2. Section 3 provides steady state analysis of the model and also contain some important distributions. Some numerical results are discussed in Sect. 4.

Notations and abbreviations used in the sequel:

  • \(\mathbf {e}(a)\): Column vector of \(1'\)s of order a.

  • \(\mathbf {e}\): Column vector of \(1'\)s of appropriate order.

  • CTMC: Continuous time Markov chain.

  • \(I_a\): identity matrix of order a.

  • \(\mathbf {e}_a(b)\): column vector of order b with 1 in the ath position and the remaining entries zero.

  • MAP: Markovian Arrival Process.

  • LST: Laplace-Steiltges Transform.

  • LIQBD: Level Independent Quasi-Birth and-Death.

2 Model Description and Mathematical Formulation

We assume that customers arrive at a single server queueing system according to MAP with representation \((D_0,D_1)\) of order n. When the system is empty, the server goes for vacation and produces inventory for future use during this period. The maximum inventory level permitted is L. The inventory processing time follows phase type distribution PH\((\alpha , T)\) of order \(m_1\). These are required for the service of customers-one for each customer.The server returns from vacation when N customers accumulate in the system. The service time follows PH\((\beta ,S)\) of order \(m_2\) when there is no processed item and it follows PH\((\gamma , U)\) of order \(m_3\) when there are processed items.

Let \( Q^{*}=D_{0}+D_{1}\) be the generator matrix of the type II arrival process and \( \varvec{\pi ^{*}}\) be its stationary probability vector. Hence \( \varvec{\pi ^{*}}\) is the unique (positive) probability vector satisfying

$$\begin{aligned} \varvec{\pi ^{ *}} Q^{*}=0,\,\, \varvec{\pi ^{*} e}=1. \end{aligned}$$

The constant \(\beta ^{*}= \varvec{\pi ^{*}} D_{1} \varvec{ e}\), referred to as \( {fundemental\, rate}\), gives the expected number of arrivals per unit of time in the stationary version of the MAP. It is assumed that the arrival process is independent of the inventory processing and service process.

2.1 The QBD Process

The model described in Sect. 1 can be studied as a LIQBD process. First we introduce the following notations:

At time t:

  • N(t): the number of customers in the system at time t,

  • I(t): the number of processed inventory

    $$J(t)=\left\{ \begin{array}{ll} 0, when\, the\, server\, is\, on\, vacation\\ 1, when\, the\, server\, is\, busy\, serving\, a\, customer\\ \end{array}\right. $$
  • K(t): the phase of the inventory processing/service process

  • M(t): the phase of arrival of the customer.

It is easy to verify that \( \{(N(t),I(t),J(t),K(t), M(t)):t\ge 0\}\) is a LIQBD with state space: (i) no customer in the system

\(l(0)=\{(0,i,0,k_1,l):0\le i\le L-1,1\le k_1\le m_1,1\le l\le n\}\cup \{(0,L,0,l):1\le l\le n\}\).

(ii) when there are h customers in the system, for \(1\le h\le N-1\):

\(l(h)=\{(h,i,0,k_1,l):0\le i\le L-1, 1\le k_1\le m_1,1\le l \le n\}\cup \{(h,L,0,l):1\le l\le n\} \cup \{(h,0,1,k_2,l):1\le k_2\le m_2,1\le l\le n\}\cup \{(h,i,1,k_3,l):1\le i\le L-N+h,1\le k_3\le m_3,1\le l\le n\}\ \text {(last part only when} L-N+h>0\text {)}\)

and for \(h\ge N\):

\(l(h)=\{(h,0,1,k_2,l): 1\le k_2\le m_2,1\le l \le n\}\cup \{(h,i,1,k_3,l):1\le i\le L, 1\le k_3\le m_3,1\le l\le n\}\).

The infinitesimal generator of this CTMC is

$$ \mathcal Q_1 = \left[ {\begin{array}{*{20}c} {B_0 } &{} {C_0 } &{} {} &{} {} \\ {B_{1} } &{} {E_1 } &{} {F_1} &{} {} \\ &{}{B_2 } &{} {E_2 } &{} {F_2} &{} {} \\ {} &{} &{}\ddots &{} \ddots &{} \ddots \\ {} &{} &{}{B_{N-2}} &{} {E_{N-2} } &{} {F_{N-2}} &{} {} \\ {} &{} &{} &{}{B_{N-1}} &{} {E_{N-1} } &{} {F'_{N-1}} &{} {} \\ {} &{} &{} &{} &{}{B'_N}&{} {A_1}&{}{A_0}\\ {} &{} &{} &{} &{} &{} {A_2}&{}{A_1}&{}{A_0}\\ {} &{} &{} &{} &{} &{} &{} \ddots &{} \ddots &{} \ddots \end{array}} \right] . $$

The boundary blocks \(B_0,C_0,B_1, F'_{N-1},B'_N\) are of orders \((Lm_1+1)n\times (Lm_1+1)n\), \((Lm_1+1)n\times \bigl ((Lm_1+1)n+m_2n+(L-N+1)m_3n\bigr )\), \(\bigl ((Lm_1+1)n+m_2n+(L-N+1)m_3n\bigr )\times (Lm_1+1)n \), \(\bigl ((m_1+m_2)n+(L-1)(m_1+m_3)n+n\bigr ) \times (m_2+Lm_3)n\), \((m_2+Lm_3)n\times \bigl ((m_1+m_2)n+(L-1)(m_1+m_3)n+n\bigr )\) respectively. For \(2\le h\le N-1\), \(B_{h}\) is of order \(\bigl ((m_1+m_2)n+(L-N+h)(m_1+m_3)n+(N-h-1)m_1n+n\bigr )\times \bigl (m_1+m_2)n+(L-N+h-1)(m_1+m_3)n+(N-h)m_1n+n\bigr )\). For \(1\le h\le N-1\), \(E_{h}\) is of order \(\bigl ((m_1+m_2)n+(L-N+h)(m_1+m_3)n+(N-h-1)m_1n+n\bigr ) \times \bigl ((m_1+m_2)n+(L-N+h)(m_1+m_3)n+(N-h-1)m_1n+n\bigr )\). For \(1\le h\le N-2\), \(F_h\) is of order \(\bigl ((m_1+m_2)n+(L-N+h)(m_1+m_3)n+(N-h-1)m_1n+n \bigr )\times \bigl ((m_1+m_2)n+(L-N+h+1)(m_1+m_3)n+(N-h-2)m_1n+n\bigr )\). \(A_0,A_1,A_2\) are square matrices of order \( (m_2+Lm_3)n\). Define the entries \(B_{0_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\), \(C_{0_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\), \(B_{1_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\), \(E_{h_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\), \(B_{h_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\), \(F_{h_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\), \({{F'}_{N-1}}_{(i_1,j_1,k_1,l_1)}^{(i_2,j_2,k_2,l_2)}\) and \({{B'}_N}_{(i_1,j_1,k_1,l_1)}^{(i_2,j_2,k_2,l_2)}\) as transition submatrices which contains transitions of the form \((0,i_1,j_1,k_1,l_1) \rightarrow (0,i_2,j_2,k_2,l_2), \) \((0,i_1,j_1,k_1,l_1) \rightarrow (1,i_2,j_2,k_2,l_2), \)  \( (1,i_1,j_1,k_1,l_1) \rightarrow (0,i_2,j_2,k_2,l_2),\) \((h,i_1,j_1,k_1,l_1) \rightarrow (h,i_2,j_2,k_2,l_2)\), where \(1\le h\le N-1\), \((h,i_1,j_1,k_1,l_1) \rightarrow (h-1,i_2,j_2,k_2,l_2)\), where \(2\le h\le N-1\), \((h,i_1,j_1,k_1,l_1) \rightarrow (h+1,i_2,j_2,k_2,l_2)\), where \(1\le h\le N-2\), \((N-1,i_1,j_1,k_1,l_1) \rightarrow (N,i_2,j_2,k_2,l_2)\) and \((N,i_1,j_1,k_1,l_1) \rightarrow (N-1,i_2,j_2,k_2,l_2) \) respectively. Define the entries \(A_{2_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}, A_{1_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\) and \(A_{0_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}\) as transition submatrices which contains transitions of the form \((h,i_1,j_1,k_1,l_1) \rightarrow (h-1,i_2,j_2,k_2,l_2)\), where \(h \ge N+1\), \((h,i_1,j_1,k_1,l_1) \rightarrow (h,i_2,j_2,k_2,l_2)\), where \(h\ge N\) and \((h,i_1,j_1,k_1,l_1) \rightarrow (h+1,i_2,j_2,k_2,l_2)\), where \(h\ge N\) respectively. Since none or one event alone could take place in a short interval of time with positive probability, in general, a transition such as \((h_1,i_1,j_1,k_1,l_1)\rightarrow (h_2,i_2,j_2,k_2,l_2)\) has positive rate only for exactly one of \(h_1,i_1,j_1,k_1,l_1 \) different from \(h_2,i_2,j_2,k_2,l_2\).

$$B_{0_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} T^o \alpha \otimes I_n &{} i_2=i_1+ 1,0\le i_1\le L-2; j_1= j_2=0;1 \le k_1,k_2 \le m_1;\\ {} &{} 1\le l_1,l_2\le n\\ T^o \otimes I_n &{} i_1=L-1,i_2=L; j_1= j_2=0;1 \le k_1,k_2 \le m_1; 1\le l_1,l_2\le n\\ T \oplus D_0 &{}i_1=i_2,0\le i_1\le L-1;j_1=j_2=0;1 \le k_1,k_2 \le m_1; \\ {} &{} 1\le l_1,l_2 \le n\\ D_0 &{} i_1=i_2=L;j_1=j_2=0;1\le l_1,l_2\le n \end{array} \right. $$
$$C_{0_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} I_{m_1} \otimes D_1&{}0\le i_1\le L-1,i_1=i_2;j_1=j_2=0;1 \le k_1,k_2,\le m_1;\\ {} &{} 1\le l_1,l_2 \le n\\ D_1&{}i_1=i_2=L;j_1=j_2=0;1\le l_1,l_2\le n \end{array} \right. $$
$$B_{1_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} S^0\alpha \otimes I_n&{}i_1=i_2=0;j_1=1,j_2=0;1\le k_1\le m_2,\\ {} &{}1\le k_2 \le m_1;1\le l_1,l_2\le n\\ U^0\alpha \otimes I_n&{}1\le i_1\le L-N+1;i_2=i_1-1;j_1=1,j_2=0;;1\le k_1\le m_3,\\ {} &{}1\le k_2 \le m_1;1\le l_1,l_2\le n\\ \end{array} \right. $$

For \(1\le h\le N-1\),

$$E_{h_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} T^0 \alpha \otimes I_n&{} 0\le i_1\le L-2,i_2=i_1+1;j_1=j_2=0;\\ {} &{}1\le k_1,k_2\le m_1; 1\le l_1,l_2\le n\\ T^0 \otimes I_n&{} i_1=L-1,i_2=L;j_1=j_2=0;\\ {} &{}1\le k_1\le m_1; 1\le l_1,l_2\le n\\ T \oplus D_0&{} i_1=i_2,0\le i_1\le L-1;j_1=j_2=0;1\le k_1,k_2\le m_1;\\ {} &{}1\le l_1,l_2\le n\\ S\oplus D_0&{} i_1=i_2=0,j_1=j_2=1,1\le k_1,k_2\le m_2,1\le l_1,l_2\le n\\ U\oplus D_0&{} i_1=i_2,1\le i_1\le L-N+h;j_1=j_2=1,\\ {} &{}1\le k_1,k_2\le m_3,1\le l_1,l_2\le n\\ D_0&{} i_1=i_2=L;j_1=j_2=0;1\le l_1,l_2\le n\\ \end{array} \right. $$

For \(2\le h\le N-1\),

$$B_{h_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} S^0\beta \otimes I_n&{}i_1=i_2=0;j_1=j_2=1;1\le k_1,k_2\le m_2;1\le l_1,l_2\le n\\ U^0\beta \otimes I_n&{}i_1=1,i_2=0;j_1=j_2=1;1\le k_1\le m_3,\\ {} &{}1\le k_2 \le m_2;1\le l_1,l_2\le n\\ U^0\gamma \otimes I_n&{}2\le i_1\le L-N+h,i_2=i_1-1;j_1=j_2=1;\\ {} &{}1\le k_1,k_2 \le m_3;1\le l_1,l_2\le n\\ \end{array} \right. $$

For \(1\le h\le N-2\),

$$F_{h_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} I_{m_1}\otimes D_1&{}0\le i_1\le L-1, i_1=i_2;j_1=j_2=0;1 \le k_1,k_2\le m_1;\\ {} &{} 1\le l_1,l_2 \le n\\ I_{m_2}\otimes D_1&{} i_2=i_1=0;j_1=j_2=1;1\le k_1,k_2 \le m_2,1\le l_1,l_2 \le n\\ I_{m_3}\otimes D_1&{} i_2=i_1,1\le i_1\le L-N+h;j_1=j_2=1;\\ {} &{}1\le k_1,k_2 \le m_3,1\le l_1,l_2 \le n\\ D_1&{}i_1=i_2=L;j_1=j_2=0;1 \le k_1,k_2\le m_1;1\le l_1,l_2 \le n\\ \end{array} \right. $$
$${{F'}_{N-1}}_{(i_1,j_1,k_1,l_1)}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} e(m_1)\otimes ( \beta \otimes D_1)&{} i_1=i_2=0;j_1=0,j_2=1;1 \le k_1\le m_1,\\ {} &{} 1\le k_2\le m_2; 1\le l_1,l_2 \le n\\ I_{m_2}\otimes D_1&{} i_2=i_1=0;j_1=j_2=1;1\le k_1,k_2 \le m_2,\\ {} &{}1\le l_1,l_2 \le n\\ I_{m_3}\otimes D_1&{} i_2=i_1,0\le i_1\le L-1;j_1=j_2=1;,\\ {} &{}1\le k_1,k_2 \le m_3,1\le l_1,l_2 \le n\\ e(m_1)\otimes ( \gamma \otimes D_1)&{}1\le i_1\le L-1;j_1=0,j_2=1;1 \le k_1\le m_1,\\ {} &{} 1\le k_2\le m_3; 1\le l_1,l_2 \le n\\ \gamma \otimes D_1&{} i_1=i_2=L; j_1=0,j_2=1;1\le k_1\le m_1, \\ {} &{}1\le k_2\le m_3;1\le l_1,l_2\le n\\ \end{array} \right. $$
$${{B'}_N}_{(i_1,j_1,k_1,l_1)}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} S^0\beta \otimes I_n&{}i_1=i_2=0;j_1=j_2=1;1\le k_1,k_2\le m_2,;1\le l_1,l_2\le n\\ U^0\beta \otimes I_n&{}i_1=1,i_2=0;j_1=j_2=1;1\le k_1\le m_3,\\ {} &{}1\le k_2 \le m_2;1\le l_1,l_2\le n\\ U^0\gamma \otimes I_n&{}2\le i_1\le L,i_2=i_1-1;j_1=j_2=1;1\le k_1,k_2 \le m_3;\\ {} &{}1\le l_1,l_2\le n\\ \end{array} \right. $$
$$A_{2_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} S^0 \beta \otimes I_n&{} i_1=i_2=0;j_1=j_2=1;1 \le k_1,k_2\le m_2;\\ {} &{}1\le l_1,l_2 \le n\\ U^0 \beta \otimes I_n &{}i_1=1,i_2=0;j_1=j_2=1; 1 \le k_1\le m_3,1\le k_2\le m_2;\\ {} &{} 1\le l_1,l_2\le n\\ U^0 \gamma \otimes I_n&{} i_2=i_1-1,2\le i_2\le L;j_1=j_2=1;1 \le k_1,k_2\le m_3;\\ {} &{}1\le l_1,l_2 \le n \\ \end{array} \right. $$
$$A_{1_{(h,i_1,j_1,k_1,l_1)}}^{(h,i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} S \oplus D_0&{} i_1=i_2=0,j_1=j_2=1,1\le k_1,k_2\le m_2,1\le l_1,l_2\le n\\ U \oplus D_0&{} i_1=i_2,1\le i_1\le L;j_1=j_2=1,1\le k_1,k_2\le m_3,1\le l_1,l_2\le n\\ \end{array} \right. $$
$$A_{0_{(i_1,j_1,k_1,l_1)}}^{(i_2,j_2,k_2,l_2)}=\left\{ \begin{array}{ll} I_{m_2 }\otimes D_1 &{} i_1=i_2=0;j_1=j_2=1;1 \le k_1,k_2\le m_2; 1\le l_1,l_2 \le n\\ I_{m_3 }\otimes D_1 &{}i_1=i_2,1\le i_1\le L ;j_1=j_2=1;1 \le k_1,k_2\le m_3; 1\le l_1,l_2 \le n\\ \end{array} \right. $$

3 Steady State Analysis

The stability condition for the system is given by

Lemma 1

The system is stable iff \(\pi ^{*}D_1e<(\beta (-S)^{-1}e)^{-1}\).

Let \(\pmb {x}\) be the steady state probability vector of Q. We partition this vector as

$$\begin{aligned} \pmb {x}=(\pmb {x_0,x_1,x_2}\ldots ), \end{aligned}$$

where \(\pmb {x_0}\) is of dimension \((Lm_1+1)n\), \(\pmb {x_h} \), \(1\le h\le N-1\) are of dimension \((m_1+m_2)n+(L-N+h)(m_1+m_3)n+(N-h-1)m_1n+n\) and \(\pmb {x_N,x_{N+1}}\ldots \) are of dimension \((m_2+Lm_3)n\). Under the stability condition, we have

$$\begin{aligned} \pmb {x_{N+i}}=\pmb {x}_NR^{i},i\ge 1 \end{aligned}$$

where the matrix R is the minimal nonnegative solution to the matrix quadratic equation

$$\begin{aligned} R^2A_2+RA_1+A_0=0 \end{aligned}$$

and the vectors \(\pmb {x_0,x_1},\cdots ,\pmb {x_N}\ldots \)are obtained by solving the equations

$$\begin{aligned} \pmb {x_0}B_0+\pmb {x_1}B_1=0 \end{aligned}$$
(1)
$$\begin{aligned} \pmb {x_0}C_0+\pmb {x_1}E_1+\pmb {x_2}B_2=0 \end{aligned}$$
(2)
$$\begin{aligned} \pmb {x_{i-1}}F_{i-1}+\pmb {x_i}E_i+\pmb {x_{i+1}}B_{i+1}=0,\,\text {for}\,\,2\le i\le N-2 \end{aligned}$$
(3)
$$\begin{aligned} \pmb {x_{N-2}}F_{N-2}+\pmb {x_{N-1}}E_{N-1}+\pmb {x_N}B_{N'}=0\end{aligned}$$
(4)
$$\begin{aligned} \pmb {x_{N-1}}{F'}_{N-1}+\pmb {x_N}(A_1+RA_2)=0 \end{aligned}$$
(5)

subject to the normalizing condition

$$\begin{aligned} \sum _{i=0}^{N-1}\pmb {x_i}\pmb {e}++\pmb {x_{N}}(I-R)^{-1}\pmb {e}=1 \end{aligned}$$
(6)

3.1 Distribution of Time till the Number of Customers Hit N or the Inventory Level Reaches L

We can study this by a phase type distribution \(PH(\psi _1,V_1)\) where the underlying Markov process has state space \(\{(h,i,j,k):0\le h\le N-1, 0\le i\le L-1,1\le j\le m_1,1\le k\le n\}\cup \{*_1\}\cup \{*_2\}\) where \(*_1\) denotes the absorbing state indicating the inventory level hitting L and \(*_2\) denotes the absorbing state indicating the number of customers reaching N. The infinitesimal generator is

$$ \varvec{V_1}= \left[ {\begin{array}{*{3}c} {V _1} &{} {V_1^{(0)}} &{}{V_1^{(1)}}\\ {\pmb {0} } &{} {0} &{}{0} \end{array}} \right] \,\text {where},\, {V_1}=\left[ {\begin{array}{*{10}c} {E} &{} {I_{Lm_1}\otimes D_1} &{}{}\\ \ddots &{}\ddots &{}{}\\ &{} {E} &{} {I_{Lm_1}\otimes D_1}&{}{}\\ {} &{}&{}{E} &{}{} \end{array}} \right] ,$$
$$ V_1^{(0)}= \left[ {\begin{array}{*{1}c} {\pmb {e}_L(L)\otimes (T^0\otimes e(n))} \\ \vdots \\ {\pmb {e}_L(L)\otimes ( T^0\otimes e(n))} \end{array}} \right] \,, V_1^{(1)}= \left[ {\begin{array}{*{1}c} {\pmb {0}} \\ \vdots \\ {\pmb {0}} \\ {\pmb {e}(Lm_1)\otimes \delta } \end{array}} \right] $$

with

$$ E= \left[ {\begin{array}{*{5}c} {T\oplus D_0} &{} {T^0\alpha \otimes I_n} &{}{}\\ \ddots &{} \ddots \\ &{} {T\oplus D_0} &{} {T^0\alpha \otimes I_n}&{}{} \\ &{} &{}{T\oplus D_0} \end{array}} \right] \,\text {and}\, \delta =\left[ {\begin{array}{*{1}c} { \delta _1}\\ \vdots \\ { \delta _n} \end{array}} \right] ,$$

with \(\delta _i \) representing the sum of ith row of the \(D_1\) matrix.

The initial probability vector is

$$\begin{aligned} \psi _1=(1/d_1)(x_{0,0,0,1,1},\cdots ,x_{0,0,0,1,n},\cdots , x_{0,0,0,m_1,1},\cdots ,x_{0,0,0,m_1,n},\mathbf {0}) \end{aligned}$$

where \(d_1=\sum _{l=1}^n\sum _{k=1}^{m_1}x_{0,0,0,k,l}\) and \(\mathbf {0}\) is a zero matrix of order \(1\times \bigl ((N-1)Lm_1n+(L-1)m_1n\bigr )\).

Thus we have the following lemma.

Lemma 2

The expected duration of time till the inventory level reaches L before the number of customers hit N is given by \(\psi _1(-V_1)^{-2}V_1^{(0)}\) and the expected duration of time till the number of customers hit N before the inventory level reaches L is given by \(\psi _1(-V_1)^{-2}V_1^{(1)}.\)

3.2 Distribution of Idle Time

Case (i)

Suppose that the number of customers become N only after the inventory level hits L. The probability for this event is the probability for absorption of \(PH(\psi _1,V_1)\) to \(*_1\). In this case, we can study this conditional distribution by a phase type distribution \(PH(\psi _2,V_2)\) where the underlying Markov process has state space \(\{(h,L,0,l):0\le h\le N-1,1\le l\le n\}\cup \{*\}\) where \(*\) denotes the absorbing state indicating that the number of customers hitting N. The infinitesimal generator is

$$ \varvec{V_2}= \left[ {\begin{array}{*{2}c} {V _2} &{} {V_2^0 } \\ {\pmb {0} } &{} {0} \end{array}} \right] ,\,\,\text {where},\, {V_2}=\left[ {\begin{array}{*{10}c} {D_0} &{} {D_1} &{}{}\\ \ddots &{}\ddots &{}{}\\ &{} {D_0} &{} {D_1} &{}{}\\ &{} &{}{D_0} \end{array}} \right] \,, V_2^{0}= \left[ {\begin{array}{*{1}c} {\pmb {0}} \\ \vdots \\ {\pmb {0}} \\ {\delta } \end{array}} \right] $$

where \(\delta =\left[ {\begin{array}{*{1}c} { \delta _1}\\ \vdots \\ { \delta _n} \end{array}} \right] \)with \(\delta _i\) representing the sum of ith row of the \(D_1\) matrix. The initial probability vector is

$$\begin{aligned} \psi _2=(1/d_2)(v_{0,L,0,1},\cdots ,v_{0,L,0,n},\cdots ,v_{N-1,L,0,1},\cdots ,v_{N-1,L,0,n} ) \end{aligned}$$

where, for \(0\le h\le N-2, 1\le l\le n\),

$$\begin{aligned} v_{h,L,0,l}=\sum _{k=1}^{m_1}\frac{\eta _k}{\sum _{l \ne l'}d_{ll'}^0+\delta _l+\sum _{k\ne k'}T_{kk'}+\eta _k} x_{h,L-1,0,k,l} \end{aligned}$$

and, for \(h=N-1, \, 1\le l\le n\),

$$\begin{aligned} v_{N-1,L,0,l}=\sum _{k=1}^{m_1}\frac{\eta _k}{\sum _{l \ne l'}d_{ll'}^0+\sum _{k\ne k'}T_{kk'}+\eta _k} x_{N-1,L-1,0,k,l}, \end{aligned}$$

with, \(d_2=\sum _{h=0}^{N-1}\sum _{l=1}^{n}v_{h,L,0,l}\).

Here, \(\eta _k\) represents the absorption rate from phase k in \(PH(\alpha , T)\), \(T_{kk''}\) represent the \(kk'\)th entry of T, \(d_{ll'}^0\) represent the transition rates from the phase l to the phase \(l'\) without arrival and \(\delta _l\) represent the lth row sum of \(D_1\) matrix.

Case(ii)

Suppose that the number of customers become N before the inventory level hits L. The probability for this event is the probability for absorption of \(PH(\psi _1,V_1)\) to \(*_2\). In this case, the idle time = 0.

Thus we have the following theorem.

Theorem 1

The LST of the distribution of the idle time is given by

$$\begin{aligned} \left( \psi _2(sI-V_2)^{-1}V_2^0\right) \left( \int _{t=0}^{\infty }\psi _1e^{V_1t}V_1^{(0)}dt\right) \end{aligned}$$

3.3 Distribution of Time Until the Number of Customers Hit N

We can study this by a phase type distribution \(PH(\psi _3,V_3)\) where the underlying Markov process has state space \(\{(h,i,j,k):0\le h\le N-1, 0\le i\le L-1,1\le j\le m_1,1\le k\le n\}\cup \{(h,L,k):0\le h\le N-1,1\le k\le n\}\cup \{*\}\) where \(*\) denotes the absorbing state indicating the number of customers reaching N. The infinitesimal generator is

$$ \varvec{V_3}= \left[ {\begin{array}{*{2}c} {V _3} &{} {V_3^{0}} \\ {\pmb {0} } &{} {0} \end{array}} \right] ,\, \,\text {where}\, {V_3}=\left[ {\begin{array}{*{10}c} {F} &{} {I_{Lm_1+1}\otimes D_1} &{}{}\\ \ \ddots &{}\ddots &{}{}\\ &{} {F} &{} {I_{Lm_1+1}\otimes D_1}&{}{}\\ {} &{}&{}{F} &{}{} \end{array}} \right] \,, V_3^{0}= \left[ {\begin{array}{*{1}c} {\pmb {0}} \\ \vdots \\ {\pmb {0}} \\ { \pmb {e}(Lm_1+1)\otimes \delta } \end{array}} \right] $$

with

$$ F= \left[ {\begin{array}{*{6}c} {T\oplus D_0} &{} {T^0\alpha \otimes I_n} &{}{}&{}{}\\ \ddots &{}\ddots \\ &{} {T\oplus D_0} &{} {T^0\alpha \otimes I_n}&{}{}\\ &{} {} &{}{T\oplus D_0}&{}{T^0\otimes I_n}\\ &{} {} &{} {} &{}{ D_0} \end{array}} \right] $$

The initial probability vector is

$$\begin{aligned} \psi _3=(1/d_1(x_{0,0,0,1,1},\cdots ,x_{0,0,0,1,n},\cdots , x_{0,0,0,m_1,1},\cdots ,x_{0,0,0,m_1,n},\mathbf {0}) \end{aligned}$$

where \(d_1=\sum _{l=1}^n\sum _{k=1}^{m_1}x_{0,0,0,k,l}\),   where \(\mathbf {0}\) is a zero matrix of order \(1\times \bigl ((N-1)(Lm_1+1)n+((L-1)m_1+1)n\bigr )\).

Thus we have the following lemma.

Lemma 3

The distribution of time when the processing starts until the number of customers hit N is a phase type distribution with representation \(PH(\psi _3,V_3)\).

3.4 Distribution of Number of Inventory Processed Before the Arrival of First Customer

To compute the above distribution, first we find the following:

Distribution of Processing Time till the Arrival of First Customer. Consider the Markov process with state space \(\{(i,j,k):0\le i\le L-1,1\le j\le m_1,1\le k\le n\}\cup \{(L,k):1\le l\le n\}\cup \{*\}\), where i denote the number of items in the inventory, j, the phase of inventory processing, k, the arrival phase of customer, *, the absorbing state indicating the arrival of a customer. The infinitesimal generator of the process is given by

$$ \mathcal V_4= \left[ {\begin{array}{*{20}c} {0}&{}{0}&{}{0}&{}{0}&{}{0}&{}{0}\\ {e(m_1)\otimes \delta } &{} {T\oplus D_0}&{} T^0\alpha \otimes I_n &{}{0}&{}{0}&{}{0} \\ {e(m_1)\otimes \delta } &{}{0} &{}{T\oplus D_0} &{}{T^0\alpha \otimes I_n} &{}{0}&{}{0} \\ \vdots &{}\vdots &{} \ddots &{} \ddots &{} \ddots &{} \vdots \\ {e(m_1)\otimes \delta } &{}{0} &{}{0}&{}{T\oplus D_0} &{}{T^0\alpha \otimes I_n} &{}{0} \\ {e(m_1)\otimes \delta } &{}{0} &{}{0} &{}{0}&{} {T\oplus D_0} &{}{T^0\otimes I_n} \\ {\delta } &{}{0}&{}{0}&{}{0}&{}{0}&{}{D_0} \end{array}} \right] . $$

The initial probability is given by

$$\begin{aligned} \psi _4=\frac{1}{d_1}(x_{0,0,0,1,1},\ldots ,x_{0,0,0,1,n},\ldots , x_{0,0,0,m_1,1},\ldots x_{0,0,0,m_1,n},\pmb {0}) \end{aligned}$$

where \(\pmb {0}\) is a zero matrix of order \(1\times ( (L-1)m_1+1)n\).

Let Y denote the number of items processed before the first arrival and \(y_k\) be the probability that k items are processed before an arrival. Then \(y_k\) is the probability that the absorption occurs from the level k for the process. Hence \(y_k\) are given by

$$ y_0=-\psi _4 (T\oplus D_0)^{-1}(e(m_1)\otimes \delta )$$

For \(k=1,2,3,\ldots L-1\)

$$ y_k=(-1)^{k+1}\psi _4\left( (T\oplus D_0)^{-1}(T^0\alpha \otimes I_n)\right) ^{k}(T\oplus D_0)^{-1}(e(m_1)\otimes \delta ) $$

and

$$ y_L=(-1)^{L+1}\psi _4\left( (T\oplus D_0)^{-1}(T^0\alpha \otimes I_n)\right) ^{L-1}(T\oplus D_0)^{-1}(T^0\otimes I_n)D_0^{-1} \delta $$

Thus we have the following lemma.

Lemma 4

The distribution of number of inventory processed before the arrival of first customer is given by \(P(Y=k)=y_k.\)

Definition 1

Starting up with the epoch of departure of a customer leaving behind no customer in the system until the next epoch at which no customer is left at a service completion epoch is called a busy cycle.

3.5 Distribution of Busy Cycle

First we assume that \(L>N\).

The distribution of duration of busy cycle in which no item is left in the inventory can be studied by a continuous time Markov chain with state space \(\{(h,i,0,k,l):0\le h\le N-1, 0\le i\le L-1,1\le k\le m_1,1\le l\le n\}\cup \{(h,L,0,l):0\le h\le N-1,1\le l\le n\}\cup \{(h,i,1,k,l): 1\le h\le M, i=0,1\le k\le m_2,1\le l\le n\}\cup \{(h,i,1,k,l): 1\le h\le N-1,1\le i\le L-N+h, 1\le k\le m_3,1\le l\le n\}\cup \{(h,i,1,k,l): N\le h\le M,1\le i\le L, 1\le k\le m_3,1\le l\le n\}\cup \{*\}\), where (hi, 0, kl) denote the states that correspond to the server being in vacation with h customers in the system,i, items in the inventory, k, processing phase and l,the arrival phase, (hL, 0, l) denote the states that correspond to the server being in vacation with h customers in the system, L, items in the inventory and l,the arrival phase, (hi, 1, kl) denote the states that correspond to the server being in normal mode with h customers in the system,i, items in the inventory, k, service phase and l,the arrival phase, \(*\) denote the absorbing state indicating that the number of customers become zero by a service completion and M is chosen in such a way that \(P\left( \sum _{h=0}^M x_h\pmb {e}>1-\epsilon \right) \rightarrow 0\) for every \(\epsilon >0\). Then the distribution of a busy cycle can be studied by a phase type distribution \(PH(\phi , B)\), whose infinitesimal generator is given by

$$ \mathcal B= \left[ {\begin{array}{*{3}c} {B} &{} {B^0} \\ {\pmb {0}}&{}{0} \end{array}} \right] \, \text {where},\, B= \left[ {\begin{array}{*{3}c} {B_{11}} &{} {B_{12}} \\ {0}&{}{B_{22}} \end{array}} \right] $$

Now,

$$ B_{11}=\left[ {\begin{array}{*{10}c} {F} &{} {I_{Lm_1+1}\otimes D_1} &{}{}\\ \ &{}\ddots &{}\ddots &{}{}\\ &{} &{} {F} &{} {I_{Lm_1+1}\otimes D_1}&{}{}\\ {} &{} &{}&{}{F} &{}{} \end{array}} \right] \,, \,\text {with}\, F= \left[ {\begin{array}{*{4}c} {T\oplus D_0} &{} {T^0\alpha \otimes I_n} &{}{}&{}{}\\ \ddots &{}\ddots \\ &{} {T\oplus D_0} &{} {T^0\alpha \otimes I_n}&{}{}\\ &{} {} &{}{T\oplus D_0}&{}{T^0\otimes I_n}\\ &{} {} &{} {} &{}{ D_0} \end{array}} \right] $$
$$\begin{aligned} B_{12}=e_N(N)e_N'(M)\otimes {B'}_{12}, \end{aligned}$$

where,

$$ {B'}_{12}= \left[ {\begin{array}{*{7}c} {e(m_1)\otimes (\beta \otimes D_1)} &{} {}\\ &{}{I_{L-1}\otimes (e(m_1)\otimes (\gamma \otimes D_1)} &{}{}\\ &{} &{} \ddots \\ &{} {} &{} &{} {\gamma \otimes D_1} \end{array}} \right] $$
$$ B_{22}= \left[ {\begin{array}{*{8}c} {E_1} &{} {F_1 }&{}{}\\ {G_1}&{} {E_2}&{}{F_2}\\ {} &{} \ddots &{}\ddots &{}\ddots \\ &{} &{} {G_{N-2}} &{} {E_{N-1}} &{} {F_{N-1}}\\ &{} &{} &{} {G_{N-1}} &{}{E_N}&{}{I\otimes D_1}\\ &{} &{} &{} \ddots &{}\ddots &{}\ddots \\ {}&{} &{} &{} &{} {G_{M-2}}&{} {E_{M-1}}&{}{I\otimes D_1}\\ {}&{} &{}&{} &{}&{} {G_{M-1}}&{} {E'_M}\\ \end{array}} \right] $$

For \(1\le h\le N-1\),

$$ G_h=\left[ {\begin{array}{*{5}c} {S^0\beta \otimes I_n} &{} {0}\\ {U^0\beta \otimes I_n}&{}{0}\\ {0}&{}{I_{L-N+h}\otimes (U^0\gamma \otimes I_n)}&{}{}\\ \end{array}} \right] , E_h= \left[ {\begin{array}{*{5}c} {S\oplus D_0} &{} {}\\ {}&{}{I_{L-N+h}\otimes (U\oplus D_0)}\\ \end{array}} \right] $$

and

$$ F_h= \left[ {\begin{array}{*{5}c} { {I_{m_2+(L-N+h)m_3}\otimes D_1}} &{} {0}\\ \end{array}} \right] . $$
$$\text {For}\, N\le h\le M-1,\, E_h= \left[ {\begin{array}{*{5}c} {S\oplus D_0} &{} {}\\ {}&{}{I_{L}\otimes (U\oplus D_0)}\\ \end{array}} \right] $$
$$\text {For}\, h\ge N,\, G_h=\left[ {\begin{array}{*{5}c} {S^0\beta \otimes I_n} &{} {0}&{}{0}\\ {U^0\beta \otimes I_n}&{}{0}&{}{0}\\ {0}&{}{I_{L-1}\otimes (U^0\gamma \otimes I_n)}&{}{0}\\ \end{array}} \right] $$
$${E'}_M= \left[ {\begin{array}{*{5}c} {E_{M0}} &{} {}\\ {}&{}{I_L\otimes (E_{M1})}\\ \end{array}} \right] ,\,\text {where}$$

\(E_{M0}=S\oplus D_0-I_{m_2}\otimes \varDelta \) and \(E_{M1}=U\oplus D_0-I_{m_3}\otimes \varDelta \), with \(\varDelta = \left[ {\begin{array}{*{5}c} {\delta _1} \\ &{} \ddots \\ {}&{} &{}{\delta _n} \end{array}} \right] .\)

and

$$ B^0= \left[ {\begin{array}{*{1}c} \pmb {0}\\ B^{00}\\ \end{array}} \right] ,\, \,\text {with},\, B^{00}=\left[ {\begin{array}{*{1}c} {B_{000}}\\ \pmb {0}\\ \vdots \\ \pmb {0} \end{array}} \right] ,\, \text {where},\, B^{000}=\left[ {\begin{array}{*{1}c} {S^0\otimes e(n)} \\ {e(L-N+1)\otimes (U^0\otimes e(n))} \end{array}} \right] $$

The initial probability vector is

$$\begin{aligned} \phi =(\phi ',\pmb {0}) \end{aligned}$$

where, \(\phi '=\frac{1}{d_3}(w_{0,0,0,1,1},\cdots ,w_{0,0,0,m_1,n},\cdots , w_{0,L-1,0,1,1},\cdots , w_{0,L-1,0,m_1,n},\mathbf {0})\), where \(d_3=\sum _{i=0}^{L-1}\sum _{k'=1}^{m_1}\sum _{l=1}^n w_{0,i,0,k',l}\).

For \(1\le k'\le m_1,\,1\le l\le n\),

$$\begin{aligned} w_{0,0,0,k',l}=\sum _{k=1}^{m_2}\frac{\sigma _k \alpha _{k'}}{\delta _l+\sum _{l\ne l'}d_{ll'}^0+\sigma _k +\sum _{k\ne k''}S_{kk''}}x_{1,0,1,k,l}+\qquad \qquad \nonumber \\ \sum _{k=1}^{m_3}\frac{\tau _k \alpha _{k'}}{\delta _l+\sum _{l\ne l'}d_{ll'}^0+\tau _k +\sum _{k\ne k''}U_{kk''}}x_{1,1,1,k,l},\end{aligned}$$
(7)

For \(1\le i\le L-1,\, 1\le k'\le m_1,\,1\le l\le n\),

$$ w_{0,i,0,k',l}=\sum _{k=1}^{m_3}\frac{\tau _k \alpha _{k'}}{\delta _l+\sum _{l\ne l'}d_{ll'}^0+\tau _k +\sum _{k\ne k''}U_{kk''}}x_{1,i+1,1,k,l}, $$

where \(\sigma _k, \tau _k \) represent the absorption rates from service phase k in \(PH(\beta ,S)\) and \(PH(\gamma ,U)\) respectively, \(S_{kk''},\,U_{kk''}\) represent the \(kk''\)th entry of S and U respectively, \(\alpha _{k'}\) represents the probability that the processing of item starts in phase \(k'\), \(d_{ll'}^0\) represent the transition rates from the phase l to the phase \(l'\) without arrival and \(\delta _l\) represent the lth row sum of \(D_1\) matrix.

From the above discussions we have the following.

Theorem 2

The LST of the distribution of a busy cycle in which no item is left in the inventory is given by

$$\begin{aligned} \hat{B_{C_1}}(s) =\phi (sI-B)^{-1}I'(B^0)' \end{aligned}$$

where, \(I'\) denote the columns of identity matrix corresponding to the 1 customer level with number of items in the inventory 0 and 1 and

$$ (B^{0})'=\left[ {\begin{array}{*{1}c} {S^0\otimes e(n)} \\ {U^0\otimes e(n)} \end{array}} \right] $$

Theorem 3

The LST of the distribution of a busy cycle in which atleast one item is left in the inventory is given by

$$\begin{aligned} \hat{B_{C_2}}(s) =\phi (sI-B)^{-1}I''(B^0)'' \end{aligned}$$

where, \(I''\) denote the columns of identity matrix corresponding to 1 customer level with number of items in the inventory \(>1\) and

$$ (B^{0})''= {e(L-N)\otimes (U^0\otimes e(n))} $$

Theorem 4

For stationary MAP, the expected number of busy cycles in which at least one inventory left in an interval of length t is given by

$$ \left( t/(\phi (-B)^{-1}\pmb {e})\right) \left( \hat{B_{C_2}}'(0)/\left( \hat{B_{C_1}}'(0)+ \hat{B_{C_2}}'(0)\right) \right) $$

4 Numerical Results

We fix \( \alpha = \left[ {\begin{array}{*{2}c} {1}&{0} \end{array}} \right] ,\, \beta = \left[ {\begin{array}{*{2}c} {1}&{0} \end{array}} \right] \) and \(\gamma = \left[ {\begin{array}{*{2}c} {0.8}&{0.2} \end{array}} \right] \), \(T= \left[ {\begin{array}{*{2}c} {-3} &{} {3} \\ {0 } &{} {-3 } \end{array}} \right] \), \(S= \left[ {\begin{array}{*{2}c} {-4} &{} {4} \\ {0 } &{} {-4 } \end{array}} \right] \),

\( U= \left[ {\begin{array}{*{2}c} {-2} &{} {2} \\ {0 } &{} {-2 } \end{array}} \right] \) and \(D0=-1,\, D1=1\)

For these input parameters we get the system characteristics as given in Table 1. The behaviour of the performance characteristics is on expected lines. Let E denote Expected Idle time, SD, standard deviation of Idle time, CV, Coefficient of Variation of Idle time.

Table 1. Mean/Standard deviation/Coefficient of variation of idle time of the server

5 Conclusion

In this paper, we considered a MAP/PH/1 queue with processing of service items under Vacation and N-policy. We analysed the distribution of time till the number of customers hit N or the inventory level reaches L, distribution of idle time, the distribution of time until the number of customers hit N and also the distribution of number of inventory processed before the arrival of first customer. Also we provided the distribution of a busy cycle, LSTs of busy cycles in which no item is left in the inventory and atleast one item is left in the inventory. We performed some numerical experiments to evaluate the expected idle time, standard deviation and coefficient of varaiation of idle time of the server. We propose to extend the model to the case in which the customers are impatient. Also we will find individual optimal strategy, server’s maximum revenue and social optimal strategy by numerical experiments in a future study.