An Alert-Assisted Inspection Policy for a Production Process with Imperfect Condition Signals An alert-assisted inspection policy for a production process with imperfect condition signals

We study the inspection scheduling decisions for a production process that goes through a hidden defec- tive state before its failure. The production process is equipped with a predictive model, generating alert and no-alert signals. An alert signal indicates that production process is in the defective state, while a no-alert signal indicates it is in the healthy state. The signals are imperfect, meaning that an alert signal can be generated for a healthy process and a no-alert signal can be generated for a defective process. Only a costly inspection can detect the true condition. We introduce a new inspection policy, which gen-eralizes the age-based inspection policy that performs planned inspections at predetermined intervals, by considering that an inspection can also be triggered by a certain number of alerts from the predictive model. To optimize the proposed inspection policy, a stochastic dynamic programming model is formu- lated with the objective of minimizing the long-run expected cost rate. The performance improvement achieved by the optimal policy is quantiﬁed by comparing it to practically relevant benchmark policies. Numerical experiments with a set of realistic problem instances show that adding alert-triggered inspections to traditional age-based inspection scheduling brings up to 44% reduction in the expected cost rate when the predictive model is suﬃciently accurate. Characterizing the performance of the optimal policy at a given level of imperfectness is especially useful in practice as it allows making an assessment on how much can be invested to justify a certain level of improvement in the predictive model.


Introduction
Data-driven models are becoming popular for predicting the condition of industrial systems. Examples include building a random-forest classifier to generate predictive alerts for signaling the defective condition of a machine tool ( Wang, 2017 ) and for predicting the condition of a medical-grade monitor in an X-ray scanner ( van Lohuizen, 2018 ). However, the predictions from datadriven models can be incorrect (i.e., due to limitations in data quality, model misspecification, or prediction errors), leading to a wrong conclusion on the true condition of the asset. In such a case, it is unlikely to completely replace conventional inspection policies (e.g., inspections at predetermined intervals) with purely prediction-driven inspection policies. Finding the right balance between these two is key to obtain the most benefit from data-driven models.
The motivation behind this work comes from our collaboration with Philips Consumer Lifestyle (PCL), a global consumerelectronics manufacturer. PCL produces electric shavers by using E-mail address: a.e.akcay@tue.nl highly precise electrochemical machining tools. These tools are subject to random failures, and before a tool fails, it goes through a defective phase where the tool can continue processing new products (see Akcay, Topan, and van Houtum 2021 for details). Only a physical inspection can exactly detect the true condition of the tool. Recently, a data-driven prediction model has been developed to generate an alert when there is an indication of tool failure ( Wang, 2017 ). It then becomes a practical question to answer how to react to these alerts given that they are not always correct.
In the current practice of PCL, a tool is inspected as soon as a specific number of products has been processed ( Akcay et al., 2021;Maarse, 2017 ). This is essentially a periodic-inspection policy and can be considered as an extreme because the inspection is triggered only by a fixed amount of usage and any information on the real-time condition of the tool is ignored. The other extreme is the inspect-at-first-alert policy , which means not to keep track of the usage but perform an inspection as soon as there is an alert from the predictive model. This could work well if the alert and no-alert signals are highly accurate. However, these signals are imperfect, meaning that an alert signal can be raised for a healthy tool (i.e., false positive) while it is possible to observe a no-alert signal for a defective tool (i.e., false negative). Thus, a good inspection policy requires the right balance between trusting the alerts from the predictive model and still performing inspections at predetermined intervals.
In order to achieve this balance, we introduce a new inspection policy referred to as the ( s, u ) -policy . In a production process with a hidden operational state (i.e., the process can be in a healthy or defective state, but this is not observed directly) and with a defect-prediction model generating an alert if the state of the process is estimated as defective, the ( s, u ) -policy works as follows: for a production process at age τ , an inspection is scheduled to be performed as soon as the process completes u (τ ) additional products or s (τ ) number of alerts is observed, whichever occurs first. Notice that the ( s, u ) -policy is very general. As special cases, it reduces to the periodic inspection policy (i.e., when s (τ ) = ∞ and u (τ ) is fixed for all τ ), the age-based inspection policy of Maillart and Pollock (2002) with aperiodic inspection intervals (i.e., when s (τ ) = ∞ for all τ ), and the inspect-at-first-alert policy (i.e., when s (τ ) = 1 and u (τ ) = ∞ for all τ ). The ( s, u ) -policy aims to strike a balance between performing an inspection not too early and not too late given the imperfectness of the alert and no-alert signals. Although our problem is motivated from a specific company, it captures a more general situation where imperfect information is periodically revealed about a system's true condition, and only costly inspections can identify this true condition with certainty.
In this paper, we specifically answer the following research questions: (i) How to characterize the long-run expected-cost rate under the ( s, u ) -policy and solve for the optimal value of s (τ ) and u (τ ) at each possible process age τ ? (ii) When is it most beneficial to add an alert-triggered inspection option to conventional age-based inspection scheduling at predetermined intervals? When is it sufficient to only have planned inspections at predetermined intervals or to only have alert-driven inspections? (iii) What is the economic value of a better defect-prediction model? In particular, what is the reduction in the expected cost rate by improving the false-positive rate and the false-negative rate of the defectprediction model?
The contributions of our paper can be summarized as follows.
To find the optimal ( s, u ) -policy we formulate a stochastic dynamic programming model with the objective of minimizing the long-run expected cost rate by considering that the number of products processed in the healthy and defective states have general probability distributions. As an input for this formulation, the alert-arrival process is characterized in the presence of a defectprediction model that generates imperfect alert and no-alert signals. To the best of our knowledge, the ( s, u ) -policy is new and has not been studied in the literature before. With the increasing popularity of data-driven prediction models for condition monitoring, the ( s, u ) -policy is especially attractive when the aim is to support traditional age-based inspection policies with the imperfect signals from such prediction models. It is often argued that smart maintenance requires blending traditional approaches with new tools and techniques, and the two need to work in a complementary fashion ( Close, 2017 ). This is the intuition behind the ( s, u ) -policy in its effort to combine a traditional age-based inspection policy with alert-driven inspections. Through numerical examples along with sensitivity analysis, the performance improvement achieved by the optimal ( s, u ) -policy is quantified by comparing it with benchmark policies. By evaluating the performance of the optimal ( s, u ) -policy, it can also be answered how much can be further invested for reducing the imperfectness of the alert and no-alert signals (e.g., whether it is worth to invest in new sensors for collecting more data or put more effort for model development, etc.) The remainder of this paper is organized as follows. Section 2 reviews the relevant literature and Section 3 formally introduces the inspection planning problem. Section 4 analyzes the alert arrival process for a defect-prediction model with a specific false-positive and false-negative probability. Section 5 characterizes the long-run expected cost rate under the ( s, u ) -policy and formulates the problem of finding the optimal ( s, u ) -policy as a stochastic dynamic program. Section 6 discusses how to solve this dynamic program, and Section 7 presents the numerical experiments and insights. Section 8 concludes the paper with future research directions.

Literature review
There is a rich literature on maintenance optimization covering various areas such as system replacement, inspections and repair ( Jardine & Tsang, 2013;de Jonge & Scarf, 2020 ). Our paper complements the literature on inspection planning (e.g., Chelbi & Daoud 2009 ) by addressing the question of when to perform an inspection to detect the true condition of a system. In particular, there are three literature streams that are the most relevant to our work: (1) Age-based inspection scheduling under delay-time model, (2) planning of imperfect inspections, and (3) maintenance planning under imperfect condition signals. In the remainder of this section, each group is discussed in detail.

Age-based inspection scheduling under delay-time model
The deterioration model of the production process considered in our paper is also referred to as the delay-time model . There is a rich literature on maintenance planning under delay-time models ( Christer, 1982 ). We refer the reader to Wang (2012) and Section 3.2 of de Jonge and Scarf (2020) for a review of this literature. Our work comes closest to Maillart and Pollock (2002) , which optimize the aperiodic inspection intervals of an industrial system as a function of the system age with the objective of minimizing the average cost rate in the long run. Various extensions of the standard delay-time model have been studied. MacPherson and Glazebrook (2011) extend ( Maillart & Pollock, 2002 ) by adding a choice between a cheap repair and a more expensive renewal of the system, should it be found to be in the defective state by an inspection. Postponement of preventive action in defective state is considered by van Oosterom, Elwany, Çelebi, and van Houtum (2014) . Wang, Wang, and Peng (2017) consider a delayed first inspection and then periodic inspections, Cavalcante, Lopes, and Scarf (2018) consider an heterogeneous population of components with periodic inspections, and Scarf, Cavalcante, and Lopes (2019) consider random inspections (i.e., inspections arriving as a Poisson process and inspections that are periodic but randomly carried out). However, all the studies mentioned above consider perfect inspections (i.e., an inspection accurately reveals the true condition of the system) in the absence of condition monitoring or alert signals. In this work, we also consider perfect inspections but assume that condition signals are available in the form of imperfect alert and no-alert signals providing information on the hidden operational state of the system.

Planning of imperfect inspections
Due to the limitations of current technologies and/or human errors, imperfect inspections (i.e., failing to detect an existing problem or incorrectly reporting a problem) are quite common in practice. Imperfect inspection policies are widely studied under the delay-time degradation model; see Okumura, Jardine, and Yamashina (1996) for an early example. While we consider perfect inspections in our paper, the outcome of a defect-prediction model can be considered as performing an imperfect inspection at no cost, establishing the link with our paper and this literature stream. Under the delay-time model, the imperfectness of the inspections are often modelled as independent parameters representing the false-positive (i.e., labeling a healthy system as defective) and false-negative (i.e., labeling a defective system as healthy) probabilities; e.g., Berrade, Scarf, Cavalcante, and Dwight (2013) . Several extensions of imperfect inspections under delaytime model have been studied. Flage (2014) and Alberti, Cavalcante, Scarf, and Silva (2018) consider failure-inducing inspections, Berrade, Scarf, and Cavalcante (2017) consider the postponement option of preventive action for a defective system, and Cavalcante, Scarf, and Berrade (2019) consider silent failures. Driessen, Peng, and van Houtum (2017) and Zhang, Shen, and Ma (2020) allow the false-positive and false-negative probabilities to change over time. The objective in these studies is to optimize the inspection interval by using renewal theory with the objective of minimizing average cost-rate in the long run. Yang, Ye, Lee, Yang, and Peng (2019) and Zhang, Shen, Liao, and Ma (2021) consider two-phase maintenance policies (where there are different inspection policies in each phase). Levitin, Finkelstein, and Huang (2019) consider reliability-critical systems that perform missions of fixed durations and optimize the schedule of imperfect inspections with the objective of maximizing the mission completion probability at a given constraint on the probability of failure. Similar to the papers mentioned above, the decision in our paper is also about when to inspect a system. However, there is a fundamental difference. In our case, imperfect inspections are performed automatically (i.e., in a regular manner as long as the system operates) via a prediction model without any cost, and the information obtained from the prediction model is used for scheduling perfect inspections.
Maintenance planning under imperfect condition signals Our paper comes closest to the literature which considers the availability of periodically obtained imperfect monitoring information (also referred to as inaccurate condition signals) in order to decide when to perform inspections. For a single system with a degradation model represented with a Markov chain, many structural properties have been derived by formulating the problem as a Partially Observable Markov Decision Process (POMDP) model; e.g., Ohnishi, Kawai, and Mine (1986) , Özekici and Pliska (1991) , and Grosfeld-Nir (1996) . Kim and Makis (2013) analyze the joint optimization of sampling and maintenance decisions in the POMDP framework, and determine that the optimal information sampling and maintenance optimization policy consists of at most four regions. Also using a POMDP model, van Oosterom, Maillart, and Kharoufeh (2017) consider that periodically obtained sensor information can become worse over time, and address the problem of adaptively scheduling perfect inspections and sensor replacements. More recently, van Staden and Boute (2020) consider the effect of access to different quality levels for deterioration data, resulting in imperfect information about the underlying state of the system being monitored. The authors investigate the decision maker's willingness to pay for the information that provides more accurate representation of the real condition. In the presence of an imperfect defect-prediction model, Xiao, Akcay, Maillart, and van Houtum (2020) analytically characterize when the structure of the optimal policy can be represented with a critical threshold on a belief variable that represents the likelihood that the system is in the healthy state. In the papers with a POMDP framework, it is often the case that a decision is made at every time period, e.g., inspect or skip the inspection, conditional on the information available on the true state of the system, which is summarized in a continuous belief state. On the other hand, motivated from the practical problem at PCL, we focus on the scheduling decision (i.e., when to do the next inspection). The scheduling decision is made at the moments when the true state of the system is known with certainty, making it unnecessary to maintain a belief state. To optimize the scheduling decisions, we build a stochastic dynamic programming model with the current age of the process as the state information. This brings us the following modeling advantages compared to a POMDP framework. In our paper, the healthy and defective states of the system are also hidden, but the degradation states do not necessarily evolve according to a Markov chain: we assume the duration of the healthy state and the defective state can follow a general probability distribution. Furthermore, the resulting policy (i.e., counting the number of alerts and the usage of the process, and comparing them with known thresholds to trigger an inspection) is practically more appealing than maintaining a continuous belief state and responding to it in a short time window. In terms of modeling methodology, our paper can be considered closest to MacPherson and Glazebrook (2014) , which assume the availability of imperfect sensor information and optimizes the inspection schedule that minimizes the long-run average cost rate under a delay-time model. However, MacPherson and Glazebrook (2014) assume that if a transition to defective state is undetected by a sensor, there is no further opportunity to detect the defective state. While this can be a fine assumption for a sensor, it is hardly applicable when a data-driven prediction model is used for monitoring purpose.

Model formulation
In this section, the inspection planning problem under the ( s, u ) -policy will be formally introduced. Sections 3.1 and 3.2 introduce the failure model of the production process and the details of the defect-prediction model, respectively. Section 3.3 describes the ( s, u ) -policy, and Section 3.4 specifies the objective to consider in optimizing this policy. Table 1 provides a summary of all the mathematical notations to be used in the model formulation.

Deterioration model of the production process
We consider a production process that can be in one of the three states: healthy, defective, and failed. A healthy process goes into a defective state before it fails. The defective state is not visible from outside, and only an inspection can reveal it with certainty. Let X ∈ N 0 denote the number of products processed by a healthy process until it becomes defective (e.g., X = 5 means that the process completes five products in healthy state, but the process becomes defective during the sixth product), where N 0 = { 0 , 1 , 2 , . . . } is the set of nonnegative integers. We let H ∈ N 0 denote the number of products processed in the defective state (e.g., H = 2 means that the process completes two products in the defective state and fails during the processing of the next product). The probability mass function (pmf) and cumulative distribution function (cdf) of X are denoted with f X (·) and F X (·) , respectively. Likewise, the pmf and cdf of H are denoted with f H (·) and F H (·) . This so-called delay-time model is a commonly used deterioration process in the inspection-based maintenance literature (see, e.g., Baker & Christer, 1994;Driessen et al., 2017;van Oosterom et al., 2014;Wang, 2012;Yang et al., 2019 for examples in continuoustime setting and Akcay et al., 2021 for an example in discrete-time setting).

Defect-prediction model
We assume that a defect-prediction model is available to detect whether the production process has already reached the defective state. Such a predictive model can be regarded as a binary classifier: It generates an alert if the process is predicted as defective.
If the process is predicted as healthy, then no alert is generated. The predictions can be imperfect with a false-positive probability α and false-negative probability β. To be specific, the defectprediction model gives an alert for a healthy process with probability α, and it fails to give an alert for a defective process with probability β. This is summarized in Table 2 .
The training of a binary classifier requires minimizing the discrepancy between the model output and the actual condition by

T
Total number of products to be processed τ Age of the process The number of products to be processed until the next planned inspection for a process at age τ s (τ ) The number of alerts to wait before triggering an inspection for a process at age τ X The number of products processed by a healthy process until the process becomes defective H The number of products processed in the defective state False-positive probability in defect prediction β False-negative probability in defect prediction The random variable that represents the number of products at which the i th alert (starting from the current age) is generated given that the process is currently healthy and it completes x more products in the healthy state Cost of an alert-triggered inspection I p Cost of a planned inspection C d Cost of processing a product in the defective state C p Cost of preventive maintenance C f Cost of corrective maintenance The expected total cost incurred in the next T products for a process at age τ if the actions s (τ ) = ˜ s and u (τ ) = ˜ u are taken at age τ and the optimal ( s, u ) -policy is followed thereafter γ * Long-run expected cost per product under the optimal ( s, u ) -policy Table 2 Confusion matrix of the defect-prediction model. tuning the model parameters according to a specified measure of the prediction performance, e.g., precision, recall, F 1 -score ( Florian, Sgarbossa, & Zennaro, 2021 ). Once the trained prediction model is validated by using a separate test data, the proportion of the alert instances among the healthy-process instances of the test data can be used as the false-positive probability α. Likewise, the proportion of the no-alert instances among the defective-process instances of the test data can be used as the false-negative probability β. It is important to note that α + β = 1 implies that the alert and noalert signals come from a random classifier ( Fawcett, 2006 ), which means predicting the process as defective at a fixed percentage of the time without exploiting any information from available data.
Furthermore, if α + β > 1 , it is possible to negate the classifier (i.e., reverse its classification decisions on every instance) to achieve The cost of generating an output from the prediction model is negligible. This is reasonable when the prediction model is already built and there is sufficient computing capacity available to run it. We assume that the defect-prediction model is run upon the completion of every product unless there is a failure or there is already a scheduled inspection. This reflects the situation that the prediction model is run per product by using the data related to the process specifications obtained during the manufacturing of that particular product. Running a prediction model at discrete times is not uncommon in practice, e.g., when the prediction model is run after collecting a new batch of data every hour, day, week, etc. Also, a widely performed data processing step is to batch or aggregate sensor data before running a prediction model, further justifying the generation of prediction model output at discrete time points.
For a given true condition of the process, the predictions are generated independently from each other; e.g., for a process which is in the healthy state, an alert is generated with probability α upon the completion of a product, independent of the previous prediction outputs.

Description of the (s, u ) -policy
The idea behind the (s, u ) -policy is to support a classical agebased inspection policy (e.g., MacPherson & Glazebrook, 2011;Maillart & Pollock, 2002;Sabouri, Shechter, & Huh, 2015 ) with alert signals. Specifically, in addition to scheduled inspection moments, alerts from the defect-prediction model can also trigger an inspection. The characteristics of the production process and the details of the (s, u ) -policy are described as follows: • There is a cost associated with continuing production with a defective process; e.g., the economic loss due to lower quality of the products. Let C d denote the cost of processing a product in the defective state of the production process. • The age of the process increases by one unit when the processing of a product is completed without failure. If the process fails, a corrective maintenance is performed at cost C f and the next product starts with a healthy process at age zero.
• For a new process at age τ = 0 , or for a process which is inspected at age τ > 0 and found healthy, the next inspection is scheduled to be performed after u (τ ) additional products or as soon as the s (τ ) th alert (starting from age τ ) is observed, whichever occurs first. The former is referred to as a planned inspection, and the latter is referred to as an alert-triggered inspection. In contrast to a defect-prediction model, inspections perfectly reveal the true state of the production process. The costs of performing an alert-driven inspection and a planned inspection are denoted with I a and I p , respectively. Inspections do not alter the condition of the process. • If an inspection finds that the process is defective, a preventive maintenance is performed at cost C p and the processing of the next product starts with a healthy process at age zero. This implies the process is certainly in the healthy state after an inspection is performed. Therefore, the accumulated number of alerts is reset to zero after an inspection. • If the processing of a product is completed without a failure, the defect-prediction model is run to see whether an alert is generated. However, if there is already an inspection planned at the end of that product, then the planned inspection is performed without running the defect-prediction model. Fig. 1 summarizes the (s, u ) -policy with a graphical illustration.
We refer to the inspection policy described above as the (s, u )policy. Notice that s (τ ) = 1 and u (τ ) = ∞ , ∀ τ , imply performing an inspection if and only if an alert is observed; i.e., inspect-at-firstalert policy . On the other hand, if s (τ ) ≥ u (τ ) , ∀ τ , it means that an alert-driven inspection is never performed (because the s (τ ) th alert can be raised earliest by the completion of the s (τ ) th product, but s (τ ) ≥ u (τ ) implies there is already a planned inspection) and the (s, u ) -policy becomes equivalent to the age-based inspection policy with predetermined (possibly aperiodic) inspection intervals as in Maillart and Pollock (2002) .

Objective
For a process that starts at age τ , we let g(T , τ | s (τ ) , u (τ )) denote the expected total cost incurred during the processing of the next T products under the ( s, u ) -policy. We consider a decision maker whose objective is to find the optimal ( s, u ) -policy (i.e., the optimal action s (τ ) and u (τ ) at each possible τ value) that mini- mizes the long-run expected cost per product, i.e., where the minimization is over all the possible ( s, u ) -policies, and γ * is the minimum long-run expected cost per product under the optimal ( s, u ) -policy. For a process at age τ , we let s * (τ ) and u * (τ ) denote the values of s (τ ) and u (τ ) , respectively, under the optimal (s, u ) -policy.
The objective function in (1) addresses the trade-off between being less proactive (i.e., higher costs of defective production and corrective maintenance) on one hand and being more proactive (i.e., higher costs of inspection and preventive replacement) on the other hand. Notice that the performance measure is defined as the long-run expected cost per product . This is suitable objective for an established manufacturer in a competitive market, where the products must be produced as least costly as possible. We emphasize that the duration of inspection and maintenance activities and the time it takes to process one product are not explicitly specified in our model because the objective represents the cost per product, not per time unit.

Alert-arrival process
The objective of this section is to characterize the alertarrival process generated by the prediction model described in Section 3.2 . Specifically, we will characterize the probability distribution of the number of products by which a specific number of alerts is generated. We do not explicitly consider the process failures in this section. To be specific, the process starts in the healthy state, it becomes defective after a random amount of products, and it stays defective without observing a process failure. This is an assumption only made in this section for convenience in presentation, and Section 5 continues with the original failure model as introduced in Section 3.1 .
The probability distribution of the number of products by which a specific number of alerts is observed will be an input to evaluate the expected cost under the ( s, u ) -policy and then to determine the optimal actions s (τ ) and u (τ ) for a process at age τ . As illustrated in Fig. 1 , inspection is scheduled only for a new process (i.e., at age zero), or for a process which is just inspected and found in the healthy state. Thus, at a decision moment (i.e., the moment at which the next inspection moment is scheduled), the process must certainly be in the healthy state. Therefore, in the remainder of this section, we consider a process which is known to be in healthy state. The number of products processed before observing a specific number of alerts is a random variable that depends on the realization of the duration of healthy state and the imperfectness of the defect-prediction model. For a process which is currently in healthy state, we let T i (x ) denote the random variable that represents the number of products at which the i th alert (starting from the current age) is generated given that the process completes x more products in the healthy state before entering the defective state. For example, for a healthy process at a certain age, T 3 (2) denotes the number of products at which the 3rd next alert is observed given that the process becomes defective after completing 2 more products in the healthy state. As another example, T 1 (0) denotes the number of products at which the next alert is observed given that the process has just processed the last product in the healthy state and no more products is processed in the healthy state. Later in Section 5.1 , further examples on the realization of T i (x ) will be illustrated in various scenarios under the (s, u ) -policy; see Figs. 4 and 5 .
Notice that T i (x ) ∈ { i, i + 1 , . . . } because the defect-prediction model is run after every product and the i th alert cannot be observed before processing i products. We let p i,x (·) denote the pmf of the random variable T i (x ) . In Proposition 2 , we will characterize the function p i,x (·) for all possible values of i and x , and this will be an input to evaluate the expected cost under the ( s, u ) -policy.
But first, in Proposition 1 , we characterize the pmf of random variable T 1 (x ) , i.e., the number of products at which an healthy process generates the next alert, given that the process becomes defective after completing x more products in the healthy state.
Proposition 1. For a process which is known to be in healthy state, the probability that the next alert is generated at the tth product is given by For any x , it can be verified that the probabilities p 1 ,x (t) associated with each possible value of t sum up to 1; i.e., Proposition 1 shows that the number of products at which the first alert is generated is likely to be larger as the false positive probability α decreases and the false-negative probability β increases. For example, Fig. 2 illustrates p 1 , 8 (·) which represents the pmf for the number of products at which the first alert is generated when the process completes 8 more products in the healthy state and becomes defective in the 9th product. Fig. 2 (left) has a higher false-positive probability, making it more likely to observe an alert sooner. In Fig. 2 (both in middle and right), it is unlikely to observe an alert before the 9th product. This is due to low falsepositive probability. In Fig. 2 (right), the alert is most likely to be realized as soon as the defect-prediction model is run after the defect arrival (i.e., after the 9th product) because of the lower falsenegative probability compared to the case in Fig. 2 (middle).
Notice that the arrival moment of the i th alert is equal to the number of products until the (i − 1) th alert and the number of products processed between the (i − 1) th alert and the i th alert.
Based on this observation, Proposition 2 builds on the expression characterized in (2) and shows how to recursively calculate the pmf of the number of products at which the process generates the i th alert for each given value of Proposition 2. For a process which is known to be in healthy state, the probability that the i th alert is generated at the tth product is given by

Optimization of the ( s, u ) -policy
This section presents a stochastic dynamic programming (SDP) formulation to solve for the optimal ( s, u ) -policy by minimizing the long-run expected cost per product. To start with, the possible events that cause a change in the state variables of the dynamic program will be discussed in Section 5.1 . In Section 5.2 , the SDP formulation will be presented for finite planning horizon of T products with the objective of minimizing the expected total cost. In Section 5.3 , the formulation is extended to the case where the objective is to minimize the long-run expected cost per product.

Possible events under the ( s, u ) -policy
Suppose that the planning horizon consists of T products for a process that is currently at age τ and known to be in the healthy state (i.e., an inspection at age τ has revealed that the process is healthy and thus X ≥ τ holds). We represent the state of the system with the pair (T , τ ) . Given that the decisions u (τ ) and s (τ ) are taken at age τ , there are three types of events regarding what triggers the next intervention to the process under the ( s, u ) -policy: (1) Process failure, (2) alert-triggered inspection, and (3) planned inspection. The realizations of the random variables X, T s (τ ) (X − τ ) and H determine which event takes place.
Process Failure. The process failure is observed if the following event occurs: In the case of Event 1, an immediate corrective maintenance takes place, and the process renews (i.e., the process age is set to 0) with T − (X − τ ) − H products left in the planning horizon.
Consequently, given the realizations X = x and H = h , the failure event results in the corrective maintenance cost C f and the cost of working with a defective process h C d , while the state moves from (T , τ ) to (T − x + τ − h, 0) . A realization of Event 1 is illustrated in Fig. 3 for X = τ + 3 (i.e., the process completed τ + 3 products in the healthy state) and H = 3 (i.e., the process completed 3 products in the defective state and failed during the processing of the 4th product). The cost 3 C d + C f is charged as a result of Event 1.
Alert-triggered inspection. An alert-triggered inspection is performed when the s (τ ) th alert is observed before a failure or planned inspection. This corresponds to the following event: which is the union of the following two disjoint events: In the case of Event 2A, the alert-triggered inspection finds the process in the healthy state. Then, no maintenance takes place, only the inspection cost I a is charged, and the process age increases to τ + T s (τ ) (X − τ ) (i.e., it does not renew) with T − T s (τ ) (X − τ ) products left in the planning horizon. Therefore, given the realizations X = x and T s (τ ) (x − τ ) = i , the state moves from (T , τ ) to (T − i, τ + i ) . A realization of Event 2A is illustrated in Fig. 4 (top) for X = τ + 7 and T 3 (7) = 6 .
In the case of Event 2B, the alert-triggered inspection finds the process in the defective state. Then, an immediate preventive maintenance takes place, and the process renews (i.e., the process age is reset to 0) with T − T s (τ ) (X − τ ) products left in the planning horizon. Consequently, conditional on X = x and T s (τ ) (x − τ ) = i , the realization of Event 2B results in the inspection cost I a , preventive maintenance cost C p , and the cost of working with a defective process (i − x + τ ) C d . Also, the state moves from (T , τ ) to (T − i, 0) . A realization of Event 2B is illustrated in Fig. 4 (bottom) for Planned inspection. A planned inspection is performed when the scheduled inspection moment is reached. This corresponds to the following event: which is the union of the following two disjoint events: In the case of Event 3A, the planned inspection finds the process in the healthy state. Then, no maintenance takes place, only the inspection cost I p is charged, and the state variables move from (T , τ ) to (T − u (τ ) , τ + u (τ )) . A realization of Event 3A is illustrated Fig. 5 (top) for u (τ ) = 8 when X = τ + 10 and T 3 (10) ≥ 9 . Table 3 Summary of state transitions and associated costs from the starting state (T, τ ) conditional on X = x , T s (τ ) (x − τ ) = i and H = h .

Event
Cost Next state In the case of Event 3B, the planned inspection finds the process in the defective state. Therefore, an immediate preventive maintenance takes place, and the process restarts with age 0 and T − u (τ ) products left in the planning horizon. Consequently, given the realization X = x , Event 3B results in the inspection cost I p , preventive replacement cost C p , and the cost of working with a defective process (u (τ ) − x + τ ) C d . Also, the state moves from (T , τ ) to (T − u (τ ) , 0) . A realization of Event 3B is illustrated in Fig. 5 (bottom) for u (τ ) = 8 when X = τ + 3 and T 3 (3) ≥ 9 , where the realized cost is I p + C p + 5 C d . In Table 3 , we summarize what the next state and the realized cost will be at the end of one renewal cycle for each possible event under the ( s, u ) -policy.

Finite-horizon total expected cost
Let g(T , τ ) denote the minimum expected total cost for a process that starts as healthy at age τ and is operated over a finite planning horizon of T products by following the optimal ( s, u )policy. The problem of calculating g(T , τ ) and solving for the optimal ( s, u ) -policy can be formulated as a stochastic dynamic program with state variables (T , τ ) . First, notice that g(0 , τ ) = 0 for all τ ; i.e., the process is terminated at no cost at the end of the planning horizon regardless of the age of the process. Furthermore, it holds that where g(T , τ | ˜ s , ˜ u ) is the expected total cost for a healthy process at age τ if the actions ˜ s and ˜ u are taken at age τ and the optimal ( s, u ) -policy is followed thereafter. Specifically, where f X (x | τ ) is the pmf of the number of products processed in the healthy state conditional on the fact that the process is healthy The expression in (5) corresponds to observing Event 1 after taking the decision ˜ s and ˜ u at age τ ; i.e., the realized value of H is strictly smaller than the realized value of τ + min { ˜ u , T ˜ s (X ) } − X so that a failure is observed. The expression in (6) corresponds to Event 2A, where the realized value of T ˜ s (X − τ ) is strictly less than ˜ u (i.e., so the alert-triggered inspection occurs before the planned inspection) and less than the realized value of X − τ (i.e., so the alert-triggered inspection finds the process in the healthy state). The expression in (7) corresponds to Event 2B, where the realized value of T ˜ s (τ )(X − τ ) is still strictly less than ˜ u (i.e., so the alert-triggered inspection occurs before the planned inspection) but strictly greater than the realized value of X − τ (i.e., so the alert-triggered inspection finds the process in the defective state), with the realized value of H high enough so no failure is observed. The expression in (8) corresponds to Event 3A, where the realized value of T ˜ s (X − τ ) must be at least ˜ u (i.e., so the alert-triggered inspection cannot occur before the planned inspection) and the realized value of X must be at least τ + ˜ u (i.e., so the planned inspection finds the process in the healthy state). In contrast, the expression in (9) corresponds to Event 3B, where the realized value of X must be strictly less than τ + ˜ u (i.e., so the planned inspection finds the process in the defective state), with the realized value of H high enough so no failure is observed.

Long-run expected cost per product under the optimal ( s, u ) -policy
The objective of this section to characterize the expected cost per product under the optimal ( s, u ) -policy in an infinite planning horizon (i.e., T → ∞ ). We also refer to this value as the long-run minimum average cost rate, and denote it with γ * . Since all cost parameters and the probability distributions for the random variables X and H are stationary, it follows that where V (τ ) is a constant representing the relative cost of beginning the operation with a healthy process of age τ ( Puterman, 2014 ). In this limit, (4) becomes for τ ∈ N 0 . Notice that the summations on the right-hand side of Eq. (10) are defined over the entire sample space of the random variables. Therefore, the constant T γ * can be subtracted from both sides of Eq. (10) . The value of constant V (0) can be arbitrarily set to zero ( Puterman, 2014 ). After reorganizing the terms, Eq. (10) can be equivalently written as follows: In Section 6 , we discuss our solution approach for the optimization problem in (11) and describe how we solve for the minimum expected cost rate γ * and the corresponding optimal ( s, u ) -policy.

Solution approach
To start with, the random variable X is assumed to be geometrically distributed in Section 6.1 . This is equivalent to assuming that the process moves from healthy state to defective state with a fixed probability independent of the past. In Section 6.2 , this assumption is relaxed, and the solution approach is presented for a general probability distribution for the random variable X. A. Akcay European Journal of Operational Research 298 (2022) 510-525 6.1. Geometrically distributed X The assumption of geometrically distributed number of products in the healthy state is equivalent to saying that the process moves from healthy state to defective state with a fixed probability independent of the age of the process. Because of this so-called memoryless property, an inspection action that does not lead to preventive replacement also results in the renewal of the system. This is because the remaining length of the healthy state, conditioned on the event that the process is found healthy in an inspection, has the same probability distribution with the length of the healthy state for a new process. Thus, the age of the process at the last inspection is irrevelant and the optimal policy can be summarized by a fixed decision (i.e., a fixed monitoring interval and a fixed number of alerts to wait before triggering an inspection) regardless of the age of the process. In other words, the decision maker always uses the same policy parameters regardless of the age (i.e., s * (τ ) = s * and u * (τ ) = u * for all τ ). As the optimal policy is independent of the age of the process, without loss of generality, we set V (τ ) = 0 for all τ ∈ N 0 , leading to a special case of the optimization model in (11) given by Notice that the functions c τ ( ˜ s , ˜ u ) and d τ ( ˜ s , ˜ u ) are independent of the process age τ for geometrically distributed X. Thus, the value of τ is arbitrarily set as zero in (12) . The optimal cost rate γ * can be identified as the optimal objective value of the following linear program: with γ as an unconstrained decision variable. The optimal number of alerts to trigger an inspection and the optimal monitoring interval under the optimal ( s, u ) -policy, denoted with s * and u * respectively, satisfy the equation c 0 (s * , u * ) γ * = d 0 (s * , u * ) .

Generally distributed X
Notice that the domain of the random variables X and H is defined as N 0 , and therefore, the age of the process can go to infinity in theory, leading to a countably infinite state space for the dynamic program in (11) . However, in practice, it is often the case that the process becomes more likely to be defective (if it did not become defective yet) as the process continues. This makes it unlikely to see a process at an age higher than a sufficiently large threshold because the process would be renewed as soon as it is found defective. Accordingly, we truncate the state space of the dynamic program in (11) to eliminate the ages that are unlikely to be reached under any ( s, u ) -policy. Specifically, let N be chosen such that P (X > N| X ≥ N) < for a sufficiently small . This means that the probability of finding a process, which is known as healthy at age N, again in the healthy state in an inspection at age N + 1 or later cannot be greater than . Consequently, we redefine the truncated state space of the dynamic program in (11) as T ∈ { 0 , 1 , . . . , N} . Notice that the probability distribution of the random variable X is an input required for the characterization of the expected cost rate under the (s, u ) -policy. In Appendix A, we describe how this distribution (together with the distribution of H) can be estimated from historical data available from previous maintenance cycles. Once the distribution of X is available, the value of N can be determined by setting it equal to min { i : In our numerical experiments, we set = 0 . 01 as it leads to a significantly accurate calculation of the expected cost rate (i.e., the expected cost rate does not change significantly if is decreased even further).  Table 5 For each ( α, β) pair, first row is the expected cost rate under the AI policy, and second and third rows are the optimal cost rate γ * and the values of (s * , u * ) , respectively, under the optimal ( s, u )-policy ( I p = 1 , I a = 2 , C p = 6 , C f = 60 , C d = 1 and the distributions X1 and H1 The action space is defined as Notice that it is not necessary to allow s > u in the action space because this represent the situation where an alert-triggered inspection never takes place, and this scenario is already captured when s = u . The upper limit L makes the action space finite and can be set to an arbitrarily large value. We solve the dynamic program in (11) with policy iteration, as outlined in Algorithm 1 .
In the policy evaluation step of Algorithm 1 , notice that the parameter V j represent the relative cost of beginning the operation with a healthy process of age j. In the truncated state space with sufficiently large N, we know that the coefficients that are multiplied with V j will be zero anyway for j > N (i.e., the probability of being in those states is negligible under any ( s, u ) -policy). Thus, without loss of generality, we set V j = 0 for j > N. Therefore, the policy evaluation step includes solving a system of linear equations with N + 1 equations and N + 1 variables. The policy iteration algorithm terminates when the current policy cannot be improved anymore and the cost rate stays the same. We refer the reader to Bertsekas (2011) for details on the policy iteration algorithm.

Numerical experiments
For numerical analysis, we consider that the number of products completed in the healthy state of the production process is represented with a discrete Weibull distribution ( Nakagawa & Osaki, 1975;Vila, Nakano, & Saulo, 2019 ). To be specific, the pmf and cdf of the random variable X is given by f X (x ) = q x p − q (x +1) p and F X (x ) = 1 − q (x +1) p for x ∈ N 0 , where p > 0 and 0 < q < 1 are the shape parameters. When p = 1 , note that this distribution becomes a geometric distribution with success probability 1 − q . The hazard rate is an increasing function for p > 1 , similar to the continuous Weibull distribution. The details of the three discrete Weibull distributions which we use to model the random variable X are given in Table 4 2 (see the distributions X1, X2 and X3). For the number

Require:
State space T and action space A .
Policy iteration step : Run the policy evaluation step to obtain the cost rate ˆ γ under the policy ˆ end while return s * (τ ) = ˆ s (τ ) and u * (τ ) = ˆ u (τ ) as the optimal action at state τ ∈ T , and γ * = ˆ γ as the expected cost rate under the optimal policy.
Algorithm 1 : Policy iteration algorithm to solve for the optimal (s,u)-policy.
of products processed in the defective state, we consider a discrete uniform distribution and a constant value (see the distribution H1 and H2, respectively, in Table 4 ). Notice that X1 is the geometric distribution representing a situation where the number of products until becoming defective is independent of the age of the process. The distributions X2 and X3 are selected such that they have the same mean but less variability with an increasing hazard-rate function. For = 0 . 01 , the parameter N that truncates the state space is equal to 1893 and 279 for distributions X2 and X3, respectively. The distribution H1 captures a situation where a defective process can make any number of products from a given range at equal probabilities. The distribution H2 represents a fixed number of products in the defective state. The so-called deterministic delay time is a reasonable assumption in many practical situations; e.g., when the crack gradually expands at a constant rate in the electro-chemical machining process of PCL mentioned in Section 1 . Also, van Oosterom et al. (2014) consider an inspection planning model under deterministic delay time. We study the following inspection-scheduling policies as benchmarks in our numerical analysis: • Always inspect (AI) policy : An inspection is performed if and only if an alert is observed. This is the same as the inspectat-first-alert policy, mentioned in Section 1 . It is a special case of the (s, u ) -policy with s (τ ) = 1 and u (τ ) = ∞ for all τ . • Alert-Driven Inspection (ADI) policy : For a process at age τ , an inspection is scheduled to be performed only when the s (τ ) -th alert is observed. The ADI policy is a special case of the (s, u )policy with u (τ ) = ∞ for all τ , and it includes the AI policy as a special case when s (τ ) = 1 for all τ .
• Age-Based Inspection (ABI) policy with age-dependent inspection intervals : For a process at age τ , an inspection is scheduled to be performed when the process completes u (τ ) additional products. The availability of the defect-prediction model is ignored. It is a special case of the (s, u ) -policy with s (τ ) = u (τ ) for all τ (i.e., recall that an alert-triggered inspection is never possible if this condition holds). This policy is formally analyzed by Maillart and Pollock (2002) in a continuous-time setting.
In the remainder of this section, Section 7.1 quantifies the performance improvement by the optimal (s, u ) -policy compared to the benchmark policies and discusses when the optimal (s, u )policy becomes the most beneficial. The economic value of an imperfect defect-prediction model under the optimal (s, u ) -policy is quantified, and it is investigated how this value is affected by the imperfectness of the prediction model. Section 7.2 shows how the structure of the optimal (s, u ) -policy is affected from various problem parameters.

Comparison of the optimal ( s, u )-policy with benchmark policies
The objective of this section is to investigate when it is the most beneficial to generalize the AI and ABI policies to the (s, u )policy. To start with, the number of products processed in the healthy state (X ) is assumed to be geometrically distributed (i.e., the distribution X1). For each ( α, β) pair, Table 5 presents the expected cost rate under the AI policy (first row), the expected cost rate γ * under the optimal (s, u ) -policy (second row) and the corresponding optimal solution (s * , u * ) (third row). Notice that the decisions (s * , u * ) under the optimal policy do not depend on the age Fig. 6. The percentage reduction % in the expected cost rate under the optimal (s, u ) -policy compared to the optimal ABI policy for C d = 1 , I p = 1 , and C p = 6 for the distributions X1 and H1.
of the process in Table 5 because X is geometrically distributed. We set the upper bound parameter L of the action space equal to 50, which is a sufficiently large value in our context. There are three types of results presented in Table 5 : (1) For sufficiently low values of false-positive probability α (i.e., for α = 0 . 05 with β ≤ 0 . 4 , and for α = 0 . 1 and β = 0 . 4 ), we observe that the AI policy turns out to be optimal since it is obtained that (s * , u * ) = (1 , 50) under the optimal policy (i.e., planned inspection is not possible with u * equal to L ). Furthermore, for sufficiently accurate defect-prediction model (i.e., α ≤ 0 . 2 and β ≤ 0 . 3 ), the optimal policy turns out to be an ADI policy.
(2) When the defect-prediction model is not good enough (i.e, see the entries in italic font for α = 0 . 4 and β ≥ 0 . 2 and for α = 0 . 3 and β = 0 . 4 in Table 5 ), the optimal (s, u ) -policy turns out to be the optimal ABI policy (i.e., note that s * = u * implies an alert-triggered inspection is never possible).
(3) In the remaining cases, we observe that the optimal (s, u ) -policy achieves a strictly lower expected cost rate than the optimal ADI policy and the optimal ABI policy (i.e., see the entries in bold font in Table 5 ). These cases can be interpreted as the ones where it is beneficial to generalize both the ABI and ADI (and hence the AI) policies to the (s, u ) -policy.
For the problem instance used in Table 5 , the expected cost rate under the optimal ABI policy is γ * ABI = 0 . 915 . We observe that there can be up to 29 . 2% (i.e., (0.915-0.648)/0.915) reduction in the expected cost rate by generalizing the optimal ABI policy into the ( s, u ) -policy (when α = 0 . 05 and β = 0 . 05 ). When α = 0 . 4 and β = 0 . 4 , there is 13 . 4% reduction in the expected cost rate by generalizing the optimal ADI policy into the ( s, u ) -policy, i.e., (1 . 056 − 0 . 915) / 1 . 056 = 13 . 4% , where 1.056 is the expected cost rate of the optimal ADI policy at the corresponding α and β values (not shown in Table 5 ). Let % denote the percentage reduction in the expected cost rate by following the optimal (s, u ) -policy instead of the optimal ABI policy (i.e., % = (γ * ABI − γ * ) /γ * ABI ). Fig. 6 illustrates the effect of the cost parameters on the percentage benefit % . It shows that a process with high corrective maintenance and low alert-driven inspection cost is an ideal candidate to migrate from classical age-based inspection to the proposed hybrid inspection policy. In practice, the decision maker can compare the cost of a prediction model (e.g., the cost of model development or additional sensors for further data collection, etc.) at a certain accuracy level with the economic benefit of moving from optimal ABI policy to the optimal (s, u ) -policy, and decide whether it is beneficial to add alert-driven inspections to the maintenance program instead of only relying on inspections at predetermined usage intervals. For example, we observe in Fig. 6 (left) that adopting the optimal (s, u ) -policy brings up to 40% cost reduction by incorporating the alert information on top of a periodic inspection policy.
For the distribution X2 and each ( α, β) pair, Table 6 presents the expected cost rate under the AI policy (first row) and the ex- Table 6 For each ( α, β) pair, first row is the expected cost rate under the AI policy and second row is the optimal cost rate γ * under the optimal ( s, u )-policy (same setting as in Table 5  pected cost rate γ * under the optimal ( s, u ) -policy (second row).
Different from Table 5, Table 6 does not report the optimal actions as the optimal ( s, u ) -policy now depends on the age of the process as well (see Section 7.2 for illustration of the optimal policy). Table 6 shows that AI policy is still optimal for low falsepositive probability (in this case, only when α = 0 . 05 ) and the optimal ABI policy (with cost rate γ * ABI = 0 . 882) again becomes the optimal ( s, u ) -policy for a defect-prediction model of poor quality (i.e., when α + β ≥ 0 . 7 in Table 6 ). In the remaining cases of Table 6 , the expected cost rate under the optimal (s, u ) -policy is always less than the expected cost rate of the AI policy and the optimal ABI policy. A relevant question is whether (and to what extent) it pays off to invest in further improving prediction accuracy (e.g., via investing in digitalization and analytics expertise) for reducing the expected cost rate. This question can be answered by analyzing how the expected cost rate under the optimal (s, u ) -policy is influenced by the prediction-quality parameters α and β. In particular, the optimal cost rate at the current (α, β ) pair can be compared with the optimal cost rate at a target (α, β ) pair. If the improvement in the cost rate is higher than the additional cost rate to be incurred due to improving the prediction model, then the decision maker can conclude that it is worth to improve the prediction model. Otherwise, the prediction model can be considered as good enough with no further improvement in α or β. Intuitively, a prediction model can be tuned to be more sensitive in certain data patterns, making it more likely to trigger an alert leading to a higher false-positive probability α. On the other hand, making the prediction-model less sensitive to such patterns leads to a higher false-negative probability β. Given this trade-off between the false-positive and falsenegative probabilities, it is practically relevant to understand how sensitive the cost rate is to a unit change in α or β. For example, Table 7 The benefit of the optimal (s, u ) -policy compared to the optimal ABI policy.  Table 6 shows that the optimal cost rate is γ * = 0 . 807 for α = 0 . 2 and β = 0 . 2 . If the false-negative probability β is improved from 0.2 to 0.1, we see the optimal cost rate goes down to γ * = 0 . 779 . The same amount of decrease in the false-positive probability α, however, is more effective, leading to the reduction of the optimal cost rate down to γ * = 0 . 725 . In Tables 5 and 6 , we always observe that an improvement in the false-positive probability is more beneficial than the same amount of improvement in the false-negative probability.

The structure of the Optimal (s, u ) -policy
In this section, we investigate the properties of the optimal (s, u ) -policy. We start with geometrically distributed X, where the optimal (s, u ) -policy does not depend on the process age τ ; i.e., s * (τ ) = s * and u * (τ ) = u * for all τ . In Table 5 , we already observed that for a fixed false-positive probability α, as the false-negative probability β decreases, u * (i.e., the optimal number of products to process before triggering a planned inspection) is nondecreasing.
For example, consider the bold entries in Table 5 with α = 0 . 3 : we observe that u * increases from 4 to 14 as β decreases from 0.3 to 0.05. A higher u * value implies that the optimal ( s, u ) -policy relies more on the number of alerts but less on the number of products processed since last inspection to trigger a new inspection. This is intuitive because it becomes more likely to generate an alert signal for a defective process as β gets smaller. Also, for a fixed β, we observe that u * is nonincreasing in α, reflecting the fact that the optimal ( s, u ) -policy relies more on the number of products (rather than the number of alerts) to trigger an inspection when the false-positive probability is high.
Furthermore, we can argue that the optimal (s, u ) -policy can be beneficial in its capability of postponing the maintenance action (via the selection of the optimal number of alerts to wait to trigger an inspection) especially when the prediction model is sufficiently accurate and the cost parameter C d is low. In Table 7  (s * , u * ) = (12 , 50) . That is, the optimal (s, u ) -policy dictates to do an inspection only at the 12th alert. That is, it can be argued that the optimal (s, u ) -policy delays the inspection and the follow-up preventive maintenance action as much as possible to better utilize the remaining lifetime of the process. When the number of products processed in the healthy state follows the distribution X2, Fig. 7 shows how the optimal ABI policy (left) and the optimal ( s, u ) -policy (middle, right) behave as a function of the process age for the same problem instance in Table 6 . Specifically, Fig. 7 (a) shows that the optimal number of products to process before triggering an inspection is a nonincreasing function of the process age. This result is not new, and has also been shown by Maillart and Pollock (2002) , who studied age-based inspection planning with aperiodic inspection intervals but in the absence of condition signals. In Fig. 7 (b), we extend this result by showing the behavior of the ( s, u ) -policy as a function of the process age for α = 0 . 3 and β = 0 . 1 . It is observed that the number of alerts to trigger an alert-driven inspection is also a nonincreasing function of the process age. When the false-positive probability becomes smaller, Fig. 7 (c) shows that the number of alerts to trigger an alert-driven inspection takes smaller values at each possible process age, while the monotonicity with respect to the process age is preserved.
In Fig. 8 , we illustrate the optimal ABI policy (left) and the optimal ( s, u ) -policy (middle, right) by using the distribution X3 instead of X2. We observe that s * (τ ) is less than its counterpart in Fig. 7 , meaning that less number of alerts is needed to trigger an inspection. This is intuitive given that the hazard rate of the random variable X (i.e., probability of entering into defective phase if not yet entered) is higher in distribution X3 compared to X2 at any Fig. 7. Optimal actions as a function of the process age for distribution X2. age of the process. Furthermore, the optimal action s * (τ ) is still nonincreasing in process age τ . However, the monotonicity of u * (·) continues to hold only at a fixed value of s * (·) . For example, we observe in Fig. 8 Fig. 8 (c) shows that u * (τ ) is first nonincreasing in τ ∈ { 0 , . . . , 8 } , then it makes a jump as soon as the function s * (·) decreases. A jump in the function u * (·) is observed only if there is a decrease in the value of the function s * (·) . But, a decrease in s * (·) does not always lead to a jump in u * (·) .

Conclusion
We study the inspection scheduling decisions for a production process that goes through a hidden defective phase which can only be detected via costly inspections. The production process is equipped with a defect-prediction model that generates alert and no-alert signals to indicate the defective and healthy state of the process, respectively. However, the signals generated by the defectprediction model are not always correct. To address the question of how to react to imperfect alert and no-alert signals, we introduce a new inspection policy, referred to as the ( s, u ) -policy, to take into account these signals in inspection scheduling. Specifically, the ( s, u ) -policy schedules the next planned inspection after a specific number of products depending on the age of the process. In addition, it allows an inspection to be triggered by a certain number of alerts also depending on the age of the process. Thus, the proposed policy can be regarded as an extension of classical age-based inspection policy. It is applicable when imperfect information is periodically revealed about a system's true condition and only costly inspections can identify this true condition.
To find the optimal ( s, u ) -policy, a stochastic dynamic programming model is formulated with the objective of minimizing the long-run expected cost rate. The performance improvement achieved by the optimal ( s, u ) -policy is quantified by comparing it to the benchmark policies. The economic value of adding an alerttriggered inspection option to a conventional age-based inspection policy is discussed. Quantifying the performance of the optimal ( s, u ) -policy at a given level of imperfectness can be used in practice to obtain the economic value of a certain level of improvement in the predictive model. A future research direction is to extend the ( s, u ) -policy to allow multiple alert types that imperfectly indicate various degradation levels of a system. Another potential research direction is to consider that the false-positive and false-negative probabilities of the defect-prediction model are uncertain and updated by observing the outcomes of the inspections.
(a) Suppose that x ≤ z. This represents the case where the process is already completed its healthy state by the time the (i − 1) th alert is generated; i.e., the process is already in the defective state in the first product that is processed after seeing the (i − 1) th alert. Thus, the random variable Y i (x ) has the distribution of the random variable T 1 (0) .
(b) Suppose that x > z. This represents the case where the process is already in the healthy state by the time the (i − 1) th alert is generated, and it will become defective after processing x − z more products in the healthy state. Thus, the random variable Y i (x ) has the probability distribution of the random variable T 1 (x − z) .
Since T i −1 (x ) and Y i (x ) are independent for a given defect arrival moment x , by using (13) , it can be written that where P (T i −1 (x ) = z) = p i −1 ,x (z) and The result follows from plugging P (T i −1 (x ) = z) and P ( Y i (x ) = t − z ) into Eq. (14) .   rate under the optimal ABI policy and the cost rate under the optimal ADI policy, denoted with γ * ABI and γ * ADI , respectively. Also, the percentage difference of these cost rates is reported, i.e., ˜ % = 100 (γ * ABI − γ * ADI ) /γ * ABI % . A negative ˜ % indicates that the optimal ABI policy performs better than the optimal ADI policy. For each distribution type X1, X2 and X3, representing the number of products processed in the healthy state, Table B.8 assumes the number of products processed in the defective state follows the distribution H1, while Table B.9 assumes it follows the distribution H2.
Tables B.8 and B.9 illustrate how the percentage benefit ˜ % increases as the defect-prediction model becomes more accurate (i.e., as the parameters α and β decrease). At a fixed false-positive probability α, it is observed that the speed of increase in the percentage benefit ˜ % is first high and then decreases as the falsenegative probability β decreases. In Table B.8 with α = 0 . 2 and the distribution X1, for example, ˜ % increases 5.9 units as β decreases from 0.5 to 0.35, then increases 4 units as β decreases from 0.35 to 0.2, and finally increases only 2.8 units as β decreases from 0.2 to 0.05. This monotonic change in the speed of increase in ˜ % holds for all the cases in Tables B.8 and B.9 at a fixed α value. Furthermore, there is a relatively large percentage benefit ˜ % at low α values compared to the low β values. For example, in Table B.8 with α = 0 . 05 and the distribution X1, it is observed that ˜ % can still be as high as 27 . 7% even for β = 0 . 5 , a quite large false-negative probability for a prediction model. In this example with specified cost parameters, the optimal ADI policy, which triggers an inspection only by counting the alerts, becomes more advantageous by improving the false-positive probability rather than improving the false-negative probability. Finally, the values of the percentage benefit ˜ % are lower in Table B.9 compared to their counterparts in Table B.8 . That is, as the number of products to be processed in the defective state becomes more variable, we observe that the optimal ADI policy becomes more beneficial than the optimal ABI policy.