# Optimization of Intelligent Maintenance System in Smart Factory Using State Space Search Algorithm
### Literature Review on Available Solutions  
#### 1.1.1 Unplanned Downtime (UPDT)  
Minimizing UPDT is crucial, as cost-effective production processes are essential for maintaining business competitiveness. As shown in Figure 4, if damage occurs due to unavailable spare parts in the warehouse, significant time is required for supply and repair [7]. Therefore, finding solutions to reduce such delays is necessary. UPDT can be calculated using the equation provided in reference [8], where the planned operating time (POT) is defined as the scheduled runtime of production machinery in the factory minus the actual operating time:  
\[\text{Unplanned Downtime}=\text{Planned Operating Time}-\text{Actual Operating Time} \tag{1}\]  
or Actual Operating Time = Planned Operating Time \(-\) Unplanned Downtime (2)  
The percentage of UPDT can be calculated by dividing the UPDT value obtained from Equation (1) by the POT value, as follows:  
\[\text{UPDT Rate}=\frac{\text{Unplanned Downtime}}{\text{Planned Operating Time}} \tag{3}\]  
These variables can be used interchangeably in each calculation. Consequently, the total value of machine downtime can be determined using Equation (4):  
\[\text{Total Downtime}=\text{Planned Downtime}+\text{Unplanned Downtime} \tag{4}\]  
Equipment failure indicators are primary contributors to UPDT. The failure rate of the equipment, denoted by \(\lambda\) (equipment failure rate, EFR), can be calculated by dividing the total time of failures (T) by the total number of failures (R) during the work shift:  
Figure 4: Timeline of machine failure—spare parts not available in stock. Figure 3: Plans to decrease downtime. \[\text{Equipment Failure Rate}=\frac{\text{Total Number of Failures (R)}}{\text{Total Time of Failures (T)}} \tag{5}\]  
The mean time between failures (MTBF) is another critical metric serving as an indicator of UPDT performance. The MTBF value is derived as the inverse calculation from Equation (5):  
\[\text{Mean Time Failure Rate (MTBF)}=\ \frac{1}{\lambda}=\frac{\text{Total Time of Failures (T)}}{\text{Total Number of Failures (R)}} \tag{6}\]  
UPDT serves as an indicator of lost production time due to both planned and unplanned machine downtime resulting from emergency maintenance events. These events may be caused by factors such as defective equipment, substandard machinery, operator error, mechanical issues, incorrect machine adjustments, and insufficient maintenance planning [9]. Not all planned activities succeed, and some events face complications causing delays in service restoration. Many failures result from procedural errors, so the downtime model includes procedural downtime called Unsuccessful Planned Events that show in Figure 5.  
To model accurately, we assess the failure likelihood and average outage duration for each event. Instead of evaluating each action individually, we categorize unsuccessful activities and determine the average recovery time for each category [7; 9]. For instance, the following topics will group unsuccessful activities and calculate the average recovery assessment. * Unsuccessful planned hardware updates and upgrades;
* Other unsuccessful hardware events;
* Unsuccessful firmware patches and updates;
* Unsuccessful software patches and updates;
* Unsuccessful release applications (retrofits);
* Other unsuccessful software events;
* Other unsuccessful events. Based on the data, failure probability calculations can be employed to determine the recovery time for each category of failed activities.