Flexible scheduling of diagnostic tests in automotive manufacturing

The car of the future will be driven by software and offer a variety of customisation options. Enabling these customisation options forces modern automotive manufacturers to update their standardised scheduling concepts for testing and commissioning cars. A flexible scheduling concept means that every chosen customer configuration code must have its own testing procedure. This concept is essential to provide individual testing workflows where the time and resources are optimised for every car. Manual scheduling is complicated due to constraints on time, predecessor-successor relationships, mutual exclusion criteria, resources and status conditions on the car engineering and assembly line. Applied methods to handle the mathematical formulation for the corresponding industrial optimisation problem and its implementation are not yet available. This paper presents a procedure for automated and non-preemptive scheduling in the testing and commissioning of cars, which is built on a Boolean satisfiability problem on parallel and identical machines with temporal and resource constraints. The presented method is successfully implemented and evaluated on a variant assembly line of an automotive Original Equipment Manufacturer. This paper is the starting point for an automated workflow planning and scheduling process in automotive manufacturing.


Introduction and motivation
The automotive industry is affected by the increasing importance of automotive software (Ebert and Favaro 2017). Automotive software allows customers to use more assisted, software-linked car functions during their car journey. These software-linked customer car functions are related to components and electronic control units (ECUs), such as the head-up display. The functions support new concepts for automotive software engineering in manufacturing: the Original Equipment Manufacturers (OEM) offer their customers flexible customisation possibilities and equip the manufacturing processes accordingly.
Automotive manufacturing should therefore be able to produce, test, and commission software-linked, customised cars. As every chosen configuration code may need its own testing procedure to complete the car, such as the commissioning of a seat massage, it is essential to provide time and resource-optimised individual testing workflows for any given car. Those testing workflows consist of software and worker-guided process steps. Nowadays, all of these tests are written into a schedule by hand with a preferably short test time. To minimise factory costs, the schedule of the test procedures could be optimised with respect to the total test time within a factory by applying an automated scheduling procedure.
The main contribution of this paper is a method for the automated and flexible scheduling of diagnostic tests on cars subject to several constraints. The constraints relate to time, direct predecessors, set of all predecessors, mutual exclusion criteria, resource and status conditions for the car engineering and assembly line. The corresponding mathematical model can be formulated as a Boolean satisfiability problem on parallel identical machines. This is the first use case to describe flexible scheduling on parallel identical machines with complex constraints for testing and commissioning in car manufacturing.
The paper is structured as follows: Section 2 introduces the background to scheduling, business challenges and deduces resulting requirements of scheduling for testing and commissioning in automotive manufacturing systems. Section 2 hereby outlines the research questions of this work. The related work is discussed in Section 3. Section 4 describes the mathematical model for scheduling diagnostic tests. A novel automated and flexible scheduling procedure based on the mathematical model is presented in Section 5. The computational study is illustrated in Section 6. The results of the study are presented and discussed in the following Section 6. The final Section 7 concludes this paper.

Problem definition
Section 2 introduces the basic concept of production planning in manufacturing. We explain the technical requirements arising from expert discussions that need to be fulfilled for scheduling in testing and commissioning. We can then select an appropriate mathematical concept based on the defined technical requirements.

Background to scheduling and real-time operating systems
The process of translating customer orders into manufacturing jobs on specific dates is called production planning (Lawlor 1973). Production planning creates a plan that describes the necessary, ordered set of jobs required to accomplish a specific goal in terms of customer orders, given certain starting conditions. Scheduling is a subprocess of production planning, dealing with the allocation of resources to jobs over given time periods with respect to the optimisation of one or more objectives (Błażewicz 2007). A typical optimisation problem in industry is minimising the makespan of a job schedule, which can be interpreted as the time needed from the start to the end of the schedule (Hillier and Herrmann 2006). Scheduling is broadly applied in open, flow and job shop production problems (Brucker 2007).
Scheduling in manufacturing can be interpreted as non-preemptive scheduling in real-time operation systems (Quilliot et al. 2021). To narrow down related work, we continue with the industrial challenges and derive requirements from these.

Challenges and requirements in the complex scheduling of diagnostic tests
Modern automotive manufacturers offer their customers a wide range of car customisation options. A fixed production plan is therefore no option in flexible manufacturing systems, or in standardised car diagnostic testing schedules for electric and electronic car components (challenge C 1 ). As every choice of configuration set may need its own testing procedure, manufacturing systems must provide time and resource-optimised individual testing schedules for any given car (challenge C 2 ). Fig. 1 shows three exemplary testing scenarios on an automotive assembly production line. In test location 1, the maximum number of tests is conducted on the fully equipped car with seven scheduled tests. A fully equipped car has more electrical and electronic components than others and thus, for cars with less Flexible scheduling of diagnostic tests in automotive… equipment codes, fewer tests need to be scheduled. In test location 2, there is a schedule with a worker-guided test. In test location 3, the smallest scope of tests is conducted on the cars with the least equipment. The tests are performed on a car with motor status on and in communication with a test bench.
The tests should be performed in parallel at all test locations to minimise testing run times if feasible. In the following, we will take a closer look at the constraints that decide on the parallel execution of tests.
Expert discussions were held with engineers and programmers to address the challenges C 1 and C 2 and resulted in six requirements for the creation of a procedure to schedule diagnostic tests in automotive manufacturing. We introduced a flexible manufacturing system (FMS) to handle challenge C 2 : a FMS is an integrated group of processing computer, numerical control machines and material handling equipment controlled by computers for the automatic processing of parts (ElMaraghy and Caggiano 2016). In an FMS, testing schedules consist of equipment-dependent tests and can be computed event-driven.
Six technical requirements will be formulated with mathematical expressions in the following to handle challenge C 1 . These explicit requirements arise from expert knowledge in automotive diagnostic test scheduling. The baseline scheduling model is built by an engineer who writes all tests into a software sequence schedule by hand, preferably with a short test time. It is based on experience.
Schedules were either created on demand or beforehand to plan machine usage better. Thus, the following explicit requirements form the technical basis of the mathematical optimisation model for flexible scheduling in this work. To formulate the constraints, we list all of the basic mathematical notation of this work in Table 1.
Feasible solution for a given set of constraints C We define the finite set of N individual tests that are scheduled for a car at an automotive assembly line as and the finite set of K different resources that may be used by a test i ∈ I as For example, the specific test i ∈ I may use 20% of the car engine's resource capacity. The finite set of Z different status conditions, which must be considered in the test schedule, is defined as For example, the car engine must be turned on before testing the air conditioning. The respective test would require the motor status to be on as the status condition.
Without loss of generality, we formulate the requirements R time , R dir , R pre , R mutex , R res and R status for the test i ∈ I.
• Requirement R time : a test has a run time Test i ∈ I has a predicted run time {t i } i∈I , t i ∈ ℝ >0 . The prediction can be based on expert knowledge and an analysis of historic tests. The run time t i is a crucial requirement to minimise with respect to the makespan of the test schedule. Note that the more accurate the time predictions are, the more efficient an optimised test schedule will be in the production line. • Requirement R dir : a test can have a direct predecessor Test i ∈ I may require a test as a direct predecessor {pre i } i∈I , pre i ∈ I . Therefore, the end time of pre i must equal the start time of i. For example, the engine must be brought up to a certain temperature before it is tested under maximum load. There must be short time between the test of heating and the main test of the engine itself. • Requirement R pre : a test has a set of predecessors Test i ∈ I may require a set of predecessors {P i } i∈I , P i ⊂ I , which must be completed before i starts. For example, an ECU should be flashed by software before it is coded to a specific configuration. • Requirement R mutex : a test can have mutual exclusive tests Test i ∈ I may require a set of mutual exclusive tests {M i } i∈I , M i ⊂ I , which may not run parallel to i. For example, you cannot simultaneously test whether the air conditioning can precisely regulate to a predefined high or low temperature. • Requirement R res : a test has resource criteria Test i ∈ I may temporarily consume a fixed amount {r i,j } i∈I,j∈J , r i,j ∈ [0, 100] of automotive bus resource j ∈ J . At no point in the testing schedule may the consumed amount of resources be greater than 100% on any of the resources. • Requirement R status : a test has status criteria A test i ∈ I may require or change a status of a reference object l ∈ L , i.e., {c i,l } i∈I,l∈L , c i,l ∈ {require_on, require_off, turn_on, turn_off, any} . For exam-

3
Flexible scheduling of diagnostic tests in automotive… ple, if test i ∈ I has the status c i,l = require_on for l = engine , another test j ∈ I with status c j,l = turn_on must be run beforehand. No test m ∈ I with status c m,l = turn_off has to be performed in between. For example, before performing a worker-guided test, at least one worker must be present at the test location and thus be set to the state turn_on.
The scheduling of N tests is processed on K = {1, … , S} , which is the set of S ∈ ℕ identical and parallel machines. Each test i ∈ I has a run time {t i } i∈I and can only be processed by one processing unit of the FMS at a time. We specify that the machines are identical, so that processing i ∈ I takes time {t i } i∈I on any machine (Shmoys et al. 1991).
We define C as a fixed and finite set of requirements and will refer to s i as the start time and e i ∶= s i + t i as the end time for the test i ∈ I . Therefore, the time interval of We minimise the schedule with respect to the makespan An optimal solution for a set of constraints given an objective is called Θ C . Every test has a predicted run time, as stated in requirement R time and can inherit any combination of further constraints. Fulfilling those requirements will ensure a faultless testing procedure and exclude the risk of damage to any of the components.
We classify the scheduling problem in terms of the three-field notation of Brucker (2007). A scheduling problem is classified in | | . determines the machine environment. In this work, we assume = { 1 = K} because of identical parallel machines. Job characteristics are determined by = { 2 = prec, 3 = const} . In this work, directed acyclic graphs are of interest so that 2 = prec . The specification of release dates is also of interest, in combination with the car's state of construction on the assembly line, i.e., 3 = const . The optimality criterion is the minimal completion time of the test schedule, i.e., = e max . As proposed by Brucker (2007), we ignore the empty symbols in the three-field notation.

Research questions
We assume that the fulfilment of the six outlined requirements R time , R dir , R pre , R mutex , R res and R status forms the theoretical basis for a procedure to schedule diagnostic tests flexibly in automotive manufacturing. To investigate the complex scheduling problem, we formulate the research questions RQ1 and RQ2 as follows: RQ1: Which mathematical model describes the scheduling problem, taking into account the requirements R time , R dir , R pre , R mutex , R res and R status , and how can a numerical solution be found? RQ2: What are the key elements of the procedure for scheduling diagnostic tests during the assembly line production in automotive companies based on the model provided by RQ1?
(1) e max = max i∈I e i .

Related work
Based on the requirements of Section 2.2, we identified the criteria relevant for the classification of related work (see Table 2).
Scheduling in automotive use cases has been extensively discussed in literature. Shi et al. (2017), for example, developed test plans with tight schedules that combine multiple diagnostic tests on cars to fully utilise all of the available time in prototype car test scheduling. Moreover, Spieckermann et al. (2004) dealt with the scheduling problem of operating paint shop systems with sequence-dependent set-up costs.
Schedules of diagnostic tests in automotive production lines contain safety and certification-relevant test steps. This is why we prefer exact deterministic mathematical methods in this paper. The constraints implicated by the direct predecessor R dir and the set of predecessors R pre are explained exhaustively in any context of linear programming (Vanderbei 2020). The mutual exclusion constraint R mut can be formulated using binary helper variables.
We will develop a method to translate the requirements of Section 2.2 into a piecewise linear model (mixed-integer model) for every requirement except R res , which will be formulated as a logical constraint.
To do so, the mathematical model of this paper will be formulated as a Boolean satisfiability (SAT) problem and will be solved accordingly, e.g., with the Generic seaRch Algorithm for the Satisfiability Problem (GRASP) of Marques-Silva and Sakallah (1999). An overview on the theory and applications of SAT problems is provided by Pulina and Seidl (2020). Huang and Zhou (2018), for example, provide an efficient SAT encoding method for complex job-shop scheduling.
The group of SAT problems is proven to be NP-complete by Cook (1971). This means that it is possible to verify any given solution in polynomial time, but no algorithm exists that can find one such solution in polynomial time. As the algorithm engineering of modern SAT solvers has improved over recent years, the real world running time in the present use case of static scheduling is of negligible importance (Alouneh et al. 2019). Weckenborg et al. (2020) discussed the automotive capacity scheduling of prototype vehicle production at the Volkswagen Pre-Production Center. Resource allocation, the selection and scheduling of orders for prototype vehicle production are of interest here. Moreover, Weckenborg et al. (2020) proposed a spreadsheet-based decision support system for daily capacity scheduling. Nevertheless, the setting is different to our work in terms of the application and the criteria of Table 2. Buergin et al. (2018) introduced an optimisation model for the local order scheduling of mixed-model aircraft assembly lines covering both assignment to lines as well as sequencing with respect to cost. Requirements R time , R pre and R res are the focus of the work of Buergin et al. (2018). Dörmer et al. (2015) covered the problem of master production scheduling for high-variant, mixed-model automotive assembly lines. Individual, customerdefined models of a basic product type are assigned to short-term production Flexible scheduling of diagnostic tests in automotive… Table 2 Classification of related work -symbol "X" means applicable, symbol "-" means not applicable or not specified, P. periods while anticipating the negative impacts of an unbalanced model sequence at the lower planning level. The focus is on workload and processing times at the stations on the assembly lines with respect to cost, thus the requirements R time and R res are fulfilled. Wang and Liu (2015) described a multi-objective, parallel machine scheduling problem with resources on machines and moulds, and with flexible preventive maintenance activities on resources. The work deals with parallel identical machines and addresses the requirements R time , R pre and R res . Bartels and Zimmermann (2009) covered an approach to experimental cars based on multi-mode, resource-constrained project scheduling with minimum and maximum time lags as well as renewable and cumulative resources, i.e., requirements R time , R pre as well as R res are studied. However, the objective is different as scheduling is used to minimise the number of automotive prototypes used in Bartels and Zimmermann (2009).
To the best of the authors' knowledge, no literature exists on combining the constraint criteria R time , R dir , R pre , R mutex , R res and R status into a deterministic comprehensible method which optimises the makespan of the test schedule. There is no suitable approach to fulfill all of the criteria in Table 2 for automotive batch scheduling on assembly lines.

Model formulation and solution for flexible scheduling
We will build the full model, which describes the input and output data with regard to the conditions and requirements of Section 2. Without loss of generality, the constraints will be formulated for a test i ∈ I.

Constraints for tests as model input
Referring to the problem description in Section 2.2, the input data can be represented in a table of length |I| . Every test i ∈ I has constraints and requirements that are indicated in this table. There is no specific requirement for the input format or data type as it depends on the realised implementation.

Objectives for the mathematical model
The objective of the optimisation in this work is to calculate the start time s i , given the input table, so that the makespan is minimised as defined in Eq. 1, formally This ensures that the testing schedules are as cost efficient as possible, whereby cost is related to minimal run time.
To force the constraint R dir of the direct predecessor pre i of test i ∈ I , we require (2) min

3
Flexible scheduling of diagnostic tests in automotive… Next, we formulate the requirement R pre for the set of predecessors P i of test i ∈ I, So far, this is a strictly linear model and a solution Θ C for such could be found using the Simplex method in linear programming (Vanderbei 2020), given a linear objective function. Note that Eq. 2 is not linear.
The helper variables have to be defined for the mutual exclusion requirements R mutex of test i ∈ I . We define as a helper variable in order to process the constraints 'either or': To enforce the mutual exclusion requirement for test i ∈ I , every test in M i must 'either end before i' or 'start after i'. With the help of a binary variable h i,m ∈ {0, 1} , the 'either or' constraint is translated to We forego a formal proof, but will explain shortly: According to Definition 5, it holds that ∑ i∈I t i is the upper limit of the makespan, but note that the trivial chaining of tests is not necessarily a feasible solution. However, every feasible solution Θ C is shorter or equal in time.
We start with h i,m = 0 . Eq. 6b is then automatically fulfilled so that test m must end before test i starts.
Vice versa, assuming h i,m = 1 . As e m ≤ e max and s i ≥ 0 , it holds that for fixed i, m ∈ I , Eq. 6a is and therefore, the constraint will always be fulfilled no matter what s i , s m is. In that case, Eq. 6b is enforced, so that test m must begin only after test i is finished.
We have successfully translated 'either Eq. 6a or Eq. 6b' into the system using the binary helper variable h i,m ∈ {0, 1} . The system of constraints containing the (3) e pre i = s i .
(4) e p ≤ s i ∀p ∈ P i .
mutual exclusion requirements is no longer a strictly linear model, but rather a mixed-integer linear (MILP) system. It must be solved with suitable methods, e.g., a combination of the Simplex method and Branch and Bound method of Integer Programming (Hu and Kahng 2016).
In the next step, we want to translate the status requirement R status into mathematical constraints, which will keep the system a MILP problem. To do so, we have to interpret what possible status condition the test i ∈ I can have. As defined in R status for a test i ∈ I and a status l ∈ L , the test i ∈ I can either require the status condition to be ' off/on ', but can also turn the condition ' off/on '. Note that it may also hold the ' any ' requirement, which defines the status condition l to be of no concern to test i. Note that by definition, the status condition, if changing, is updated when the test is completed and that during that test, no other test which is not of status ' any ' can be run. An intuitive explanation will follow for these conditions based on the Pseudo code illustrated in Algorithm 1 of Appendix A.
At the start of the testing procedure, all status conditions are 'off' by definition. If there is a test i 1 ∈ I with condition ' require_on ', there are two possible allocations of the test. Either i 1 is executed before any other test with the status condition ' turn_on ' or i 1 is executed after a test with the status condition ' turn_off ', but before any test with ' turn_on ' is executed in between. On the other hand, a test i 2 ∈ I with status condition ' require_on ' can only run if a test with status condition ' turn_on ' is run beforehand and no test with status condition ' turn_off ' may run in between. Note that those constraints must hold for every kind of status condition l ∈ L.
There may be multiple ' turn_on'-'turn_off ' tests, which is why every possible combination must be taken into account by using 'either or' constraints as a help again. As the 'either or' in this case can also be 'at least one of many', we use a binary helper variable for every possible case and the constraint, so that Allow us to illustrate an example: let i 1 , i 2 , i 3 , j ∈ I and we want j to only start if at least one of the other tests i 1 , i 2 , i 3 is finished. The system would be It can be seen that at least one of h 1 , h 2 , h 3 must be equal to 0, and therefore one of Eqs. 9a, 9b or 9c are enforced, while the other two equations are of no concern. (8) For the resource constraint R res , it would be possible to keep the model strictly piecewise linear and solve it with an MILP method. This has the disadvantage of having an exponential number of constraints depending on the number of tests that use a resource. We therefore introduce a logical constraint r t,i,j , which forces the model to be solved as a SAT. For every test i ∈ I we create an interval T i = [s i , e i ] and define to enforce Implementing this constraint depends on the SAT solver or library that is used. In this work, the solver used by the implemented library of Perron and Furnon (2019) is the conflict-driven clause learning (CDCL) algorithm, which was developed by Marques-Silva and Sakallah (1999).
We have formally established the constraints of the system and will now be able to use a SAT solver to find an optimal solution.

Schedule of diagnostic tests as model output
The optimised schedule includes the start times s i of the tests i ∈ I . As the run time t i for a test i ∈ I is only a prediction based on historic data, real-world testing time may depend on many external non-controllable factors such as worker interaction. Thus, an output format is needed that still forces the test schedule to adhere to all requirements. Hence, an adjacency list is introduced which contains a list of predecessors for every test. In order for test i to be started, every test in the predecessor list of test i must have finished. An exemplary adjacency list is illustrated in Table 3. The derived schedule begins with tests 1 and 2, which have no predecessors. Thus, they can be run in parallel. When test 1 is finished, test 3 can start. When tests 2 and 3 are finished, test 4 can finally start.
We provide a Pseudo code in Algorithm 2 of Appendix A to translate the optimised start times to an adjacency list. The makespan of the adjacency schedule is equal to the makespan of the start time e max , if the predicted times {t i } i∈I are used to calculate the makespan.

A novel automated scheduling procedure
Having derived the mathematical scheduler in Section 4, we now describe the overall procedure to schedule diagnostic tests for the testing and commissioning of electronic components in automotive manufacturing. The mathematical model is hereby the central element.
The novel procedure consists of seven steps and two decisions (compare Fig. 2). We run through the procedure with an exemplary set of N tests I = {1, … , N} where I ⊂ I all and I all are the set of all existent tests over all cars. Moreover, we use automation systems as FMS, most of which are structured hierarchically in the so-called automation pyramid according to ISA-95 (ISA 2000).
The procedure for scheduling diagnostic tests on a selected car starts with Step 1. The set of tests I, that are performed on a specific car, depends on the configuration codes of the car. The configuration codes are linked to the tests, and this linked information is the input data for the first step. In Step 2, the location of the car on the assembly line is determined with the help of a production system at the supervisory level (ISA 2000). In Step 3, a production system at the planning level offers the constraints C for the configuration code-dependent tests of the car on the assembly line. The constraints C are necessary to schedule N tests for a car with respect to the business and engineering requirements R time , R dir , R pre , R mutex , R res and R status . In Step 4, the tests are scheduled with the objective of minimising the overall test run time. The mathematical model behind Step 4 has been highlighted extensively in Section 4. The schedule is represented as an adjacency list. In Step 5, the resulting schedule of N tests for the car on the assembly line is transferred for execution with a controller at the supervisory level. A code repository can support with binaries for each test. In Step 6, the results of the executed schedule are analysed and documented. In Decision 1, a check is carried out as to whether there is at least one test with a result equal to 'not OK'. If so, Decision 2 checks whether a repetition of the test or tests with the result equal to 'not OK' is feasible. The repetition can depend on the new position of the car in the assembly line production at the time of Decision 2. If the repetition is feasible, the tests with the result equal to 'not OK' are repeated for the car on the given assembly line by going back to Step 2. If all test results are 'OK', Decision 2 is skipped. In Step 7, the N test processes have been carried out on the car. The procedure is finished.

Industrial evaluation
We would now like to describe the industrial evaluation of the mathematical model of Section 4 and the procedure from Fig. 2 for an automotive case study with an OEM.
Flexible scheduling of diagnostic tests in automotive… Fig. 2 Flowchart of scheduling procedure to run diagnostic tests more flexibly and reduce overall run time

Details of computational implementation environment
A prototype of the mathematical model in Section 4 was implemented to validate this work. We used a Lenovo ThinkPad T570 with 24GB RAM and an Intel i5-6300U processor to illustrate the run time efficiency of the method. In the computation environment, we used Google OR -Tools (Perron and Furnon 2019) for implementation in Python 3.8 as the number of constraints may rise to 10 3 . As suggested in the benchmark test of Da Col and Teppan (2019), there is no real-world run time problem, even if one would expect the number of constraints to rise gradually with the development of electrified cars and more complex assembly lines. Fig. 2 illustrates three types of input parameters: the car with its configuration codes, the set of all test locations in the factory, and the boundary constraints for the tests that are performed on the car at a test location. In the following real-world case study, we therefore look at the procedure from two angles: first, we select a specific test location at the automotive assembly line. The data related to the tests at the chosen test location, are illustrated in Table 4. This case study allows us to evaluate the mathematical model presented in Sect. 4 in detail.

Case study-based industrial evaluation
Second, we look at the associated relationships with the tests and the number of all cars produced in the selected production hall at the German location over a fixed period. We hereby evaluate the procedure illustrated in Fig. 2.
We begin by looking at the test location in the interior installation of the assembly line production that contains representative tests of automatic and worker-guided test scopes. Table 4 gives an overview of the tests for the case study.
In this setting, there is only one worker available at the test location, so that only one worker-guided test can be run in parallel. We consider no tests requiring communication with test benches. Automated tests can contain functions such as coding and flashing. Tests 18, 19, 20, and 21 are help tests in the chosen test location: test 18 turns the ignition of the car on and test 19 turns it off. Test 20 requires the existence of a worker and test 21 releases it.
All tests in Table 4 except for tests 18, 19, 20, and 21 are carried out with the ignition on (column ign_condition_status). Which test can be tested on a car depends on the car configuration. There are 128 possible schedules in this case, which will be reduced to feasible combinations when matching them with the actual equipment codes of a fixed car volume. On the one hand, the test of the exit lights is performed in tests 9 and 10, and can be carried out automatically depending on a 1 3 Flexible scheduling of diagnostic tests in automotive… Table 4 Implementation details for industrial case study on an automotive assembly line On the other hand, the exit lights are executed manually in tests 3 and 6. In the following, we consider a set of the volume of E Class models produced at a German plant over the period February-May 2021.

Results of the case study at the OEM based on the implementation of the scheduling procedure
We highlight Steps 1-3 of the procedure (see Fig. 3). Considering the fixed car volume in the German production plant, two out of 128 feasible condition sets from Table 4 remain. This means that we have two scheduling variants. We determine, that test 15 is not relevant for the cars on hand in the period since the underlying configuration code is not installed. On the one hand, the test of the exit lights in tests 9 and 10 can be carried out automatically depending on a specific configuration code. On the other hand, the exit lights are executed manually in tests 3 and 6 if the specific configuration code is not present for a car. In 3% of the fixed car volume, the test set I 1 = {1, 2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21} is scheduled in Step 4, whereas the set I 2 = {1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21} is scheduled in 97% of the cars.
Having applied the mathematical model presented in Section 4 on test sets I 1 , I 2 , the resulting schedules can be visualised in Fig. 3. The model terminated with the optimal status, meaning the shortest possible schedule, has been found in both test sets. Note that it is possible for more than one solution to be of optimal length. As already (a)

(b)
Version I 1 with two more automated tests 9 , 10 Version I 2 with two more worker-assisted tests 3 , 6 Fig. 3 Two schedules as Gantt charts for the presented automotive case study -worker assistance is illustrated in grey, test 14 is not to scale mentioned, the individual test times are only predictions. If the test times differ from the predictions in a scheduled procedure, a different schedule may have been quicker given the real world times. Hence, it is important to be as precise as possible when predicting the test run times.
The optimisation problem with respect to I 1 is solved on average over 10 runs in 0.0092ms and I 2 in 0.0165ms.

Discussion
The results of the previous Section 6 are discussed and the work is assessed against the requirements formulated in Section 2.2 on a per-concept basis.
We have created a mathematical model to address the run time of a test ( R time ), direct predecessors ( R dir ), the set of all predecessors ( R pre ), mutual exclusive tests ( R mutex ), resource constraints ( R res ) and status conditions ( R status ) per definition. The resulting schedules of Fig. 3 have been confirmed manually, since the example that is illustrated in Table 4, is rather simple. The research question RQ1 is answered by definition.
Without considering the resource constraint, a branch-and-cut would be most appropriate, as has been discussed extensively in Padberg and Rinaldi (1991). The scalability and complexity is also well understood and discussed (Basu et al. 2021). Adding the logical constraint of the resources makes the optimisation more complex. In terms of the scope in the automotive industry, the limits of the model are out of reach as thorough benchmark tests have been performed and analysed in Da Col and Teppan (2019). Hence, even if added complexity is assumed in the future by a more complex car architecture, the scalability will not pose a problem in this scope.
In terms of abstract complexity, scalability is dependent on the computational complexity of algorithms expressed in Big O-notation. General SAT problems are proven to be NP-complete by Cook (1971). Therefore, solving will have complexity O(2 N ) in the worst case, but since no methods exist to reduce complexity and increase efficiency, benchmark tests as in Da Col and Teppan (2019) are of greater significance.
Furthermore, we proposed a procedure with key elements to schedule the tests on an assembly line for automotive companies based on the mathematical model provided in Fig. 2. We decided to apply static scheduling to each car, so that Steps 1-6 of the procedure are straightforward. In the evaluation study, we were unable to test Decisions 1 and 2 as the rescheduling policy since our test setting was not event-driven. However, the outlined procedure shows future possibilities to integrate the static scheduler into an event-driven production system. As the given scheduling procedure does not focus on a specific technology, it is transferable to other scenarios in different industries with scheduling processes. This brings us back to the research question RQ2 that we analysed as well.

Conclusion and future work
In this paper, we have described the development, implementation and successful evaluation of a mathematical optimisation model as basis for the flexible scheduling of automotive diagnostic tests on an assembly production line. The approach considers multiple scheduling constraints on the car engineering and assembly line related to time, direct predecessors, set of all predecessors, mutual exclusion criteria, resource and status conditions.
The model presented here is the main contribution of this work and is formulated as a Boolean satisfiability problem. It has been successfully validated on the final assembly line of a German OEM plant. We embedded the model into a procedure to schedule the tests for each car with configuration codes at the test location. By integrating the model into the procedure, we showed that complex scheduling with multi-constraints can be flexible and automated. In general, the schedules generated with the proposed method were better in terms of run time and work effort than the solutions generated by the current manual procedure. After successful test implementation, the OEM estimates the annual cost savings to be substantial. This is the first use case that describes flexible scheduling on parallel identical machines with complex constraints for testing and commissioning in car manufacturing. Thereby, this work presents a way to integrate the procedure into an eventdriven production system. The paper provides a basis for further research into optimisation methods for automated workflow management in automotive manufacturing. The dynamic scheduling of diagnostic tests will be of interest in future.

Author Contributions
All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by SK, MR and FGA. The first draft of the manuscript was written by SK and MR and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.
Funding Open Access funding enabled and organized by Projekt DEAL. No funding was received to assist with the preparation of this manuscript.
Data availability All of the data generated for the scheduling method during this study are included in this published article. Confidential data are not included.

Code availability
The code that supports the findings of this study are available from Mercedes-Benz AG, but restrictions apply to the availability of the code. However, the code is available from the authors on reasonable request and with the permission of Mercedes-Benz AG.

Conflict of interest
The authors declare that they have no conflict of interests.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.