Abstract

Parallel test is an efficient approach for improving test efficiency in the aerospace field. To meet the challenges of implementing multiunit parallel test in practical projects, this paper presented a mixed-integer linear programming (MILP) model for solving the task scheduling problem. A novel sequence-based iterative (SBI) method is proposed to solve the model in reasonable time. The SBI method is composed of an implied sequence finding procedure (ISF) and a sequence-based iterative optimization (SBIO) procedure. The first procedure can reduce the search space by fixing free sequence variables according to the original test flowcharts, and the second procedure can solve the model iteratively in a reasonable amount of time. In addition, two indexes, namely, speed rate and average resource utilization rate, are introduced to evaluate the proposed methods comprehensively. Computational results indicate that the proposed method performs well in real-world test examples, especially for larger examples that cannot be solved by the full-space method. Furthermore, it is proved that the essence of the parallel test is trading space for time.

1. Introduction

In the aerospace field, test is an essential procedure in the manufacturing of aircraft, missiles, and satellites to guarantee the functional integrity. Every piece of equipment is a system of multiple relatively independent subsystems. When testing a system, every subsystem must pass some specific test items. In the test field, the relatively independent subsystem to be tested is called the unit under test (UUT), and the corresponding test items are called test tasks. Traditionally, the UUTs of an aerospace equipment will be tested sequentially [1, 2] using an automatic test system (ATS), which provides the necessary resources for test tasks. Sequential test methods are time-consuming [3] because of the unit-by-unit and task-by-task strategy. With the increase of test workload, sequential test severely restricts the efficiency of equipment support. Therefore, implementing parallel test is becoming highly desirable in the aerospace field [1, 4]. Parallel test means that multiple UUTs can be tested at the same time and that multiple test tasks can be performed at the same time, which can improve test efficiency without increasing the cost [4, 5].

However, implementing parallel test in projects is challenging due to several practical difficulties [1]. First, resource competition can occur because test resources in an ATS are limited under the volume and budget constraints. Commonly, there are few spare resources in an ATS, and the test tasks must be scheduled elaborately with a minimum test resource set. Second, most instrument resources can be controlled by only one software thread at a time, which leads to a task’s exclusive occupation of relevant resources and threads. In the parallel test, tasks are assigned to multiple parallel software threads, with each thread performing some of the test tasks. Therefore, thread competition will occur among tasks that are assigned to the same thread. Third, the UUTs must be tested according to test flowcharts, which are strictly determined by the technical sequences and working principles. These difficulties lead to a complex NP-hard tasks scheduling problem [6, 7] that involves up to hundreds of decision variables.

Although task scheduling for multiunit parallel test is important in the aerospace test field, limited solutions have been proposed due to the difficulties that are mentioned above. Xin et al. [3] established a relation model of test tasks based on graph theory and proposed two algorithms based on graph coloring, whose correctness and feasibility were proved by both theory and simulation. Xiao and Wang [8] proposed a vertex partitioning algorithm, which was derived from graph theory to coordinate system resource conflicts and time precedence. Xia et al. [9] combined the genetic algorithm and the simulated annealing algorithm to find the multi-UUT test task array. Li [10] built a mathematical model for the parallel test system with multi-UUTs and resource constraints and solved the model using genetic algorithm. Grey and Elizalde [11] proposed a method for performing multiple tests on one or more units by dynamically searching next executable test task. Lu et al. proposed two multiobjective evolutionary algorithms based on decomposition [12, 13] for test task scheduling problem, both of which considered two minimization objectives that were the test makespan and the mean resource workload. Zhang et al. [14] improved the basic ant colony algorithm to solve the parallel test task scheduling problem and to obtain the task execution sequence with shortest test time. In reference [15], a hybrid algorithm which combined the advantages of genetic algorithm and greedy algorithm was proposed for the parallel test task scheduling problem, and the chromosome coding and crossover in genetic algorithm were improved. Dorronsoro and Pinel [16] proposed a new accurate and fast memetic parallel optimization algorithm for the independent tasks scheduling problem, which combined the virtual savant optimization framework with a parallel genetic algorithm. Zhang et al. [17] developed an optimization model that jointly considered the preventive maintenance policy and the operating unit number for the multiunit parallel production system. Kim and Kim [18] constructed an intelligent task scheduler to improve the performance and energy efficiency in a heterogeneous multicore environment.

However, the abovementioned works are not very practical when dealing with real-world test projects. Xin et al.’s [3] algorithm cannot be applied to large-scale problems because it is an enumeration method by nature. Xiao and Wang [8] do not consider dynamic test task addition and deletion; therefore, their approach is not flexible in real-world applications. In test tasks scheduling problem, test flowcharts mean predefined constraints for candidate solutions. In the works of references [9, 10, 14, 15], only simple time precedence of tasks is allowed, and it is difficult to generate legal chromosomes for the genetic algorithm, or legal candidate ant for the ant colony algorithm when considering test flowcharts. Autoscheduling method of Grey and Elizalde [11] allows the parallel execution of multiple tests by a given order without resource confliction, which means that it cannot optimize the test sequence from a global perspective. The two multiobjective evolutionary algorithms by Lu et al. [12, 13] perform well in experiment examples, but both of them supposed that the test start time and the test completion time for every test task were fixed, which means the test execution sequence cannot be optimized. The optimization algorithm for the independent tasks in reference [16] can get an accurate solution in a short computation time; however, it did not take the test flowchart into consideration. Models and methods in references [17, 18] did not take the diversity of tasks and the task-resource matching problem into consideration.

Task scheduling in multiunit parallel test is similar to scheduling problems in other domains [1921]. For example, a farmer must optimize the use of land by selecting the best mix of crops to cultivate [22] and consider several factors simultaneously including market price variability, specific resource requests for each crop, machine availability restrictions, and timing of cultivation. Another example [23] is the creation of master theatre timetables in hospitals, which takes account of the goal of reducing the maximum number of beds that are required, surgeons’ availability and preferences, variations in types of theatre, and so on. Although these problems differ in the details, the related models and approaches are inspiring to task scheduling of multiunit parallel test. To overcome the challenges mentioned above, this paper studies the task scheduling problem in multiunit parallel test and makes the following contributions:(1)An MILP model that describes the resource competition and thread competition mathematically in multiunit parallel test is constructed. The resource competition and thread competition are described by introducing sequence variables.(2)A novel SBI method is proposed for solving the MILP model. The SBI method includes two procedures: ISF and SBIO. The ISF procedure can reduce the search space by fixing free sequence variables according to the original test flowcharts, and the SBIO can solve the model in a reasonable amount of time.(3)The proposed SBI method allows tasks to be added conveniently according to practical requirements. When the test flowchart changes, the project manager can simply “insert” the tasks to obtain a new optimal schedule without reoptimizing the whole problem, which minimizes the effort required to modify the test software.

The proposed test task scheduling method can be applied to develop a new ATS or improve the performance of an existing ATS without adding new test resources. In addition, the difficulty of multithread programming will be reduced because the thread competition is solved by the proposed method. These advantages make the proposed method more practical and valuable in real-world test projects.

This paper is organized as follows. In Section 2, a motivating example is presented to illustrate the concept of parallel test. In Section 3, an MILP model is built to optimize the test time of tasks for multiple UUTs. In Section 4, the SBI method for solving the proposed model is developed. Section 5 studies 7 real-world test examples to evaluate the efficiency of the proposed SBI method. Finally, conclusions and suggestions for future research are provided in Section 6.

2. Motivating Example

To illustrate the idea of multiunit parallel test, an example of 2 UUTs with 6 test tasks, which involve 4 types of resources, is demonstrated. The required resources and expected test times (test durations) of the 6 test tasks are given in Table 1. The prerequisite test sequences, which are determined by the working principle of the corresponding UUT, are shown in Figure 1.

As shown in Table 1, some tasks use the same test resource, such as t1 and t5, as well as t2 and t4. Currently, due to the uniqueness of the resource state, two tests that use the same resource cannot be performed simultaneously. Figure 1 shows the test flowcharts of UUT1 and UUT2, which specify the prerequisite technological sequences. Tasks t1 and t2 must finish before t3 begins, and t4 must finish before t5 and t6 begins.

Figure 2(a) illustrates the concept of sequential test. In the sequential test method, all the test tasks are executed one by one using only one software thread. Resource competition does not occur and the test sequence is not violated. However, the total test time is long (140 s) and equals the sum of the test times of all tasks. Figure 2(b) illustrates the concept of multi-UUT  parallel test, which can reduce the test time by 50% (70 s) with 3 threads. Using multithread technology, different tasks can be performed simultaneously. However, there are two main challenges, resource competition and technological sequence restriction. Any resource conflict in the practical test will lead to task failure and uncertainty of the test resource. If any test sequence restriction is violated, the related UUTs will suffer security risks, especially for the high-tech equipment in the aerospace field.

This example shows that the test efficiency can be improved remarkably by multi-UUT parallel test technology. The problem becomes more challenging when more tasks and resource types with complex test flowcharts are taken into consideration. Therefore, an optimization model that accounts for all of the aspects mentioned above is needed to minimize the test time of the multiunit parallel test.

3. Mathematical Formulation

This paper discusses the task scheduling problem for multiunit parallel test under the following assumptions [9, 10]:(1)Only minimum test resource sets are provided(2)A resource can be occupied by only one test task at the same time(3)The time for which a resource is occupied by a test task is equal to the duration of the task(4)No test task can be interrupted and then completed later(5)Different test tasks of the same UUT can be performed simultaneously by different threads without violating the task sequence constraints

All the assumptions are reasonable in real-world test projects. In assumption (1), the “minimum test resource sets” means sets with the minimum number of test resources (often one resource) that satisfy the test tasks. Assumption (1) is practical because the volume and budget of an ATS are often limited and because few spare resources are installed in the test system. Assumption (2) is based on the restriction that each resource can only be in one status. Therefore, only one task can be executed by a resource at a time. Assumption (3) means that a resource is occupied once the corresponding task starts and released once the task ends. Assumption (4) is because if a test task is interrupted, the UUT will work abnormally in subsequent tasks. Assumption (5) is the technological foundation of the parallel test.

The following symbols (see Table 2) are used in modelling the problem [24, 25].

The problem of task scheduling for multiunit parallel test can be stated as follows: given test tasks set T, test resources set R, test time set , and task-resource dependency matrix A, the objective is to find an optimal task schedule (x, s) that minimizes the overall test time without violating the prerequisite technological task sequence y0.

This problem can be formulated as the following optimization model [26, 27]:under the constraints

The objective function (1) minimizes the time of the latest completed test task. Constraint (2) ensures that every task is performed by exactly one software thread. Constraint (3) enforces an execution sequence between different tasks that need the same resource [28]. By determining an execution sequence, the resource competition problem will be solved. Constraint (4) enforces an execution sequence of different tasks that are assigned to the same thread. Constraint (5) enforces the time sequence when a sequence (either a prerequisite technological sequence or execution sequence) exists between two tasks, and U is a big-M parameter. Constraint (6) ensures that the starting time of every test task is bigger than zero. Constraint (7) ensures that no sequence is required for the task itself. Constraint (8) ensures that the sequences of tasks k1 and k2 will not conflict with each other. Constraint (9) requires the sequence matrix y to conform with prerequisite technological task sequence y0. Constraints (10) and (11) define x and y as binary variables.

The model is an MILP model, in which s is a continuous variable and x and y are binary variables. The difficulty in solving this problem is due to the combination of sequencing and task assignment binaries (y and x). In small-scale problems, this model can be solved in a reasonable amount of time. However, for real-world test projects, the computation time increases exponentially with the number of tasks [26]. Therefore, it is necessary to explore reasonable methods for obtaining the optimal (or suboptimal) solution.

4. SBI Method

In real-world applications, the number of test tasks is large and the task-resource dependency is complex. Therefore, the problem is intractable with a full-space method [29]. In this section, the SBI method is proposed for solving the model . The proposed SBI method is accomplished by the ISF SBIO procedure, and its scheme is shown in Figure 3.

4.1. ISF Procedure

By test flowcharts, the prerequisite technological sequences can be fixed intuitively. For instance, can be set directly according to the test flowcharts shown in Figure 4(a). Although there is no prerequisite technological sequence for t1 and t3, t1 must finish before t3 begins because t1 finishes before t2 begins and t2 finishes before t3 begins. The sequences of t1 and t3 are called implied sequences [30]. It is difficult to find them one by one intuitively in large problems with many test tasks.

To derive all implied sequences, the ISF following procedure is proposed:For all test tasks of UUTn to be scheduled k1 = 1: Kn For all test tasks of UUTn to be scheduled k2 = 1: Kn  For all test tasks of UUTn to be scheduled k3 = 1: Kn    If AND , then

For the test flowchart shown in Figure 4(a), the implied sequences identified by the ISF procedure are shown by dashed lines in Figure 4(b). This ISF procedure is inspired in [28], in which the test tasks must be labelled elaborately according to their technological sequences. If the technological sequences are changed or new tasks are added to the flowcharts, the label numbers must be upgraded with the technological sequences, which brings great inconvenience to practical test project management [31]. In the ISF procedure proposed by this paper, the test tasks can be labelled freely. The ISF procedure can substantially reduce the computation time, as shown in Section 5.

4.2. SBIO Procedure

In model , the sequence matrix y is a key variable, which includes a K × K sequence binary elements. These binary elements can be classified into three types depending on their sources:(1)Prerequisite technological sequence (PTS): PTS can be fixed intuitively according to the original test flowcharts. The function of PTS is to ensure all the prerequisite technological sequences are followed.(2)Implied sequence (IS): IS is the sequence identified by the ISF procedure. The function of IS is to reduce the number of binary variables to be optimized, thereby shortening the computation time.(3)Free sequence (FS): FS is the indeterminate element to be optimized in matrix y after the ISF procedure. FS is used to obtain a minimum objective function Z when the tasks use the same resource or are assigned to the same thread. The combination of FS is a leading contributor to the high computational burden.

By the ISF procedure, the PTS and IS of every UUT can be determined. Thus, the sequence matrix for every UUT is dense (y (1), y (2), …, y (N) in Figure 5). However, for the integrated matrix of multiple UUTs, there are many FSs to be optimized (gray region in Figure 5). It is time-consuming to solve the model . Of the three types of sequence elements, PTS and IS are determined by test flowcharts. This makes fixing FS before optimization the only way to reduce the computation time. Based on the above analysis, model is reformulated and the SBIO procedure is proposed.

A reformulated model (k) is proposed:under the constraints

Compared to model , model (k) restricts the tasks to be scheduled to a partial test set {t1, t2, …, tk}. Constraint (9) in is reformulated as constraint (20) in (k). is the optimization result of model (l).

The SBIO procedure for solving model (k) is shown in Figure 6. The initial sequence matrix y1 is set to 0 because of its 1 × 1 dimension and lack of prerequisite test sequence for itself. For every iteration k, the SBIO procedure will solve the model (k) to obtain yk. After adding PTS of tk+1 to yk, the ISF procedure will be performed to reduce the number of FSs. Then, the sequence matrix yk obtained by solving (k) will be used to rebuild (k + 1). The reservation mechanism of the last step’s optimization result will reduce the computation time of the current step. Finally, model (K) (i.e., model ) will be solved and the corresponding optimization result will be output as the solution.

5. Experiments and Results

5.1. Experiment Design

In this section, 7 real-world examples which involve including 3 UUTs, 31 test tasks, and 10 resources were studied to evaluate the SBI method. All the examples were solved on a PC with an Intel Core i5-4590 3.3 GHz CPU using CPLEX 12.6. The relative optimality tolerance was set to 0.1%. The other CPLEX options have been set as the default for all models. In all models, the big-M parameter was set as the sum of all test tasks times, multiplied by a safety factor 2, so no feasible solutions would be cut off [28].

The task-resource dependency matrix and corresponding test time are shown in Table 3. The configurations of the 7 examples are given in Table 4. The test flowcharts of 3 UUTs are presented in Figure 7. The small examples (1, 2, and 3) each involve only one UUT. The medium examples (4, 5, and 6) involve two UUTs, respectively. The large example involves all 3 UUTs. For every example, three scenarios (using 2, 3, and 4 threads) and three methods (full-space method without ISF, full-space method with ISF, and SBI method) for parallel test are studied to find the optimal solution.

Two indexes, speed rate (SR) and average resource utilization rate (ARUR), are used to evaluate the efficiency of the proposed method comprehensively.

The SR is defined as the ratio of the sequential test time and the parallel test time for the same task set.

The ARUR is defined as the integral average of the instantaneous resource utilization rate over the whole test.

In (25), t is the completion time of the whole test, is the number of utilized resources at time τ, and N is the total number of utilized resources during the whole test. The SR can evaluate the extent of the speedup of the parallel test compared to the sequential test. The ARUR can indicate the overall level of resource utilization.

5.2. Model Statistics and Experiment Results

The model statistics and solution details for all examples are given in Table 5. Examples are labelled in the format “E-T,” where “E” stands for the example number and “T” represents the number of threads that are used. For example, label “7-3” means that example 7 is solved using 3 threads. The recorded model statistics are the numbers of constraints and binary and continuous variables in model . The solution details of both the full-space method and the SBI method are recorded for comparison. The search time is limited to 2000 seconds for all examples. The computation times of the full-space method are recorded in the two cases. The FIS procedure is adopted in the first case but not the second. The computation time of the SBI method includes the total time needed for the ISF and SBIO procedures.

The advantage of the proposed MILP model lies in its unlimited descriptive ability, which means that it can describe test task scheduling problem with any number of tasks, resources, and threads. What is more, every practical constraint for test resources, threads, and sequences can be described clearly by the corresponding equation or inequality in model (k). However, the number of binary variables and total constraints will increase sharply with the number of tasks, resources, and threads getting larger (see “Model details” in Table 5), which is caused by the combination of the three. This will lead to more memory to be consumed when solving the model. Considering that the memory of the modern computer is large enough to deal with it and the computation time will be reduced by the proposed SBI method, this disadvantage can be overcome.

As shown in Table 5, the optimal solution cannot be found in 2000 s by the full-space method without the ISF procedure in examples 7-2, 7-3, and 7-4. Nor can it be found by the full-space method with the ISF procedure in 2000 s in examples 7-3 and 7-4. However, the optimal (or suboptimal) solutions can be found by the proposed SBI method in all examples.

5.3. Discussion
5.3.1. Computation Time

The computation time of all examples is shown in Figure 8 on the natural logarithmic scale. In all examples, the full-space method without the ISF procedure takes the most computation time. The full-space method with the ISF procedure takes the least computation time in small problems that involve one UUT (examples 1, 2, and 3). However, for medium and large problems with 2 or 3 UUTs (examples 4-7), the SBI method takes the least computation time. Therefore, the time efficiency of the SBI method is better than that of the full-space method for large problems, such as in practical multiple UUTs parallel test applications.

5.3.2. Resource Competition and Thread Competition

The best solutions (i.e., those with the minimum tasks completion time) with different number of threads are shown in Figure 9. For small problems (examples 1, 2, and 3), using different numbers of threads has no remarkable effect on the value of the solution. The best solution of example 2 using 2 threads is associated with longer computation time (461 s) than the solutions that are obtained using 3 and 4 threads (456 s) because some tasks must “wait” to be performed when the number of threads is limited. However, for medium and large problems (examples 4-7), using more threads to schedule test tasks can reduce the completion time of the whole test. Nevertheless, it does not promise an affirmatory optimal solution reduction (see examples 4-6 in Figure 9) because the completion time is restricted by test resources other than the number of threads. In practical test projects, using too many threads will lead to higher complexity of resource control. For this reason, applying fewer threads is preferable when the solutions are equal. For the biggest problem (example 7), the same solution can be found using either 3 or 4 threads.

The Gantt chart of the best solution for all the examples are shown in Figure 10, in which the resource competition and thread competition are efficiently solved, and this will facilitate the software programming and resource control in practice.

5.3.3. Effect of Adding Tasks

To evaluate the effect of adding tasks in the proposed model, three tasks (t32, t33, and t34) were randomly generated and inserted into the test flowchart in example 7. The three tasks were generated by following rules: (1) the required resources, with a maximum number of 3, were randomly selected from the given resource set; (2) test time for each task was a randomly generated real number within the bounds ; and (3) each task was inserted into one of the test flowchart, which means . The test sequences were also randomly generated. Table 6 and Figure 11 report the details of three randomly generated tasks. Example 7 with tasks t32, t33, and t34 was denoted as example 7. Example 7 was solved based on model (31) of example 7 using 3 threads, and the model statics and solution details are recorded in Table 7.

The additional computation time for adding a task to the proposed model is less than 10 seconds (see Table 7). When adding a new task to test projects, the developer simply needs to describe the resource requirements and redefines the test flowchart. In comparison, the procedure proposed by Maravelias and Grossmann [28] has to label the test tasks elaborately according to their technological sequences, which means the whole model must be reoptimized. Therefore, the SBI method will bring great convenience to practical application when adding new test tasks.

5.3.4. SR and ARUR

The SR and ARUR for examples 4-7 are shown in Figure 12. The SR of parallel test for all examples ranges from 1.33 (example 1) to 1.97 (example 4 using 4 threads), which means that the parallel test consumes 50.7% (1/1.97) to 75% (1/1.33) of the time compared to the sequential test. From the computational results shown in Figure 12, it is concluded that the SR will increase with the ARUR for the same tasks set, which proves that the multi-UUT parallel test trades space for time.

6. Conclusions

In this paper, an MILP optimization model for the scheduling of multiunit parallel test is presented. This model uses the sequence variables to describe the resource competition and the thread competition, which takes the original test flowcharts into consideration. To solve the model in a reasonable amount of time, the proposed model is reformulated and a novel SBI method is proposed. The SBI method is accomplished by the ISF and SBIO procedures. The ISF procedure reduces the search space by fixing FS variables according to the original test flowcharts, and the SBIO procedure can solve the reformulated model in a reasonable amount of time. Moreover, the SBI method is evaluated comprehensively in terms of test duration, SR, and ARUR using different numbers of threads. The computational results prove that the SBI method performs well in real-world test examples, especially for larger examples that cannot be solved by the full-space method. The method presented in this paper can be applied to many task scheduling problems that involve resource competition, such as software test, and agrochemical and pharmaceutical products development. Future research will concentrate on developing a method for task scheduling problems that have high resource requirements for every resource type.

Data Availability

Some or all data and models used during the study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.