## 3 Materials and Methods
Users can access predefined blocks representing different entities, such as miners or equipment, and define the spatial layout of the model using environment blocks. Process flow blocks facilitate the modeling of agent movements and interactions, while event blocks handle simulation triggers and responses, and decision-making blocks allow agents to adapt to changing conditions. Additionally, AnyLogic offers robust tools for analysis and visualization, including 3D visualization for spatial understanding, data analysis to identify bottlenecks, and experimentation capabilities for testing various strategies. The integration features further enable real-time data input and output with other systems, making AnyLogic a powerful platform for modeling and optimizing complex processes in underground mine evacuations [55]. As depicted in Figure 5, the pre-incident decision model randomly positioned miners in various locations throughout the mine. The evacuation decision model, shown in Figure 6, considered the reaction time during the pre-evacuation phase. Triangular and uniform distribution functions were used to enable agents to be in different locations over time, and the activities were overridden when the evacuation was initiated. Simulation. The next step revolved around the development of evacuation scenarios and evaluation of simulation model. In this study, three different scenarios were generated to examine the effects of pre-evacuation and wayfinding behaviors on evacuation performance. These scenarios included a chaotic situation, smart evacuation, and passive signage. All miners evacuated on foot, and their body size and speed were based on the described data in the data collection part. The minimum-cost network flow algorithm was utilized to determine the optimal evacuation path. In AnyLogic, each evacuee could be modeled as an agent capable of navigating a network of paths. To achieve this, custom Java code was implemented to calculate the optimal path for each agent, and the resulting routes were  
Figure 4: Underground mine layout showing levels 100, 150, and 250.  
then assigned to guide their movements. In an emergency in an underground mine, this algorithm calculated miners' distances to each \"safe location\" and directed them to the nearest one. This approach minimized the evacuation time and cost by identifying optimal escape routes, making it an effective solution for mine safety scenarios. The mathematical formulation of this algorithm was defined as follows:  
\[\sum_{(i,j)\in A}c_{ij}.x_{ij} \tag{1}\]  
\[subject\ to\sum_{j}x_{ij}-\sum_{k}x_{ki}=b_{i};\forall i\in N \tag{2}\]  
\[x_{ij}\geq 0\quad\forall\ (i,j)\in A \tag{3}\]  
where \(x_{ij}\) is units of flow from node \(i\) to node \(j\) along arc (\(i\),\(j\)), \(c_{ij}\) is the cost per unit of flow on arc (\(i\),\(j\)), A is the set of all arcs (\(i\),\(j\)) in the network, \(N\) is the set of nodes in the network, and \(b_{i}\) is the net supply or demand at node \(i\). This study examined various scenarios and cases with parameters such as pre-evacuation delay, intersection delay, and error probability to analyze the impacts of stamina and guidance on evacuation performance. Three distinct scenarios were defined: chaotic, smart evacuation, and passive signage, each characterized by unique levels of inherent delay and error probability. These inherent delays and error probabilities distinguished the scenarios at the outset. Then, the analysis process was conducted by introducing variations in error probability and delays through sensitivity analysis. The details of each simulation scenario were as follows:  
Figure 5: Constructing pre-incident model. Figure 6: Constructing evacuation model. * Chaotic Situation: Miners made decisions at every mine intersection. This scenario featured two cases: 1. Case 1: Examining evacuation time while increasing the probability of errors; 2.