Skip to Content
MathematicsMathematics
  • Article
  • Open Access

5 March 2026

28 Pages

Optimization Analysis of a Multi-Server Queueing System with Two-Phase Heterogeneous Services and Synchronous Working Vacation Interruptions

,
and
1
School of Computer Engineering, Chengdu Technological University, Chengdu 611730, China
2
School of Mathematics and Computer Science, Wuyi University, Wuyishan 354300, China
3
School of Information and Communication Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
*
Author to whom correspondence should be addressed.

Abstract

Despite extensive research on queueing models in flexible manufacturing systems (FMS), few studies have simultaneously considered the heterogeneity of servers and the impact of synchronous working vacations on system performance. To fill this research gap, this study proposes a novel multi-server queueing model that uniquely integrates two-phase heterogeneous services with synchronous working vacation interruptions. The innovation lies in capturing the complex task processing mechanism where the two-phase service is provided by different servers, and they conduct working vacations synchronously when the system is empty and terminate vacations once the system population reaches a specified threshold. Based on the matrix-analytic approach, this research investigates the stability condition and the stationary distribution of the system. A key numerical finding is the diminishing marginal returns of server numbers, where exceeding an optimal count increases congestion, thereby degrading overall performance. The vacation interruption threshold l is also shown to significantly influence server state allocation. A comparative analysis of three different system configurations, demonstrates that dynamic server number or a vacation interruption threshold adjustment effectively mitigates congestion; and in order to enhance the system clearing capability, when vacations are longer, opting for multiple servers is preferable, whereas a single server is more suitable during shorter vacation periods. For cost optimization, three algorithms (CPSO, JAYA, MLS-JAYA) consistently converge to the same robust optimal solution for server count and vacation rate. Furthermore, to simultaneously minimize waiting time, we apply the MOEA/D algorithm to study the bi-objective optimization problem.

1. Introduction

Dynamic resource allocation and multi-stage processing constitute prominent challenges in contemporary service systems. To address practical application requirements, this study introduces a novel multi-server queueing model characterized by two-phase service and synchronous working vacation interruptions. In this framework, service provision for each customer is divided into two essential phases, each executed by distinct servers, wherein the server in phase one is also capable of delivering auxiliary services. When the system becomes empty, all servers simultaneously initiate working vacations, which are synchronously terminated once the customer population reaches a predefined threshold. This modeling approach enables the system to dynamically adjust its overall service capacity in response to real-time workload fluctuations. The incorporation of the working vacation mechanism enables the system to operate in a low-power mode during periods of reduced demand, thereby reducing operational costs. This model exhibits considerable practical relevance in domains such as flexible manufacturing, retail environments with extensive self-service terminals, and cloud computing within large-scale data centers. This study systematically investigates the effects of the server count, vacation interruption threshold, and working vacation rate on key performance metrics. Furthermore, the optimal server quantity and vacation rate that jointly minimize system average operating cost and the mean waiting time for customers (or orders) are derived.
In real life, two-stage services have extremely broad applications across various fields, including telecommunications systems, hospitals, and manufacturing. To meet diverse service requirements, a comprehensive workflow typically involves multiple stages. This design decomposes tasks to establish standardized production or operational models, thereby enhancing system efficiency. In the early study, to investigate control issues in distributed systems, Krishna and Lee [1] studied a single-server queueing system with two-phase service: the first phase being batch service and the second phase being individual service. Doshi [2] generalized the result in Krishna and Lee [1] into generally distributed service times. Choudhury and Deka [3] studied a single server M/G/1 queue with two phases of heterogeneous service and unreliable server, and obtained the stability queue length distribution at arbitrary and departure epoch. Then, Choudhury and Deka [4] extended the work of Choudhury and Deka [3] into multiple vacation policy. Singh et al. [5] considered a single-server queue with generally distributed repair and optional second phase service. In their model, the server has to perform m-different phases of repair. Recently, Yang and Chen [6] proposed a single-server queueing model with second optional service and working breakdowns. They constructed a four-dimensional cost function, and with the help of genetic algorithm (GA), the optimal service rate can be solved. In the multi-server queueing model of Ahuja et al. [7], the second phase of service is optional and the population of customers in the system is limited. The matrix-geometric approach was applied for the performance analysis. Boualem et al. [8] proposed a retrial queue that incorporates a two-phase service process and the general service time distribution and discussed the stochastic controllability of some performance measures. In Jain and Kaur [9], an unreliable retrial bulk queue with multi-phase optional service was analyzed, where balking, Bernoulli vacations, and Bernoulli feedback were explicitly taken into account. The maximum entropy principle (MEP) was utilized to obtain the approximate solutions of the stationary probabilities. Begum and Choudhury [10] proposed an unreliable single-server queue with two-heterogeneous optional repeated service (THORS) under Bernoulli vacation and N-policy, where the service times of two phases are generally distributed. They derived the probability generating function of the queue size for service completion epoch. Wu and Yang [11] proposed a novel multi-server queueing system with two-phase service: in phase-1, service is provided by a single server, while in phase-2, service is provided jointly by c servers. With the help of the canonical particle swarm optimization (CPSO) algorithm and the epsilon-constraint (EC) algorithm, they obtained the optimal solution of the proposed single-objective and bi-objective optimization problems. Inspired by Wu and Yang [11], our paper extends its findings to the working vacation model and incorporates an interruption threshold. In the work of Kumar and Jain [12], based on the matrix-analytic approach, a steady-state analysis was conducted for a queueing model featuring a hybrid vacation policy and two-phase service, with corresponding equilibrium state probabilities provided. Xu et al. [13] focused on a retrial queue subject to collisions and delayed vacations, where the service process is comprised of two distinct and heterogeneous phases.
Furthermore, researchers have maintained a consistent interest in vacation queueing models due to their widespread application in business management and industrial settings. When the system is idle, maintaining a high-cost, high-throughput service state at the server would result in significant resource wastage. Therefore, considering operational costs, managers typically choose to temporarily close the server during such periods—a state referred to in queueing theory terminology as vacation. With the development of queueing theory, rather than completely stopping work, Servi and Finn [14] first proposed working vacation model in queueing theory. This model allows a server to sustain a lower service rate while on vacations. Vacations can be seen as working vacations with zero service rate. Wu and Takagi [15] constructed the embedded Markov chain of a queueing model characterized by general distributed service time and multiple working vacation policy. For the same system, stochastic decomposition results was established by Liu et al. [16]. Li and Tian [17] introduced vacation interruptions and derived the random decomposition results for system content and customer waiting time. In their model, once queueing occurs, the server in vacation state immediately resumes the normal service rate. The study was further extended to the case of a single working vacation policy by Majid and Manoharan [18]. For broader overviews of working vacation queue models, see Chandrasekaran et al. [19] and Fiems [20].
Multi-server queueing systems are widely used in hospitals, manufacturing, supermarket checkout counters, and cloud computing scenarios. These service requests are quite random, and due to the high volume of service demands, multiple servers must be implemented to ensure the system operates efficiently. Simultaneously, the optimized design of multi-server systems is essential for improving service efficiency and lowering waiting costs, leading to an increasing industry focus on researching multi-server systems. However, most of the aforementioned studies are based on single-server models. In contrast, research on multi-server systems is severely limited by the complexity of the required theory. Ahuja et al. [7] introduced a retrial mechanism into a multi-server queue with finite system capacity and an optional service, and assumed that customers can balk if all servers are busy. Wu and Yang [11] considered heterogeneous services offered by different servers and then investigated the optimization problems. Recently, Ganie and Manoharan [21] considered two vacation policies: single and multiple working vacation policies, in a multi-server queue with synchronous working vacation and customer impatience. Ke et al. [22] proposed a multi-server retrial queueing model with vacations, and they also analyzed single and multiple vacation policies. In their study, the matrix-geometric method was used to derive the performance measures. A queue combining working vacations with customer impatience was examined by Vijaya Laxmi and Kassahun [23], where the steady-state probabilities were obtained using probability generating function technique. Liu et al. [24] considered that in call centers, servers handle both incoming and outgoing calls, so they examined a retrial queue featuring working vacations, multiple servers and two-way communication. Their study obtained the optimal rate for outgoing calls and vacations using a multi-objective genetic algorithm. Ke et al. [25] focused on a retrial queue featuring synchronous working vacation interruption, in which servers resume service when the customer count attains a given value. Liu et al. [26] extended the work of Liu et al. [24] with disasters. Ke et al. [27] studied a multi-server retrial queue with (m,d) vacation policy and non-preemptive customers. Aishwarya et al. [28] assumed the arrival process is a batch Markovian process and the service times is phase-type in a multi-server retrial queueing system. In their model, customers retry for service only when the number of servers reaches a specific thresholds, which depends on the state of arrival process.
In summary, whether examining two-phase service or working vacation models, most studies have consistently focused on single-server queueing systems. Research considering multi-server queues remains extremely limited. From the perspective of a model’s practical application value, multi-server queues are better aligned with real-world scenarios and more closely match actual production requirements. Based on this, we propose a multi-server queue with heterogeneous two-phase services and synchronous working vacation interruptions. We summarize the main contributions of this work as follows:
(1)
Based on the above literature review, to the best of our knowledge, research on multi-server queueing systems involving either two-phase service or working vacation interruption remains scarce, with most studies either ignoring one of these two characteristics or focusing on single-server models. This research proposes a novel multi-server queueing system with two-phase heterogeneous service and working vacation interruption. The two-phase service is provided by distinct servers, with the Phase-1 server capable of offering auxiliary services for the second phase. Working vacation is interrupted when the queue size reaches a preset threshold.
(2)
The heterogeneous service with multiple servers represents a typical flexible strategy for systems to handle order fluctuations. It not only avoids excessive investment in purchasing servers to a certain extent but also enables dynamic allocation of service resources through auxiliary service mechanisms. The model proposed in this paper has broad applications across multiple fields, particularly in flexible manufacturing.
(3)
Through numerical experiments, this paper analyzes the impact of system parameters on performance metrics and investigates the distinct behaviors of three different models. We find that increasing a working vacation interruption threshold or the number of servers both effectively reduce system congestion, and the system capability of clearing can be enhanced by adjusting the vacation duration and the number of servers. Furthermore, a phenomenon of diminishing marginal returns regarding the number of servers is observed, indicating that excessive resource allocation can actually degrade overall system performance.
(4)
To address system optimization issues, we employed the CPSO algorithm, JAYA algorithm, and the latest MLS-JAYA algorithm to solve the single-objective problem, thereby determining the optimal number of servers and the optimal working vacation rate. Additionally, to achieve a balance between the system’s average total cost and customer waiting time, we utilized the MOEA/D algorithm to obtain a set of Pareto optimal solutions.
The proposed model has extensive applications, including in flexible manufacturing systems (FMS) and cloud computing, etc. On a flexible production line for automotive components, the workflow consists of two stages. Stage 1 is performed by a high-speed loading robot, which picks up parts to be inspected from the conveyor belt, delivers them to the inspection station, and rapidly completes visual alignment and parameter configuration. In stage 2, several high-precision 3D scanners operate in parallel to perform full-dimensional measurements and defect identification of the parts. When all scanners are busy and there are no new parts to handle, the loading robot temporarily switches to an auxiliary mode using its integrated simple camera to conduct a preliminary visual inspection of the parts. Although inspection accuracy is lower than that of 3D scanners, it can quickly screen out obvious defective products, thereby alleviating pressure on subsequent inspections.
We organize this paper as follows. Section 2 introduces the model’s mathematical formalization and its foundational assumptions. Subsequently, Section 3 focuses on obtaining the stationary probabilities and establishing the stability criterion through the matrix-analytic approach. In Section 4, we explore two simplified variants of the model, providing the explicit steady-state distributions. Section 5 conducts a detailed examination of system performance metrics, supplemented by numerical sensitivity experiments. Section 6 deals with both single- and bi-objective optimization problems. Section 7 presents the final conclusions.

2. Model Description

Our system comprises c + 1 servers, and each customer’s service is divided into two phases. Server-1 provides the first phase of service, while the remaining c servers handle the second phase. Every customer must sequentially receive both Phase-1 and Phase-2 services before leaving the system. Customer arrivals follow a Poisson process with parameter λ . Service times for the first and second phases follow exponential distributions with parameters μ 1 and μ 2 , respectively. Upon arrival, a new customer immediately receives service if Server-1 is idle; otherwise, the customer waits in the queue.
(a)
auxiliary service: When a customer completes the Phase-1 service at Server-1 and finds all c servers in the second phase are busy, the customer will continue receiving auxiliary service provided by server-1, meaning the customer will receive Phase-2 service at Server-1. The service time for auxiliary services follows an exponential distribution with parameter μ 3 ( ≤ μ 2 ) . During auxiliary service, if new customers arrive at the first phase, Server-1 will continue the current auxiliary service without immediately switching back to regular Phase-1 service. Newly arrived customers will wait in the queue.
(b)
working vacation and vacation interruption: Upon completion of the Phase-2 service, if the system is empty, all servers enter a working vacation period. During this period, servers do not cease operations entirely but operate at a reduced rate. We assume that during the working vacation period, the service times for Phase-1, Phase-2, and auxiliary services follow exponential distributions with parameters η 1 , η 2 , and η 3 ( ≤ η 2 ) , where η i < μ i , i = 1 , 2 , 3 , respectively, while the working vacation duration follows an exponential distribution with parameter θ . When the Phase-2 service is completed (or the auxiliary service for Server-1 is completed) or the working vacation ends, if the number of customers in the queue (including those in Server-1) reaches the threshold level l, all servers simultaneously interrupt their working vacation and switch to normal working status.
We introduce C ( t ) to describe the vacation state of servers in the system at time t, where C ( t ) = 0 indicates that all the servers are on working vacations, and C ( t ) = 1 indicates that no servers are on working vacations. Let S 1 ( t ) represent the number of customers in phase-1 service, including both those waiting in the queue and the customer receiving auxiliary service from server-1, while S 2 ( t ) denotes the number of customers in phase-2 service, excluding the one handled by server-1. With these definitions, the process X ( t ) = { ( S 1 ( t ) , S 2 ( t ) , C ( t ) ) } evolves as a Markov process on the state space Ω = { ( n , m , i ) , n ≥ 0 , m = 0 , 1 , 2 , ⋯ , c , i = 0 , 1 } .
According to the transition diagram, i.e., Figure 1, the infinitesimal generator Q possesses a block tri-diagonal structure, and its detailed formulation is given below.
Q = 0 1 ⋮ l − 1 l l + 1 ⋮ D 0 U             L 0 D 1 U             ⋱ ⋱ ⋱             L 0 D 1 U             L D U             L D U             ⋱ ⋱ ⋱ ,
where D 0 , D 1 , L 0 , L , D and U are all square matrices with order 2 ( c + 1 ) and
L = 0 η 1                   0 η 1                   ⋱ ⋱                   0 η 1                   0         η 3           0 μ 1                   0 μ 1                   ⋱ ⋱                   0 μ 1                   μ 3 ,
L 0 = 0 η 1                   0 η 1                   ⋱ ⋱                   0 η 1                   η 3                     0 μ 1                   0 μ 1                   ⋱ ⋱                   0 μ 1                   μ 3 ,
D = − α 2 , 0         θ           − α 2 , 1       η 2 θ           ⋱       ⋱ ⋱           − α 2 , c − 1       ( c − 1 ) η 2 θ           − α 2 , c       c η 2 θ           − β 1 , 0                   μ 2 − β 1 , 1                   ⋱ ⋱                   ( c − 1 ) μ 2 − β 1 , c − 1                   c μ 2 − β 1 , c ,
D 0 = − α 0 , 0                   η 2 − α 0 , 1                   2 η 2 − α 0 , 2                   ⋱ ⋱                   c η 2 − α 0 , c                   0 − β 0 , 0         μ 2         0 − β 0 , 1                   2 μ 2 − β 0 , 2                   ⋱ ⋱                   c μ 2 − β 0 , c ,
D 1 = − α 1 , 0                   η 2 − α 1 , 1                   ⋱ ⋱                   ( c − 1 ) η 2 − α 1 , c − 1                   c η 2 − α 1 , c                   0 − β 1 , 0                   μ 2 − β 1 , 1                   ⋱ ⋱                   ( c − 1 ) μ 2 − β 1 , c − 1                   c μ 2 − β 1 , c ,
α 0 , j = λ + j η 2 , 0 ≤ j ≤ c β 0 , j = λ + j μ 2 , 0 ≤ j ≤ c ,
α 1 , j = λ + η 1 + j η 2 , 0 ≤ j ≤ c − 1 , λ + η 3 + j η 2 , j = c , β 1 , j = λ + μ 1 + j μ 2 , 0 ≤ j ≤ c − 1 , λ + μ 3 + j μ 2 , j = c ,
α 2 , j = λ + η 1 + θ + j η 2 , 0 ≤ j ≤ c − 1 , λ + η 3 + θ + j η 2 , j = c ,
and U = λ I 2 ( c + 1 ) .
Figure 1. System transition diagram.

3. Analysis of System Equilibrium Distribution

This section outlines the approach for obtaining the system’s steady-state distribution, which requires establishing the stability condition prior to any equilibrium analysis.
Theorem 1.
The model is stable if and only if
( λ − μ 1 ) ∑ i = 0 c c ! i ! ( μ 2 μ 1 ) c − i < μ 3 − μ 1 .
Proof of Theorem 1.
Consider the vector x = [ x 0 , 0 , x 0 , 1 , ⋯ , x 0 , c , x 1 , 1 , ⋯ , x 1 , c ] , defined as the unique solution to x ( U + L + D ) = 0 . This solution is normalized such that x e = 1 , with  e and 0 denoting the all-ones and all-zeros column vectors of appropriate size. According to Neuts [29] (see Page 82, Theorem 3.1.1), stability holds if x U e < x L e holds. To simplify the calculation, we consider the structure of matrix U , L , D , it follows
x ∗ 0 μ 1     0 μ 1   ⋱ ⋱     0 μ 1   μ 3 e < x ∗ λ     λ   ⋱     λ e ,
where x ∗ is the solution of the following equations:
x ∗ − μ 1 μ 1     μ 2 − ( μ 1 + μ 2 ) μ 1   ⋱ ⋱ ⋱   ( c − 1 ) μ 2 − ( μ 1 + ( c − 1 ) μ 2 ) μ 1   c μ 2 − c μ 2 = 0 ,
and the normalization equation is simplified as x ∗ e = 1 . Denote x ∗ = [ x 0 ∗ , x 1 ∗ , ⋯ , x c ∗ ] and substitute x ∗ into Equation (3), we obtain the following equations:
− μ 1 x 0 ∗ + μ 2 x 1 ∗ = 0 ,
μ 1 x i − 1 ∗ − ( μ 1 + i μ 2 ) x i ∗ + ( i + 1 ) μ 2 x i + 1 ∗ = 0 , 1 ≤ i ≤ c − 1 ,
μ 1 x c − 1 ∗ − c μ 2 x c ∗ = 0 ,
∑ i = 0 c x i ∗ = 1 .
From Equation (4), we have x 0 ∗ = μ 2 μ 1 x 1 ∗ . Substitute x 0 ∗ into Equation (5) and calculate recursively, we have x i ∗ = μ 1 i i ! μ 2 i x 0 ∗ , 1 ≤ i ≤ c − 1 . Finally, according to Equations (6) and (7), x c ∗ can be obtained. Substitute x ∗ into Equation (2), we have
( λ − μ 1 ) ∑ i = 0 c c ! i ! ( μ 2 μ 1 ) c − i < μ 3 − μ 1 ,
which completes our proof.    □
The equilibrium probability in ( n , m , i ) state, denoted by P k , m , i , is defined as:
P k , m , i = lim t → ∞ P r [ S 1 ( t ) = k , S 2 ( t ) = m , C ( t ) = i ] , k ≥ 0 , m = 0 , 1 , ⋯ , c , i = 0 , 1 .
Define P = [ P 0 , P 1 , P 2 , ⋯ ] , where
P k = [ P k , 0 , 0 , P k , 1 , 0 , ⋯ , P k , c , 0 , P k , 0 , 1 , P k , 1 , 1 , ⋯ , P k , c , 1 ] , k ≥ 0 .
If the stability condition is satisfied, according to the theory of matrix-analytic approach introduced by Neuts [29], the following equation holds:
P k = P l − 1 R k + 1 − l , k ≥ l .
The crucial component here is the rate matrix R , which satisfies the following equation:
R 2 L + R D + U = 0 .
According to the existing literature, multiple approaches can be employed to calculate the matrix R . To compute R in Equation (9), we construct an iterative sequence of matrices { R ( k ) , k ≥ 0 } . Set initial value R ( 0 ) = 0 , then the sequence is generated recursively by R ( k ) = − U D − 1 − R 2 ( k − 1 ) L D − 1 for k ≥ 1 . Thus, lim k → ∞ R ( k ) can be regarded as the approximation of rate matrix R .
For P k ( 0 ≤ k ≤ l − 1 ) , we have
[ P 0 , P 1 , P 2 , ⋯ , P l − 1 ] Q ˜ = 0 ,
where
Q ˜ = 0 1 ⋮ l − 2 l − 1 D 0 U       L 0 D 1 U       ⋱ ⋱ ⋱       L 0 D 1 U       L 0 R L 0 + D 1 .
From Equation (10), the following set of equations can be obtain
P 0 D 0 + P 1 L 0 = 0 ,
P k − 1 U + P k D 1 + P k + 1 L 0 = 0 , 1 ≤ k ≤ l − 2 ,
P l − 2 U + P l − 1 ( R L 0 + D 1 ) = 0 .
Solving Equations (11) and (12) recursively, it is easy to get that
P 0 = − P 1 L 0 D 0 − 1 = P 1 A 0 ,
P k = P k + 1 ( − D 1 − A k − 1 U ) − 1 = P k + 1 A k , 1 ≤ k ≤ l − 2 ,
where
A k = − L 0 D 0 − 1 , k = 0 , − ( D 1 + A k − 1 U ) − 1 , 1 ≤ k ≤ l − 2 .
From Equation (13), we have
P l − 1 ( A l − 2 U + R L 0 + D 1 ) = 0 .
Combing with the normalization condition
P l − 1 ( ∑ n = 1 l − 2 Π i = 1 n A i e + ( I − R ) − 1 e ) = 1 ,
we can finally obtain P l − 1 , therefore, the vector P can be solved.

4. Special Cases

4.1. A Special Case Without Working Vacations ( c = 1 )

When c = 1 and there are no working vacations, our system turns into the special case analyzed by Wu and Yang [11]. This reduction permits the explicit derivation of R . Following the result in Wu and Yang [11], the probability P 0 , 0 is as follows:
P 0 , 0 = μ 2 [ μ 1 ( μ 2 + μ 3 ) − λ ( μ 2 + μ 1 ) ] λ μ 1 μ 3 + λ μ 2 μ 3 + μ 1 μ 2 ( μ 2 + μ 3 ) .
Due to the formula in their work that P 0 ( B 0 + R A ) = 0 , we can obtain that
P 0 , 1 = λ μ 2 P 0 , 0 = λ [ μ 1 ( μ 2 + μ 3 ) − λ ( μ 2 + μ 1 ) ] λ μ 1 μ 3 + λ μ 2 μ 3 + μ 1 μ 2 ( μ 2 + μ 3 ) ,
and P 0 = [ P 0 , 0 , P 0 , 1 ] can be derived. Thus, substitute P 0 into P k = P 0 R k , k ≥ 1 , other probabilities can also be obtained. Here, we give the closed-form expression of R k that Wu and Yang [11] did not offer:
R k = 1 δ k ( β 1 k − β 2 k β 1 − β 2 A + β 1 β 2 k − β 2 β 1 k β 1 − β 2 I ) = 1 δ k ( β 1 k − β 2 k ) ( μ 2 + μ 3 ) + β 1 β 2 k − β 2 β 1 k β 1 − β 2 ( β 1 k − β 2 k ) λ β 1 − β 2 ( β 1 k − β 2 k ) μ 2 β 1 − β 2 ( β 1 k − β 2 k ) ( λ + μ 1 ) + β 1 β 2 k − β 2 β 1 k β 1 − β 2 ,
where
A = μ 3 + μ 2 λ μ 2 λ + μ 1 , β 1 , 2 = λ + μ 1 + μ 2 + μ 3 ± b 2 , b = ( λ + μ 1 + μ 2 + μ 3 ) 2 − 4 λ δ , δ = λ μ 3 + μ 1 ( μ 2 + μ 3 ) λ .
Therefore, the following theorem holds.
Theorem 2.
For an M / M / ( 1 + 1 ) queue with two-phase heterogeneous service, if the stability requirement μ 1 ( μ 2 + μ 3 ) > λ ( μ 1 + μ 2 ) holds, the stationary probabilities are given by:
P n , 0 = 1 δ n + 1 P 0 , 0 ( β 1 n − β 2 n ) ( λ + μ 2 + μ 3 ) + β 1 β 2 n − β 2 β 1 n β 1 − β 2 , n ≥ 1 ,
P n , 1 = 1 δ n + 1 P 0 , 0 λ ( ( β 1 n − β 2 n ) ( λ + μ 2 + μ 3 ) + β 1 β 2 n − β 2 β 1 n ) μ 2 ( β 1 − β 2 ) , n ≥ 1 ,
where P 0 , 0 and P 0 , 1 have been given in Equations (18) and (19).

4.2. A Special Case with c = 1 , l = 1

Setting c = 1 and l = 1 yields a model with just one server handling phase-2 service, where the vacation period ends as soon as the queue non-empty. The infinitesimal generator associated with this system is expressed as follows.
Q = D 0 U           L 0 D U           L D U           ⋱ ⋱ ⋱           L D U           ⋱ ⋱ ⋱ ,
where the matrix L , D , U , D 0 , L 0 are
D = − ( λ + η 1 + θ )   θ     − ( λ + η 2 + η 3 + θ ) η 2 θ     − ( λ + μ 1 )       μ 2 − ( λ + μ 2 + μ 3 ) , L = 0 η 1       0   η 3     0 μ 1       μ 1 , U = , λ         λ         λ         λ , L 0 = 0 η 1       η 3         0 μ 1       μ 3 D 0 = − ( λ + θ )   θ     − ( λ + η 2 + θ ) η 2 θ     − λ   μ 2     − ( λ + μ 2 ) .
According to Equation (1), the system is stable if μ 1 + μ 2 μ 1 < μ 3 − μ 1 λ − μ 1 . Furthermore, the rate matrix R satisfies R 2 L + RD + U = 0 , and based on the structural characteristics of the matrix L , D , U , we assume R has the following structure:
R = r 1 , 1 r 1 , 2 r 1 , 3 r 1 , 4 0 r 2 , 2 r 2 , 3 r 2 , 4 0 0 r 3 , 3 r 3 , 4 0 0 r 4 , 3 r 4 , 4 .
Substitute R , L , D , U into R 2 L + RD + U = 0 , we have the following equations:
λ − r 1 , 1 ( θ + λ + η 1 ) = 0 ,
r 1 , 1 2 η 1 − r 1 , 2 ( θ + λ + η 2 + η 3 ) = 0
θ r 1 , 1 + r 1 , 2 η 2 − r 1 , 3 ( λ + μ 1 ) + r 1 , 4 μ 2 = 0
θ r 1 , 2 + ( r 1 , 1 r 1 , 2 + r 1 , 2 r 2 , 2 ) η 3 + ( r 1 , 1 r 1 , 3 + r 1 , 2 r 2 , 3 + r 1 , 3 r 3 , 3 + r 1 , 4 r 4 , 3 ) μ 1 − r 1 , 4 ( λ + μ 2 + μ 3 )
+ ( r 1 , 1 r 1 , 4 + r 1 , 2 r 2 , 4 + r 1 , 3 r 3 , 4 + r 1 , 4 r 4 , 4 ) μ 3 = 0
λ − r 2 , 2 ( θ + λ + η 2 + η 3 ) = 0
r 2 , 2 η 2 − r 2 , 3 ( λ + μ 1 ) + r 2 , 4 μ 2 = 0 θ r 2 , 2 + r 2 , 2 2 η 3 + ( r 2 , 2 r 2 , 3 + r 2 , 3 r 3 , 3 + r 2 , 4 r 4 , 3 ) μ 1 − r 2 , 4 ( λ + μ 2 + μ 3 )
+ ( r 2 , 2 r 2 , 4 + r 2 , 3 r 3 , 4 + r 2 , 4 r 4 , 4 ) μ 3 = 0
λ − r 3 , 3 ( λ + μ 1 ) + r 3 , 4 μ 2 = 0
( r 3 , 3 2 + r 3 , 4 r 4 , 3 ) μ 1 − r 3 , 4 ( λ + μ 2 + μ 3 ) + ( r 3 , 3 r 3 , 4 + r 3 , 4 r 4 , 4 ) μ 3 = 0
− r 4 , 3 ( λ + μ 1 ) + r 44 μ 2 = 0
λ + ( r 3 , 3 r 4 , 3 + r 4 , 3 r 4 , 4 ) μ 1 − r 4 , 4 ( λ + μ 2 + μ 3 ) + ( r 3 , 4 r 4 , 3 + r 4 , 4 2 ) μ 3 = 0 .
From Equations (24) and (28), we can easily get
r 1 , 1 = λ λ + θ + η 1 , r 2 , 2 = λ λ + θ + η 2 + η 3
Substitute r 1 , 1 into Equation (25), we have
r 1 , 2 = ( λ + θ + η 1 λ ) 2 η 1 λ + θ + η 2 + η 3 ,
Then, solve the series of Equations (31)–(34), we have
r 3 , 3 = λ ( μ 2 + μ 3 ) μ 1 μ 2 + λ μ 3 + μ 1 μ 3 , r 3 , 4 = λ 2 μ 1 μ 2 + λ μ 3 + μ 1 μ 3 r 4 , 3 = λ μ 2 λ μ 3 + μ 1 ( μ 2 + μ 3 ) , r 4 , 4 = λ ( λ + μ 1 ) λ μ 3 + μ 1 ( μ 2 + μ 3 ) ,
Finally, we substitute the above results into Equations (26), (27), (29) and (30), we get
r 1 , 3 = γ μ 2 + σ μ 3 ( θ + λ + η 1 ) 2 ( θ + λ + η 2 + η 3 ) ( λ μ 3 + μ 1 ( μ 2 + μ 3 ) ) , r 1 , 4 = λ 2 ( η 1 β + ( θ + λ + μ 1 ) ( α + η 1 ( θ + λ ) ) ) ( θ + λ + η 1 ) 2 ( θ + λ + η 2 + η 3 ) ( λ μ 3 + μ 1 ( μ 2 + μ 3 ) ) , r 2 , 3 = λ ( ( θ + λ + η 2 ) μ 2 + η 2 μ 3 ) ( θ + λ + η 2 + η 3 ) ( λ μ 3 + μ 1 ( μ 2 + μ 3 ) ) , r 2 , 4 = λ ( λ η 2 + ( θ + λ ) ( λ + μ 1 ) ) ( θ + λ + η 2 + η 3 ) ( λ μ 3 + μ 1 ( μ 2 + μ 3 ) .
where
α = ( θ + λ ) ( θ + λ + η 2 + η 3 ) , β = ( θ + λ ) η 2 + θ η 3 , γ = ( θ + λ ) α + η 1 ( ( θ + λ ) 2 + β ) , σ = θ α + η 1 ( β + θ ( θ + λ ) ) .
Consequently, R admits a closed-form expression.
We denote R = B C 0 A , then for n ≥ 1 , R k = B k S k 0 A k . It is easy to know that
B k = r 1 , 1 k r 1 , 2 r 1 , 1 k − r 2 , 2 k r 1 , 1 − r 2 , 2 0 r 2 , 2 k ,
and
A k = λ 1 k − λ 2 k λ 1 − λ 2 A + λ 1 λ 2 k − λ 2 λ 1 k λ 1 − λ 2 I = a 1 , 1 ( k ) a 1 , 2 ( k ) a 2 , 1 ( k ) a 2 , 2 ( k ) = λ 1 k − λ 2 k λ 1 − λ 2 r 3 , 3 + λ 1 λ 2 k − λ 2 λ 1 k λ 1 − λ 2 λ 1 k − λ 2 k λ 1 − λ 2 r 3 , 4 λ 1 k − λ 2 k λ 1 − λ 2 r 4 , 3 λ 1 k − λ 2 k λ 1 − λ 2 r 4 , 4 + λ 1 λ 2 k − λ 2 λ 1 k λ 1 − λ 2 ,
where
λ 1 , 2 = λ ( λ + μ 1 + μ 2 + μ 3 ) ± ( μ 1 μ 2 + λ μ 3 + μ 1 μ 3 ) Δ 2 ( λ μ 3 + μ 1 ( μ 2 + μ 3 ) ) , Δ = λ 2 ( μ 1 2 + μ 2 2 + ( λ − μ 3 ) 2 + 2 μ 1 ( λ − μ 2 − μ 3 ) + 2 μ 2 ( λ + μ 3 ) ) ( λ μ 3 + μ 1 ( μ 2 + μ 3 ) ) 2 .
Denote
u 1 ( m ) = r 1 , 1 m r 1 , 3 + r 1 , 2 r 2 , 3 r 1 , 1 m − r 2 , 2 m r 1 , 1 − r 2 , 2 , u 2 ( m ) = r 1 , 1 m r 1 , 4 + r 1 , 2 r 2 , 4 r 1 , 1 m − r 2 , 2 m r 1 , 1 − r 2 , 2 , v 1 ( m ) = r 2 , 2 m r 2 , 3 , v 2 ( m ) = r 2 , 2 m r 2 , 4 .
Hence, the matrix S k can be calculated:
S k = ∑ j = 0 k − 1 B k − 1 − j CA j = s k 1 , 1 s k 1 , 2 s k 1 , 3 s k 1 , 4 ,
where for i = 1 , 2 :
s k 1 , i = ∑ j = 0 k − 1 ( u 1 ( k − 1 − j ) a 1 , i ( j ) + u 2 ( k − 1 − j ) a 2 , i ( j ) ) , s k 2 , i = ∑ j = 0 k − 1 ( v 1 ( k − 1 − j ) a 1 , i ( j ) + v 2 ( k − 1 − j ) a 2 , i ( j ) ) .
At this point, the specific expression of R k , k ≥ 1 is derived. Due to P Q = 0 and P n = P 1 R n − 1 , n ≥ 1 , we know that the probability vectors P 0 and P 1 satisfy the following equation:
[ P 0 , P 1 ] D 0 U L 0 D + RL = 0 .
Solving the above equations, we can see that P 0 and P 1 can be represented by the probability for the system to be empty ( P 0 , 0 , 0 ):
P 0 , 1 , 0 = λ φ ( θ + λ + η 1 ) 2 P 0 , 0 , 0 , P 0 , 0 , 1 = θ ( θ + λ + η 1 ) 2 + λ η 2 φ λ ( θ + λ + η 1 ) 2 P 0 , 0 , 0 ,
P 0 , 1 , 1 = λ + θ μ 2 P 0 , 0 , 0 , P 1 , 0 , 0 = λ θ + λ + η 1 P 0 , 0 , 0 , P 1 , 1 , 0 = λ 2 ξ ( θ + λ + η 1 ) 2 P 0 , 0 , 0 ,
P 1 , 0 , 1 = ( ( λ + μ 2 ) ( θ + λ ) + θ μ 3 μ 1 μ 2 + λ μ 3 + μ 1 μ 3 − λ ( θ φ μ 2 − ϖ 1 μ 3 ) ( θ + λ + η 1 ) 2 ( μ 1 μ 2 + λ μ 3 + μ 1 μ 3 ) ) P 0 , 0 , 0 ,
P 1 , 1 , 1 = ( λ ( ( λ + μ 1 ) ( θ + λ ) + μ 2 ( θ + λ + μ 1 ) ) μ 2 ( μ 1 μ 2 + λ μ 3 + μ 1 μ 3 ) − λ ( θ λ φ + ϖ 2 μ 1 ) ( θ + λ + η 1 ) 2 ( μ 1 μ 2 + λ μ 3 + μ 1 μ 3 ) ) P 0 , 0 , 0 ,
where
ξ = 2 θ η 1 ( θ + λ ) + η 1 ( η 1 + η 2 ) ( θ + λ ) ( θ + λ + 2 η 2 ) + η 2 2 + θ η 3 + η 2 η 3 , φ = ( θ + λ + η 2 + η 3 ) ξ − η 1 , ϖ 1 = θ ( λ + θ ) + η 1 ( θ − η 2 ) + ξ η 2 ( η 2 + θ + 2 λ + η 3 ) , ϖ 2 = θ ( λ + θ ) ( 1 + ξ ) − η 1 η 2 + ξ η 2 ( η 2 + 2 θ + 2 λ + η 3 ) + θ ξ η 3 .
Denote P 1 , 0 , 1 = K 1 ∗ P 0 , 0 , 0 and P 1 , 1 , 1 = K 2 ∗ P 0 , 0 , 0 . Therefore, due to P n = P 1 R n − 1 , n ≥ 1 , the following theorem can be established.
Theorem 3.
For an M / M / ( 1 + 1 ) queueing system with two-phase heterogeneous service and working vacation interruptions, if the stability condition μ 1 μ 1 + μ 2 < μ 3 − μ 1 λ − μ 1 holds, for  n ≥ 1 , the stationary probabilities are:
P n , 0 , 0 = ( λ θ + λ + η 1 ) n P 0 , 0 , 0 ,
P n , 1 , 0 = ( r 1 , 1 k − r 2 , 2 k r 1 , 1 − r 2 , 2 η 1 ( θ + λ + η 1 ) θ + λ + η 2 + η 3 + λ n + 1 ξ ( θ + λ + η 2 + η 3 ) n − 1 ( θ + λ + η 1 ) 2 ) P 0 , 0 , 0 ,
P n , 0 , 1 = ( λ θ + λ + η 1 s n − 1 1 , 1 + λ 2 ξ ( θ + λ + η 1 ) 2 s n − 1 1 , 3 + K 1 ∗ d 1 , 1 ( n − 1 ) + λ 1 n − 1 − λ 2 n − 1 λ 1 − λ 2 K 2 ∗ r 4 , 3 ) P 0 , 0 , 0 ,
P n , 1 , 1 = ( λ θ + λ + η 1 s n − 1 1 , 2 + λ 2 ξ ( θ + λ + η 1 ) 2 s n − 1 1 , 4 + λ 1 n − 1 − λ 2 n − 1 λ 1 − λ 2 K 1 ∗ r 3 , 4 + K 2 ∗ d 2 , 2 ( n − 1 ) ) P 0 , 0 , 0 .
For n = 0 , the probability vector P 0 has been given in Equations (36) and (37). P 0 , 0 , 0 , as the probability for the system to be empty, can be derived using the normalization condition
( P 0 + P 1 ( I + R ( I − R ) − 1 ) ) e = 1 .

5. Performance Measures and Sensitivity Analysis

In this section, several crucial performance measures are given and analyzed using MATLAB (version: R2017b) program. Numerical illustrations further reveals how main system parameters influence the model’s performance. Furthermore, we conduct a comparative analysis among three different models.

5.1. Performance Measures

(1)
Mean system content and waiting time
To analyze system congestion, we compute the expected customer count during different periods. The mean system content during vacation:
E [ N V ] = ∑ u = 0 ∞ P u [ u , u + 1 , u + 2 , … , u + c ︸ # = c + 1 , 0 , … , 0 ] T ;
  • During the normal busy period:
    E [ N B ] = ∑ u = 0 ∞ P u [ 0 , … , 0 ︸ # = c + 1 , u , u + 1 , u + 2 , … , u + c ] T ;
  • In the first phase:
    E [ N 1 ] = ∑ k = 0 ∞ k P k e T ;
  • In the second phase:
    E [ N 2 ] = ∑ k = 0 ∞ P k [ 0 , 1 , 2 , … , c ︸ # = c + 1 , 0 , 1 , 2 , … , c ] T .
  • Hence, the mean number and waiting time of customers in the system:
    E [ N ] = E [ N 1 ] + E [ N 2 ] , E [ W ] = E [ N ] λ .
(2)
Mean number of servers
Denote 1 × ( c + 1 ) vectors 0 = [ 0 , ⋯ , 0 ] , v 1 = [ 0 , 1 , 2 , ⋯ , c ] and v 2 = [ c + 1 , c , ⋯ , 1 ] . The mean number of busy and idle servers during the normal busy period:
E [ N B ] = P 0 [ 0 , v 1 ] T + ∑ n = 1 ∞ P n [ 0 , v 1 + e T ] T , E [ N I ] = P 0 [ 0 , v 2 ] T + ∑ n = 1 ∞ P n [ 0 , v 2 − e T ] T .
  • The mean number of busy and idle servers during vacation:
    E [ V B ] = P 0 [ v 1 , 0 ] T + ∑ n = 1 ∞ P n [ v 1 + e T , 0 ] T , E [ V I ] = P 0 [ v 2 , 0 ] T + ∑ n = 1 ∞ P n [ v 2 − e T , 0 ] T .
  • The mean number of busy, idle and vacation servers:
    E [ B ] = E [ N B ] + E [ V B ] , E [ I ] = E [ N I ] + E [ V I ] , E [ V ] = E [ V B ] + E [ V I ] .
(3)
The probability of an empty system:
P e m p t y = P 0 [ 1 , 0 , … , 0 ︸ # = c + 1 , 1 , 0 , … , 0 ] T .
(4)
The server utility in the second phase is
S U = E [ N 2 ] c .

5.2. Sensitivity Analysis

Here, we conduct a numerical analysis of the system and present examples assessing the effect of parametric changes on several performance metrics. The baseline has been set as follows:
Figure 2 and Figure 3: λ = 0.5 , μ 1 = 1.5 , μ 2 = 1 , μ 3 = 0.5 , η 1 = 1 , η 2 = 0.5 , η 3 = 0.3 , θ = 0.5 ,
Figure 2. The impact of arrival rate λ on performance measures. (a) The mean number of customers. (b) The mean waiting time of customers. (c) The probability of an empty system. (d) The server utility in phase-2.
Figure 3. The impact of vacation rate θ on performance measures. (a) The mean number of customers. (b) The probability of an empty system. (c) The server utility in phase-2.
Figure 4 and Figure 5: λ = 1 , μ 1 = 1.5 , μ 2 = 2 , μ 3 = 1 , η 1 = 1 , η 2 = 1.5 , η 3 = 0.5 , θ = 0.5 ,
Figure 4. The impact of the number of servers c on performance measures. (a) The mean number of customers. (b) The probability of an empty system. (c) The server utility in phase-2.
Figure 5. The impact of vacation interruption threshold l on performance measures. (a) The mean number of busy servers. (b) The mean number of idle servers. (c) The mean number of servers on vacation.
  • and the corresponding parameters change when they are used as variables or when there is an additional declaration in the figure titles. Figure 2, Figure 3, Figure 4 and Figure 5 plots several performance metrics, including the mean number of customers, the mean waiting time of customers, probability of an empty system, and utility of the server in the second phase, respectively as functions of system parameters λ , θ , c, and l. Based on the expression for E [ W ] , it is evident that the trend of E [ W ] with respect to θ mirrors that of E [ N ] . Therefore, Figure 3 does not include a separate plot for the mean waiting time of customers, and Figure 4 and Figure 5 follow the same rationale.
According to Figure 2, when the customer arrival rate λ increases, the mean number of customers E [ N ] , the mean waiting time of customers E [ W ] and the server utility in Phase-2 increase; however, the probability of an empty system P e m p t y decreases. An increase in customer arrival rate λ implies greater system congestion, so the trends in E [ N ] , E [ W ] , and P e m p t y align with our intuition. Similarly, regarding changes in S U , as the customer arrival rate rises, the number of customers in Phase-2 increases, and the utilization rate of servers in the second phase correspondingly improves.
Figure 3 illustrates that as the working vacation rate θ increases, both E [ N ] and S U decrease. Clearly, the service rate decreases during working vacation periods. Prolonged operation at a low rate leads to customer accumulation in the system. Therefore, a shorter vacation duration results in a smaller E [ N ] , aligning with our intuition, while the variation in S U follows the same principle.
Additionally, Figure 2 and Figure 3 compares the performance of three different models:
(1)
Model 1: a multi-server queueing system with working vacation interruption threshold (c = 3, l = 5);
(2)
Model 2: a single-server queueing system with working vacation interruption threshold (c = 1, l = 5);
(3)
Model 3: a single-server queueing system with working vacation interruption (c = 1, l = 1), representing the special case described in Section 4.2.
Consequently, upon ending vacation or completing the Phase-2 service, the system immediately terminates the working vacation state if either the queue or Server-1 is found to be non-empty. All servers then switch to regular working mode. Based on the information in Figure 2 and Figure 3, we can see that:
  • In terms of the mean number of customers in the system, when λ is large, Model 3 > Model 2 > Model 1, while the probability of the system being empty shows the exact opposite pattern. This demonstrates that both increasing a working vacation interruption threshold and adding multiple servers effectively reduce system congestion.
  • The probability of the system being empty represents, in a sense, its clearing capacity. Changes in customer arrival rates do not alter the relative clearing capacities among the three models, which consistently remain Model 1 > Model 2 > Model 3. However, variations in vacation rates significantly alter this hierarchy. Model 3’s clearing capacity is highly sensitive to vacation duration. As vacation periods gradually shorten, Model 1’s advantage diminishes, and Model 3 emerges as the most efficient clearer among the three. This characteristic suggests that managers can enhance the system’s clearing capacity by adjusting vacation lengths and the number of service counters. For instance, when vacations are longer, opting for multiple servers is preferable, while shorter vacations may be better served by a single server.
  • For the server utility in the second phase, Model 3 > Model 2 > Model 1, and this relationship remains unchanged regardless of variations in λ or θ .
Figure 4 illustrates the impact of the number of system servers on various performance metrics. In Figure 4a, it is clear that there exists a c that minimizes E [ N ] . This characteristic is counterintuitive, yet it precisely reflects the diminishing marginal returns in resource allocation. Its root cause lies in the dynamic switching between normal operation and vacation modes. When c is small, scaling up the number of servers in Phase 2 does indeed reduce E [ N ] . However, when c exceeds a certain threshold, the situation changes due to the setting of l. At this point, the system is more likely to enter working vacations with low efficiency due to the larger number of servers. Also, it becomes more difficult to interrupt server vacations. Thus, it reduces the system’s processing efficiency, consequently increasing E [ N ] . This is a critical characteristic that reveals how excessive resource allocation can actually degrade overall system performance. Therefore, configuring c is of vital importance. We will focus on examining this aspect in the optimization analysis section. In Figure 4b, P e m p t y has a maximum value, which is another reflection of the characteristic in Figure 4a. In Figure 4c, when the number of servers increases, which means each server will receive fewer tasks, so the server utility in Phase-2 decreases.
Figure 5 reveal that the working vacation interruption threshold l significantly shapes server allocation. As the threshold for working vacation interruption l increases, E [ B ] ( E [ I ] ) reaches a maximum (minimum) value, and E [ V ] increases. For small thresholds l, vacations are frequently interrupted, resulting in many idle servers. As the threshold increases, more customers accumulate, and more servers become busy, leading to a reduction of E [ I ] and a growth of E [ B ] . However, if the threshold is sufficiently large, the system will operate at a persistently low service rate. This limits the system’s service efficiency, causing E [ B ] to decline, whereas E [ I ] continues to increase. Moreover, the variation of E [ V ] is quite intuitive.

6. Optimization Analysis

In this section, we use MATLAB software to discuss two optimization problems by numerical examples. One application scenario for our model is the flexible manufacturing of automotive components. For this system, minimizing overall costs is the primary concern for managers. Investment in the system is directly tied to equipment purchases, and improper management of working vacation durations can also incur losses. Therefore, in this section, we will employ optimization algorithms to investigate the optimal c and θ . The average system total cost is formulated as:
T C ( c , θ ) = C 1 E [ N ] + C 2 ( μ 1 + μ 2 + μ 3 ) + C 3 ( η 1 + η 2 + η 3 ) + C 4 θ ,
where C 1 denotes the per-customer holding cost within the system; C 2 denotes the cost incurred when servers operate at their normal service rates; C 3 denotes the server cost providing service in working vacations; C 4 denotes the system cost while servers are in working vacations.

6.1. Single-Objective Optimization

This section focuses on minimizing the average total cost given by Equation (45). The corresponding optimization model is formally formulated as follows.
T C ( c ∗ , θ ∗ ) = min c l ⩽ c ⩽ c u θ l ⩽ θ ⩽ θ u T C ( c , θ )
where c and θ are restricted to the intervals [ c l , c u ] and [ θ l , θ u ] , respectively.

6.2. The Canonical Particle Swarm Optimization (CPSO) Algorithm

As the expected cost function in Equation (45) contains both discrete and continuous decision variables, classical gradient-based methods are rendered unsuitable for optimization. The intelligence algorithms thus come into play. The Particle Swarm Optimization (PSO) algorithm, derived from observations of bird flocking behavior by Kennedy and Eberhart [30], is known for its effectiveness in nonlinear problems. To address the issue of premature convergence, the canonical PSO (CPSO) algorithm was later developed by introducing constriction factor [31]. This CPSO algorithm is implemented here to solve our single-objective optimization problem, utilizing a specific constriction factor
ζ ( κ 1 , κ 2 ) = 2 2 − κ 1 − κ 2 − ( κ 1 + κ 2 ) 2 − 4 ( κ 1 + κ 2 ) − 1 .
The PSO and CPSO algorithm have numerous applications in queueing models, see Yang and Wu [32], Wu and Yang [11], Kumar and Jain [12], etc. According to the study of Yang and Wu [32] and Wu and Yang [11], we set the parameter κ 1 = 2.8 and κ 2 = 1.3 . The CPSO algorithm is presented below:   Step 1. Generate the initial N = 100 random particles, with positions randomly distributed over the search space and velocities initialized to zero.
Step 2. Evaluate every particle’s fitness through T C ( c , θ ) , and set the initial personal best positions. The particle with the best fitness is chosen to serve as the global best position.
Step 3. Iteratively update the swarm until the termination criterion is satisfied:
  • Update the particle velocity with
    v j ( i + 1 ) = ζ v j ( i ) + κ 1 U ( 0 , 1 ) pbest j − x j ( i ) + κ 2 U ( 0 , 1 ) gbest − x j ( i ) ,
    where the term p b e s t i corresponds to the optimal position particle i has discovered to date, while g b e s t records the globally best solution.
  • Update position with
    x i ( t + 1 ) = x i ( t ) + v i ( t + 1 ) ;
  • Evaluate fitness T C ( c , θ ) . If it is lower than the objective value of the particle’s personal best, update p b e s t i to the new position x i ( t + 1 ) .
Step 4. Return g b e s t as the heuristic solution with the approximately minimum objective value.
Define k as the number of iterations in the inner loop required to check the termination condition, and N as the population size. By our calculation, the time complexity of the CPSO algorithm is O ( k N ) .

6.3. The JAYA and MLS-JAYA Algorithm

The JAYA algorithm was proposed by Rao et al. [33] in 2016 as a simple yet effective population-based metaheuristic. It updates each candidate solution by moving toward the best solution while simultaneously moving away from the worst solution, using a rule that incorporates random perturbations. However, the original update employs absolute values which may distort the search direction and hinder convergence on complex landscapes. To address these issues, Deng and Liu [34] introduced MLS-JAYA, which integrates three complementary learning strategies. First, a population-based incremental learning (PBIL) mechanism maintains a Gaussian probability model of promising regions to guide exploration and preserve diversity. Second, a modified search operator removes the absolute value to ensure geometrically consistent movement toward the best solution, accelerating exploitation. Third, an orthogonal opposition-based learning technique combines centroid opposition with orthogonal experimental design to generate high-quality trial solutions, helping the algorithm escape local optima. These mechanisms collectively balance exploration and exploitation, enabling MLS-JAYA to achieve superior performance across a wide range of optimization problems. Other latest algorithms can refer to Mortazavi [35], Ren et al. [36] and Meng et al. [37]. The Pseudo code of JAYA and MLS-JAYA algorithms are showed in Algorithms 1 and 2, respectively. The corresponding parameter values of each algorithm are referenced from Deng and Liu [34]. Three algorithms applied in this paper, i.e., the CPSO algorithm, the JAYA algorithm and the MLS-JAYA algorithm share the same baseline below. Define k as the number of iterations in the inner loop required to check the termination condition, and N as the population size. The time complexity of the JAYA algorithm and the MSL-JAYA algorithm are both O ( k N l o g ( N ) ) .
Algorithm 1: Pseudo code of the JAYA Algorithm
Mathematics 14 00874 i001
In our experiments, the upper and lower bounds are set as c u = 20 , θ u = 2 and c l = 1 , θ l = 0.1 , respectively. Meanwhile, the baseline is set as C 1 = 150 , C 2 = 50 , C 3 = 60 , C 4 = 10 , l = 5 , λ = 1 , μ 1 = 1.5 , η 1 = 1 , μ 2 = 2 , η 2 = 1.5 , μ 3 = 1 , η 3 = 0.5 . The relationship between the mean total cost and the vary parameters c and θ has been depicted in Figure 6.
Figure 6. The mean total cost vs. the number of servers c and the vacation rate θ .
Table 1, Table 2 and Table 3 illustrate the impacts of system parameters on the optimal decisions c ∗ , θ ∗ , together with the resulting minimum average cost T C ( c ∗ , θ ∗ ) . From Table 1, Table 2 and Table 3, we can see that the optimal solutions obtained by the three different algorithms are identical, indicating that these optimal solutions are robust and reliable. As shown in Table 1, increasing the arrival rate λ leads to higher T C ( c ∗ , θ ∗ ) and θ ∗ , while the optimal number of servers c ∗ first decreases and then increases. This is because a higher arrival rate increases the system congestion and associated holding and service costs. To compensate, the system tends to terminate vacations more quickly, resulting in a smaller θ ∗ . Meanwhile, reducing c is initially effective in controlling costs; however, when the arrival rate becomes sufficiently large, additional servers are required to meet service demand, causing a larger c ∗ . In addition, Table 1 shows that a larger l results in lower c ∗ and θ ∗ , but a higher average cost. A larger threshold allows working vacations to persist longer, leading to customer accumulation and higher holding costs. Consequently, to minimize the total cost, the system reduces θ ∗ and c ∗ .
Algorithm 2: Pseudo code of MLS-JAYA algorithm
Mathematics 14 00874 i002
Table 1. Impact of ( l , λ ) on optimal solutions and values using different algorithms.
Table 2. Impact of ( μ 1 , μ 2 , μ 3 ) on optimal solutions and values using different algorithms.
Table 3. Impact of ( η 1 , η 2 , η 3 ) on optimal solutions and values using different algorithms.
Table 2 examines the effects of service rates in different phases during normal operation. An increase in μ 1 reduces the system size and average cost, prompting the system to operate with fewer servers and a higher θ to minimize the system cost. In contrast, increasing μ 2 encourages more frequent entry into working vacations, thereby increasing the average cost; in this case, increasing θ is effective in controlling cost, while the optimal number of servers remains relatively insensitive. Similarly, a higher μ 3 leads to an increase in θ ∗ and T C ( c ∗ , θ ∗ ) , accompanied by a reduction in c ∗ .
Table 3 illustrates how the service rates in different phases during working vacations influence the optimal solution. Similar to the previous analytical approach, increasing either rate reduces the system size and average cost, leading to a smaller c ∗ and a higher θ ∗ .

6.4. Bi-Objective Optimization Problem

In the previous subsection, we investigated the optimal solution that minimizes T C and how it is influenced by system parameters. However, in a queueing system, we are not only concerned with minimizing system costs but also with avoiding excessive increases in customer waiting time. Yet these two objectives are often conflicting. Therefore, to simultaneously ensure service quality, in this subsection, we employ the MOEA/D algorithm [38], which provides an algorithmic framework for decomposing multi-objective optimization problems into a set of single-objective subproblems, to investigate this bi-objective optimization problem. A flowchart illustrating the MOEA/D algorithm is shown in Figure 7.
Figure 7. Flowchart of the MOEA/D algorithm.
The baseline can refer to the previous subsection, and the neighborhood size M = 20 , the population N = 100 . Figure 8 has displayed the solution of the Pareto front when λ = 1 , which reaches a balance between two objective functions, and the detailed results for different values of λ are shown in Table 4. As indicated in the table, the rate of customer arrivals increases, c ∗ , θ ∗ , E [ W ] and T C all increase, which is consistent with our intuition. As shown in Figure 8, reducing T C leads to an increase in E [ W ] . However, based on the Pareto solution, it is clear that the difference between the two objective functions is very small. When c and θ are near the point ( 3.897 , 1002.71 ) , the system can be approximated minimizing both T C and E [ W ] . This demonstrates that the proposed model can minimize system cost while maintaining service quality by controlling the number of servers and the duration of working vacations. Such a characteristic highlights the practical significance of our model.
Figure 8. Pareto front ( λ = 1 ).
Table 4. Impact of λ on the Pareto Front.

7. Conclusions

This research analyzes a multi-server queueing model in which customer service is completed through two successive stages, while all servers simultaneously undertake working vacations that are interrupted once the system size exceeds a specified threshold. Our model can describe the practical scenario in flexible production lines, such as an intelligent inspection system for automotive components. Through the matrix-analytic technique, this study establishes the stability criterion and the stationary distribution. In the numerical experiments section, we analyze the impact of system parameters on performance metrics and compared the behavior of three models: ( c , l ) = ( 3 , 5 ) , ( c , l ) = ( 1 , 5 ) , and ( c , l ) = ( 1 , 1 ) . It is observed that when customer arrival rates are high, increasing the working vacation interruption threshold or the number of servers effectively reduces system congestion. Managers can enhance the system’s clearing capacity by adjusting vacation lengths and the number of service counters. For instance, when vacations are longer, opting for multiple servers is preferable, while shorter vacations may be better served by a single counter. Furthermore, since E [ N ] has a minimum value with respect to c, an excessive number of servers may actually lead to an overcrowded system. This reflects that excessive resource allocation can actually degrade overall system performance. This phenomenon of diminishing marginal returns serves as a warning to managers that they should select an appropriate number of servers based on the system’s specific circumstances, rather than simply increasing the number of servers indiscriminately. In the optimization analysis section, we construct single-objective and bi-objective optimization model. We employed the CPSO algorithm, the JAYA algorithm, and the latest MLS-JAYA algorithm to determine the optimal number of servers and the optimal working vacation rate. The results from all three algorithms were consistent, indicating that the optimal solution is highly stable. Additionally, we utilized the MOEA/D algorithm to obtain the Pareto front solution, which achieves a balance between the mean total system cost and the mean customer waiting time.
Our research also offers avenues for expansion. For instance, future studies could explore generally distributed service times or attempt to solve scenarios involving multiple customer classes. Furthermore, real-world data from practical application scenarios could be utilized to validate the parameter fitting effectiveness of the proposed model.

Author Contributions

Conceptualization, W.X.; methodology, W.X.; software, W.X., L.L. and W.F.; validation, L.L. and W.F.; formal analysis, W.X.; writing—original draft preparation, W.X.; writing—review and editing, W.X., L.L. and W.F.; supervision, W.X.; funding acquisition, W.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Chengdu Technological University Talent Program (No. 2550062).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Krishna, C.; Lee, Y.H. A study of two-phase service. Oper. Res. Lett. 1990, 9, 91–97. [Google Scholar] [CrossRef] [Scilit]
  2. Doshi, B. Analysis of a two phase queueing system with general service times. Oper. Res. Lett. 1991, 10, 265–272. [Google Scholar] [CrossRef] [Scilit]
  3. Choudhury, G.; Deka, M. A single server queueing system with two phases of service subject to server breakdown and Bernoulli vacation. Appl. Math. Model. 2012, 36, 6050–6060. [Google Scholar] [CrossRef] [Scilit]
  4. Choudhury, G.; Deka, M. A batch arrival unreliable server delaying repair queue with two phases of service and Bernoulli vacation under multiple vacation policy. Qual. Technol. Quant. Manag. 2018, 15, 157–186. [Google Scholar] [CrossRef] [Scilit]
  5. Singh, C.J.; Jain, M.; Kaur, S. Performance analysis of bulk arrival queue with balking, optional service, delayed repair and multi-phase repair. Ain Shams Eng. J. 2018, 9, 2067–2077. [Google Scholar] [CrossRef] [Scilit]
  6. Yang, D.Y.; Chen, Y.H. Computation and optimization of a working breakdown queue with second optional service. J. Ind. Prod. Eng. 2018, 35, 181–188. [Google Scholar] [CrossRef] [Scilit]
  7. Ahuja, A.; Jain, A.; Jain, M. Finite population multi-server retrial queueing system with an optional service and balking. Int. J. Comput. Appl. 2019, 41, 54–61. [Google Scholar] [CrossRef] [Scilit]
  8. Boualem, M.; Bareche, A.; Cherfaoui, M. Approximate controllability of stochastic bounds of stationary distribution of an M/G/1 queue with repeated attempts and two-phase service. Int. J. Manag. Sci. Eng. Manag. 2019, 14, 79–85. [Google Scholar] [CrossRef] [Scilit]
  9. Jain, M.; Kaur, S. Bernoulli vacation model for MX/G/1 unreliable server retrial queue with bernoulli feedback, balking and optional service. RAIRO-Oper. Res. 2021, 55, S2027–S2053. [Google Scholar] [CrossRef] [Scilit]
  10. Begum, A.; Choudhury, G. Analysis of a bulk arrival N-policy queue with two-service genre, breakdown, delayed repair under Bernoulli vacation and repeated service policy. RAIRO-Oper. Res. 2022, 56, 979–1012. [Google Scholar] [CrossRef] [Scilit]
  11. Wu, C.H.; Yang, D.Y. Bi-objective optimization of a queueing model with two-phase heterogeneous service. Comput. Oper. Res. 2021, 130, 105230. [Google Scholar] [CrossRef] [Scilit]
  12. Kumar, A.; Jain, M. Cost optimization of an unreliable server queue with two stage service process under hybrid vacation policy. Math. Comput. Simul. 2023, 204, 259–281. [Google Scholar] [CrossRef] [Scilit]
  13. Xu, W.; Li, L.; Fan, W.; Liu, L. Optimal control of a two-phase heterogeneous service retrial queueing system with collisions and delayed vacations. J. Appl. Math. Comput. 2024, 70, 2879–2906. [Google Scholar] [CrossRef] [Scilit]
  14. Servi, L.D.; Finn, S.G. M/M/1 queues with working vacations (m/m/1/wv). Perform. Eval. 2002, 50, 41–52. [Google Scholar] [CrossRef] [Scilit]
  15. Wu, D.A.; Takagi, H. M/G/1 queue with multiple working vacations. Perform. Eval. 2006, 63, 654–681. [Google Scholar] [CrossRef] [Scilit]
  16. Liu, W.y.; Xu, X.l.; Tian, N.s. Stochastic decompositions in the M/M/1 queue with working vacations. Oper. Res. Lett. 2007, 35, 595–600. [Google Scholar] [CrossRef] [Scilit]
  17. Li, J.; Tian, N. The M/M/1 queue with working vacations and vacation interruptions. J. Syst. Sci. Syst. Eng. 2007, 16, 121–127. [Google Scholar] [CrossRef] [Scilit]
  18. Majid, S.; Manoharan, P. Analysis of the M/M/1 queue with single working vacation and vacation interruption. Int. J. Math. Trends Technol.-IJMTT 2017, 47, 31–39. [Google Scholar]
  19. Chandrasekaran, V.; Indhira, K.; Saravanarajan, M.; Rajadurai, P. A survey on working vacation queueing models. Int. J. Pure Appl. Math. 2016, 106, 33–41. [Google Scholar]
  20. Fiems, D. Queues with Working Vacations: A Survey. Mathematics 2025, 13, 1894. [Google Scholar] [CrossRef] [Scilit]
  21. Ganie, S.M.; Manoharan, P. Impatient customers in an M/M/c queue with single and multiple synchronous working vacations. Pak. J. Stat. Oper. Res. 2018, 14, 571–594. [Google Scholar] [CrossRef] [Scilit]
  22. Ke, J.C.; Chang, F.M.; Liu, T.H. M/M/c balking retrial queue with vacation. Qual. Technol. Quant. Manag. 2019, 16, 54–66. [Google Scholar] [CrossRef] [Scilit]
  23. Vijaya Laxmi, P.; Kassahun, T. Analysis of variant working vacation queue with reneging under a multi-server environment. Int. J. Manag. Sci. Eng. Manag. 2020, 15, 130–137. [Google Scholar] [CrossRef] [Scilit]
  24. Liu, T.H.; Chiou, K.C.; Chen, C.M.; Chang, F.M. Multiserver retrial queue with two-way communication and synchronous working vacation. Mathematics 2024, 12, 1163. [Google Scholar] [CrossRef] [Scilit]
  25. Ke, J.C.; Chang, F.M.; Liu, T.H. Bi-objective optimization of a retrial model with synchronous working vacation interruption. Qual. Technol. Quant. Manag. 2025, 22, 659–682. [Google Scholar] [CrossRef] [Scilit]
  26. Liu, T.H.; Hsu, H.Y.; Chang, F.M. Multi-server two-way communication retrial queue subject to disaster and synchronous working vacation. Algorithms 2025, 18, 24. [Google Scholar] [CrossRef] [Scilit]
  27. Ke, J.C.; Chang, F.M.; Liu, T.H.; Kuo, C.C. Analysis of synchronous vacation retrial queue with non-preemptive customers. Commun. Stat. Simul. Comput. 2025, 1–30. [Google Scholar] [CrossRef] [Scilit]
  28. Aishwarya, N.; Melikov, A.; Ayyappan, G. Analysis of BMAP/PH/c Retrial Queue with Threshold-Controlled Retrials and Synchronous Working Vacation. Methodol. Comput. Appl. Probab. 2026, 28, 10. [Google Scholar] [CrossRef] [Scilit]
  29. Neuts, M.F. Matrix-Geometric Solutions in Stochastic Models; Johns Hopkins Series in the Mathematical Sciences; The Johns Hopkins University Press: Baltimore, MD, USA; London, UK, 1981; Volume 2. [Google Scholar]
  30. Kennedy, J.; Eberhart, R. Particle swarm optimization. In Proceedings of the ICNN’95-International Conference on Neural Networks, Perth, WA, Australia, 27 November–1 December, 1995; IEEE: New York, NY, USA, 1995; Volume 4, pp. 1942–1948. [Google Scholar]
  31. Clerc, M.; Kennedy, J. The particle swarm-explosion, stability, and convergence in a multidimensional complex space. IEEE Trans. Evol. Comput. 2002, 6, 58–73. [Google Scholar] [CrossRef] [Scilit]
  32. Yang, D.Y.; Wu, C.H. Performance analysis and optimization of a retrial queue with working vacations and starting failures. Math. Comput. Model. Dyn. Syst. 2019, 25, 463–481. [Google Scholar] [CrossRef] [Scilit]
  33. Rao, R. Jaya: A simple and new optimization algorithm for solving constrained and unconstrained optimization problems. Int. J. Ind. Eng. Comput. 2016, 7, 19–34. [Google Scholar] [CrossRef] [Scilit]
  34. Deng, L.; Liu, S. MLS-JAYA: A multi-learning JAYA algorithm for numerical optimization and efficient engineering design. Clust. Comput. 2026, 29, 88. [Google Scholar] [CrossRef] [Scilit]
  35. Mortazavi, A. Optimal Design of Frame Structures Based on the Finite Elements Analysis Using Fuzzy Jaya Algorithm. In Optimization Methods for Finite Element Analysis and Design; CRC Press: Boca Raton, FL, USA, 2026; pp. 95–106. [Google Scholar]
  36. Ren, Y.; Li, Q.; Zhang, Y.; Li, J.; Pedrycz, W.; Suganthan, P.; Mallipeddi, R.; Song, Y. An Evolutionary Algorithm with Memory Guidance for Data Transmission Scheduling Optimization in Communication Satellite Network. IEEE Trans. Syst. Man Cybern. Syst. 2026, 56, 1354–1368. [Google Scholar] [CrossRef] [Scilit]
  37. Meng, Q.; Chen, K.; Qu, Q. Ppswarm: Multi-uav path planning based on hybrid pso in complex scenarios. Drones 2024, 8, 192. [Google Scholar] [CrossRef] [Scilit]
  38. Zhang, Q.; Li, H. MOEA/D: A multiobjective evolutionary algorithm based on decomposition. IEEE Trans. Evol. Comput. 2007, 11, 712–731. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.