1. Introduction
There exist a huge number of publications devoted to the permutation flow shop problem (PFSP) or to the more general case of the flow shop problem (FSP) in the scheduling literature. In both the PFSP and the FSP, all jobs must be processed on a set of
m machines according to a fixed technological order. In the PFSP, all jobs are performed by each machine in the same order, while in the FSP, jobs may be performed in different orders on different machines selected to satisfy a specific optimization criterion. Often, the makespan has to be minimized, i.e., the maximum completion time of the complete set of jobs should be minimized. The PFSP is denoted as
. In [
1], an overview of the PFSP with the makespan criterion is presented. Three categories of methods used to solve the PFSP are considered: traditional algorithms, heuristic algorithms, and meta-heuristic algorithms. This study focused on meta-heuristic algorithms due to their effectiveness in solving many application problems. As a result of this study, it was demonstrated that meta-heuristic algorithms play a vital role in solving the PFSP. Most works deal with various heuristics and metaheuristics, see, e.g., [
2,
3,
4,
5,
6]. Much of the current work in the field of the PFSP is related to Industry 4.0 [
7,
8]. References [
9,
10] provide an overview of the FSP with assembly operations (AFSP). The basic assembly process in a workshop is described, consisting of two stages: the manufacturing or machining stage and the assembly stage. The machining and assembly stages use one or more machines operating in parallel. The final products have a hierarchical assembly structure with multiple components and assembly operations. A review of assembly shop models with a methodology for solving the corresponding problems of scheduling theory is presented. No less intensive work has been done for the job shop problem (JSP). We briefly discuss some of the latest publications. A review of more than 120 papers has been presented in [
11]. It examines the problem in relation to the new demands of Industry 4.0. This line of research has split into several new independent ones. Another review [
12] briefly described the research developments and current state of the art of job shop problems, classifying existing research methods and discussing future directions for the development. Reference [
13] described the development of an innovative high-performance genetic algorithm for the JSP. In [
14], a genetic algorithm and a simulated annealing one have been proposed for application in the manufacturing industry. Finally, reference [
15] provided an overview for a generalization of the classical job shop problem, namely the flexible job shop problem (FJSP).
This paper attempts to use the recursive functions apparatus to initiate systematic formulations of extensions of the problem of scheduling theory. A recursive function, by definition, is calculated using some algorithm. This, in some cases, allows the specifics of the problem extension to be incorporated into the algorithm of the recursive function. It is proposed to formulate and solve the extended problems of scheduling theory using a set of functions and their superposition. At this stage, the paper presents a description of the PFSP using recursive functions, as well as a transition to problems with the ‘and’ predicate and a permutation variant of the job shop problem (PJSP). The PFSP formulation with the ‘and’ predicate allows for solving problems involving assembly operations. All functions have a common domain and range. The authors demonstrate the applicability of the branch and bound method for all three problems. This greatly simplifies their application when using recursive functions. The flexibility requirements of Industry 4.0 manufacturing necessitate the use of PFSP, PFSP with assembly operations, and PJSP models. This can be accomplished by using three models in one solver.
It can be noted that the general PFSP with at least three machines and minimizing the makespan is already NP-hard in the strong sense, so the existence of polynomial solution algorithms is unlikely. Therefore, all exact enumerative algorithms for the PFSP have an exponential complexity. Since the PFSP with assembly operations and also the PJSP contain the PFSP as a special case, these problems are also NP-hard in the strong sense.
This article discusses a new approach through the definition of recursive functions to describe the timing characteristics of the PFSP. The concept of interval calculations is used to describe time domains. The equivalence of the PFSP representation in the existing and the recursive forms is proved. Here, equivalence is understood as the equality of the sets of feasible schedules for each pair of job number and machine number. Then, the transition from interval recursive functions to scalar ones is carried out. It is shown that with a fixed order of operations, scalar functions calculate an optimal schedule on the set of feasible schedules.
Moreover, the recursive representation of the PFSP is extended by including the predicate ‘and’, which allows one to move from chains of machines to trees and acyclic graphs. The branch and bound method (B&B) [
16] using the introduced recursive function is considered as an exact optimization method. A description of one of the variants of a lower bound on the makespan and the branching method are given. The branching method is based on an original permutation generator with a given property. The permutation algorithm and the recursive implementation of the B&B method are described. It is shown that the complexity of the algorithm does not increase compared to the known B&B algorithms for the PFSP [
16,
17].
The rest of this paper is organized as follows.
Section 2 reviews some basics of interval calculations relevant for the PFSP.
Section 3 proves the equivalence of the existing and the recursive PFSP representations.
Section 4 provides a method for implementing the B&B algorithm for the recursive PFSP.
Section 5 gives the definition of the ‘and’ function and the extended formulation of the problem. Then,
Section 6 discusses the B&B method for the introduced extended formulation of the problem.
Section 7 presents some initial results with the suggested algorithm. In
Section 8, a recursive function is formulated to describe a variant of the job shop problem.
3. Solving the Permutation Flow Shop Equivalence Problem
Consider the description of the PFSP [
19]. Let
be the set of jobs and
be the set of machines arranged sequentially. Moreover, let
be the processing time of job
j on machine
k.
The precedence graph of such a problem (see
Figure 1a) is a simple chain in which the vertices are machines, and the edges define precedence relations between the machines. This graph can be “expanded” if we fix some order of the jobs and define precedence relations between the jobs
and between the machines
. Any vertex of such a graph is identified with the pair (job number, machine number). An expanded graph describing precedence relations between the jobs is presented in
Figure 1b.
The vertical edges define precedence relations between the jobs for a particular machine. The horizontal edges define precedence relations between the machines for a fixed job. This graph is acyclic and has one start and one end vertex. Consider some schedule and then renumber the jobs in the order in which they are located in the schedule, i.e., for simplicity of the description, consider the schedule with the new numbering. The following assumptions are valid for the PFSP:
Job assumptions: A job cannot be processed by more than one machine at a time; each job must be processed in accordance with the machine precedence relationship; the job is processed as early as possible, depending on the order of the machines; all jobs are equally important, meaning there are no priorities, deadlines, or urgent orders.
Machine assumptions: No machine can process more than one job at a time; after starting a job, it must be completed without interruption; there is only one machine of each type; no job is processed more than once by any machine.
Assumptions about the processing times: The processing time of each job on each machine does not depend on the sequence in which the jobs are processed; the processing time of each job on each machine is specific and integer; the transport time between machines and a setup time, if any, are included in the processing time.
Additional time limits can be set in the scheduling problems. Denote
as the interval completion time of job
j on the
kth machine.
is the minimal time for the completion of job
j on the
kth machine, and
is the corresponding maximal time. The completion time
must satisfy the condition
; otherwise, the schedule is infeasible. In fact, this is the interval function completion time of job
j on machine
k. We will assume that in the initial formulation of the problem, a matrix
of initial domains of the feasible values for the job completion times has been defined. We will assume, unless otherwise specified, that the initial domains are the interval
, where
is a sufficiently large finite value, which will be discussed below. We describe two additional restrictions [
19]:
is the moment when job j arrives for processing, i.e., its release date. This parameter defines the time point from which job j can be scheduled for execution, but its processing does not necessarily begin at this moment. In this case, in the matrix of initial domains, it is necessary to put for and .
is the deadline for processing job j. A deadline cannot be violated, and any schedule that contains a job that finishes after its deadline is infeasible. In this case, in the matrix of initial domains, it is necessary to put for and .
The combination of the constraints
and
generates initial domains of the form
for
and
. If these restrictions relate to specific operations, they will look like
and
. In this case, the following time relations will be satisfied:
Here, we take into account the fact that the interval time
for the start of job
j on the
kth machine is calculated by the following formula:
The above inequalities are supplemented by inequalities of the form .
The system of inequalities (1)–(4) defines an infinite set of feasible schedules. To reduce this set to a finite one, we will use a positive integer constant
and supplement the system (1)–(4) with the inequalities
It is possible to assign to
a value so small that the set of feasible schedules is empty.
Remark 1. In what follows, we always assume that there is a constant such that there is at least one feasible schedule.
Example 2. Consider a PFSP with four machines and three jobs.
Table 1 shows the processing times
of the jobs. The rows correspond to the job numbers, and the columns represent the machine numbers.
Let
. In this case, the intervals for each pair
are given in
Table 2.
Figure 2 shows the Gantt charts of three variants from the set of feasible schedules. ”Schedule 1” and ”Schedule 2” are optimal schedules (for this sequence), while ”Schedule 2” and ”Schedule 3” have different inserted idle times. It is easy to verify that increasing any interval in
Table 2 will lead to the appearance of infeasible schedules, and decreasing any interval will result in the loss of feasible schedules.
Let
be the interval calculated by some algorithm for completing the
jth job on the
kth machine, and let
be the corresponding initial domain. According to
Figure 3, we define the interval noncommutative operation intersection (∩) as
. The figure shows all significant cases of interval intersections:
- (a)
the interval is to the left of . The completion time of the jth job on the kth machine should be artificially increased to values from the interval . Only in this case, the schedule will be feasible;
- (b–e)
are clear without additional explanation;
- (f)
with this arrangement of intervals, the value of the interval is equal to an empty set, which corresponds to the absence of a feasible schedule.
It can be shown that all feasible sets of time values are uniquely determinable and maximal. Therefore, when searching for an optimal solution, no solution will be lost.
All precedence relations define intervals (including the scalar ). Again, for simplicity of the description, consider some schedule and then renumber the jobs in the order in which they are located in the schedule, i.e., consider the schedule with the new numbering. The calculations of these intervals can be divided into four groups. Next, we write them using interval variables, assuming that the initial interval is and :
For the completion of the first job on the first machine
, we have:
For the completion of the first job on the
kth machine
, we have:
For the completion of job
j on the first machine
, we have:
The interval of the completion time of job
j on the
kth machine
is obtained as follows:
The PFSP can be formulated using a finite set of special recursive functions. This is due to the existence of precedence relationships between the machines and jobs in the PFSP when the current characteristics of the problem are determined by the preceding ones. Recursive functions have arguments and parameters as data. The arguments of the functions are pairs (job number, machine number). They are passed as function arguments in the normal mathematical sense. Parameters are defined outside the recursive function, and they are essentially global variables in imperative programming terms. Examples of parameters can be , and so on. For any recursive function R whose set of arguments is determined by the Cartesian product , the parameters and the set of values will be written as . If a recursive function has no parameters, they are skipped together with the curly braces in the definition of the recursive function.
We will denote the interval recursive function as
Specific types of recursive functions will be provided subsequently as the PFSP is considered. Let us consider the problem of equivalence of the existing PFSP formulation in the literature and its recursive representation. The equivalence of both formulations is established through the equivalence of the domains of acceptable values of the completion times for each pair (job number, machine number). An optimal solution is within the allowed processing times. This fact allows us to move to the functional representation of the problem and to apply various appropriate methods. We can describe each group by the corresponding recursive functions:
This set of functions can be combined into one function:
The function is defined for all values of j and k. If , then there is no feasible schedule. It can be seen from the formula that it calculates the only value of the interval. We show that this recursive function defines the same domain for each as the set of values defined by the system of inequalities (1)–(5).
Theorem 1. Let the following conditions be satisfied for both the PFSP given by the system of inequalities (1)–(5) and the recursive PFSP:
one graph is set for both problems (see Figure 1a); consider some schedule and then renumber the jobs in the order in which they are located in the schedule, i.e., consider the schedule with the new numbering;
the processing time of job j on the kth machine is ;
the same matrix of initial time intervals is specified:
Taking into account Remark 1, this means that the set of feasible schedules is defined on intervals determined by from below and from above.
Then, the following statement is true: the set of domains of feasible times for the non-recursive PFSP coincides with the set of domains for the recursive PFSP, i.e., for .
In other words, the sets of feasible schedules for each pair (job number, machine number) are the same, or in both cases, there is no feasible schedule, i.e., there are j and k such that .
Proof. Let the conditions of the theorem be satisfied. The proof is obtained via complete induction. Let us recall the formulation of the principle of complete induction. Let there be a sequence of statements
. If for any natural
i the fact that all
are true also implies that
is true, then all statements in this sequence are true. Therefore, for
, we have
Here,
denotes a logical implication. The statement
is the equality of the intervals
. Let us apply this method to the graph in
Figure 1b. From graph theory, it is known that the vertices of an acyclic graph are strictly partially ordered. There exist algorithms for constructing some linear order for a strictly partially ordered graph. Informally, a linear order is when all the vertices of a graph are arranged in a line, and all edges are directed from left to right. Any such algorithm is suitable because:
- -
the first vertex is always of the original graph,
- -
the last vertex is always ,
- -
when evaluating the recursive function according to a linear order, its arguments have already been evaluated.
Let us choose a row-by-row traversal. In this case, for a pair , all pairs with or have already been considered. We will traverse the elements of the matrix of interval variables T in the rows from left to right and from the top row to the bottom one.
Let us prove the statement
. From the system of inequalities (1)–(4), it follows that
From the definition of the recursive function, it follows that
Therefore, we have
.
Let us assume that the statements are true. We now prove that the statement is also true. Among the four groups of relationship types described above, the first type is considered for .
Let us analyze the remaining three types.
- (a)
Processing of the first job on the
kth machine
:
In this case, the problem satisfies the equality
In turn,
and due to the condition
, we get
Therefore, we have
.
- (b)
Processing of job
j on the first machine
: In this case, the problem satisfies the equality
In case of recursion,
Due to the condition
, finally, we get
Therefore, we have
.
- (c)
Processing of job
j on the
kth machine
assumes that the problem satisfies the equalities
In this case,
Therefore, we have
.
All possible situations have been analyzed. □
The main optimization problem in the PFSP is to find the order of job processing so that for some selected criterion, the function value is optimal. The most common criterion is the makespan (i.e., the total time it takes to complete the whole set of jobs). We remember that the vast majority of flow shop problems are treated as a PFSP; see, for example, [
17,
20,
21].
To effectively solve the problem of calculating an optimal schedule, it is necessary to switch from interval recursive functions (6) to scalar recursive functions
. Consider the case when all elements of the matrix of initial time intervals are equal to
. In this case, all the cases of interval intersections shown in
Figure 3 will be reduced to case (d) and will look similar to
Figure 4. The value of
will always be equal to
, and the interval value can be replaced by a scalar equal to the lower value of the interval
. Then, the recursive function (6) will look as follows:
or finally
The function
calculates the completion time of job
j on the
kth machine. The scalar function (8) is obtained from the interval function (6) by replacing the interval with the lowest value of the interval. These arguments are given for
, but it can be proven that they are also valid for the intervals
in accordance with Remark 1.
In Example 2 above,
computes only one schedule with minimum completion time, which corresponds to the ”Schedule 1” diagram in
Figure 2.
The analysis of Formula (8) shows that when calculating the function
, the traversal of pairs
is carried out in the order indicated in
Figure 5a.
However, if Function (8) is replaced by an equivalent Function (9) (the difference is in the last expression), then the pairs will be traversed according to the scheme in
Figure 5b:
Theorem 2. Let the PFSP include m machines and n jobs. Consider some schedule and then renumber the jobs in the order in which they are located in the schedule, i.e., consider the schedule with the new numbering. In this case, the following equality is true for any and any :The point of this theorem is that the scalar function calculates the minimum completion time for any given sequence of jobs. This follows from the principle of the function construction. Proof. If in Formula (7), is replaced by , then a formula for calculating is obtained. The direct comparison of the resulting formula with Formula (8) for calculating proves the validity of the theorem. □
The following important theorem follows from Theorem 2.
Theorem 3. Let the PFSP be defined for m machines and n jobs. In addition, let Π
be the set of all permutations of n jobs and be the permutation corresponding to the minimum completion time of all jobs, computed as for . For the PFSP, such a permutation satisfies the following equality: The meaning of the theorem is that the minimum completion time of all jobs, computed using interval calculations, is equal to the value of the scalar recursive function for the same permutation.
Proof. The set of all permutations is finite and has the cardinality . In this case, as proven by Theorem 2, for any permutation , the equality holds. Therefore, it also holds for the permutation . □
Let us look at Example 2 again. If, after calculating the intervals in
Table 2, we introduce a constraint of the form
(the moment the job is received for processing), this will lead to a change in the intervals for the third job to
and for the fourth job to
. Among the schedules given in the example in
Figure 2, only Schedule 3 will remain feasible. The other schedules will become infeasible. Evaluating the recursive function will not result in a feasible schedule. This example demonstrates the importance of including the constraints in the initial value matrix when evaluating the recursive function.
Theorem 3 states that when computing an optimal schedule for the PFSP, one can move from interval calculations to the scalar recursive function (8), although the cardinality of the set of values of the function is less than or equal to the cardinality of the set of values of the function . If the function has several minima, then the function will have the same number of minima.
The permutation
denotes the order of the job numbers, and
is the number of the job at position
in the schedule (permutation)
. The recursive function was defined before to have a fixed order of the processing of the jobs. Let us add the permutation
to the definition of the function as a global variable so that we can change the order of the jobs. We define new functions:
and
.
is the set of job position numbers, and
. We include the permutation
in the definitions of the recursive functions (6) and (8) so that we can change the processing order of the jobs:
In the function , where is the number of the position in the schedule (permutation) and is the number of the machine, they are the arguments of the recursive function, and the processing times and the permutation are the parameters of the function.
Example 3. Here, we calculate the completion times of jobs 1 and 2 on machines 1 and 2. It should be noted that in this case, the first argument of the function is the number of the position in the schedule π:
For simplicity of the description, we have discussed the approach for the PFSP. It can be noted that one can extend this procedure to the FSP with possibly different job sequences on the machines.
4. Implementation of the Branch and Bound Method for the PFSP
It should be noted that the PFSP was one of the first combinatorial optimization problems for which the branch and bound (B&B) method was applied [
16] soon after its development [
22]. A large number of works were devoted to the application of the B&B method for solving the PFSP. References [
17,
23] review the most important works on B&B algorithms for the PFSP. Since the B&B method follows very organically from the recursive representation of the PFSP, we consider it subsequently.
Evaluation of the Lower Bound LB1. Taking into account the permutation
of jobs, for a certain pair
, the lower bound LB can be determined as follows:
Remark 2. Calculating the value of the function from the value of the function is simpler than calculating . Therefore, it makes sense to calculate the lower bound only for the pair . In [24], the effectiveness of the comparison with the lower bound on the last machine was also justified. In this case, it is possible to move from formula (10) to the formula for calculating the bound on the last machine:
Next, let us formulate the exact meaning of the bound
. In the described case, this means that for a fixed order of a part of the jobs
, the processing times of all jobs cannot be less than
for any arrival order of the remaining jobs
.
Let
be the set of permutations of
n jobs for which the value
has already been calculated. Then, the lower bound
for the considered job sequences will be
Thus, if the inequality
is satisfied for the current pair
, then this sequence of jobs
is excluded from consideration as not promising, and the corresponding branch of permutations is cut off. The next one will be one of the sequences
with
where
is the set of all permutations of the
remaining jobs.
Branching. First of all, the branching must be consistent with the traversal defined by the recursive function. If
it is necessary to change the order of the jobs. However, it is necessary to change the order in such a way as to minimize the loss of information when calculating the functions
The literature describes many permutation algorithms with different characteristics. Let
.
assigns an element
x to each permutation of the set, i.e.,
. In this case, the algorithm for generating permutations should calculate them in such a sequence that they satisfy the following recursive property:
This property, after calculating the function , allows one to study all permutations of the ”tail” of the queue of jobs being scheduled and only then track back.
Example 4. Figure 6 shows an example of a complete permutation tree that satisfies Property (12) for . The root of the tree is an auxiliary vertex, and the permutation corresponds to some path from the root. The vertical edge shows the next level of recursion. It connects the initial sequence to its tail. The tree is traversed from top to bottom and from left to right. In this example, the permutations will be generated in the following order: (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,3,4,2), …, (4,3,1,2), (4,3,2,1). There are 24 permutations in total. This algorithm can be implemented through recursive copying of the tail of permutations. This is a costly operation, but the algorithm can be modified so that the permutation
exists in a single instance as a global variable. This is done using forward and reverse permutations of two jobs (when returning along the search tree). The description of the B&B algorithm is given in
Appendix A.
5. ‘And’ Function
The flow shop problem discussed above is more a subject of theoretical research and has limited application in practice. In order to bring it closer to practice, various additional elements can be introduced; first of all, various types of constraints. In real production, the main machine chain is served by various preparatory operations, for example, those associated with delivery from the warehouse to the production line; preparatory steps; technological issues; testing, etc.
Next, we expand the PFSP by introducing the ‘and’ function. A well-known construction, shown in
Figure 7a, denotes a precedence relation in which the execution of a job on machine 3 can only begin after the completion of the jobs on machines 1 and 2. Using the ‘and’ function, it will look similar to
Figure 7b. In what follows, we will interpret the ‘and’ function as a machine with zero processing time for any job. Thus, the chained precedence graph for the PFSP is expanded into an acyclic precedence graph when using the ‘and’ function. Therefore, the PFSP is transformed towards an Assembly Line job (AL), but without the presence of a conveyor belt and workstations. This problem can be called the Assembly Permutation Flow Shop Problem (APFSP). The absence of a conveyor belt frees it from the ”cycle time” limitation, and the absence of workstations frees it from solving the balancing problem, i.e., an optimal distribution of the jobs among the stations, taking into account the cycle time.
Despite the absence of assembly line attributes, this model can have wide applications.
The ‘and’ function in the interval representation
is as follows:
where
and
are precedence functions that will be defined later. Therefore,
or in a scalar expression
:
Accordingly, we get the function
, where
is the set of job position numbers and
:
Including the ‘and’ function in the PFSP causes the machines to process the job according to the precedence tree. To set a specific order of the precedence graph traversal, we assume that the function
is always the first one in Formula (13) and determines the upper arc in
Figure 7b. Adding the ‘and’ function causes the assumption in
Section 3 to be invalid: “a job cannot be processed by more than one machine at a time”, since machines 1 and 2 in
Figure 7b can execute the same job simultaneously.
We prove that when adding the ‘and’ function to the PFSP (i.e.,
and
), Theorem 3 remains valid, and the function
supplemented by
also implements a greedy algorithm for a fixed sequence of jobs.
Figure 8a shows an example of a precedence graph between the machines.
Figure 8b shows the precedence graph between the machines and jobs (with a fixed order of jobs).
Figure 8c shows the computation (superposition) graph of the recursive function for a certain sequence of four jobs. In the latter case, the arc determines the transfer of the value
.
Adding the ‘and’ function to the PFSP causes the machines to process a job according to the precedence tree. The graph in
Figure 8b is acyclic. In this case, it is convenient to traverse the graph according to the jobs, i.e., the first job tree, the second job tree, etc., in accordance with the job permutation algorithm. The tree of each job is traversed as indicated in the figure by the dotted line.
6. Implementation of the Branch and Bound Method for the APFSP
When implementing any method for the APFSP, it is necessary to switch to a precedence graph representation with typed vertices. Let us define the set as the following types of vertices:
—the starting vertex of the graph (machine);
—the intermediate or final vertex of a graph (machine);
and—the vertex corresponding to the ‘and’ function.
Let us define the function that gives this type of a vertex. It is necessary to define explicitly the precedence functions for the vertices .
is defined for the vertices of type , , meaning that the vertex immediately precedes the vertex .
and are defined for the vertices of type ‘and’; means that the vertex immediately precedes the vertex along the first incoming edge; means that the vertex precedes the vertex along the second incoming edge.
The main issues of the implementation of the method are also the choice of the lower bound (LB) calculating techniques and branching algorithms. Consider the calculation of the lower bound LB1 by traversing the jobs, that is, similar to
Figure 5, but with tree traversal. This means that Formulas (8) and (13) are used.
Evaluation of the Lower Bound LB1. Analysis of Formula (8) shows that when calculating the function
, the operations
are traversed in the order indicated in
Figure 5a. Consider the example in
Figure 8a. If the ‘and’ function is present, the job processing tree will be traversed as shown in the figure. Naturally, the value of
is calculated after calculating
. The values of
for the job
considering that
can be calculated as follows:
From the example considered, it is clear that the calculation of
is carried out using the same tree traversal as when calculating
. In this case, for
, Equality (10) is transformed into the following equality:
where
is the set of vertices belonging to the path from
to
m in the machine precedence graph. The uniqueness of this path follows from the fact that the machine precedence graph is a tree and
m is its root node (see, for example,
Figure 8a or
Figure 8b). Taking into account Remark 2, Expression (11) can also be used.
Appendix A presents three algorithms used for the solution of the APFSP.
The described algorithms work both for the PFSP and the APFSP. The only difference is in the definitions of the function. In the case of the PFSP, . For the APFSP, the precedence functions are determined from the precedence graph or a matrix. In this case, it is obvious that for the APFSP, the complexity of the B&B algorithm does not increase. An important feature should be noted. In the case when the last vertex in the precedence graph is the ‘and’ function, the B&B algorithm executes correctly, but its “predictive power” is reduced to zero.
Recursive functions also allow one to calculate the values of objective functions, different from makespan. This can be done by replacing the function
by
In this case, the calculation of the optimization criterion is concentrated in the body of the function and is invariant to the details of the optimization method.
7. Evaluating the Effectivenes of the Algorithm
Existing publications on the B&B method in scheduling theory use tests that are characterized by the computing times using specific hardware. To assess the effectiveness of the B&B method without using pure computing time indicators, it is advisable to determine the reduction in completed elementary calculations due to the fact that some sets of job permutations were deliberately discarded and not checked. There are two possible approaches here:
consider it elementary to calculate the completion time of the job’s last technological operation (approach L);
consider it elementary to calculate the completion time of each technological operation of each job (approach A).
In both cases, it is necessary to determine the maximum possible number of such calculations when solving a problem for n jobs and m machines, then to compare it with the number of calculations actually performed.
In the
L approach, the maximum number of elementary computations is determined by the permutation generation algorithm (see
Appendix A). At each step, this algorithm either adds a new job to the already fixed initial part of the vector
or replaces the last job in this fixed part by the next one. In both cases, the completion time of the last technological operation of the last job in the fixed part of
is calculated. The completion times of all technological operations of all previous jobs are already known and do not need to be calculated again. Thus, an “elementary computation” is the calculation of
m elements of the job completion times matrix (
) row, and the total number of such computations is equal to the number of different variants of the initial part of the vector
generated by the algorithm.
Consider, for example, the generation of permutations and the computation of the completion times for three jobs (
3). If the rejection of branches of the search along the lower bound
is never performed, then the sequence of actions performed by the algorithm is described by
Table 3.
As a result of the algorithm’s operation, 15 initial parts of the vector
were generated (including 6 complete permutations of 3 tasks), and 15 elementary computations of the
rows were performed. With the size
h of the initial part of the vector
, the total number of such generated initial parts is equal to the number of placements from
n to
h:
The total number of initial parts of the vector
of all possible sizes from 1 to
n is equal to
When using the B&B method, the algorithm will perform all
elementary calculations extremely rarely. However, this estimate is achievable in practice. Let us consider the degeneration case in which all rows of the matrix
are identical. In this case, the
value calculated using Formulas (10) or (11) will be the same for any values of the arguments, and none of the branches will be discarded. The number of elementary calculations performed by the algorithm will be exactly
. In approach
A, the maximum possible number of elementary calculations is
m times
since every row of the job completion times matrix contains
m elements. In the optimized algorithm, the number of real calculations will be less than the given values. The effectiveness of solving a problem can be assessed by the proportion of calculations not performed. If
and
are the numbers of calculations when solving problem number
i for
n jobs and
m machines using approaches
L and
A, respectively, then the efficiency of the solutions can be estimated using the following formulas:
A zero value of these indicators means that the use of the method did not provide any gain in the number of calculations; a theoretically unattainable value of 1 (or 100%) means that the use of the method completely eliminated the need for calculations.
The authors performed 10,000 tests for problems with 5–11 jobs on random acyclic graphs with random job processing times. The problem generation parameters in these experiments were as follows:
total number of nodes in the acyclic graph (technological operations): 15;
number of initial operations: random value in [1,3];
number of ‘and’ operations: random value in [1,4];
job processing times (): random value in [1,10].
All random values are uniformly distributed integers. For each number of jobs, a histogram of the distribution of the number of experiments in the ranges of the
efficiency obtained in the experiment was constructed. Thus, seven histograms were constructed, presented in
Figure 9.
The histograms in the figure show how many times a particular efficiency was achieved during the random experiments. The horizontal axis shows the ten-percent efficiency ranges (from “0–10” to “91–100”), and the vertical axis shows the number of experiments out of 10,000 performed in which the corresponding efficiency value was achieved. It can be seen from the figure that as the number of jobs increases, the efficiency of the algorithm also increases. The histogram for five jobs has a maximum around 50%. This means that most of the experiments with five jobs showed a fifty percent efficiency; that is, approximately half of the maximum possible number of elementary calculations for a given task were performed. However, a significant number (about 800) of experiments showed an efficiency of less than 10%. As the number of jobs increases, the histogram maximum moves into the high efficiency region. For 11 jobs, more than 7000 out of 10,000 experiments performed showed an efficiency in the range of 91–100%; i.e., less than 10% of the number of elementary calculations that would be required to solve the problem when analyzing all possible permutations were performed.
8. Job Shop Problem
The job shop problem (JSP) is a generalization of the FSP. For each job, the JSP allows its own set of machines to be used from the set
and its own order of execution of any job by the machines. The order of execution is determined by the precedence relationships between the machines, and it is possible that a job does not use the entire set of machines. In this section, we consider a special variant of the JSP, namely the permutation job shop problem (PJSP), where the job sequence is identical for all machines.
Figure 10a shows an example of a job shop precedence graph for some fixed order of jobs. Just as in
Figure 1, each job corresponds to a row of machines. If a job uses a machine, the corresponding graph vertex is shaded. The horizontal arcs represent the precedence relationships between the machines, and the vertical arcs represent the precedence relationships between the jobs for some fixed order of the jobs. We will call the pair (job number, machine number) relevant if machine
k is used to perform job
j, and we will call machine
k relevant for job
j and irrelevant otherwise. All machines that are irrelevant for job
j are characterized by a zero processing time, i.e.,
. Example
Figure 10a shows that for each job, the precedence relationships between the machines are defined only between the machines that are relevant for the given job.
Figure 10b shows the graph that results from swapping the third and fifth jobs of the graph in
Figure 10a. Obviously, when the jobs are rearranged, the precedence relationships between the machines for each job do not change, but they do change between the jobs. The precedence relations between the machines are defined by the precedence function
as follows:
For a fixed sequence of jobs, the function
is implemented by a precedence matrix predefined by the precedence graph. For example, the precedence matrix
W for jobs
j with respect to machines
k and matrix
P of the given operation processing times, corresponding to the graph in
Figure 10a, will have the following form:
When rearranging the jobs to maintain correspondence, it is enough to carry out the appropriate rearrangement of the precedence matrix rows.
Let us define a recursive function:
. Here,
is the set of job position numbers and
.
The function is defined for all argument values.
The set of machines relevant to some job, connected by the arcs of the precedence relationships, form one or more simple chains of machines. Thus, in
Figure 11a, job 2 includes two simple chains of relevant machines
and
. Let us assume that for each job, one of the following two conditions is satisfied:
a job can contain only one chain of relevant machines;
if a job contains two or more chains of relevant machines, then these chains cannot have common machines.
In this case, such a job can be split into two (or more) jobs so that each job contains one chain of machines. An example of such a split is shown in
Figure 11. Here, job 2, consisting of two chains (see
Figure 11a), is split into two jobs, job 2 and job 2’ (see
Figure 11b), such that each of them contains one chain. This division of the job into two or more jobs increases the total number of jobs and the total number of combinatorial options when searching for an optimal job order. It can be proven that with such a split, there exists an optimal schedule with a value of
for the new set of jobs that will be the same as for the original set of jobs.
Theorem 4. Let there be a set of n jobs. If some job is a set of w simple chains of machines, then this job can be broken down into w jobs such that each job contains only one chain. If the original set of jobs for some processing order has a completion time of , then for the new set of jobs, there exists an order with a completion time of .
Proof. Let some order of
n jobs be fixed, and let the job under consideration have the number
. Let us make two assumptions. First, suppose that the job contains only two simple chains of machines. Second, for simplicity and clarity, assume that the two chains consist of sequences of adjacent machines, as shown in
Figure 12.
Here, the first chain consists of
q machines, and the second consists of
z machines. The remaining
machines for job
j are irrelevant and are not displayed. These assumptions do not reduce the generality of the problem statement. If the statement can be proved for two chains, then a successive application of the job splitting will allow it to be applied to any other set of chains. The second assumption makes the statement of the theorem more clear, but it does not change the essence of the problem. The completion time of the
-th machine (
)
depends on the completion time
of job
on some
-th machine and the completion time
of job
j on machine
. If a machine is the first one in the chain, then its completion time depends only on
. The same reasoning applies to the second chain with the times
. Let us divide job
j into two jobs so that each job
j and
will contain one chain, as shown in
Figure 13. The irrelevant machines of job
j will also be irrelevant for the new jobs and are not shown in the figure.
Since the irrelevant machines do not change the completion time when it is transmitted transitively vertically and they have no horizontal connections, then at the output of the two jobs j and , the values of the completion times and do not change. For the machines that are not relevant in both works, the values also do not change. Therefore, if the fixed order corresponded to an optimal schedule, then the new order of the split jobs will have the same completion time value. Moreover, with the new set of jobs, it is possible to have a schedule with a shorter completion time. These arguments apply to job . For the first job, similar arguments apply in the absence of the values and . □
In what follows, we will assume that each job contains one simple chain of relevant machines. To be able to calculate the function for all jobs and relevant machines, we will do the following:
Let us supplement the set with the machine . This will be a virtual machine, and the time it takes to perform any work will be zero ( for );
For each job, we define an additional precedence relation between machine and the last actual machine in the simple chain that performs the given job. The last machine in the chain always precedes machine .
The result of the additions for the graph in
Figure 10a is shown in
Figure 14a. If we call the function
, then, in the process of calculation, it will go through the machines and jobs in the order shown in
Figure 14b using the numbered arrows. If arrows hit vertices where
has already been evaluated, they are returned (the function is not re-evaluated). This corresponds to a memorized computation, which significantly reduces the overall amount of computation.
It may seem that there is no need to add machine
, and we can complete the precedence relationships with machine
m. However, if machine
m for some job
j is inside a chain of machines, as in
Figure 11a for job 3, then the calculations will be incorrect.
The function is completely defined. For the relevant pairs , it calculates the time it takes for the k-th machine to complete job . For the irrelevant pairs , it computes the completion time of job on machine k. From the example, it is clear that the function for each job traverses only the relevant machines.