1. Introduction
The global telemedicine market is expanding rapidly due to the increasing demand for accessible and efficient healthcare services [
1]. Telemedicine has played a crucial role in overcoming geographic and physical barriers to healthcare, particularly benefiting patients in rural and underserved areas. By facilitating remote consultations, it reduces the need for long-distance travel and minimizes in-person waiting times, while also improving healthcare access for vulnerable populations such as the elderly and people with disabilities. Additionally, telemedicine increases operational efficiency by allowing healthcare providers to serve more patients without the need for physical travel.
Despite these advantages, the growing reliance on telemedicine platforms has introduced new operational challenges. Patient inflow is often highly variable, and traditional queuing models struggle to adapt to such fluctuations, leading to increased delays, system congestion, and inefficient resource utilization [
2,
3]. This has created a pressing need for intelligent, data-driven systems capable of supporting real-time queue management and resource allocation.
In response to this challenge, this study proposes a hybrid ANN-PSO model designed to improve telemedicine queuing system performance. ANN models offer robust predictive capabilities, while PSO enhances these models by optimizing their parameter configurations, resulting in better generalization and more accurate queue predictions. The ANN-PSO model dynamically adapts to variations in patient demand, helping administrators anticipate service bottlenecks and optimize resource utilization.
The recent literature has demonstrated the effectiveness of ANN-PSO models in healthcare applications, outperforming traditional ANN models and classical queuing theory approaches in terms of prediction accuracy, adaptability, and computational efficiency [
4,
5,
6]. By continuously updating its predictions using real-time data, the ANN-PSO model offers a scalable and flexible solution applicable to both small-scale and large-scale telemedicine systems.
The novelty of this study lies not in the introduction of the ANN-PSO algorithm itself, but in its targeted application to the M/M/s/N queuing system for telemedicine environments. Specifically, the research contributes by (1) identifying optimal ANN-PSO configurations for multiple output performance metrics, (2) employing a queuing simulation-based data generation approach using Revoledu, and (3) applying the model to a complex telemedicine queuing framework that is underexplored in prior work.
This research aims to enhance the performance of telemedicine queuing systems by reducing patient waiting times, optimizing server utilization, and improving the overall quality of virtual healthcare services. The proposed model serves as a valuable decision-support tool, empowering telemedicine administrators to manage patient flow effectively, adapt to fluctuating demand, and ensure timely and efficient service delivery.
The objectives of the study are as follows:
To simulate telemedicine queuing scenarios and generate data for modeling system behavior.
To train an ANN model using simulated data to predict key performance indicators such as queue intensity, utilization, and delays.
To optimize the ANN model using PSO in order to identify the best parameter configurations for improving queuing system performance.
In telemedicine, queue management presents a significant challenge as it directly influences service efficiency, resource utilization and patient satisfaction. The increasing reliance on telemedicine platforms has created a demand for efficient queuing mechanisms that can dynamically adapt to variations in patient inflow and service rates. Traditional queuing models, such as Markovian processes and queueing theory-based approaches, often operate on fixed assumptions regarding arrival rates and service times, which makes them ineffective in real-time applications. ANNs, when optimized using PSO, provide a more robust and adaptive solution by enabling real-time predictions of queue congestion, patient waiting times and system load distribution [
5]. A significant drawback of conventional ANN training techniques, like backpropagation (BP), is their dependence on gradient-based optimization. This method frequently leads to gradual convergence and vulnerability to the local minimum, which impairs the ANN’s capacity to generalize efficiently. By contrast, PSO leverages a population-based search strategy that enables ANN models to continuously refine their weight parameters and improve predictive accuracy over multiple iterations. This hybrid ANN-PSO approach enhances queue estimation while facilitating dynamic decision-making in resource allocation, ensuring that telemedicine services can adapt to fluctuating patient demand [
4].
This approach allows ANN-PSO models to optimize their weights iteratively, enabling them to make accurate queue predictions while dynamically adapting to changes in patient arrival patterns. Studies have demonstrated that ANN-PSO models outperform conventional ANN models trained using backpropagation in terms of both accuracy and computational efficiency. For example, Yadav [
4] applied ANN-PSO in medical queue prediction, reporting a 24% reduction in prediction errors compared to traditional queuing models. Beyond improving queue prediction, the ANN-PSO framework also enhances decision-making in telemedicine by optimizing server allocation. Traditional queuing models often operate under fixed assumptions about the number of servers required for optimal performance, whereas ANN-PSO can dynamically allocate resources based on real-time demand. In this regard, by continuously monitoring patient influx and adjusting the number of active servers, ANN-PSO minimizes patient waiting times and ensures efficient resource utilization [
5].
In support of this, Adhicandra et al. [
7] proposed the integration of reinforcement learning with priority queuing algorithms for emergency healthcare services. Their model, tested in real hospital environments, demonstrated a 50% reduction in emergency waiting times and improved patient satisfaction, highlighting the viability of intelligent queue optimization in healthcare.
Additionally, Yousif et al. [
8] employed deep reinforcement learning with the RED algorithm for active queue management in networks, showing that dynamic adaptations could effectively stabilize queues and minimize delay—concepts applicable to telemedicine systems.
Moreover, Ngorsed and Suesaowaluk [
9] introduced a web-based queue system for non-tertiary hospitals in Nigeria, successfully reducing crowding and improving service delivery during the COVID-19 pandemic. Their model, based on Poisson distribution and Little’s Law, validates the practical use of queuing theory in healthcare management.
Perdana et al. [
10] implemented a QR-code-based hospital check-in system to streamline queue verification and administration, which significantly improved operational efficiency. These examples reinforce the growing role of digital technologies in modern queue management systems.
The combination of Markov Chains and ANNs has also been explored in traffic prediction models by Olayode et al. [
11], who concluded that ANN outperformed Markov Chain models for predicting dynamic traffic flows—an analogy applicable to patient inflow in healthcare. In a follow-up study, Olayode et al. [
12] applied ANN-PSO to traffic flow modeling, achieving over 98% accuracy. Their findings underscore the model’s strength in dynamic, real-world environments and affirm its relevance for telemedicine queuing systems. Tarekegn Nigatu et al. [
13] further contributed by mathematically analyzing PSO convergence behaviors and demonstrating how constriction factors improve global search efficiency, supporting the theoretical soundness of PSO-enhanced ANN training.
Furthermore, one of the most significant advantages of the ANN-PSO approach is its ability to adapt to real-time data streams, a crucial feature in telemedicine environments where patient arrival patterns and service durations can fluctuate unpredictably. Unlike traditional queuing models that rely on historical data, ANN-PSO continuously updates its predictive model using the latest available information, which makes it particularly effective for large-scale telehealth operations [
14].
The scalability of ANN-PSO further enhances its applicability in telemedicine. Whether deployed in small clinics or large-scale hospital networks, ANN-PSO can optimize telemedicine service delivery by fine-tuning queue management parameters to meet specific operational needs [
15]. Moreover, through leveraging PSO’s ability to explore and exploit different weight configurations, ANN-PSO ensures that telemedicine platforms operate with maximum efficiency [
16]. Additionally, PSO’s stochastic search mechanism allows ANN-PSO models to avoid the common pitfalls of traditional optimization algorithms, such as premature convergence to suboptimal solutions. This ensures that ANN-PSO maintains a high level of predictive accuracy even in complex, multi-modal optimization landscapes. Studies have shown that PSO-driven ANN models exhibit faster convergence rates compared to traditional backpropagation-based models, which make them ideal for real-time decision-making in healthcare applications [
5]. In view of this, the hybrid ANN-PSO method signifies notable progress in telemedicine queue optimization. Integrating the forecasting abilities of ANNs with the global search effectiveness of PSO, this system allows for the precise, adaptive and efficient management of telemedicine queues. The capacity of ANN-PSO to perpetually enhance its predictions using real-time data guarantees optimal resource distribution, shorter patient waiting times and better service delivery in various healthcare environments. With the ongoing growth of telemedicine, the incorporation of ANN-PSO models into queue management systems is likely to significantly improve healthcare accessibility and efficiency [
17].
ANNs enhanced through PSO have shown substantial advancements in healthcare processes, especially in managing queues and optimizing patient services. Several studies have offered empirical proof of the effectiveness of ANN-PSO models in improving queue prediction precision, resource distribution and system efficiency in healthcare environments. Alam et al. [
5] reported that ANN-PSO models significantly outperformed conventional queue prediction techniques in terms of both accuracy and computational efficiency. This has enabled healthcare administrators to better anticipate patient flow and optimize resource distribution [
16]. In emergency care settings, where patient arrival rates and service times are highly unpredictable, ANN-PSO has been particularly effective. Yadav [
4] implemented ANN-PSO models in emergency room queue management and observed a 24% reduction in queue prediction errors compared to traditional machine learning approaches. The ability of ANN-PSO to rapidly adapt to dynamic queue conditions makes it an essential tool for improving emergency response times and minimizing patient wait times [
16].
The application of ANN-PSO is not limited to emergency departments but extends to telemedicine platforms, where it has proven instrumental in optimizing virtual healthcare services. Zychlinski [
6] proposed an ANN-PSO-based multi-server queue management system for telemedicine which demonstrated improved system utilization and reduced patient backlog. The study showed that ANN-PSO’s adaptive learning capability enables continuous adjustments in queue predictions based on real-time patient arrival patterns. This helps to ensure optimal resource allocation and enhanced service efficiency [
16]. One of the primary reasons for the superior performance of ANN-PSO in healthcare settings is its ability to mitigate the limitations of traditional queuing models. Conventional queuing models, including Markovian processes and Poisson distributions, typically depend on rigid assumptions regarding arrival and service rates, which fail to reflect the fluctuations of patient influx in actual situations. ANN-PSO, conversely, adjusts its parameters in real time according to live data, which enables healthcare systems to stay flexible and adaptable to evolving circumstances [
16].
Beyond queue management, ANN-PSO has also been utilized in diagnostic and monitoring applications. In telemedicine, ANN-PSO models have been integrated with IoT-based cloud networks to enhance the efficiency of remote patient monitoring. For example, a study by Goyal et al. [
16] introduced an improved PSO approach for physiological sensor data fusion in IoT healthcare frameworks. This model improved EEG-based epilepsy diagnosis by optimizing the propagation of neural networks, which achieved a 4.6% improvement in execution time compared to Genetic Algorithm-based models [
16]. Recent studies further underscore ANN-PSO’s suitability for telemedicine applications.
Mondal, Nandi & Jana [
18] demonstrated that ANN-PSO accelerates neural network training, enabling telemedicine systems to make rapid adjustments for service optimization and thereby greatly enhancing system scalability and adaptability in large-scale deployments. Goyal et al. [
16] confirmed that, compared to traditional backpropagation methods, ANN-PSO achieves faster convergence rates while maintaining high prediction accuracy, a critical advantage for real-time telemedicine platforms.
Moreover, ANN-PSO’s integration with IoT devices supports continuous remote patient tracking and predictive health analytics, facilitating early identification of potential health issues in chronic disease management [
19]. For instance, in remote cardiovascular risk assessment and diabetes-monitoring systems, ANN-PSO-enhanced models delivered more reliable prognosis due to their ability to process and learn from high-frequency data streams [
16].
ANN-PSO also excels in multi-modal optimization tasks—leveraging a population-based search to navigate complex, non-differentiable solution spaces—making it ideal for balancing competing telemedicine objectives (e.g., minimizing patient wait times, optimizing resource use, and maximizing service quality) without the need for gradient information. Finally, by reducing computational overhead and enabling lightweight model updates, ANN-PSO allows cloud-based telemedicine platforms to sustain uninterrupted service during peaks in demand, delivering cost-effective, scalable solutions without performance degradation [
16].
2. Materials and Methods
This study employs the M/M/s/N queuing model, widely used to analyze and optimize systems characterized by random customer arrivals and service requirements, such as telecommunications networks, computer systems, and customer service centers [
20]. The M/M/s/N queuing model is an extension of the classical M/M/s model, incorporating a finite system capacity (N). It is particularly useful for analyzing service systems where waiting space is limited, and customers may be denied entry if the system reaches its maximum capacity.
The applicability of the M/M/s/N model to telemedicine is grounded in its alignment with core operational characteristics: in telemedicine platforms, patient consultation requests occur randomly, akin to a Poisson arrival process, and consultation durations vary, modeled effectively by exponential service times [
21]. The parameters represent the number of available doctors conducting remote consultations in parallel, while N reflects real-world capacity constraints such as platform session limits, clinician availability, and bandwidth restrictions. These dynamics mirror the M/M/s/N model’s treatment of arrivals blocked when capacity is reached.
The assumptions used in the M/M/s/N queuing model were adopted based on its suitability for modeling stochastic systems like telemedicine, where arrival and service rates are random. These assumptions (Poisson arrivals, exponential service times, finite capacity, multiple servers) reflect the unpredictable and time-sensitive nature of patient requests in telemedicine, aligning well with real-world dynamics.
This model consists of four key elements:
The arrival process follows a Poisson distribution with an average arrival rate; this means arrivals are random and independent of each other, making the interarrival times exponentially distributed.
In the context of telemedicine, this reflects real-world patient demand, where consultations are requested unpredictably.
The service process follows an exponential distribution with an average service rate, μ; this assumes that shorter service times occur more frequently than longer ones, which aligns with real-life consultations, where some cases require minimal interaction while others need extended discussions.
The model includes parallel servers, representing the number of healthcare providers available for telemedicine consultations.
Each patient, upon arrival, will be immediately assigned to an available provider if one is free. If all providers are busy, the patient will either wait in a queue or be rejected, depending on system capacity.
Unlike the standard M/M/s model (which assumes an infinite queue), M/M/s/N introduces a finite limit (N) on the number of patients that can be in the system (including those waiting and being served).
If a new patient arrives when the system is already at full capacity (N patients present), they are blocked and denied service.
This is critical in telemedicine, where platform limitations, provider availability, or technological constraints may cap the number of simultaneous consultations.
Additionally, the maximum queue size = N − s [
20].
To understand system efficiency, the M/M/s/N model allows for the evaluation of several key performance indicators [
20]:
- 1.
Utilization factor (U).
The utilization factor represents the percentage of time that all servers are busy, given by the following:
where
U is the utilization factor;
is the average number of customers in the system (both waiting and being served);
is the average number of customers waiting in line for service;
is the number of service providers (servers).
- 2.
Probability of an empty system (P0).
The probability that there are no customers in the system is given by the following:
where
P0 is the probability that there are no customers in the system;
is the traffic intensity, defined as ;
is the arrival rate of customers;
is the service rate per server;
is the number of servers;
is the maximum system capacity (including waiting and service).
- 3.
Probability of n customers in the system (Pn).
The probability of having exactly
n customers in the system is given by the following:
where
- 4.
Average waiting time in the queue (Wq).
The average time a customer spends in the waiting line waiting for a service is given by the following:
where
Wq is the average waiting time in the queue;
is the average number of customers in the waiting line;
is the arrival rate of customers;
Pn is the probability that the system is full.
- 5.
Average time spent in the system (W).
The average time a customer spends in the system (including waiting and service time) is given by the following:
where
W is the average time a customer spends in the system;
Wq is the average time spent waiting in the queue;
µ is the average service rate per server.
- 6.
Average number of customers waiting in line for a service (Lq).
The average number of customers waiting for a service is given by the following:
where
- 7.
Average number of customers in the system (L).
The total number of customers present in the system, including those waiting and being served, is given by the following:
where
The data generated was organized in Microsoft Excel, detailing both input parameters and output performance metrics, including queue intensity, system utilization, queue length, delays, and the probability of an idled server. This data was then imported into MATLAB 2018 for ANN model development.
In an ANN-PSO model, the PSO algorithm optimizes ANN weights and biases by iteratively refining the network parameters based on minimizing the prediction error. Mathematically, the velocity and position of each particle are updated using the following equations [
22]:
where
represents the velocity update of a particle in the search space;
represents the updated position (ANN weight/bias);
is the inertia factor controlling exploration vs. exploitation;
are acceleration coefficients influencing cognitive (Pbest) and social (Gbest) learning;
are the random values between 0 and 1 ensuring stochastic behavior.
As such, by iteratively updating ANN weights and biases using PSO, the model converges to an optimal configuration that minimizes queue-related prediction errors in telemedicine systems [
4,
23,
24]. The process involves the following steps:
Data Collection: The dataset is collected and pre-processed to ensure it is properly structured for effective model training. Input and output parameters are carefully prepared, ensuring that relevant data is available for accurate predictions.
Data for this study was generated using the Revoledu online queuing calculator, a web-based tool designed to simulate and evaluate queuing system performance [
20]. This tool enables users to input key parameters—including arrival rate (λ), service rate (μ), system capacity (N), and number of servers (s)—to compute queuing metrics such as queue length, utilization, and delays for different queuing models. For this study, the M/M/s/N model was selected to simulate a telemedicine queuing system using a scenario-based approach.
To ensure variability and robustness in training the predictive models, input values were randomly generated within the following predefined ranges supported by the Revoledu simulator:
Arrival rate (λ): 600 to 1000;
Service rate (μ): 100 to 200;
System capacity (N): 35 to 75;
Number of servers (s): 11 to 19.
A total of 100 unique simulation scenarios were produced using a uniform random sampling strategy across these ranges (as detailed in
Appendix A). To ensure reproducibility, a fixed random seed (rng default) was applied during data processing in MATLAB. These datasets were subsequently used for training and optimizing the ANN-PSO models.
The data generated was organized in Microsoft Excel, detailing both input parameters and output performance metrics, including queue intensity, system utilization, queue length, delays, and the probability of an idled server. This data was then imported into MATLAB for models’ development.
To assess the relationships between input and output variables in the 100 generated telemedicine queuing scenarios, a Spearman correlation analysis was performed. The Spearman correlation between inputs and outputs are summarized in
Table 1.
This non-parametric test reveals monotonic relationships. The arrival rate is positively correlated with queue intensity (0.55) and queue length in the system (0.22). However, it is negatively correlated with delay in the queue/system and idle probability, suggesting that the presence of more arrivals reduces the idle time and increases congestion. The service rate has a strong negative correlation with delay in the system (−0.47) and delay in the queue (−0.37), indicating that faster service reduces the wait time. But it has a slight positive effect on the idle probability (0.13). The capacity positively affects the queue length and system size, possibly due to the accommodation of more patients. It has a minimal correlation with other outputs. The number of servers is negatively correlated with delay in the queue/system (−0.57/−0.55), confirming that more servers reduce wait time. It is negatively correlated with queuing utilization (−0.32), reflecting distributed load.
The heatmap in
Figure 1 reveals strong positive correlations between arrival rate and most performance indicators such as queue intensity (ρ = 0.93), queue length in the system (ρ = 0.91), and delay in the queue (ρ = 0.84), indicating that higher arrival rates significantly intensify system congestion. Conversely, the probability of idle servers shows a moderate to strong negative correlation with input variables, particularly with arrival rate (ρ = −0.73) and queue intensity (ρ = −0.70), suggesting reduced idleness as the system load increases. These non-linear, monotonic relationships confirm that the results are not trivially explained by linear regression alone and validate the complexity and variability inherent in the system dynamics. The presented analysis supports the robustness of the scenario design and highlights the need for advanced modeling approaches beyond simple regression.
- 2.
Model Creation: The ANN model was defined in MATLAB, specifying the input and output layers. This step established the fundamental structure of the network, ensuring compatibility with the optimization process. The dataset was split into training (70%), validation (15%), and testing (15%) subsets. For ANN-PSO optimization, a 90% training and 10% testing split was adopted to allow the swarm to better explore the search space during fitness evaluation.
- 3.
Parameter Configuration:
Hyperparameter tuning was conducted using a sensitivity analysis approach, as recommended by Momeni et al. [
25], who emphasize the importance of optimizing PSO parameters such as the number of neurons (n), swarm size (N), and acceleration coefficients (C1 and C2). Multiple runs and parameter combinations were tested to identify the most effective settings for the ANN-PSO model and ensure a well-optimized network. The table used with their proposed parameter values is in the next section of this work (
Table 2).
This structured experimentation involved 36 trial configurations, each assessed using key performance indicators—Mean Square Error (MSE) and R-squared (R2)—across different queuing outputs (e.g., delay, queue length, utilization). Optimal settings varied per metric, affirming the need for metric-specific tuning.
Initialize Weights and Biases: This study started with random initial values, allowing the optimization process to efficiently explore the parameter space and identify the best configuration. To ensure reproducibility, MATLAB’s ‘rng default’ function was applied prior to data splitting and model training.
- 4.
Train Network Using PSO: The model was trained in MATLAB using Particle Swarm Optimization (PSO), where parameters are iteratively adjusted to minimize the error function. Random initial values were assigned to facilitate optimal exploration and convergence during training.
- 5.
Evaluate Performance:
The trained model was assessed using regression (R2) and error metrics (MSE) to evaluate its predictive accuracy.
Performance metrics for different configurations were recorded and analyzed to determine the effectiveness of the model.
- 6.
Model Testing: The trained network was tested using unseen test data within the defined parameter range to verify its generalization ability and evaluate how well it performs in real-world scenarios.
- 7.
Identify Optimal Configuration: The model configuration that achieves the highest R2 and lowest MSE was selected as the best-performing setup. This ensured that the network provided the most reliable predictions.
Figure 2 shows the methodology employed to integrate ANN with PSO to optimize the queuing system model.
- 8.
Deploy and Validate: The optimal model was deployed for prediction tasks, and its outputs were validated against expected values. This final step ensured the model’s robustness and its effectiveness in predicting telemedicine system performance.
Although real patient data was not used, the simulation was carefully designed using queuing theory parameters validated in the literature. The use of Revoledu allowed for the generation of 100 unique and diverse queuing scenarios with uniform coverage of the parameter space. This approach ensured a broad representation of real-world dynamics, including congestion, under-utilization, and blocking behaviors.
Unlike unconstrained models such as M/M/1 or M/M/∞, the M/M/s/N structure is more representative of actual telemedicine operations, where maximum concurrent sessions and server availability are bounded. Prior studies such as those by Ngorsed & Suesaowaluk [
9] and Perdana et al. [
10] have employed Poisson-based models with finite capacity to simulate patient loads in virtual hospitals, validating the appropriateness of the M/M/s/N framework for such settings.
4. Conclusions
This study set out to optimize telemedicine queuing systems by developing a hybrid Artificial Neural Network–Particle Swarm Optimization (ANN-PSO) model aimed at improving system performance and patient experience.
The first objective—simulating queuing scenarios to generate relevant data—was achieved using queuing theory-based simulations that captured key variables such as arrival rates, service rates, and system capacity. These simulations provided a realistic foundation for training predictive models.
The second objective—training an ANN to forecast critical performance metrics—demonstrated that ANNs can effectively predict outputs such as queue intensity, system utilization, and delays with high accuracy. This predictive capability enables telemedicine administrators to anticipate demand and make proactive decisions.
The third and central objective—optimizing the ANN model using PSO—was fulfilled by fine-tuning network parameters to enhance model generalization and minimize prediction error. Rather than replacing traditional analytical approaches, the ANN-PSO model serves as a complementary tool that offers flexible, data-driven predictions under dynamic conditions. By enabling real-time adaptation to varying patient loads, this hybrid model supports more responsive telemedicine queue management and contributes to efficient, patient-centered service delivery.
The novelty of this study lies in its integrated use of ANN-PSO for simulating and optimizing M/M/s/N telemedicine queueing systems, with a unique focus on generating and evaluating optimal configurations for multiple performance metrics across a two-phase simulation. Unlike previous works, this study offers a practical framework tailored to address queue-related inefficiencies in dynamic telemedicine environments.
The ANN-PSO framework complements closed-form analysis by functioning as a real-time predictive engine. While analytical formulas compute point estimates under strict assumptions, the ANN-PSO dynamically updates predictions based on streaming data and system fluctuations. This capability is critical in telemedicine platforms that operate in stochastic, multi-parameter environments where closed-form assumptions (e.g., constant μ, infinite queues) often fail to capture temporal variability. As demonstrated in
Section 3.1 and
Section 3.2, ANN-PSO offers reliable forecasting across multiple metrics (utilization, queue delay, idle probability), making it suitable for decision support in adaptive scheduling and load balancing.