## 3 Materials and Methods  
### Study Design  
The study design for building an ED simulation system consists of several essential components: requirements analysis, hybrid simulation modeling, and experimental analysis, as illustrated in Figure 1. This study design is grounded in the concept of hybrid simulation, integrating different simulation methodologies to capture the complexities of ED operations [34].  
* Designing Simulation Process  
The initial phase involves tailoring the simulation process to meet the specific operational needs of the ED. This stage includes defining key concepts and identifying the main components of the ED system, such as patient intake, treatment processes, and resource allocation. By employing Discrete Event Simulation (DES) and Agent-Based Simulation (ABS), we can model the actual operations and patient flows within the ED with high accuracy, ensuring that the simulation reflects real-world conditions.  
\begin{table}
\begin{tabular}{l l c c c c} \hline \hline \multicolumn{1}{c}{**Research**} & \multicolumn{1}{c}{**Performance Metrics**} & \begin{tabular}{c} **Nonstationary** \\ **Demand** \\ \end{tabular} & \begin{tabular}{c} **Patient** \\ **Return** \\ \end{tabular} & \begin{tabular}{c} **Patient Number** \\ **Control** \\ \end{tabular} & \begin{tabular}{c} **Allocation** \\ **Scheduling** \\ \end{tabular} \\ \hline \multirow{3}{*}{\begin{tabular}{l} [PERSON] et al. (2022) [30] \\ [PERSON] et al. (2023) [31] \\ \end{tabular} } & \
\begin{tabular}{l} Divergence between the \\ physician’s service productivity \\ and the patient’s demands \\ Patient waiting time \\ \end{tabular} & Y & N & N & Y \\ \hline
\begin{tabular}{l} [PERSON] et al. (2023) [32] \\ [PERSON] et al. (2024) [33] \\ \end{tabular} & LoS & Y & Y & N & N \\ \hline \hline \end{tabular}
\end{table}
Table 1: _Cont._* Establishing Scheduling Policy  
The second phase focuses on developing robust scheduling policies that are critical for optimizing ED operations. These policies consider real-time conditions such as patient influx and staff availability, and they are designed to be adaptable to dynamic changes within the ED. Our aim is to minimize LoS time by implementing effective and flexible scheduling strategies that can respond promptly to varying operational demands.
* Integrating Machine Learning Models  
In the third phase, machine learning models are integrated into our scheduling strategies to handle the variability in patient influx and physician availability. We develop multiple strategies tailored to different scenarios, utilizing machine learning algorithms to optimize these strategies for enhanced operational efficiency and responsiveness in the ED setting.
* Experimentation and Evaluation  
The final phase of our study involves experimentation and evaluation of the proposed scheduling strategies. By simulating various scenarios, we assess the impact of different strategies on reducing LoS, a critical issue in ED management. This iterative process not only refines our theoretical concepts but also supports the development of adaptable systems that can be implemented across various ED settings. Through continuous improvement and rigorous testing, our framework not only enhances the functionality of ED systems but also improves overall LoS and healthcare provider efficiency.