## 2 Materials and Methods
[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 (R\({}^{2}\))--across dif \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Number of Neurons**} & \multirow{2}{*}{**Swarm Population Size**} & \multicolumn{2}{c}{**Acceleration Factor**} \\ \cline{3-4}  & & **C\({}_{1}\)** & **C\({}_{2}\)** \\ \hline
5 & 10 & 2.25 & 2.00 \\ \hline
6 & 20 & 2.25 & 2.00 \\ \hline
7 & 50 & 1.50 & 2.25 \\ \hline
8 & 100 & 1.00 & 2.75 \\ \hline
9 & 200 & 1.50 & 2.00 \\ \hline
10 & 400 & 1.00 & 2.25 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Values of the hybrid ANN-PSO parameter. ferent 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. * **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. * **Evaluate Performance:*
* The trained model was assessed using regression (R\({}^{2}\)) 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. * **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. * **Identify Optimal Configuration**: The model configuration that achieves the highest R\({}^{2}\) 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. * **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/\(\infty\), 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 [PERSON] [9] and [PERSON] 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.