Towards Mountain Fire Safety Using Fire Spread Predictive Analytics and Mountain Fire Containment in IoT Environment

Mountains are popular tourist destinations due to their climate, fresh atmosphere, breathtaking sceneries, and varied topography. However, they are at times exposed to accidents, such as fire caused due to natural hazards and human activities. Such unforeseen fire accidents have a social, economic, and environmental impact on mountain towns worldwide. Protecting mountains from such fire accidents is also very challenging in terms of the high cost of fire containment resources, tracking fire spread, and evacuating the people at risk. This paper aims to fill this gap and proposes a three-fold methodology for fire safety in the mountains. The first part of the methodology is an optimization model for effective fire containment resource utilization. The second part of the methodology is a novel ensemble model based on machine learning, the heuristic approach, and principal component regression for predictive analytics of fire spread data. The final part of the methodology consists of an Internet of Things-based task orchestration approach to notify fire safety information to safety authorities. The proposed three-fold fire safety approach provides in-time information to safety authorities for making on-time decisions to minimize the damage caused by mountain fire with minimum containment cost. The performance of optimization models is evaluated in terms of execution time and cost. The particle swarm optimization-based model performs better in terms of cost, whereas the bat algorithm performs better in terms of execution time. The prediction models’ performance is evaluated in terms of root mean square error, mean absolute error, and mean absolute percentage error. The proposed ensemble-based prediction model accuracy for fire spread and burned area prediction is higher than that of the state-of-the-art algorithms. It is evident from the results that the proposed fire safety mechanism is a step towards efficient mountain fire safety management.


Introduction
Tourists are attracted to mountain destinations due to the climate, clean air, scenic beauty, unique landscapes, heritage, and local culture. People make trips to these destinations to spend their holidays, and for sport and recreational activities [1]. Mountain-based tourist destinations are exposed to accidents such as fires caused due to natural hazards and tourist activities. Such accidental fire events have a social, economic, and environmental impact on mountain towns worldwide. Hence, these tourist resorts should be designed with an acceptable level of fire safety to minimize the risks of fire hazards. Fire safety is a significant concern, and recently, many scientific studies have proposed fire safety mechanisms [2]. Fire safety policies are considered in the construction of hotels, restaurants, and tourist resorts in the mountains. Protection of these tourist places is essential, and it should be repaired and made functional after a fire hazard occurs [3]. As part of the essential solutions, tourist places are designed with an evacuation plan in case of fire efficiently. One of the issues regarding mountain fire containment is resource over-usage. The fire safety system's objective in the IoT environment will minimize resources' net cost to reduce resource over-usage. Optimization solutions are useful where the goal is to find the best solution from all possible solutions. Predictive analytics on fire spread information will help authorities make efficient fire containment decisions. The main contributions of this study are: • Optimization model for minimizing fire containment cost. • Predictive Optimization model for improving optimization results. • Ensemble Model for fire spread, and fire-burned area prediction. • IoT Task orchestration-based notification system for fire spread and containment information.
The optimization model is based on an objective function to optimize the mountain fire containment cost. The objective function is utilized by particle swarm optimization (PSO) to minimize the fire containment cost. Artificial neural network (ANN)-PSO is used as a predictive optimization model for enhancing the optimization mechanism of fire containment cost. The ensemble model is based on ANN, principal component regression (PCR), and Kalman filter (KL). The ensemble model is used for predictive analytics on fire spread and the burned area with higher accuracy than traditional machine learning and heuristic approaches. The IoT task orchestration-based notification system is used to notify analysis information to safety authorities in real-time. The task orchestrationbased notification system has been proven useful for latency-critical applications [31,32]. Prediction and optimization models were evaluated on the dataset from Hallasan mountain of Jeju Island, South Korea. Pre-trained prediction and optimization models are deployed at the edge devices near the mountain tourists resort. It can be used for real-time predictive analytics of fire spread, a burned area, containment cost, and optimized and predictive optimization of resources. Predictive analysis helps the authorities effectively manage and design fire safety mechanisms and policies. Figure 1 represents a conceptual diagram of our proposed fire safety mechanism. Wireless sensing devices are used to detect and notify fire in the IoT environment. For example, a temperature sensor detects heat, a smoke sensor detects smoke, and a flame can be detected from the fire parameters. Fixed fire detection sensors are installed in the mountain's towns at critical checkpoints. If a fire occurs, actuators are used to notify the fire, and the fire profile is sent to authorities using an IoT edge gateway. Disposable sensors are dropped over the random fire locations to collect the fire information in a less intrusive way. An edge gateway-based device provides descriptive and predictive analytics based on the fire profile data, such as the fire spread area, burned area, and fire containment cost using the pre-trained models. These analytics are sent to fire safety authorities' IoT servers. The IoT server further processes these analytics to provide an optimized cost of fire containment. Safety authorities activate the evacuation plan for the people at risk, and the firefighter team starts suppressing the fire to contain it by using available resources. The rest of the paper is structured as follows. Related work is presented in Section 2; Section 3 presents the material and methods. Section 4 presents the results and discussion of the proposed mountain fire safety system. Section 5 presents the conclusion and future work directions.

Related Work
This section presents studies of fire detection, notification, and fire safety mechanisms for managing forest and mountain fires. Fires in the mountains and forest can spread to mountain towns due to fueling materials in the surroundings. Fire spread to agricultural lands can cause massive damage. Fire spread is affected by weather parameters, vegetation, and wind factors. These fires damage everything that comes in its spread lines, such as living organisms, structures, and plants, in a matter of minutes. Wildfires make mountains' town residents homeless, burn and make barren agricultural land, and enormous resources are spent on repairing the lands and providing relief to the mountains' town residents. Residents must be relocated, buildings and homes must be rebuilt, and a large amount of smoke pollutes the air and increases the toxicity level. These studies can be categorized into notification at the earliest stage possible, fire propagation modeling and tracking, peopletracking and localization, people evacuation, health plans, and resource minimization to suppress the fire.
Fire notification systems aim to notify the safety authorities about fire occurrences at the earliest stage possible. These fire notification systems can be categorized into two main types: First, utilisation of sensing information from sensors; second, utilisation of real camera images, video streams, and image datasets. Camera and image framebased detection techniques identify various fire events segmented from the landscape images [33]. Unmanned aerial vehicle (UAV)-based systems were developed recently for wildfire detection and fire-spread tracking. UAV-based fire detection systems collect images of the fire area in real-time and send them to the laboratory for analysis [34]. Fire detection using CCTV video streams is the most reliable and fastest mechanism among the image processing techniques [35][36][37]. Video stream-based models use color information, such as red, green, and blue for fire detection and notification [38]. Image processing-based techniques involve segmentation of a candidate region. A fuzzy logic-based system utilizes segmented region information for real-time verification of fires. Video-streams-based fire detection models are sensitive to environmental interference. Color dispersion models were developed for fire detection to adapt to environmental interference [39]. Camera-based fire detection systems require high-resolution cameras to capture the fire area's images. Such a high-quality camera-based detection system can cause bandwidth and storage issues. AlexNet is an adaptive prioritization mechanism to change the status of the camera from high to low and normal resolution [40].
Fire detection systems analyze sensing information and monitor the wireless sensing network [41]. Analysis of sensing network information is widely used for military applications, such as monitoring animals and detecting wildfire [42]. Some studies utilize ZigBee protocol suit-based IoT solutions for their wildfire detection mechanism [43]. In the literature, some contributions have been made for wildfire localization. Identifying the fire intensity and magnitude-based location spots are essential for effective wildfire suppression. Mapping approaches for forestlands are helpful in the localization of the fire. The ANN-based mapping model was proposed for forestlands in the Mediterranean [44]. The ANN model is used for learning weights instead of handcrafted coefficients. The model performance is excellent in static fire probability predictions, but inefficient in dynamic fire fronts. Determining fire points where the fire intensity is high, as well as the direction of fire spread are crucial factors for suppressing huge fires. The fire occurrence needs fire-fighting expert confirmation by visiting the fire location; however, it is risky and timeconsuming. Researchers have used visual sensor-based fire detection systems to localize fires [45]. Visual sensor systems enable fire detection and confirmation remotely without visiting the place of the wildfire [46]. There are some problems of visual sensor-based fire detection systems, such as low signal transmission, bad quality of collected images, and irregularity of lighting. In the literature, a widely used visual-based fire detection model is the Convolutional Neural Networks (CNN) [47,48]. The CNN improves fire detection accuracy, hence minimizing the harm caused by a fire outbreak.
Some studies proposed mathematical modeling-based approaches for the wildfire to reproduce and analyze fire behavior. These systems provide fire spread analysis, such as fire spread direction, fire intensity, vegetation matter or fuel type, weather, and climate statistics for wildfire suppression. Prometheus, a fire management system, is designed to predict fire spread rates and behavior [49].
Fire behavior models were used previously for decisions related to fire management [50,51]. The model predicts fire spread rate and intensity in a continuous fuel derma in the forest. The model is efficient for brush fields, but inefficient for crown fire applications [52]. Famous fire simulators, such as Farsite and Prometheus, work on the Huygens principle. The Huygens principle of wave propagation simulates firefronts like a wave of light moving and shifting forward in space [53]. A wildfire prediction model based on cellular and hexagonal automata are developed for homogenous and heterogeneous forests [54,55]. In the paper [56], authors used an extreme machine learning-based approach to simulate wildfire spread. The fire region is simulated as a grid of cells with probability. If a cell's probability is above a threshold value, then the cell is considered to be burning. The ANN model is trained using existing vegetation and topographic data to predict the igniting probability of the cells. These systems also simulate an evacuation plan of the residence, and an efficient strategy for firefighters to reduce risk and minimize fire damage. Table 1 presents a summary of the well-known fire management system. Fire management systems are summarized based on the type of modules, methodology approach, cost, efficiency, rate of false alarm, detection delay, and localization accuracy.
Fire detection using optical camera-based approaches is costly and reliable, but detection delay is long. Fire detection systems based on wireless sensor networks are more reliable as the cost is average, faulty alarm repetition is low, fire localization accuracy is high, and detection delay is low. Fire detection and notification based on IoT mechanisms are far better than traditional wireless sensor approaches in terms of delay and reliability. Nonetheless, latency and reliability is still a hot topic for remote fire detection and notification. Apart from the problems mentioned above, the issues of existing IoT-based platforms are: • Need for new IoT architecture to address the reliability and latency issues. • Existing IoT-based fire detection platforms are not used for multiple applications, such as fire spread predictive analytics. • Existing IoT-based fire detection platforms do not address burned area and fire spread prediction. • Existing IoT-based fire detection platforms do not optimize fire suppression operations, such as fire containment cost optimization. • Predictive optimization models have never been used for fire containment cost optimization.
This paper addresses the aforementioned problems, such as fire spread and burned area prediction in the IoT environment. We also propose optimization and predictive optimization-based solutions for fire containment resource cost minimization. We revamped our existing IoT-based fire detection and notification architecture for fire safety information notifications.  [38] Video processing Yes No high high low medium long Reliable Fire-detection [36] Video analytics Yes No high high low high medium Vision-based Fire-detection [37] Vision-based approach Yes No medium high low -medium Wildfire monitoring [41] Wildfire Sensorboard No Yes medium high medium high low Forest Fire Detection system [57] IoT No Yes medium medium --low MTO-IoT-based fire detection [28] IoT No Yes low high low high low

Materials and Methods
This section presents the design of the proposed mountain fire safety mechanism.There are three components of the proposed mountain fire safety mechanism. The first component is an optimization model for effective fire containment resource utilization. The second component is a prediction model based on an ensemble approach for predictive analytics of fire spread and burn data in an IoT-Edge environment. The ensemble prediction model is on ANN, PCR, and KL algorithms based on an automated machine learning paradigm (AutoML). The third component is the IoT-Virtual objects-based task orchestration approach for real-time remote notification of fire safety information to safety authorities. The proposed fire safety mechanism design is given in Figure 2. The proposed fire safety mechanism provides services such as fire spread notification, fire spread prediction, fire burned area prediction, fire containment cost prediction, fire containment cost minimization, and notification of people at risk for evacuation planning. The first part of the proposed fire safety system shows the integrated dataset from the fire spread data, fire history, and weather data. The integrated dataset is explained in detail in Section 4.1. We apply traditional pre-processing approaches to prepare the dataset.  Fire spread data is the output of the IoT-Virtual object-based task orchestration system (IVToS), which generate a fire spread profile using fire safety sensors. IVToS provides notification services for fire safety information, such as fire spread notification, notification of the number of people at risk, and notification of fire spread rate. IVToS provides tasklevel management of fire safety services from the functional unit of services known as microservices. A virtual object is formed based on the virtualization of fire safety devices. Tasks are paired with virtual objects based on the correlation index. Task virtual object pairs with the highest correlation index are deployed to provide notification services with minimum delay. The proof of concept of this idea is presented in detail in our previous study of task-level management for thermal comfort in a smart home [31], and mountain fire detection and notification systems [28]. Descriptive and predictive analysis is performed on the integrated dataset of fire history data, the fire spread data, and weather data. We trained, tested, and evaluated our proposed ensemble model on the integrated dataset to predict fire spread, the burned area, and fire containment cost. The real-time fire spread profile from IVTOS is then used as input to the proposed prediction model to predict the fire spread, burned area, and fire containment cost. An objective function is proposed for minimizing the cost of fire containment resources. The objective function is explained in detail in Section 3.1 for formulation of the objective function. For objective function evaluation, we implemented the optimization function using state-of-the-art optimization algorithms. We further used the predictive optimization approach to improve the optimization results.
For simplicity, fire safety tasks are referred to as fire tasks, and fire safety virtual objects as virtual objects in the paper's context. Fire task mapping is the mechanism of mapping fire safety tasks on virtual objects of fire safety devices to generate fire safety tasks and virtual object pairs. The fire task scheduling mechanism produces optimal order pairs of these mapping pairs. Fire task scheduling enables tasks to be executed in the right order; for example, the system should execute sensing data reading tasks first and those tasks that need sensing data later, such as computing the fire intensity task. Processes are created for one or more tasks and executed on the fire safety devices at the scheduled time. Task allocation is the mechanism of allocating fire tasks based on related processes on fire safety IoT devices. Fire safety tasks are stored in the tasks repository. The virtual device manager module generates virtual objects from the IoT devices registered at the IoT server registry. The virtual device manager fetches device metadata, supported protocols, supported methods, and provides an interface for adding, deleting, and updating virtual objects.
Fire task mapping managers have access to fire safety tasks and virtual object repositories. A fire task mapping manager's main functionality is retrieving a list of fire tasks and virtual objects and generating their pairs. A fire task mapping manager also visualizes the connection between fire tasks and virtual objects using an arrow line from the task to a virtual object. These fire task and virtual object pairs are stored in the mapping repository for availability to the scheduling module. A fire task scheduling manager will use task mapping pairs as an input and produce optimal ordered pairs of these tasks and virtual objects using rate te-monotonic scheduling algorithms. Fire safety tasks and virtual object ordered pairs are stored in the fire tasks' scheduling repository. The fire task allocation manager creates processes from these ordered pairs and deploys them on fire safety devices. The devices' responses are sent back to the prediction module for predictive analytics and optimization. Results from predictive analytics and optimization are sent to the public administration and security department for making mountain fire containment plans. The IVToS results are in the form of a fire spread profile, containing fire spread parameter information. Our proposed pre-trained ensemble model predicts the fire spread profile and fire containment cost based on the fire spread parameters of the received fire spread profile. Figure 3 represents a seven-layered architecture diagram of the proposed safety mechanism. The fire safety problems layer consists of fire safety problems, such as containment resource over usage, fire spread estimation, notification, loss of human life, and injury. The safety goals layer consists of goals for solving problems of the fire safety problems layer.
For example, to solve the problem of fire containment resource over usage, we minimize the sum of the fire containment cost using our proposed objective function and state-of-the-art optimization algorithms. The fire spread model is used for mountain fire spread calculation. The physical layer manages physical fire safety IoT resources. The fire spread parameter layers contain fire spread parameters from the fire profile, such as temperature, fire growth factor, wind velocity, and fire flame velocity, to name a few. Modeling layers provide a mathematical formulation of fire spread and objective function for minimizing the sum of fire containment costs. Mountains' town residents and tourists are registered using the IVToS application. Entry and exit information of these people are used to monitor residents and tourists in the mountains' tourist spots. IVToS provide in-time notification of the people at risk to monitor the evacuation of people at risk.  Fire safety solution layers provide solutions to individual fire safety problems. These solutions include estimation and notification of mountain fire spread at the earliest stage possible and sending fire profile information to fire safety authorities. As discussed earlier, IVToS is used for real-time notification of fire spread, the number of people at risk, and fire containment cost. Optimization and predictive optimization models use the objective function from the modeling layer for minimizing the sum of fire containment costs. The task orchestration layer uses IVToS for communication between the edge gateway and the server of the fire safety authorities. The IoT device management layer provides management of the fire safety devices, such as sensors and actuators. Figure 4 represents the interaction model of the mountain fire safety system based on the proposed architecture. Fire safety sensing and actuating devices are virtualized by a virtual object-based task orchestration system. The task orchestration module output orders pairs of tasks and virtual objects. Processes are created based on these ordered pairs of tasks and virtual objects. The process will follow the order while executing fire tasks on the fire spread detection and notification devices. Mountain fire spread is notified using the notification module. The notification module contains actuating devices, such as fire alarms, to alert the mountains' town residents, tourists, and fire safety authorities.  The prediction module utilizes the pre-trained model based on the proposed ensemble approach to predict the fire profile information. The prediction module predicts fire spread and fire containment costs based on the fire spread profile from IVToS. Constraints, such as resource selection, resource over usage penalty, and cost per unit affected area is initialized for optimization purposes. The optimal fire containment cost is achieved through the optimization module by analyzing the fire containment resources and fire spread parameters to minimize the fire containment cost. Mountains' fire safety authorities are notified with analytics of the fire spread information and optimal fire containment resource costs. Fire safety authorities use this fire spread and containment information to plan evacuation and mountain fire containment.

Formulation of Objective Function
This section presents the mathematical formulation of the objective function used for mountain fire resource containment. Table 2 presents notions used for the formulation of the objective function. The goal of the proposed objective function is to minimize the sum of the cost of fire containment resources. Fire spread is directly proportional to fire containment resources; hence, minimizing the fire spread of mountain fires requires more fire containment resources. Equation (1) calculates the mountain fire heat rate H rate in kilowatts based on the fire growth factor F growth , initial fire burning time t initial , and smouldering time t Smouldering . The time when the fire spread and intensity is low and decreasing is called the smouldering time. (1) Equation (2) calculates fire flame angles f angle based on the tangent of F growth and ratios of wind velocity v wind and fire flame velocity v f lame . Equation (3) (1) and f angle from Equation (2).
Equation (5) presents the proportionality between the cost of fire containment F cost and fire spread rate F spread . Fire containment cost is directly proportional to fire spread-for example as fire spread decreases, the fire containment cost decreases, and vice versa.
Increase in the cost per meter of mountain fire per unit time denoted by E increase is calculated using Equation (6). E increase is the product of an increase in the mountain fire costs in period t denoted by NVC t , and cost per meter of mountain fire, denoted by F Acost .
The cost of mountain fire containment is given by Equation (7), whereas V cost is the cost associated with per-hour usage of mountain fire containment resources, and t counter is a fire containment time-period counter. R min is the threshold value of maximum resource over usage allowed.
Equation (8) represents our final objective function for the minimization of mountain fire containment costs based on V cost , t counter , E increase , and R min . The objective function's goal is to minimize the fire containment cost by minimizing resources' overuse in a minimum time.

Results and Discussions
This section discusses the results and implementation environment of the proposed fire safety mechanism in the case study of mountain fires. Table 3 explains the software stack used in this study. For simulation data, the smartQfire tool was used. Anaconda IDE was used for python-based development and the testing environment. The IoT server is configured on Raspberry PI, and all fire safety devices, such as sensors and actuators, are registered in the IoT server, and a registry is maintained. The IoT server registry maintains the safety device status, connectivity, and availability status. For the implementation of predictive models and server-level programming, Python is used. The integrated dataset is in a tabular form prepared from weather data, fire profile history data, and fire spread simulation data. Traditional pre-processing approaches, such as missing data completion, duplicate records removal, and data normalization are applied to achieve the complete dataset.

Dataset
The dataset is prepared using fire spread data, fire history, and weather data. Data sources include Hallasan's dataset [28], the Kaggle Wildfire Dataset [58], and UCI Dataset [59]. For fire spread and containment simulation data, the SmartQFire Tool was used [60]. The integrated dataset contains 1517 incidents of mountain and wildfires with information. Table 4 presents dataset features and their description.

Descriptive Analysis
Descriptive analytics techniques are widely used as the first step to understand the data and prepare it for the prediction models. The descriptive analysis summarizes dataset features to meaningful information to develop prediction models. Descriptive analysis is es-sential for conducting statistical experiments and analyses. It is used to understand the data distribution, outliers, and for typo detection. It is used to visualize the relationship among dataset features, making the data ready for modeling and statistical analyses. Correlation analysis is used to engineer feature selection for building predictive analysis models.  Figure 5 presents sensing data from the dataset's weather features. Three sensing data features of the dataset temperature, humidity, and wind, are visualized in the Figure. The X-axis represents data samples from the integrated dataset, whereas Y-axis represents the sensing data feature value. The relative humidity is the amount of moisture in the mountain air compared to the total air. The relative humidity is considered for studies because it holds pressure and temperature. A fire is more intense if the relative humidity falls below 30 percent. If the relative humidity is above 60 percent, the mountain fire intensity is low, and the spread is not increasing. Wind velocity contributes to the fire spread, as presented in fire spread Equation (4). Similarly, temperature directly contributes to the heat rate of fire. These three parameters are used to calculate the fire's intensity-a fire's intensity may be more intense, low, or highly intense. Correlation analysis on dataset features is given in Figure 6. We used correlation analysis to find out how some fire data features are related to others, and the strength of their correlation.  If two data features are highly correlated, they have a strong relationship, and weak correlating features cannot be easily related. As the models we trained in this study were regression models, correlation analysis helped in the best output from the regression models. The correlated relationship between two data features is measured as the correlation coefficient. Figure 6 shows all features' correlation coefficients with other data features using the heat map. We made the correlation in two phases: data features used for fire containment costs and fire spread, and second for burned area prediction. The correlation coefficient between fire containment and spread data features is above 0.9, which means these features are strongly correlated. There is a positive correlation between the burned area and sensing data features.
The dataset is split into the training and test sets with a ratio of 70 and 30. The training dataset was used for training purposes, and test data were used for the testing purpose of the predictive analytics models. For prediction model evaluation, we trained the proposed model with other state-of-the-art machine learning models for burned area prediction and fire spread prediction. Predictive analytics enable fire safety authorities to plan fire containment, and suppression resources to be dispatched efficiently. Optimal planning of fire containment resources is possible with the help of optimization. We used an optimization model to minimize the cost of mountain fire containment resources. Our optimization approach assigns an optimal index based on the list of all possible fire lines and burned area prediction. Fire containment resources are dispatched to the fire line with the minimum optimal index. The minimum optimal index will lead to less fire line perimeters and a smaller burned area. Fire safety planning includes various action lists to minimize the damage caused by mountain fires. If the fire is spreading, the predictive analytics suggest increasing the fire containment resources. In contrast, the optimization module optimizes the cost and fulfills the objective with minimum use of resources.

Predictive Analysis
This section presents predictive analysis models developed by burned area and fire spread prediction. The predictive analysis technique predicts what will happen next. For example, if the fire is detected and fire spread is started, then what will be the fire spread, burned area, and fire containment cost after a period of time? Predictive analytics provide fire safety authorities with insights into what actions are to be needed based on the information collected. Based on past research, studies assumed that no algorithm could predict a future event with absolute accuracy. Hence, predicting the mountain fire information with small errors will be a reliable estimation for fire containment planning.
We used three types of predictive analyses in this study: fire spread prediction, burned area prediction, and fire containment cost optimization. We trained our proposed ensemble approach of the artificial neural network (ANN), principal component regression (PCR), and the Kalman filter (KF) for the burned area and fire spread area. For evaluating the effectiveness of the proposed prediction model, we also trained ANN, random forest (RF), and the support vector regression (SVR). Details of the performance analysis of these models are presented in the performance analysis section. ANN is based on a paradigm similar to the human brain, learning through historical data and experiences. ANN is widely used due to its successful solution in every field of science. RF is one mostly used ensemble approach in the literature for various solutions. SVR is a type of support vector machine (SVM) widely used for regression analysis. It works on the principle of fitting the data samples between the lines while avoiding margin violation rules. Figure 7 presents mountain fire spread prediction using these prediction models. Figure 7a presents actual fire spread in the dataset and predicted fire spread using the proposed model. Figure 7b presents actual fire spread and predicted fire spread using the ANN Model. Figure 7c presents actual fire spread and predicted fire spread using the SVR model, and Figure 7d presents actual fire spread and predicted fire spread using the RF model.The X-axis of all these subfigures represents fire spread data samples, whereas the Y-axis represents the fire spread of mountain fires in square feet.  Mountain fire usually spreads due to heat transfer, meaning that fire flows around a flammable material path. As the fire intensity increases, it yields more heat. Radiation is another source of mountain fire spread that transfers through electromagnetic nature waves. In mountain towns, those materials that can absorb and transfer heat energy enable fire spread, such as materials made of steel components. Figure 8 presents a comparison of mountain fire-burned area prediction. Figure 8a presents the actual burned area in the dataset and predicted burned area using the proposed model. Figure 8b presents the actual burned area and predicted burned area using the ANN Model. Figure 8c presents the actual burned area and predicted burned area using the SVR Model, and Figure 8d presents the actual burned area and predicted burned area using the RF model.   The X-axis of all these subfigures represents data samples of the integrated dataset. Yaxis represents the burned area in square meters. Mountain fire-burned areas are recognized by charcoal deposits, ash, vegetation structure alteration, and removal of ash. Fire safety authorities need a cartographic representation of the burned area. For instance, in the burned area's predictive analysis, we provide a general estimation of the burned area; thus, the fire fighting manager knows the spatial pattern of fire behaviour. Prediction modelbased fire analysis is performed to get meaningful information for a better understanding of the risk factors and effects of the fire.

Case Study
In this section, we explain the case study of the proposed approach in terms of the case study of Hallasan Mountain. For the case study, the mountains' fire detection and notification study dataset is used [28]. The data instances are based on the location of Hallasan. Hallasan is the highest mountain and shield volcano on Jeju. Hallasan is among three prominent mountain-based tourist destinations in South Korea. There are two parks designed around the mountain area for tourists. The Quantum Geographic Information System (QGIS) is an open-source geographic information system software used to visualize the data instances and fire points for this case study. Figure 9 represents the visualization of Hallasan mountain data in QGIS software.
This case study demonstrates how fire spread prediction, burned area prediction, and optimization of fire containment resources provide valuable information for fire containment. The experiment starts from fire spread and predicted fire spread simulations obtained from the proposed ensemble prediction model. Given the fire spread scenario, the optimization module utilizes the proposed objective function to compute the resource allocation plans to contain the fire spread. The simulation space is divided into a grid of 300 × 300 cells. The cell size is 45 × 45 feet, with a slope and aspect of 0. The wind speed is generated based on the random uniform function of 2-30 m/h, while the wind direction is from a uniform function of 30-130. The center cell (150 × 150) is used as a fire ignition point. The simulation duration was 8 h for the fire burned area, and predicted fire spread, as well as the fire perimeters were recorded. The optimization model computes the optimal index based on all the possible firefront perimeters and, in the end, selects the firefront perimeters with minimum index. Suppose that the initial igniting cell is the center of the cellular space. The top five optimal fire lines using direct attack are given in Table 5. Fire line 1 is the recommended fire line with a minimum length of 1.4km, and the area burned is the least. The optimization algorithm selects this fire line for dispatching the resources to minimize the containment cost.   During indirect attack, the proposed optimization algorithm suggests the fire line with the minimum optimal index of 0.07 for dispatching the fire resources. Fire lines 2 and 5 are closed in the optimal index, as well as fire line length and burned area. However, fire line 5 is the best among all the top five recommended fire line configurations. The top five optimal fire lines using indirect attack are given in Table 6.

Performance Analysis
This section of the study discusses the performance analysis of the proposed prediction models and optimization algorithms. Prediction models are evaluated in terms of Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and mean absolute percentage error (MAPE). RMSE, in our case, is the average absolute error difference between predicted fire spread and actual fire spread, predicted burned area, and burned area in the meter. Mean square error measures the error of a prediction model in quantitative data, such as burned area, fire spread, and fire containment costs. Mean square error is a type of distance between the vector of the predicted fire parameter value and the vector of the actual fire parameter value. MAE in the fire safety prediction mechanisms measures the absolute error of the observed phenomenon and predicted phenomena, such as the actual value and prediction of containment costs, burned area, and fire spread prediction. MAPE is the mean absolute percentage of deviation in prediction accuracy of a forecasting method in statistics. MAPE is used to compute an average deviation percentage found in fire spread, a burned area, and fire containment cost prediction. Performance results of the proposed prediction approach for fire spread prediction are compared to ANN, RF, and SVR in Table 7. The performance analysis of fire spread prediction shows that the proposed approach's MAPE value is less than the rest of the models, showing that the proposed model can perform well in a dynamic fire environment. The second good model is the ANN model. Performance results of the proposed prediction approach for fire burned area prediction are compared to ANN, RF, and SVR in Table 8. In the case of burned area prediction, our proposed model's MAPE is 9.04, whereas the second good model is the RF, with a MAPE value of 17.04. The optimization model's evaluation based on the objective function and prediction optimization is done with different well-known solutions. For the comparison, Particle Swarm Optimization (PSO), Genetic Algorithm (GA), and Bat Algorithm (BA) were used. The performance evaluation is based on containment cost and time efficiency. Figure 10a shows the execution time response of PSO, GA, and BA. It is clear from the Figure that BA performs best in terms of execution, and PSO is the slowest. The execution time is taken as the best among different configurations of PSO parameters, such as changes in the number of iterations and populations, to name a few. BA and GA solve fire containment optimization functions efficiently; also, their execution times are better than PSO. The next crucial parameter on which evaluation of the optimization models is performed is the optimal cost. The optimization algorithm's objective is to minimize the total fire containment cost. Figure 10b shows the cost comparison of PSO, GA, and BA in terms of total fire containment costs, which is the total cost of the pre-suppression, suppression, and post-suppression of the fire.

Comparison and Significance
This research study has three contributions for IoT-based fire spread prediction and containment. A predictive optimization model is a first-ever attempt toward fire containment resource optimization. This study's second contribution was proposing an ensemble prediction model for improving the accuracy of fire spread and burned area prediction. This study's third contribution is the revamping of our previously proposed task orchestration architecture to notify fire safety information at the earliest stage possible. In the literature, fire detection and notification systems were proposed in the IoT environment, but these studies do not provide predictive analytics or optimization mechanisms. Our previous study attempted fire detection and notification based on IoT edge architecture. This study used existing IoT edge architecture to notify fire spread, the burned area, and fire containment optimization information. First and foremost, the proposed fire safety architecture addresses fire containment aspects of mountain fire management in the IoT environment. However, the proposed architecture is scaleable to other safety modules, such as tourist tracking and activity monitoring, as well as optimal evacuation planning based on predictive optimization. Table 9 provides a comparison of the proposed fire safety mechanism and existing fire management platforms. We consider support for descriptive and predictive analysis, remote monitoring, optimization, and predictive optimization modules for the comparative analysis. The freedom from hardware dependence, predictive analytics, and optimization-based problem solutions in an IoT-edge environment makes our fire safety solution a significant step towards mountain-fire safety. Table 9. Comparative analysis of the proposed fire safety system, with existing fire management platforms.

Conclusions
This paper aimed to address the fire safety problem using a three-fold methodology. The first part of the methodology is an optimization model for the effective utilization of fire containment resources. The second part of the methodology is a novel ensemblebased prediction model for fire spread and burned area prediction. The final part of the methodology is IoT task orchestration-based notification system for communicating the fire safety information. The performance of optimization models was evaluated in terms of execution time and cost. The particle swarm optimization-based model performed better in terms of cost, whereas the bat algorithm performed better in terms of execution time. Performance results of the proposed ensemble-based model were evaluated in terms of root mean square error, mean absolute error, and mean absolute percentage error. It is evident from the results that the proposed ensemble model performs prediction with a small error compared to the state-of-the-art prediction algorithms. The proposed prediction model performs better for fire spread and burned area prediction. A case study application of Hallasan mountain was implemented for fire line front recommendation. Performance results suggest that the proposed fire safety system can produce useful in-time information for efficient mountain fire containment planning. As part of the future work, the proposed fire safety system's information will be utilized for fire safety policies. Furthermore, we will consider an integrated approach of software-defined networking, machine learning, and IoT to improve our proposed mountain fire safety system's performance.