Production rescheduling through product quality prediction

Abstract In production management, efficient scheduling is key towards smooth and balanced production. Scheduling can be well-supported by real-time data acquisition systems, resulting in decisions that rely on actual or predicted status of production environment and jobs in progress. Utilizing advanced monitoring systems, prediction-based rescheduling method is proposed that can react on in-process scrap predictions, performed by machine learning algorithms. Based on predictions, overall production can be rescheduled with higher efficiency, compared to rescheduling after completion of the whole machining process with realization of scrap. Series of numerical experiments are presented to demonstrate potentials in prediction-based rescheduling, with early-stage scrap detection.


Introduction
In recent years, the application of data-driven models accelerated the optimization of production processes. In particular, companies all over the world already apply Machine Learning (ML) to increase efficiency, reduce costs and ensure higher service levels. First success stories reveal the potential of optimizing processes by using ML [1]. Predictive Quality (PQ) is one of the most widely used approaches in order to reduce scrap, rework and time for quality inspection [15,14]. Simultaneously, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) [2]. An early detection of scrap parts by predicting product quality can be used to trigger a rescheduling and, thus, increase the OEE, since the machine utilization by products that are going to be scrap is reduced. However, the application of PQ for adaptive schedule adjustment has not found use in the production environment to date. * Maik Frye. Tel.: +49-241-8904-538 ; fax: +49-241-8904-6538.
In this paper, we provide a proof of concept for predictionbased scheduling through predicting product quality during manufacturing, in order to reduce waste and increase productivity. Based on the result of some ML-based product quality prediction, an event-driven rescheduling is triggered. Once the use-case is identified and process as well as product data are acquired, data are prepared for further modelling. This data are used to train ML-models that provide the opportunity of forecasting the product quality. Based on the data of each individual process in the process chain, the output of the classification model is whether the product is expected to be in or out of specification after the completion of the process. If the product is out of specification and thus a scrap part, the rescheduling is triggered.
Although identification of waste or scrap can be solely beneficial, even more business value can be brought by utilizing this information in production planning and control. Overall equipment effectiveness is known to have three major factors: quality, productivity and availability. Improving any of them will contribute to the OEE's increase. The presented method aims at investigating the second factor, namely, how productivity can be improved by the prediction of improper production quality using ML. The key idea is that the aforementioned trigger to reschedule production can be done proactively by using ML-

Introduction
In recent years, the application of data-driven models accelerated the optimization of production processes. In particular, companies all over the world already apply Machine Learning (ML) to increase efficiency, reduce costs and ensure higher service levels. First success stories reveal the potential of optimizing processes by using ML [1]. Predictive Quality (PQ) is one of the most widely used approaches in order to reduce scrap, rework and time for quality inspection [15,14]. Simultaneously, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) [2]. An early detection of scrap parts by predicting product quality can be used to trigger a rescheduling and, thus, increase the OEE, since the machine utilization by products that are going to be scrap is reduced. However, the application of PQ for adaptive schedule adjustment has not found use in the production environment to date. * Maik Frye. Tel.: +49-241-8904-538 ; fax: +49-241-8904-6538.
In this paper, we provide a proof of concept for predictionbased scheduling through predicting product quality during manufacturing, in order to reduce waste and increase productivity. Based on the result of some ML-based product quality prediction, an event-driven rescheduling is triggered. Once the use-case is identified and process as well as product data are acquired, data are prepared for further modelling. This data are used to train ML-models that provide the opportunity of forecasting the product quality. Based on the data of each individual process in the process chain, the output of the classification model is whether the product is expected to be in or out of specification after the completion of the process. If the product is out of specification and thus a scrap part, the rescheduling is triggered.
Although identification of waste or scrap can be solely beneficial, even more business value can be brought by utilizing this information in production planning and control. Overall equipment effectiveness is known to have three major factors: quality, productivity and availability. Improving any of them will contribute to the OEE's increase. The presented method aims at investigating the second factor, namely, how productivity can be improved by the prediction of improper production quality using ML. The key idea is that the aforementioned trigger to reschedule production can be done proactively by using ML-

Introduction
In recent years, the application of data-driven models accelerated the optimization of production processes. In particular, companies all over the world already apply Machine Learning (ML) to increase efficiency, reduce costs and ensure higher service levels. First success stories reveal the potential of optimizing processes by using ML [1]. Predictive Quality (PQ) is one of the most widely used approaches in order to reduce scrap, rework and time for quality inspection [15,14]. Simultaneously, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) [2]. An early detection of scrap parts by predicting product quality can be used to trigger a rescheduling and, thus, increase the OEE, since the machine utilization by products that are going to be scrap is reduced. However, the application of PQ for adaptive schedule adjustment has not found use in the production environment to date. * Maik Frye. Tel.: +49-241-8904-538 ; fax: +49-241-8904-6538.
In this paper, we provide a proof of concept for predictionbased scheduling through predicting product quality during manufacturing, in order to reduce waste and increase productivity. Based on the result of some ML-based product quality prediction, an event-driven rescheduling is triggered. Once the use-case is identified and process as well as product data are acquired, data are prepared for further modelling. This data are used to train ML-models that provide the opportunity of forecasting the product quality. Based on the data of each individual process in the process chain, the output of the classification model is whether the product is expected to be in or out of specification after the completion of the process. If the product is out of specification and thus a scrap part, the rescheduling is triggered.
Although identification of waste or scrap can be solely beneficial, even more business value can be brought by utilizing this information in production planning and control. Overall equipment effectiveness is known to have three major factors: quality, productivity and availability. Improving any of them will contribute to the OEE's increase. The presented method aims at investigating the second factor, namely, how productivity can be improved by the prediction of improper production quality using ML. The key idea is that the aforementioned trigger to reschedule production can be done proactively by using ML-

Abstract
In production management, efficient scheduling is key towards smooth and balanced production. Scheduling can be well-supported by real-time data acquisition systems, resulting in decisions that rely on actual or predicted status of production environment and jobs in progress. Utilizing advanced monitoring systems, prediction-based rescheduling method is proposed that can react on in-process scrap predictions, performed by machine learning algorithms. Based on predictions, overall production can be rescheduled with higher efficiency, compared to rescheduling after completion of the whole machining process with realization of scrap. Series of numerical experiments are presented to demonstrate potentials in prediction-based rescheduling, with early-stage scrap detection.

Introduction
In recent years, the application of data-driven models accelerated the optimization of production processes. In particular, companies all over the world already apply Machine Learning (ML) to increase efficiency, reduce costs and ensure higher service levels. First success stories reveal the potential of optimizing processes by using ML [1]. Predictive Quality (PQ) is one of the most widely used approaches in order to reduce scrap, rework and time for quality inspection [15,14]. Simultaneously, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) [2]. An early detection of scrap parts by predicting product quality can be used to trigger a rescheduling and, thus, increase the OEE, since the machine utilization by products that are going to be scrap is reduced. However, the application of PQ for adaptive schedule adjustment has not found use in the production environment to date. * Maik Frye. Tel.: +49-241-8904-538 ; fax: +49-241-8904-6538.
In this paper, we provide a proof of concept for predictionbased scheduling through predicting product quality during manufacturing, in order to reduce waste and increase productivity. Based on the result of some ML-based product quality prediction, an event-driven rescheduling is triggered. Once the use-case is identified and process as well as product data are acquired, data are prepared for further modelling. This data are used to train ML-models that provide the opportunity of forecasting the product quality. Based on the data of each individual process in the process chain, the output of the classification model is whether the product is expected to be in or out of specification after the completion of the process. If the product is out of specification and thus a scrap part, the rescheduling is triggered.
Although identification of waste or scrap can be solely beneficial, even more business value can be brought by utilizing this information in production planning and control. Overall equipment effectiveness is known to have three major factors: quality, productivity and availability. Improving any of them will contribute to the OEE's increase. The presented method aims at investigating the second factor, namely, how productivity can be improved by the prediction of improper production quality using ML. The key idea is that the aforementioned trigger to reschedule production can be done proactively by using ML- Available online at www.sciencedirect.com Procedia Manufacturing 00 (2019) 000-000 www.elsevier.com/locate/procedia

Introduction
In recent years, the application of data-driven models accelerated the optimization of production processes. In particular, companies all over the world already apply Machine Learning (ML) to increase efficiency, reduce costs and ensure higher service levels. First success stories reveal the potential of optimizing processes by using ML [1]. Predictive Quality (PQ) is one of the most widely used approaches in order to reduce scrap, rework and time for quality inspection [15,14]. Simultaneously, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) [2]. An early detection of scrap parts by predicting product quality can be used to trigger a rescheduling and, thus, increase the OEE, since the machine utilization by products that are going to be scrap is reduced. However, the application of PQ for adaptive schedule adjustment has not found use in the production environment to date. * Maik Frye. Tel.: +49-241-8904-538 ; fax: +49-241-8904-6538.
In this paper, we provide a proof of concept for predictionbased scheduling through predicting product quality during manufacturing, in order to reduce waste and increase productivity. Based on the result of some ML-based product quality prediction, an event-driven rescheduling is triggered. Once the use-case is identified and process as well as product data are acquired, data are prepared for further modelling. This data are used to train ML-models that provide the opportunity of forecasting the product quality. Based on the data of each individual process in the process chain, the output of the classification model is whether the product is expected to be in or out of specification after the completion of the process. If the product is out of specification and thus a scrap part, the rescheduling is triggered.
Although identification of waste or scrap can be solely beneficial, even more business value can be brought by utilizing this information in production planning and control. Overall equipment effectiveness is known to have three major factors: quality, productivity and availability. Improving any of them will contribute to the OEE's increase. The presented method aims at investigating the second factor, namely, how productivity can be improved by the prediction of improper production quality using ML. The key idea is that the aforementioned trigger to reschedule production can be done proactively by using ML- Available online at www.sciencedirect.com Procedia Manufacturing 00 (2019) 000-000 www.elsevier.com/locate/procedia

Introduction
In recent years, the application of data-driven models accelerated the optimization of production processes. In particular, companies all over the world already apply Machine Learning (ML) to increase efficiency, reduce costs and ensure higher service levels. First success stories reveal the potential of optimizing processes by using ML [1]. Predictive Quality (PQ) is one of the most widely used approaches in order to reduce scrap, rework and time for quality inspection [15,14]. Simultaneously, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) [2]. An early detection of scrap parts by predicting product quality can be used to trigger a rescheduling and, thus, increase the OEE, since the machine utilization by products that are going to be scrap is reduced. However, the application of PQ for adaptive schedule adjustment has not found use in the production environment to date. * Maik Frye. Tel.: +49-241-8904-538 ; fax: +49-241-8904-6538.
In this paper, we provide a proof of concept for predictionbased scheduling through predicting product quality during manufacturing, in order to reduce waste and increase productivity. Based on the result of some ML-based product quality prediction, an event-driven rescheduling is triggered. Once the use-case is identified and process as well as product data are acquired, data are prepared for further modelling. This data are used to train ML-models that provide the opportunity of forecasting the product quality. Based on the data of each individual process in the process chain, the output of the classification model is whether the product is expected to be in or out of specification after the completion of the process. If the product is out of specification and thus a scrap part, the rescheduling is triggered.
Although identification of waste or scrap can be solely beneficial, even more business value can be brought by utilizing this information in production planning and control. Overall equipment effectiveness is known to have three major factors: quality, productivity and availability. Improving any of them will contribute to the OEE's increase. The presented method aims at investigating the second factor, namely, how productivity can be improved by the prediction of improper production quality using ML. The key idea is that the aforementioned trigger to reschedule production can be done proactively by using ML- based scrap prediction techniques, rather than the reactive way, when the scrap is already realized. If the entire order set is rescheduled early in case a scrap is predicted confidently, then the new schedule will deliver less total waste than implementing the rescheduling after the realization of the total scrap loss at the end of the given process. In order to evaluate the benefit of such (re-)scheduling model, we use the discrete-event simulation (DES)-model of a production system and the productivity is quantified by the execution makespan of a given order set. Through an experimental study, the proposed adaptive technique is compared with conventional reactive rescheduling methods.

Literature review
The goal of this paper is to perform adaptive scheduling based on prediction of product quality at early stages of a process chain. Therefore, we focus on the occurrence of already existing success stories that use information from ML-models for adaptive scheduling. The first step of literature review comprises the investigation of ML-based production quality predictions. In a second step, efforts in terms of adaptive scheduling are reviewed and current results presented.

ML-based Product Quality Prediction
A large overview on existing use-cases including product quality prediction reveals general potential of applying MLmodels in production [9,6]. Zhang et al. (2016) suggested the approach to create predictive models for quality control using a two-staged method. First, available data of a production line is clustered into groups based on corresponding manufacturing processes. Subsequently, supervised learning is used to predict failed products in each cluster leading to reduced data set's sparsity. Here, the random forest algorithm reached the highest performance score [18]. In Gröner et al. (2019), an application of ML-based classifiers was presented aiming to predict flawed products in an automated production. The study's focus was on products with diverse parameter combinations leading to product defects. Among others, random forest classifier as well as support vector machine (SVM) were implemented, where treebased algorithms outperformed the SVM [4].
Kuhnle and Lanza (2019) stated that production planning needs to be dynamic enough to handle uncertainty and unexpected incidents. For that purpose, cyber-physical production systems (CPPS) provide real-time data about, among others, order tracking, machine down times and inventory levels. This enables the application of ML-algorithms, which could be used for order dispatching and maintenance management. There have been investigations, in which ML is used for order scheduling using a method, where each resource and each order is considered as intelligent agent. A ML-based solution is presented to estimate the benefit of allocating a job to a specific resource [8]. In addition, Lee (2019) designed prediction models for the product quality of camera lenses using convolutional neural networks, while considering model outputs for scheduling. Thus, defective products that are successfully predicted at an early stage of the manufacturing process can be discarded without going to the next stage, avoiding unnecessary additional costs [10]. Krauß et al. (2019) focused on the prediction of product quality based on a process chain consisting of six steps. For each process, a Classification And Regression Tree (CART)-algorithm was trained in order to classify, whether products would be in or out of specification at the end of the process chain. The CART-algorithm was assessed based on the Matthews Correlation Coefficient (MCC) and achieved a performance of MCC = 0.70 [7]. However, the model's outputs were not used to adjust production schedules.

Rescheduling strategies
The advantage of having multiple data sources can be utilized only if the production management is ready for processing the near-real time information, and able to react on unexpected changes with least possible modifications in original plans. Focusing on scheduling as a critical part of the overall decision making process, robust or reactive approaches are needed to maintain the desired level of key performance indicators (KPI). Robust approaches calculate schedules with a foresight of possible changes, and in case they happen, the original plan can be followed with no or minimal modifications. Robustness always brings some costs by nature that is often displayed by the overall effectiveness. In contrast, reactive approaches rely on deterministic scheduling parameters, however, they provide quick, possibly only local modifications of schedules in case of certain deviations [13].
In this paper, rescheduling techniques are investigated that aim at adjusting the schedule to certain changes in production with least possible loss in selected KPIs: we focus on indirectly improving the productivity of the system under study by minimizing the manufacturing makespan as our primary performance indicator in the objective function of scheduling. Rescheduling actions are triggered by the predicted product quality, in case a predefined threshold is achieved. Then, the "live" schedule needs to be refined by leaving orders under execution (and possibly within a so-called frozen period) unchanged, as it is technologically required, and recalculating the schedule considering the remaining set of work orders. A general requirement towards rescheduling is to make it rapidly and with least possible hurt of the original schedule [16]. Even though time-based rescheduling triggers are most common, realizing other condition changes may be also used in a similar way. A typical example for a deviation-based trigger might be machine breakdowns, new job arrivals or product quality changes [19,3]. As for the latter, in case the product quality is not sufficient, typically two major options are available: to perform corrective rework actions, or to mark the part as scrap. Both affect the production schedule, while in case of rework, some corrective tasks need to be pasted in the plan. In case of scrap identification, all tasks need to be rescheduled that anyhow relates to the rejected part.
In the following sections, the latter case is investigated, however, the scrap identification is done in a predictive way, ideally well before the machining process would be completed. This requires both the in-process quality monitoring, as well as predictive analytics models that detect the quality deviation, and triggers the rescheduling before processes would be finished. In this case, the rescheduling algorithm should provide a new schedule that do not influence other jobs in progress, and adaptively regenerates the schedule with least possible modifications in a short response time [11]. There are several ways to regenerate a schedule while meeting the response time constraints, among others, heuristics, rule-and constraint-based approaches are most common ones [13]. For predictive rescheduling, various solutions are available, however, most of them typically focus on the prediction of machine breakdowns as a triggering event [17,12]. In order to utilize the fault prediction in scheduling, Ji and Wang (2017) propose a method that relies on big data analytics [5]. They propose a method that relies on historical data to reduce the number of defect parts by proper taskmachine assignments.

Literature review findings
In conclusion, ML is already applied in production in order to predict product quality. There are some single approaches to use ML with the aim to make production systems more adaptive, however, most examples are focusing on the performance enhancement of ML-models and the adaption of process parameters instead of using the outputs for a prediction-based scheduling. As for the revised literature in the topics of robust scheduling and rescheduling, it can be concluded that ML and data-driven solutions are proven to perform well in scheduling tasks. However, most of the approaches remain in a prototype phase without any transfer to real industrial environments. Therefore, production engineers and planner still face the challenges related to the scheduling's robustness, in form of unexpected levels of KPIs. Although, there are publications trying to link efficiently the execution and calculation stages of schedules, only a few efforts were made to combine them into a complex scheduling system in production environment.

Prediction-based scheduling
Nowadays, ML-models and AI are widely preferred for process parameter or product quality prediction. However, the application of ML-models in production remain on a prototype level since its development for stable usage requires not only deep engineering knowledge and strong programming skills, but also a broad experience in ML-algorithms and system model building. Especially the prediction of product quality and scrap ratio based on current system status offers a huge potential for adaptive scheduling and has not yet been investigated.

Problem Statement
Based on the previously discussed literature review, the problem statement is specified. Along numerical experiments, the optimal makespan is sought, producing a fix set of work orders. A realistic job-shop environment is considered, where manufacturing processes are imperfect, thus a certain amount of scrap is always realized. It is also assumed that manufacturing processes can be fully monitored, and scraps can be predicted in-process, and completely identified post-process. There are various jobs to be processed in the system, and each may include several work orders. The orders are specified by their duration and required technology, e. g. milling, drilling, that is considered when assigning them to resources. For the order execution, alternative resources are available. Considering these constraint, an initial schedule of all orders is generated, and maintained along with the execution by rescheduling if necessary or triggered. Considering a given set of orders, the overall objective of scheduling is to minimize the makespan, which indirectly refers to increasing the resource productivity. Fig. 1. Impact of rescheduling illustrated on a small example case: given two jobs (orange and blue) with three orders, and three resources (horizontal lanes) different schedules are compared. The first schedule is the initial one, assuming no scrap operation. During the execution, order A2 is identified/predicted to be scrap, thus all blue orders are rescheduled. In the adaptive case, rescheduling happens early in time, thus the overall makespan (Makespan 2) is significantly shorter than in case of reactive scheduling (Makespan 3). The rescheduled orders are indicated by a suffix "s" in the order name.
During the schedule execution (manufacturing), we may realize scraps. We assume that rework of scrap items is not possible, therefore, in case of a scrap job realization, all corresponding tasks of the job need to be re-scheduled and executed. Therefore, the key towards makespan minimization is prompt rescheduling. Rescheduling can happen after orders are completed (reactive scheduling), or already during part processing (based on the ML-based prediction, thus ideally earlier in time). Anytime a scrap part is realized or predicted, a rescheduling is performed and all orders (including the scrap related ones) are scheduled again (Fig. 1).

Workflow of the data-driven prediction-based scheduling
The proposed scheduling architecture can be taken from Fig. 2. Starting point is an initial job schedule, taking into account the job/order and resource sets. This schedule is released to the simulated production environment, and online ML-models are applied to forecast quality of products in realtime. In case any scrap is predicted, the identified operation needs to be terminated, and all related orders, even those that are completed already, are added to the order set again. When receiving ML-based predicted product quality, the schedule for the set of unreleased orders must be recalculated. Therefore, the target architecture is structured in both ML-based product quality forecast and prediction-based scheduling, which uses information of ML-models in order to adjust production schedule instantly. Consequently, the quality of products is predicted based on process parameters and initial data from product and environment. The output of ML-models are two different classes: scrap part and in-spec part. During and after completion of each process it is assessed whether the product is classified as scrap or as in-spec part. This information is then used as a trigger for rescheduling in the way described above.

ML-Based Product Quality Prediction
In order to perform quality prediction successfully, methodological approaches are used. Since commonly used methodologies are generic and do not cover expertise from domain experts, we use an approach that considers the relevant phases of an AI-project by taking into account perspectives of data science, production and IT-experts.
According to previously defined use-case, which is the prediction of product quality in order to use this information for a rescheduling, data is acquired on many different production systems leading to numerous data sources. Various data formats further result in the necessity of data integration. Since integrating data is very use-case specific, the collaboration with IT-experts and production experts is required to cover relevant parameters and determine IT-infrastructure capabilities. Integrated data may still comprise missing values, outliers and noise that require further preparation. The preparation can be structured into data architectures, in which data scientists select and implement suitable methods of data preprocessing on the basis of initial data quality checks, as well as feature engineering. New features may also be generated through intensive collaboration between data scientist and production expert.
Based on high quality data, suitable ML-algorithms are selected, trained and optimized. For the selection of MLalgorithms, use case requirements, the underlying data quality, and external requirements such as existing computing power is considered. To understand the complexity of the problem, baseline ML-algorithms are implemented such as decision trees. Subsequently, more sophisticated algorithms are chosen. The ML model optimization takes place by performing hyperparameter tuning using state of the art tuning techniques such as random search and Bayesian optimization. In order to cover two scenarios stated in Chapter 3.2, a classification is selected, in which two classes are predicted based on process and environment parameters. Based on the predicted class, the rescheduling algorithm can be triggered. The ML-model results are assessed as the final modelling step using metrics such as F1score, MCC, or recall. If ML-models meet the requirements, models can further be deployed in production. For this reason, the first step comprises the design of deployment, in which the strategy, how the model is going to be implemented is specified as well as whether the model is trained online or offline. Subsequently, models are productionized meaning that the MLmodel is made available for final software systems and continuously tested. Once ML-models are deployed, the system is monitored and models retrained if necessary. Starting from a deployed software system, the final phase comprises the development of a certification strategy. Main action fields in regards to certification are model transparency, fairness and reliability. Moreover, data safety, protection as well as autonomy of the system needs to be ensured.

Production environment
The presented research aims at identifying the business potentials in ML-based adaptive scheduling, focusing on scrap prediction. Therefore, a realistic yet simulated production environment is considered as a testbed, assuming a generic machining shop with alternative resources and precedence constraints among orders. The corresponding scheduling model is formulated and implemented using the Kalis constraint programming (CP) library of FICO Xpress. The investigated problem is a general job-shop scheduling with alternative machines from set M, and a set of jobs N. The set of work orders is denoted by O, and each order has a given duration t o , and a resource requirement m o . The set of process (and also machine) types is denoted by S , each task has its own process type s o ∈ S and machines have process capabilities s m ∈ S . The machines are disjunctive resources and they are capable to process a single order at a time. The objective function minimizes the makespan T , which means the overall completion time of all jobs. Considering pro-cess plans of the jobs, the schedule includes some precedence constraints that prevent to hurt the predefined sequence of order completions. The precedence connection between tasks is represented by a graph G(V, E) with arcs (i, j) ∈ E symbolizing that operation i precedes operation j. The binary decision variables a om determine, if order o is assigned (1) to machine m or not (0). The scheduling model is formulated as it follows: The objective function (1) expresses the minimization of the makespan of the schedule. Constraint (2) specifies the duration of the tasks, while (3) represents the precedence limitations. Constraints (4-7) define the machine capacities considering alternative resources.

Numerical experiments
In the test scenarios, input data is generated with random parameters. For the sake of comparability, the production environment remain unchanged in all test scenarios, while the job attributes and all related order parameters are changed randomly. The simulated production environment is characterized with the following parameters. The number of machines is |M| = 7, including four different machine types that covers the whole set of machining operations. In the experiments, milling, drilling, grinding and electric-discharging operations are assumed, which require different machine types. The number of jobs is set to be |J| = 15, and each job has several operations in the range of 1 to 10 and the overall set of orders is |O| = [70, 100]. The orders' (randomly) predefined duration varies between t o = [10, 50] minutes. Considering the workload and the capacity, the short term scheduling covers 8-12 hours (makespan), equivalent to a working shift. Some orders are randomly marked to result in scrap, and the scrap rate varies between 1-5%. Along the experiments, it is assumed that the ML-model can accurately identify scrap already at 25-40% of the task completion progress. Therefore, a rescheduling event can be triggered at the earliest time of 25% task completion. This approach is compared with the traditional reactive method, when rescheduling is triggered after the task completion. The assumed prediction times are in very early, yet realistic stage of the machining process; and important to highlight that the obtained results are also idealistic based on the prediction time. In case of false alarms and later prediction, the obtained business values may decrease or significantly decrease compared to the presented case.
The simulation model of the system is implemented in Siemens Tecnomatix Plant Simulation, and callback functions are implemented in Python to bridge the scheduler and simulation models. In every experiment, the production is simulated by using both adaptive and reactive rescheduling methods, and the associated makespan values are compared. In every scenario, the makespan value is converted to be relative, i.e., the percentage value of it provides how shorter the makespan of the adaptive scheduling is compared to the reactive one. Accordingly, negative values indicate improvement with a certain percentage compared to the reactive approach, while positive values indicate worse (i.e. longer) production. The scenarios are also marked by the total number of work orders, as in case of very complex instances, the CP solver may not return with an optimal value, but the time limit of 1 minute is reached. Furthermore, the number of rescheduling actions is also highlighted, indicated by the scrap rate. Scenarios with ≤ 3 % scrap rate are associated with a few rescheduling actions (1)(2), in contrast to those scenarios where the scrap rate is relatively high (3-5%), thus rescheduling is more frequent. As indicated by the numerical results of 100 scenarios, the prediction-based rescheduling method resulted in significantly shorter makespan in most of the cases (Fig. 3). In case of relatively simple scheduling problem with 70 work orders, the CP solver terminated with a close-to-optima solution (in both methods), thus the results are easier to compare. In these cases, the prediction-based method resulted in 8-11% shorter makespan (median), and there were only a very few cases when the reactive method resulted in a shorter execution time. As the number of orders increases, the scheduling problem gets more complex and the solver typically cannot find a close-to-optimum value, however, the prediction-based method still performs better in these cases. Interesting to observe that scrap rate has no major impact on the trend of the results, but in case of more frequent rescheduling, the contribution of the prediction-based method to the system performance is also slightly increasing.
The obtained positive results show the potentials of the proposed methodology, although they are possibly biased by the conditions in which the adaptive scheduling approach operates. The outcome may vary in different circumstances, therefore the solution shall be personalized for every given environment.

Conclusions and outlook
The application of ML for production process optimization has been rapidly increased over the last years. Especially PQ is one of the most common application of ML in production. Primary goals of PQ are to reduce scrap and rework. Besides enhancing product quality, PQ offers the potential to increase machine utilization and overall equipment effectiveness (OEE) through an early detection of scrap parts that triggers rescheduling. In practice, this approach remain on concept level until date. Therefore, in this paper, rescheduling techniques are investigated that aim at adjusting the schedule to certain changes in production with the least possible loss in selected KPIs. For this reason, a realistic yet simulated production environment is considered as a testbed, assuming a generic machining shop with alternative resources and precedence constraints among the orders. Numerical results indicate the assumption that early scrap identification has a significant positive impact on the productivity, as the time saved by the ML-based prediction can be 10-15 % of the overall makespan in the analyzed cases and 100 scenarios. The proposed prediction-based scheduling model is triggered by a scrap classifier, however "predictionbased"-ness does not mean that the model always has to use a scrap forecasting result. Thus, future work on this topic consists of experimenting with different target variables (e. g. rework prediction) and comparing them. Also, certain combinations of achieved models may bring promising results when using them jointly in prediction-based scheduling. As part of the future work, the authors plan to investigate the outcome of mixing all possible prediction scenarios (processing time, scrap, rework) as triggers of rescheduling. Furthermore, current efforts are put in linking process monitoring, data collection and ML tools to compile them in a common real time analytics framework that enables further integration of production IT tools, e. g., scheduling and dispatching tools.