Next Article in Journal
Analysis of Fluctuating Antenna Beamwidth in UAV-Assisted Cellular Networks
Next Article in Special Issue
Several Goethals–Seidel Sequences with Special Structures
Previous Article in Journal
Exploring the Contributions to Mathematical Economics: A Bibliometric Analysis Using Bibliometrix and VOSviewer
Previous Article in Special Issue
Mathematical Circuit Root Simplification Using an Ensemble Heuristic–Metaheuristic Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Scheduling of Software Test to Minimize the Total Completion Time †

Institute of Information Management, National Yang Ming Chiao Tung University, Hsinchu 300, Taiwan
*
Author to whom correspondence should be addressed.
This document is based upon the thesis of Man-Ting Chao submitted for her master degree.
Mathematics 2023, 11(22), 4705; https://doi.org/10.3390/math11224705
Submission received: 9 October 2023 / Revised: 11 November 2023 / Accepted: 15 November 2023 / Published: 20 November 2023
(This article belongs to the Special Issue Recent Advances of Disсrete Optimization and Scheduling)

Abstract

:
This paper investigates a single-machine scheduling problem of a software test with shared common setup operations. Each job has a corresponding set of setup operations, and the job cannot be executed unless its setups are completed. If two jobs have the same supporting setups, the common setups are performed only once. No preemption of any processing is allowed. This problem is known to be computationally intractable. In this study, we propose sequence-based and position-based integer programming models and a branch-and-bound algorithm for finding optimal solutions. We also propose an ant colony optimization algorithm for finding approximate solutions, which will be used as the initial upper bound of the branch-and-bound algorithm. The computational experiments are designed and conducted to numerically appraise all of the proposed methods.

1. Introduction

Scheduling is the decision-making process used by many manufacturing and service industries to allocate resources to economic activities or tasks over he planning horizon [1,2]. This paper studies a scheduling model that is inspired by real-life applications, where supporting operations need to be prepared before regular jobs are processed. The specific application context is the scheduling of asoftware test at an IC design company, where the software system is modular and can be tested module by module and level by level. Before starting a module test, we need to install software utilities and libraries as well as adjust system parameters to shape an appropriate system environment. The setup operation corresponds to the installation of utilities and libraries, which are supporting tasks for the job. Different tests may require part of the same environment settings. If two jobs have common supporting tasks, the common setups are performed only once. The abstract model was also studied by Kononov, Lin, and Fang [3] as a single-machine scheduling problem formulated from the production scheduling of multimedia works. In the context of multimedia scheduling, when we want to play multimedia, we need to download their content first, including audio tracks, subtitles, and images, which can correspond to setup operations and jobs for this study, respectively. Once the setup operations of the multimedia objects are prepared, they can be embedded in upper-level objects without multiple copies, as in physical products. This unique property is different from the manufacture of tangible products, such as vehicles and computers. Following the standard three-field notation [4], we denote the model by 1 | b p p r e c | j C j , where the one indicates the single-machine setting, b p p r e c indicates the bipartite precedence relation between shared setups and test jobs, and j C j is the objective to minimize the total completion time.
This paper is organized into seven sections. In Section 2, the problem definition is presented with a numerical example for illustrations. The literature review follows. Section 3 introduces two integer programming models based on different formulation approaches. Section 4 is dedicated to the development of a branch-and-bound algorithm, including the development of upper bound, lower bound, and tree traversal methods. In Section 5, an ant colony optimization algorithm is proposed. Section 6 presents the computational experiments on the proposed methods. Finally, conclusions and suggestions for future works are given in Section 7.

2. Problem Definition and Literature Review

2.1. Problem Statements

We first present the notation that will be used in this paper. Note that all parameters are assumed to be non-negative integers.
nnumber of jobs;
mnumber of setup operations;
T = { t 1 , t 2 , , t n } set of jobs to be processed;
S = { s 1 , s 2 , , s m } set of setup operations;
R = { ( s i , t j ) | s i S s u p p o r t s t j T } relation indicating whether the setup operation s i
is required for each job t j ;
p j processing time of job t j on the machine;
s p i processing time of setup s i on the machine;
σ = ( σ 1 , σ 2 , , σ n ) particular sequence of the jobs;
σ optimal schedule sequence;
C j completion time of job t j ;
Z ( σ ) = j T total job completion time under schedule σ .
The subject of our research is dedicated to studying the single-machine scheduling problem with shared common setup operations. The objective is to minimize the total completion time of the jobs, i.e., Σ C j . The problem can be described as follows:
From time zero onwards, two disjoint sets of activities S and T are to be processed on a machine. Each job t j has a set of setup operations that job t j can only start after its setups are completed. All setup operations and jobs can be performed on the machine at any time. Although all setup operations need to be processed once, they do not contribute to the objective function because their role is only the preparatory operations for jobs under the priority relation. At any time, the machine can process at most one setup operation or job. No preemption of any processing is allowed. In software test scheduling, jobs t j represent the software to be tested, and setups s i refers to the preparation of a programming language or compilation environment that needs to be installed in advance so that the test software can be executed. For example, if t 1 is an Android application that needs to be tested, and t 1  needs setups s 1 and s 4 , then s 1 could be JAVA, s 4 could be Android Studio, etc.
To illustrate the problem of our study, we give numerical examples of four setup operations, five test jobs, the relation R , and its corresponding graph. The parameters and relation are shown in Figure 1.
Two example schedules are produced and shown below in the form of Gantt charts. The feasible schedule shown in Figure 2 is σ = ( t 1 , t 2 , t 3 , t 4 , t 5 ) with a total completion time of 115. Setups s 2 , s 3 precede job t 1 . The order of s 2 and s 3 is immaterial. Figure 3 shows schedule σ = ( t 4 , t 2 , t 1 , t 3 , t 5 ) associated with a total completion time of 101, which is optimal for the given instance. While both are feasible solutions, the objective value of Figure 3 will be better than that of Figure 2.

2.2. Literature Review

The scheduling problem studied by Kononov, Lin, and Fang [3] has a single machine that performs all setup operations and testing jobs. Referring to Brucker [5] and Leung [1], we know that precedence constraints play a crucial role in scheduling problems, especially when complexity status or categories are involved. Existing research works in the literature consider precedence relations presented in various forms. Bipartite graphs are often studied in graph theory. The graph shown in Figure 1 is bipartite because edges exist between nodes on one side and nodes on the other. Linear allocation problems can also be visualized by both supply and demand. Unfortunately, scheduling theory rarely addresses precedence constraints in bipartite graphs.
After formulation, Kononov, Lin, and Fang [3] studied two minimum sum objective functions, namely the number of late jobs and the total weighted completion time of jobs. As for the minimization of the total weighted completion time ( j w j C j ), Baker [6] is probably the first paper to address the existence of precedence constraints. Adolphson and Hu [7] proposed a polynomial time algorithm for the case in which rooted trees give priority. A fundamental problem for the jobs-per-unit execution time is 1 | p r e c , p i = 1 | w j C j , where w j 1 , 2 , 3 has been proven to be strongly NP-hard by Lawler [8]. The minimum latency set cover problem studied by Hassin and Levin [9] is the most relevant. The minimum latency set cover problem involves a subset of several operations. A subset is complete when all of their operations are finished. The objective function is the total weighted completion time of subsets. The minimum latency set cover problem is a special case of our 1 | b p p r e c | w j C j problem, and the correspondence is as follows: In our problem, an operation is mapped to a setup operation ( s i ), and a subset is interpreted as a testing job ( t j ). Furthermore, Hassin and Levin [9] showed that the minimum delay set cover problem is strongly NP-hard even if all operations require the unit execution time (UET). Subsequently, the 1 | b p p r e c | w j C j problem is hard as well. By performing a pseudo-polynomial time reduction in Lawler’s result about 1 | p r e c , p j = 1 | w j C j , where w j 1 , 2 , 3 , Kononov, Lin, and Fang [3] proved 1 | b p p r e c , s i = t j = 1 | C j is strongly NP-hard. In other words, it is very difficult to minimize the total weighted completion time in our model, even though all setup operations and all testing jobs require unit execution time and all weights are one.
To solve the scheduling problem, Shafransky and Strusevich [10]; Hwang, Kovalyov, and Lin [11]; and Cheng, Kravchenko, and Lin [12] studied several special cases with fixed job sequences and solved these problems in polynomial time. Moreover, the branch-and-bound algorithm is an enumeration technique that can be applied to combinatorial optimization problems. Brucker and Sievers [13] deploy branch-and-bound algorithms on the job-shop scheduling problem and Hadjar, Marcotte, and Francois [14] do the same on the multiple-depot vehicle scheduling problem. To find approximate solutions to a hard optimization problem, various meta-heuristics have been designed. Kunhare, Tiwari, and Dhar [15] used particle swarm optimization for feature selection in intrusion detection systems. Kunhare, Tiwari, and Dhar [16] further used a genetic algorithm to compose a hybrid approach to intrusion detection. For solving a worker assignment bi-level programming problem, Luo, Zhang, and Yin [17] designed a two-level algorithm, which simulated annealing as the upper level to minimize the worker idle time and the genetic algorithm as the lower level to minimize the production time. For more general coverage, the reader is referred to Ansari and Daxini [18] and Rachih, Mhada, and Chiheb [19]. Ant colony optimization (ACO) is a meta-heuristic algorithm that can be used to find approximate solutions to difficult optimization problems. Many research studies in the literature also use ACO to solve scheduling problems, such as Blum and Sampels [20] on group shop scheduling problems; Yang, Shi, and Marchese [21] on generalized TSP problems; and Xiang, Yin, and Lim [22] on operating room surgery scheduling problems. According to the above, it is known that the branch-and-bound algorithm and ACO may be effective in solving the scheduling problem in our study.

3. Integer Programming Models

In this section, to mathematically present the studied problem 1 | b p p r e c | Σ j C j , we formulate two integer programming models. Since the problem’s nature is set on permutations of jobs, we deploy two common approaches, sequence-based decision variables and position-based decision variables, for shaping permutation-based optimization problems. The models will be then implemented and solved by the off-the-shelf Gurobi Optimizer.

3.1. Position-Based IP

In the section, we focus on the decision that assigns m + n activities at m + n positions. Activities 1 , 2 , , m are setups and activities m + 1 , m + 2 , , and m + n are jobs. Therefore, an activity could be either a job or a setup operation. In the model, there are six categories of constraints; ( m + n ) 2 binary variables x; and two subsets of m + n integer variables, e l and C k . Index k { 1 , 2 , , m + n } indicates the positions. We use the binary relation ( i , j ) R to indicate whether the setup i should finish before the job j starts. The variables used in the model are defined in the following:
Decision variables:
x i , k = 1 if the activity i is in the position k ; 0 , otherwise .
Auxiliary variables:
p l : processing time of the activity l ; C k : completion time of the job in the position k .
Note that extra variables, C k , are introduced for extracting the completion times of jobs. If a position k is loaded with a setup, then C k M , where M is a big number.
Position-based IP:
min k = 1 m + n C k
s . t . k = 1 m + n x l , k = 1 , activity   l { 1 , , m + n }   is   assigned   to   a   position ;
l = 1 m + n x l , k = 1 , position   k   accommodates   one   activity ;
k = 1 m + n x i , k · k k = 1 m + n x j , k · k , ( i , j ) R , 1 i m , m + 1 j m + n ;
C 1 = l = 1 m + n x l , 1 · p l , completion   time   of   the   first   position ;
C k C k 1 + l = 1 m + n x l , k · p l , completion   time   of   position   k { 1 , , m + n } ;
C k C k ( i = 1 m x i , k ) M ,
x l , k { 0 , 1 } , 1 l , k m + n ;
C k 0 , C k 0 , 1 k m + n .
The goal is to minimize the total completion time of jobs. Constraint (1) lets each position accommodate exactly one job or one setup. Constraint (2) lets each activity be assigned to exactly one position. Constraint (3) ensures that any job j can start only after its setup operations, i, are all finished. Constraint (4) lets the completion time of the first position be greater than or equal to the processing time of the event that occupied the first position. Constraint (5) defines the completion time of the position k to be greater than or equal to the completion time of k 1 plus the processing time of the event that is processed in the position k. Constraint (6) defines the completion time k if the position k contains a job. The reason we added a variable is that if the objective function computes the completion time of jobs in k = 1 m + n j = m + 1 m + n C k · x j k ; it becomes quadratic. Therefore, we add an extra variable, C , to make the objective function linear, i.e., k = 1 m + n C k .

3.2. Sequence-Based IP

In this section, the formulation approach is to determine the relative positions between each two activities. The model consists of five categories of constraints; ( m + n ) 2 binary variables x; and two subsets of m + n integer variables, p j and C k .
Decision variable:
x i , j = 1   if   activity   i   precedes   the   activity   j ;   0 ,   otherwise .
Auxiliary variables:
p l : processing   time   of   the   activity   l ; C k : completion   time   of   the   activity   k .
Sequence-based IP:
min k = m + 1 m + n C k
s . t . x i , j + x j , i = 1 , i j { 1 , , m + n } ;
x j , i = 0 , ( i , j ) R , 1 i m , m + 1 j m + n ;
C j C i + p j + ( x i , j 1 ) M , i j { 1 , , m + n } ;
C i s p i , 1 i m ;
C j p j + ( i , j ) R s p i , m + 1 j m + n ;
x i , j { 0 , 1 } , 1 i , j m + n ;
C k 0 , 1 k m + n .
The objective value is to minimize the total completion time of jobs except for setup operations. Constraint (9) limits the precedence between the two events. Constraint (10) means that if job j needs setup i, then setup i should come before job j. Constraint (11) lets the completion time of job j be greater than or equal to the completion time of job i plus the processing time of job j if job i precedes job j. Constraint (12) defines the completion time of event i if it is a setup. Constraint (13) defines the completion time of event j if it is a job.

4. Branch-and-Bound Algorithm

In this section, we explore a search tree that generates all permutations of jobs. In the branch-and-bound algorithm, there will be an upper bound representing the current best solution during the search process. In the process of searching, each node will calculate the lower bound once, and if the lower bound calculated is not better than the upper bound, the subtree of the node will be pruned to speed up the search. Therefore, we propose an upper bound as the initial solution, a lower bound for pruning non-promising nodes, and a property to check whether each node satisfies the condition when pruning the tree.

4.1. Upper Bound

First, we use an ACO algorithm coupled with local search to find an approximate solution as an upper bound, sorted by the settings of pheromone and visibility. Details about the ACO algorithm will be introduced in Section 5. Implementing a branch-and-bound algorithm with tight upper bounds helps converge the solution process faster.

4.2. Lower Bound

Lower bounds can help cut unnecessary branches that will never lead to a solution better than the incumbent one. Different approaches can be used to derive lower bounds. In our study, we compute a lower bound by sorting the remaining processing times of unscheduled jobs. We can express it as the 1 | r j | Σ C j problem. When the setup operations of the scheduled jobs are complete, we can release these setup times. Then, we denote the unfinished setup operations as the release date of each job and implement the shortest remaining processing time (SRPT) method. The process with the least amount of time remaining before completion is selected to execute. Finally, we add the total current completion time of scheduled jobs and the result of the SRPT mentioned above as a lower bound. The Lower Bound algorithm is shown in Algorithm 1.   
Algorithm 1: LowerBound
Mathematics 11 04705 i001

4.3. Dominance Property

In this section, after we use the lower bound to prune nodes, we also propose a property of the branch-and-bound algorithm (Algorithm 2), which can also speed up node pruning and reduce tree traversal time. The content description and proof of the property are as follows:
 Lemma 1.
Let J = { j 1 , j 2 , . . . , j k } be the unscheduled jobs at a node X in the branch-and-bound tree. For any unscheduled job j a , if there is another unscheduled job j b such that the setups of j b are all scheduled and p b p a , then the subtree X + j a by choosing j a as the next job to schedule can be pruned off because j b precedes j a in some optimal solution.
Proof. 
Let σ be the sequence of scheduled jobs. Assume that there is an optimal solution ( σ , j a , L , j b ) , where L is a sequence of the unscheduled jobs. When the setups of job j a are not yet completed, its completion time C a would be C σ + i a i u n f i n i s h e d m s p i + p a , and, when the setups of job j b are completed, its completion time C b would be C σ + C a + C L + p b , where C L is the completion time of all jobs of L. Assuming the positions of j b and j a are swapped as ( σ , j b , L , j a ) , we denote their completion times as C b , C L , and C a . At this point, C b will be C σ + p b , and C a will be C σ + C b + C L + i a i u n f i n i s h e d m s p i + p a . Suppose that if p b is less than p a , it makes C b less than C b , which also makes the completion time of L shorter, to the benefit of both job j y and L. When both C y and C L move forward, the result of C a will also decrease accordingly. According to the assumption, we know that the total completion time of ( σ , j b , L , j a ) will be smaller than that of ( σ , j a , L , j b ) . Therefore, we can prune off the branch of node j a , which will not lead to a better solution without sacrificing the optimality.    □
Algorithm 2: Check Property
Mathematics 11 04705 i002

4.4. Tree Traversal

In this section, we use three different tree traversal methods, depth-first search (DFS), breadth-first search (BFS), and best-first search (BestFS), to perform the branch-and-bound algorithm. Moreover, we also added the upper bound, lower bound, and property mentioned above into our branch-and-bound algorithm.

4.5. Depth-First Search (DFS)

DFS is a recursive algorithm for searching all the nodes of a tree and can generate the permutations of all the solutions. It starts at the root node and traverses along each branch before backtracking. The advantage of DFS is that the demand for memory is relatively low, but the disadvantage is that because of recursion, there will be a heavier loading in the stack operation, and it will take more time to find all the solutions. The DFS algorithm is shown in Algorithm 3.
First, the algorithm will obtain the upper bound from Line 15 and call the recursive DFS function. When we encounter the deepest node or have visited all of its children, we move backward along the current path to find the unvisited node to traverse. In the search process, we use LowerBound() and CheckProperty() to test whether we should continue to search down or not. If the lower bound is greater than or equal to the upper bound, or if the property is not met, we will prune the branch because it does not yield a better solution than the current one. This method can reduce the number of search nodes.   
Algorithm 3: Depth-First Search
Mathematics 11 04705 i003

4.6. Breadth-First Search (BFS)

BFS is a tree traversal algorithm that satisfies given properties. It starts at the root of the tree, traverses all nodes at the current level, and moves to the next depth level. Unlike DFS, which will find a solution first, it will wait until the last level is searched to find all suitable solutions. In particular, this method uses a queue to record the sequence of visited nodes. The advantage of BFS is that each node is traversed by the shortest path, but the disadvantage is that it requires more memory to store all of the traversed nodes. It thus takes more time to search deeper trees.
The BFS algorithm is shown in Algorithm 4. First, the algorithm will obtain the upper bound by UpperBound() from Line 25. The BFS function starts from Line 2; we create a queue that uses the First-In-First-Out strategy. Lines 3 through 5 are the initial settings that we use to set a root. From Lines 6 to 24, we enqueue the root node and then dequeue the values in order. Then, we enqueue the unvisited nodes and recalculate the lower bound until there is no value in the queue. Before each enqueue, it is necessary to use LowerBound() and CheckProperty() to check whether the lower bound is smaller than the upper bound and whether it satisfies the property. It can reduce the number of visited nodes and shorten the execution time. In Line 12, we use the Without() function to obtain the nodes that have not been visited yet. The loop stops when the queue is empty, indicating that all nodes have been traversed.
Algorithm 4: Breadth-First Search
Mathematics 11 04705 i004

4.7. Best-First Search (BestFS)

BestFS works as a combination of depth-first and breadth-first search algorithms. It is different from other search algorithms that blindly traverse to the next node, it uses the concept of a priority queue and heuristic search, using an evaluation function to determine to which neighbor node is the best to move. It is also a greedy strategy because it always chooses the best path at the time, rather than BFS using an exhaustive search. The advantage of BestFS is that it is more efficient because it always searches through the node with the smaller lower bound first. On the other hand, the disadvantage is that the structure of the heap is difficult to maintain and requires more memory resources. Since each visited node will be stored in the heap, we can directly obtain the node with the smallest lower bound bound by heapsort. Therefore, when the amount of data is large, there will be too many nodes growing at one time, which will occupy a relatively large memory space.
The concept of the BestFS algorithm is the same as Algorithm 4. The difference is that in the BestFS function, we change the queue to a priority queue by using a min-heap data structure, where the priority order is sorted using the calculated lower bound, instead of using the FIFO order. The smaller the lower bound is, the higher the priority. When we use a heap to pop or push values, we will perform the function of heapify at the same time to ensure the heap is in the form of a min-heap. Heapify is the process of creating a heap data structure from a binary tree. Similarly, before each element is pushed into the heap, we use LowerBound() and CheckProperty() to check whether the lower bound is smaller than the upper bound and whether it satisfies the property.

5. Ant Colony Optimization (ACO)

Ant colony optimization (ACO) was proposed by Dorigo et al. [23] and Dorigo [24]. It is a meta-heuristic algorithm based on probabilistic techniques and populations. ACO is inspired by the foraging behavior of ants, where the probability of an ant choosing a path is proportional to the pheromone concentration on the path, that is, a large number of ant colonies will give positive feedback. When ants are looking for food, they constantly modify the original path through pheromones and, finally, find the best path. Initially, Ant System (AS) was used to solve the well-known traveling salesman problem (TSP). Later, many ACO variants were produced to solve different hard combinatorial optimization problems, such as assignment problems, scheduling problems, or vehicle routing problems. In recent years, some researchers have focused on applying the ACO algorithm to multi-objective problems and dynamic or stochastic problems. In ant colony optimization, each ant constructs its foraging path (solution) node by node. When determining the next node to move on, we can use dominance properties and exclusion information to rule out the nodes that are not promising. In comparison with other meta-heuristics, this feature may save the time required for handling infeasible or inferior solutions. The pseudo-code of ACO that we adopt is shown in Algorithm 5.
Algorithm 5: Ant Colony Optimization
Mathematics 11 04705 i005
State transition rule: We treat each job as a node in the graph and all nodes are connected. To choose the next edge, the ant will consider the visibility of each edge available from its current location, as well as the pheromones. The formula for calculating the visibility value is given by η i j = 1 i j s p i + p j , where η i j is the visibility value from node i to node j defined as the inverse of the processing time of job j plus its unfinished setup operations. Then, we will calculate the probability of each feasible path; the probability formula is given as p i j k = τ i j α η i j β k u n s e l e c t e d i τ i k α η i k β , where τ i j is the pheromone on the edge from node i to node j, α 0 is a parameter for controlling the influence of the pheromone, and β 0 is a parameter for controlling the influence of invisibility. The next node is determined by a roulette wheel selection.
Pheromone update rule: When all ants have found their solutions, the pheromone trails are updated. The formula for updating the pheromones is defined as τ i j = ( 1 ρ ) τ i j + τ i j k , where ρ is the pheromone evaporation rate, and τ i j k , the incremental of the pheromone from node i to node j by the kth ant, is τ i j k = Q Σ C k if the ant k traverses e d g e i , j ; 0, otherwise, where Σ C k is the total completion time in the solution of the kth ant, and Q is a constant.
Stopping criterion: We set a time limit of 1800 s for the ACO execution. Once the course reaches the time limit, the ACO algorithm will stop and report the incumbent best solution.
To close the discussion of ACO features, we note that local search algorithms can improve on the ACO solution at each iteration and make the result closer to the global optimal solution. At the end of each ACO generation, we deploy a 2-OPT local search procedure to the best solution of each generation so as to probabilistically escape the incumbent solution away from the local optimum.

6. Computational Experiments

In this section, we generate test data for appraising the proposed methods. The solution algorithms were coded in Python, and the integer programming models are implemented on Gurobi 9.1.2 interfaced with Python API. The experiments were performed on a desktop computer with Intel Core(TM) i7-8700K CPU at 3.70GHz with 32.0 GB RAM. The operating system is Microsoft Windows 10. We will describe the data generation design and parameter settings in detail and discuss the experimental results.

6.1. Data Generation Scheme

In the experiments, datasets were generated according to the following rules, and all parameters are integers:
  • Six different numbers of jobs n { 5 , 10 , 20 , 30 , 40 , 50 } and different numbers of setup operations m { 4 , 8 , 18 , 25 , 35 , 45 } .
  • A binary support relation array R of a size n m is randomly generated. If ( s i , t j ) belongs to R , denoted by r i j = 1 , then job t j cannot start unless setup s i is completed. The probability for r i j = 1 is set to be 0.5, i.e., if a generated random number 0.5 , then r i j = 1 . Note that when r i j = 1 for all i and j, the problem can be solved by simply arranging the job in the shortest processing time (SPT) order.
  • The processing times of jobs p j were generated from the uniform distribution [ 1 , 10 ] .
  • The processing times of setups s p i were generated from the uniform distribution [ 1 , 5 ] .
  • For each job number, three independent instances were generated. In total, 18 datasets will be tested, as shown in Table 1.

6.2. Results of Integer Programming Models

In the experiments of the integer programming models, we ran two integer programming models on the dataset with a time limit of 1800 s. The results are shown in Table 2. If an IP model did not complete its execution of a dataset in 1800 s, its run time is denoted as ”−”. In the table, the g a p column indicates the relative difference between the feasible solution found upon termination and the best proven lower bound. The gap values were in the output of Gurobi. The gap value is defined as: g a p ( % ) = | O b j B o u n d O b j V a l | | O b j V a l | × 100 % , where O b j B o u n d and O b j V a l are a lower bound and the incumbent solution objective, respectively. When the gap is zero we have demonstrated optimality. The column b e s t s o l u t i o n represents the best result of all our proposed methods on the same dataset.
When n k is 10, the sequence-based IP takes more than 1800 s, even though both methods can obtain the optimal solution. The position-based IP takes less time and ends up with a gap of 0 % . When n k is greater than or equal to 20, neither model can find the optimal solution within 1800 s, but there are still some solutions that can find the same solution as the best solution, such as D 17 of the position-based IP and D 13 of the sequence-based IP. As n k increases, the gap of the position-based IP will be greater than that of the sequence-based IP. However, when we compare it with the best solution, even if the objective value is the same as the best solution, the gap value is still very large, such as the position-based IP of D 17 and the sequence-based IP of D 7 to D 9 . It means that their lower bounds are not tight, i.e., they have a significant deviation from the final feasible solution.

6.3. Results of Branch-and-Bound Algorithm

Table 3 shows the results of the branch-and-bound algorithm with three different tree traversal methods. We set the time limit to 1800 s. In this table, the column n o d e _ c n t represents the number of visited nodes. The d e v column is an abbreviation for deviation, expressed as a percentage of the difference between the objective value and the best solution. The calculation formula is as d e v ( % ) = ( o b j b e s t s o l u t i o n ) b e s t s o l u t i o n × 100 % .
When n k is less than 20, DFS and BestFS successfully find the optimal solutions, but their execution times and the number of visited nodes of BFS are much larger than others. Even if n k is 20, BFS cannot find the optimal solution within the time limit. In addition, we can see that the execution time of BestFS is faster than that of DFS for a small number of jobs. When n k is greater than or equal to 30, the three methods fail to find the optimal solution within the time limit. The number of visited nodes and the deviation of DFS are clearly lower than those of BFS and BestFS. The results indicate that DFS is more efficient than BFS and BestFS because the DFS algorithm is not a layer-order traversal but will backtrack after finding the solution. Therefore, BFS and BestFS may not be able to find any feasible solution within the time limit. To sum up, the performance of DFS is better than those of BFS and BestFS, so we will analyze the experimental results of DFS in detail in the next section.

6.4. Results of DFS Algorithm

In the experiment, we compare three different cases, including the original DFS algorithm, DFS with the lower bound, and DFS with the dominance property. Table 4 shows the experimental results of the different cases and also compares their objective values ( o b j . ) , numbers of visited nodes ( n o d e _ c n t ) , execution times ( t i m e ) , and deviations ( d e v ) from the best solution.
We can find that when the lower bound and properties are incorporated into DFS, the number of visited nodes is significantly reduced. Since this method will cut off unhelpful branches, it can also speed up the traversal, making it easier to find better solutions. Even when n k is greater than or equal to 30, none of the three cases can find the best solution within the time limit. However, compared with the original DFS, DFS with a lower bound and DFS with a dominance property attained smaller deviations, indicating the capability of finding solutions closer to the best solution.

6.5. Results of ACO Algorithm

In this section, we performed the ACO algorithm on the 18 datasets and set the time limit to 1800 s. Table 5, Table 6 and Table 7 summarize the results of the three branch-and-bound algorithms with ACO upper bounds. The results include objective values ( o b j . ) and deviation ( d e v ) of the ACO. The execution time of the ACO algorithm is much shorter than that of the branch-and-bound algorithm. In addition, we will compare the objective value ( o b j . ) , the number of visited nodes ( n o d e _ c n t ) , and the execution times, ( t i m e ) , of the original algorithm and the algorithm with ACO as the upper bound. The ACO parameters used in the experiments are shown as follows: g e n e r a t i o n = 300 ; p o p u l a t i o n = 20 ; α = 3 ; β = 1 ; and ρ = 0.1 .
As can be seen from the experimental table, the deviation of the ACO is small and an even better solution can be found than IP models within 1800 s. Therefore, we can use the ACO as the initial value of the upper bound ( u b ) to speed up the tree traversal time.
When the branch-and-bound algorithm is executing with the test l b < u b , the ACO can make u b smaller, cutting more unnecessary branches. According to the tables, when n k is less than or equal to 20, the algorithm with an upper bound finds the best solution in a shorter time and visits fewer nodes; especially for the ACO in BFS, this is more obvious. As the value of n k becomes larger, it increases the probability of the algorithm finding the best solution within the same time limit. In summary, using the ACO solution as an upper bound can make the branch-and-bound algorithm perform better.
To summarize the computational study, we note that the two proposed integer programming approaches and the branch-and-bound algorithm, aimed at solving the problem to optimality, can complete their execution courses for 20 jobs or less. For larger instances, these exact two approaches become inferior. When reaching the specified time limit, the reported solutions are not favorable. Another observation is about the three traversal strategies. DFS has its advantages in its easy implementations (by straightforward recursions) and minimum memory requirement. The BFS and BestFS strategies are known to show their significance in maintaining acquired information about the quality of the unexplored nodes in a priority queue. On the other hand, they suffer from the memory space and heap manipulation work for the unexplored nodes. BFS and BestFS would be preferred when a larger memory is available and advanced data structure manipulations are available.

7. Conclusions and Future Works

In this paper, we studied the scheduling problem with shared common setups of the minimum total completion time. We proposed two integer programming models and the branch-and-bound algorithm, which incorporates three tree traversal strategies and the initial solutions yielded from an ACO algorithm. A computational study shows that the position-based IP outperforms the sequence-based one when the problem size is smaller. As the problem grows larger, the gap values for the sequence-based IP are smaller than those of the position-based IP. Similar to the branch-and-bound algorithm, the DFS performs best, regardless of whether lower bounds and other properties are used or not. Finally, we also observed that using ACO to provide an initial upper bound indeed speeds up the execution course of the branch-and-bound algorithm.
For future research, developing tighter lower bounds and upper bounds could lead to better performance. More properties can be found to help the branch-and-bound algorithm curtail non-promising branches. For integer programming models, tighter constraints can be proposed to reduce the execution time and optimality gaps to reflect a real-world circumstance in which multiple machines or servers are available for a software test project. In this generalized scenario, a setup could be performed on several machines if the jobs that it supports are assigned to distinct machines.

Author Contributions

Conceptualization, M.-T.C. and B.M.T.L.; methodology, M.-T.C. and B.M.T.L.; software, M.-T.C.; formal analysis, M.-T.C. and B.M.T.L.; writing—original draft preparation, M.-T.C. and B.M.T.L.; writing, M.-T.C. and B.M.T.L.; supervision, M.-T.C. and B.M.T.L.; project administration, B.M.T.L.; funding acquisition, B.M.T.L. All authors have read and agreed to the published version of the manuscript.

Funding

Chao and Lin were partially supported by the Ministry of Science and Technology of Taiwan under the grant MOST-110-2221-E-A49-118.

Data Availability Statement

The datasets analyzed in this study are be available upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Leung, J.Y.T. Handbook of Scheduling: Algorithms, Models, and Performance Analysis; CRC Press: Boca Raton, FL, USA, 2004. [Google Scholar]
  2. Pinedo, M. Scheduling; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
  3. Kononov, A.V.; Lin, B.M.T.; Fang, K.T. Single-machine scheduling with supporting tasks. Discret. Optim. 2015, 17, 69–79. [Google Scholar] [CrossRef]
  4. Graham, R.; Lawler, E.L.; Lenstra, J.K.; Kan, A.R. Optimization and approximation in deterministic sequencing and scheduling: A survey. Ann. Discret. Math. 1979, 5, 287–326. [Google Scholar]
  5. Brucker, P. Scheduling Algorithms; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
  6. Baker, K.E. Single Machine Sequencing with Weighting Factors and Precedence Constraints. Unpublished papers. 1971. [Google Scholar]
  7. Adolphson, D.; Hu, T.C. Optimal linear ordering. Siam J. Appl. Math. 1973, 25, 403–423. [Google Scholar] [CrossRef]
  8. Lawler, E.L. Sequencing jobs to minimize total weighted completion time subject to precedence constraints. Ann. Discret. Math. 1978, 2, 75–90. [Google Scholar]
  9. Hassin, R.; Levin, A. An approximation algorithm for the minimum latency set cover problem. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3669, pp. 726–733. [Google Scholar]
  10. Shafransky, Y.M.; Strusevich, V.A. The open shop scheduling problem with a given sequence of jobs on one machine. Nav. Res. Logist. 1998, 41, 705–731. [Google Scholar] [CrossRef]
  11. Hwang, F.J.; Kovalyov, M.Y.; Lin, B.M.T. Scheduling for fabrication and assembly in a two-machine flowshop with a fixed job sequence. Ann. Oper. Res. 2014, 27, 263–279. [Google Scholar] [CrossRef]
  12. Cheng, T.C.E.; Kravchenko, S.A.; Lin, B.M.T. Server scheduling on parallel dedicated machines with fixed job sequences. Nav. Res. Logist. 2019, 66, 321–332. [Google Scholar] [CrossRef]
  13. Brucker, P.; Jurisch, B.; Sievers, B. A branch and bound algorithm for the job-shop scheduling problem. Discret. Appl. Math. 1994, 49, 107–127. [Google Scholar] [CrossRef]
  14. Hadjar, A.; Marcotte, O.; Soumis, F. A branch-and-cut algorithm for the multiple sepot Vehicle Scheduling Problem. Oper. Res. 2006, 54, 130–149. [Google Scholar] [CrossRef]
  15. Kunhare, N.; Tiwari, R.; Dhar, J. Particle swarm optimization and feature selection for intrusion detection system. Sādhanā 2020, 45, 109. [Google Scholar] [CrossRef]
  16. Kunhare, N.; Tiwari, R.; Dhar, J. Intrusion detection system using hybrid classifiers with meta-heuristic algorithms for the optimization and feature selection by genetic algorithms. Comput. Ind. Eng. 2022, 103, 108383. [Google Scholar] [CrossRef]
  17. Luo, L.; Zhang, Z.; Yin, Y. Simulated annealing and genetic algorithm based method for a bi-level seru loading problem with worker assignment in seru production systems. J. Ind. Manag. Optim. 2021, 17, 779–803. [Google Scholar] [CrossRef]
  18. Ansari, Z.N.; Daxini, S.D. A state-of-the-art review on meta-heuristics application in remanufacturing. Arch. Comput. Methods Eng. 2022, 29, 427–470. [Google Scholar] [CrossRef]
  19. Rachih, H.; Mhada, F.Z.; Chiheb, R. Meta-heuristics for reverse logistics: A literature review and perspectives. Comput. Ind. Eng. 2019, 127, 45–62. [Google Scholar] [CrossRef]
  20. Blum, C.; Sampels, M. An ant colony optimization algorithm for shop scheduling problems. J. Math. Model. Algorithms 2004, 3, 285–308. [Google Scholar] [CrossRef]
  21. Yang, J.; Shi, X.; Marchese, M.; Liang, Y. An ant colony optimization method for generalized TSP problem. Prog. Nat. Sci. 2008, 18, 1417–1422. [Google Scholar] [CrossRef]
  22. Xiang, W.; Yin, J.; Lim, G. An ant colony optimization approach for solving an operating room surgery scheduling problem. Comput. Ind. Eng. 2015, 85, 335–345. [Google Scholar] [CrossRef]
  23. Dorigo, M.; Maniezzo, V.; Colorni, A. Positive Feedback as a Search Strategy; Technical Report 91–016; Dipartimento di Elettronica, Politecnico di Milano: Milan, Italy, 1991. [Google Scholar]
  24. Dorigo, M. Optimization, Learning and Natural Algorithms. Ph.D. Thesis, Dipartimento di Elettronica, Politecnico di Milano, Milan, Italy, 1992. (In Italian). [Google Scholar]
Figure 1. Example of 4 setups and 5 jobs.
Figure 1. Example of 4 setups and 5 jobs.
Mathematics 11 04705 g001
Figure 2. Feasible solution.
Figure 2. Feasible solution.
Mathematics 11 04705 g002
Figure 3. Optimal solution.
Figure 3. Optimal solution.
Mathematics 11 04705 g003
Table 1. Categories of datasets.
Table 1. Categories of datasets.
Datasetsnm
D 1 , D 2 , D 3 54
D 4 , D 5 , D 6 108
D 7 , D 8 , D 9 2018
D 10 , D 11 , D 12 3025
D 13 , D 14 , D 15 4035
D 16 , D 17 , D 18 5045
Table 2. Results of different IP models.
Table 2. Results of different IP models.
n k DatasetsPosition-BasedSequence-BasedBest Solution
obj.Timegapobj.Timegap
5 D 1 1010.090%1010.100%101
D 2 1280.090%1280.100%128
D 3 1220.080%1220.100%122
10 D 4 461246.110%461-19%461
D 5 42346.100%423-21%423
D 6 457355.950%457-25%457
20 D 7 2055-44%2052-53%2052
D 8 1822-34%1820-58%1820
D 9 1670-46%1662-57%1662
30 D 10 3609-50%3602-61%3597
D 11 3985-50%4007-62%3985
D 12 4448-62%4469-66%4424
40 D 13 8196-72%8168-66%8168
D 14 7395-68%7402-67%7390
D 15 7975-70%7935-66%7935
50 D 16 12,882-76%12,963-66%12,880
D 17 12,305-73%12,374-67%12,305
D 18 10,891-72%10,953-66%10,871
Table 3. Results of different tree traversal methods.
Table 3. Results of different tree traversal methods.
n k DatasetsDFSBFSBestFS
obj.node_cntTimedevobj.node_cntTimedevobj.node_cntTimedev
5 D 1 101250.000.00101670.000.00101160.000.00
D 2 128220.000.00128440.000.00128120.000.00
D 3 122270.000.00122680.010.00122200.000.00
10 D 4 4612030.060.0046141410.390.004612830.040.00
D 5 4232460.040.0042325180.270.004231280.020.00
D 6 45710550.250.0045734,6462.570.0045717880.180.00
20 D 7 205234,79869.070.0078391,940,323-2.82205233,39322.620.00
D 8 182044,84477.490.0066512,081,103-2.65182044,16622.030.00
D 9 1662201,418314.670.0062112,078,269-2.741662172,09496.320.00
30 D 10 3605440,015-0.0018,5331,482,922-4.1518,5331,903,404-4.15
D 11 4053385,433-0.0222,0051,083,532-4.5222,0551,064,974-4.53
D 12 4470392,869-0.0122,9901,165,534-4.2022,9901,423,640-4.20
40 D 13 8357189,796-0.0251,610846,721-5.3251,610769,918-5.32
D 14 7564176,723-0.0244,779873,638-5.0644,7791,112,645-5.06
D 15 8074185,522-0.0249,102888,079-5.1949,1021,094,652-5.19
50 D 16 13,00774,873-0.01106,541856,905-7.27106,541954,605-7.27
D 17 12,52784,980-0.0297,383933,536-6.9197,3831,047,559-6.91
D 18 11,25590,908-0.0487,5451,055,329-7.0587,5451,181,533-7.05
Table 4. Results of DFS algorithm.
Table 4. Results of DFS algorithm.
n k DatasetsDFSDFS + LBDFS + LB + Property
obj.node_cntTimedevobj.node_cntTimedevobj.node_cntTimedev
5 D 1 1013250.000.00101280.000.00101250.000.00
D 2 1283250.000.00128480.000.00128220.000.00
D 3 1223250.000.00122270.000.00122270.000.00
10 D 4 4619,864,100173.530.004616140.110.004612030.070.00
D 5 4239,864,100174.600.004236260.090.004232460.050.00
D 6 4579,864,100182.090.0045723810.510.0045710550.250.00
20 D 7 217427,177,572-0.062052135,187230.350.00205234,79869.070.00
D 8 214528,810,807-0.181820287,087429.710.00182044,84477.490.00
D 9 190429,472,356-0.1516621,006,3901405.520.001662201,418314.670.00
30 D 10 422914,013,551-0.183679426,340-0.023605440,015-0.00
D 11 475713,668,237-0.194211462,562-0.064053385,433-0.02
D 12 508714,077,620-0.154530443,418-0.024470392,869-0.01
40 D 13 95577,184,349-0.178405169,550-0.038357189,796-0.02
D 14 85057,327,087-0.157645210,938-0.037564176,723-0.02
D 15 91317,111,936-0.158250210,891-0.048074185,522-0.02
50 D 16 14,6294,136,372-0.1413,196104,445-0.0213,00774,873-0.01
D 17 14,2724,189,689-0.1612,911119,416-0.0512,52784,980-0.02
D 18 12,9014,254,099-0.1911,522114,774-0.0611,25590,908-0.04
Table 5. Results of DFS with ACO upper bounds.
Table 5. Results of DFS with ACO upper bounds.
n k DatasetsDFSACODFS + ACO
obj.node_cntTimeobj.devobj.node_cntTime
5 D 1 101250.001010.0010150.00
D 2 128220.001280.0012870.00
D 3 122270.001220.0012240.00
10 D 4 4612030.064610.004611120.06
D 5 4232460.044270.01423750.04
D 6 45710550.254640.024579540.25
20 D 7 205234,79869.0720580.00205232,86164.83
D 8 182044,84477.4918680.03182043,25772.69
D 9 1662201,418314.6716680.001662157,071243.59
30 D 10 3605440,015-36160.013597433,789-
D 11 4053385,433-39860.003985373,573-
D 12 4470392,869-44240.004424357,690-
40 D 13 8357189,796-82820.018282159,727-
D 14 7564176,723-73900.007390131,500-
D 15 8074185,522-79670.007967145,476-
50 D 16 13,00774873-12,8800.0012,88069,077-
D 17 12,52784,980-12,5870.0212,52783,440-
D 18 11,25590,908-10,8710.0010,87171,311-
Table 6. Results of BFS with ACO upper bounds.
Table 6. Results of BFS with ACO upper bounds.
n k DatasetsBFSACOBFS + ACO
obj.node_cntTimeobj.Deviationobj.node_cntTime
5 D 1 101670.001010.0010140.00
D 2 128440.001280.0012830.00
D 3 122680.011220.0012240.00
10 D 4 46141410.394610.00461960.04
D 5 42325180.274270.014231180.03
D 6 45734,6462.574640.0245725780.40
20 D 7 78391,940,323-20580.00205243,23133.67
D 8 66512,081,103-18680.0318683,185,673-
D 9 62112,078,269-16680.00166279,117124.83
30 D 10 18,5331,482,922-36160.013616782,158-
D 11 22,0051,083,532-39860.003986394,009-
D 12 22,9901,165,534-44240.004424485,726-
40 D 13 51,610846,721-82820.018282649,800-
D 14 44,779873,638-73900.007390532,584-
D 15 49,102888,079-79670.007967702,847-
50 D 16 106,541856,905-12,8800.0012,880682,047-
D 17 97,383933,536-12,5870.0212,587927,886-
D 18 87,5451,055,329-10,8710.0010,871820,528-
Table 7. Results of BestFS with ACO upper bounds.
Table 7. Results of BestFS with ACO upper bounds.
n k DatasetsBestFSACOBestFS + ACO
obj.node_cntTimeobj.Deviationobj.node_cntTime
5 D 1 101160.001010.0010140.00
D 2 128120.001280.0012830.00
D 3 122200.001220.0012240.00
10 D 4 4612830.044610.00461960.04
D 5 4231280.024270.01423610.02
D 6 45717880.184640.0245713330.18
20 D 7 205233,39322.6220580.00205213,38024.48
D 8 182044,16622.0318680.03182039,03125.69
D 9 1662172,09496.3216680.00166271,082100.10
30 D 10 18,5331,903,404-36160.0136161,350,098-
D 11 22,0551,064,974-39860.003986518,619-
D 12 22,9901,423,640-44240.004424648,245-
40 D 13 51,610769,918-82820.018282790,216-
D 14 44,7791,112,645-73900.007390971,168-
D 15 49,1021,094,652-79670.0079671,087,057-
50 D 16 106,541954,605-12,8800.0012,880888,985-
D 17 97,3831,047,559-12,5870.0212,5871,078,245-
D 18 87,5451,181,533-10,8710.0010,8711,181,376-
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chao, M.-T.; Lin, B.M.T. Scheduling of Software Test to Minimize the Total Completion Time. Mathematics 2023, 11, 4705. https://doi.org/10.3390/math11224705

AMA Style

Chao M-T, Lin BMT. Scheduling of Software Test to Minimize the Total Completion Time. Mathematics. 2023; 11(22):4705. https://doi.org/10.3390/math11224705

Chicago/Turabian Style

Chao, Man-Ting, and Bertrand M. T. Lin. 2023. "Scheduling of Software Test to Minimize the Total Completion Time" Mathematics 11, no. 22: 4705. https://doi.org/10.3390/math11224705

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop