Algorithms for rescheduling jobs with a LIFO buffer to minimize the weighted number of late jobs

Rescheduling can help to improve the quality of a schedule with respect to an initially given sequence. In this paper, we consider the possibility of rescheduling jobs arriving for processing at a single machine under the following limitations: (a) jobs can only be moved toward the end of the schedule and not toward the front, and (b) when a job is taken out of the sequence, it is put on a buffer of limited capacity before being reinserted in its new position closer to the end of the sequence. The buffer is organized as a stack with a last-in/first-out policy. As an objective function, we consider the minimization of the weighted number of late jobs. For this NP-hard problem, we first provide two different integer linear programming (ILP) formulations. Furthermore, we develop a branch-and-bound algorithm with a branching rule based on the movement of jobs. Then a new pseudo-polynomial dynamic programming algorithm is presented which utilizes dominance criteria and an efficient handling of states. Our computational experiments with up to 100 jobs show that this algorithm performs remarkably well and can be seen as the current method of choice.


Introduction
In current production environments, planners are facing pressure to ensure the best possible utilization of costly machinery, while at the same time the imperative for high flexibility and last-minute arrivals of orders implies that production data are becoming more volatile. Product customization up to unit lot size requires a continuous reconsideration of the production sequence instead of a once-for-all production plan for the traditional manufacturing of identical products with large lot sizes. Usually, jobs go through several work stages which should be coordinated (cf. Agnetis et al. 2006). If the job sequence is optimized for one critical machine (or simply given by the arrival of parts), it would be highly desirable to reorganize the job sequence for the subsequent machine which may have different characteristics and thus would be less efficiently utilized by the original sequence. For example, in automobile production, cars have different colors, which asks for a grouping of similarly colored cars in the paint shop to reduce setup times. However, subsequent production stages, where for example different sets of options have to be installed requiring widely differing production times, will require quite different sequences to optimally utilize the production capacity and to fulfill deadlines at the end of the line (see e.g. Drexl et al. 2006). Thus, different production stages would imply different optimal sequences. Clearly, considering space and handling effort, it is out of the question to fully reorder the sequence of jobs between any two production stages. However, a limited reordering operation where product units are taken out from the line and put into a waiting area of limited capacity before being reinserted is well within the technical capabilities of many production environments. Also last-minute changes of the expected or estimated processing times or the late disclosure of job data cause a need for changes in the sequence of jobs as they arrive for processing.
In this paper, we consider the following setting of a singlemachine problem which was introduced in Nicosia et al. (2019) and treated in more detail in Nicosia et al. (2021).
There is a sequence of jobs given to be processed sequentially on a single machine. Preceding production stages only play a role insofar as the given sequence of jobs originated from these stages. We can rearrange the jobs before they enter the considered machine to improve the value of a certain objective function depending on the job sequence. However, the rearrangement is restricted by a physical handling device. In our setting, we envision jobs to arrive on a (slowly) moving conveyor belt which transports them toward the considered single machine for processing. A job (which is equivalent to a physical part) can be picked, e.g., by a robot, and taken out of the sequence to be placed in a buffer of limited capacity. Then additional jobs may be taken out of the sequence, but at some point the job is reinserted into the sequence at a later position on the conveyor belt. Thus, it is only possible to "move a job backwards" in the sequence, but never "forward" to an earlier position. Moreover, we assume that the buffer is organized as a stack, i.e., the most recently removed job must be reinserted first which amounts to a last-in/first-out (LIFO) organization of the buffer.
The main contributions of the preceding paper by Nicosia et al. (2021) for the rescheduling problem were strictly polynomial algorithms based on dynamic programming for the minimization of the following classical objective functions: -total weighted completion time, -maximum lateness (and maximum of regular scheduling functions), -number of late jobs. Furthermore, the authors considered the minimization of the weighted number of late jobs. For this objective, the rescheduling problem was shown to be NP-hard. In Nicosia et al. (2021), only a pseudo-polynomial dynamic programming algorithm was given, as an extension of the respective algorithm for the unweighted case. However, the development and evaluation of actually applicable solution strategies was left open in this previous work.
In this paper, we will study more extensively this relevant NP-hard case which reflects the case of due dates for products at the end of the line imposed, for example, by tight outbound logistic plans. Any violation of the due date of an item causes inconvenience as well as handling and penalty costs, weighted by the importance of the customer. Note that besides being the most natural NP-hard version of the rescheduling problem, the weighted number of late jobs can be of particular importance for on-demand production scenarios. If orders arrive for possible processing with a tight time frame, but not all of them can ultimately be accepted for production, it is crucial to keep those with the highest profit or, equivalently, those which would incur the highest loss if they were not produced. For orders with low profit, i.e., low weights, it is less disturbing if they cannot meet the deadline. However, while in the standard scheduling situation late jobs are usually moved to the end of the sequence or completely canceled, this will often be impossible in rescheduling problems due to the rearrangement restrictions. Therefore, there will be orders being processed although they will miss their deadline. This outcome poses an interesting challenge and leaves room for additional negotiations between the producer and the ordering customer about the monetary compensation for orders fulfilled after their deadline.
Other operational restrictions on possible rearrangements for such a conveyor-based scenario were considered in Alfieri et al. (2018b). In the literature, various other situations of rescheduling were considered. One research branch going back to the seminal work of Hall and Potts (2004) considers the arrival of new jobs to be integrated into the sequence of old jobs (see also Hall et al. 2007 andRener et al. 2022). Another direction moving into the area of robust optimization deals with changes in the original data of the jobs. The corresponding rescheduling issues were discussed, e.g., in Abumaizar and Svestka (1997); Detti et al. (2019); Niu et al. (2019) and Ballestín et al. (2019). An interesting aspect in this direction is that of recoverable robustness (see e.g. Liebchen et al. (2009)). There, one looks for a solution that can be made feasible by a simple recovery step (see Akker et al. 2018 for a scheduling contribution). In this context, rescheduling can also be seen as a recovery step. Also, disruptions can give rise to the need for rescheduling a previously planned schedule. This was treated, e.g., by Hall and Potts (2010) for the case of delayed jobs, Nouiri et al. (2018) for random disruption events, and Li and Li (2020) for accidents. The recently published monograph Wang et al. (2020) provides a comprehensive overview. Two survey papers treating rescheduling topics are presented by Ouelhadj and Petrovic (2009) and Vieira et al. (2003). Additional pointers to the related literature can be found in Nicosia et al. (2021).
In this paper, we perform a comprehensive algorithmic treatment of the minimization of the weighted number of late jobs. Our contributions can be summarized as follows: After giving the definition of the problem of rescheduling jobs with a LIFO buffer in order to minimize the weighted number of late jobs in Sect. 2, we propose ILP formulations in Sect. 3. One is based on decision variables for every move of a job, while the other utilizes assignment variables for placing jobs at their new position. In the former model, the number of constraints is asymptotically larger than in the latter model by one or two orders of magnitude. However, it turns out that computationally, the latter, more compact model is hardly tractable and is clearly outstripped by the more capacious move-based model. In Sect. 4, we develop a new realization of a dynamic programming algorithm. While the previous dynamic program from Nicosia et al. (2021) turns out to be hardly applicable even for moderate-sized test instances, our new algorithm employs dominance criteria and an efficient handling of lists of states, resulting in a competitive solution method.
While dynamic programming can be seen as a bottomup strategy, we also develop a branch-and-bound algorithm following a top-down approach. As described in Sect. 5, we use a branching rule based on moves of jobs. Note that the structure of the rescheduling problem requires particular care to avoid the multiple treatment of identical subproblems. The lower bound is derived from identifying jobs that can never be on time in the considered subproblem.
Section 6 reports on experimental results with all the presented algorithms. It turns out that the new dynamic programming algorithm and the branch-and-bound algorithm are both relevant solution strategies, while the ILP models and the previous dynamic program are not. Among the two remaining approaches, branch-and-bound dominates for smaller stack sizes while dynamic programming takes the lead for stacks with larger capacities. Finally, concluding remarks and suggestions for future research are given in Sect. 7.

Problem definition
In this section, we give a formal problem definition of our rescheduling problem and introduce terminology and notation. We mostly follow the description of Nicosia et al. (2021) where the problem was originally introduced. A deterministic single-machine environment is considered where a given set J of n jobs has to be scheduled on a single machine in order to minimize the weighted number of late jobs. In the following, the standard notation for scheduling problems is adopted: For each job j ∈ J , its processing time, its due date, and its weight are denoted by p j , d j , and w j , respectively. It is assumed that all these quantities are given as positive integers. Furthermore, for each job j ∈ J , the completion time of job j in a schedule σ is denoted by C j (σ ), and its lateness in σ by L j (σ ) = C j (σ ) − d j . To formulate the objective function, a binary variable U j (σ ) is introduced which takes value 1 if C j (σ ) > d j , i.e., job j is late in σ , and 0 otherwise. Additionally, for a schedule σ = σ 1 , σ 2 , . . . , σ n with σ k ∈ J , k = 1, . . . , n, if i ≤ j, the ordered set of jobs σ i , σ i+1 , . . . , σ j is referred to as subsequence σ (i, j).
Additionally, it is assumed that an initial sequence σ 0 of the n jobs of set J is given in which the jobs are numbered from 1 to n, i.e., σ 0 = 1, 2, . . . , n . This simply reveals that job j is placed in the jth position of σ 0 . Hence, it holds for any i, j ∈ J with i ≤ j that σ 0 (i, j) = i, i + 1, . . . , j . For any of these subsequences σ 0 (i, j), its total processing time and its total weight are indicated below as P(i, j) = j k=i p k and W (i, j) = j k=i w k , respectively. In the problem under consideration, a new job sequence σ is to be determined such that on the one hand, j∈J w j U j (σ ) is minimum, and on the other hand, σ can be derived from σ 0 by applying a number of so-called feasible moves.
In the scheduling environment considered here, any move is performed by a physical device, for example, a robot arm. This operates on the ordered sequence of jobs arriving at the machine, e.g., on a moving conveyor, where the initial sequence corresponds to σ 0 . The rescheduling process then takes place as follows. The device picks up a job j and puts it on a stack with bounded capacity S. Next, it possibly picks up other jobs and places them on the stack too. The device can also pick jobs from the stack, according to a LIFO policy, and place them back at a proper position later in the sequence. In doing so, it is assumed that there is always enough space between the jobs even to deposit all jobs in the stack between any two jobs on the conveyor. It should be emphasized at this point that in this environment, a job can only be reinserted in a later position of the sequence, since the conveyor belt keeps moving forward while the robot arm operates at a fixed position before the machine. At the end of the rescheduling process, the stack must be empty and all jobs be put back in the sequence again.
Introducing further terminology, a move i → j, i < j consists of deleting job i from a given sequence and reinserting it immediately after all jobs of the subsequence σ 0 (i + 1, j). Due to the stated LIFO policy, two moves i 1 → j 1 and i 2 → j 2 with i 1 < i 2 are feasible only if either i 1 < j 1 < i 2 < j 2 or i 1 < i 2 < j 2 ≤ j 1 . In the latter case, we define i 2 → j 2 to be nested in move i 1 → j 1 . Additionally, since the problem setting stipulates that there must not be more than S moves nested inside each other, each move is performed on a specific level in the following sense: a move that does not contain nested moves is said to be at level 1. Recursively, a move is at level > 1 if is the smallest value such that it contains feasible nested moves at level up to − 1. To avoid ambiguity regarding the level of a move, a move i → j at level is referred to as (i, j, ). For notational convenience, we also allow a move i → i for all levels , denoted as (i, i, ), meaning that job i is not moved at all (in this case the level of this non-move is meaningless). Finally, a feasible schedule σ for the rescheduling problem with stack capacity S is a schedule that results from a set of feasible moves at levels up to a maximum of S starting from σ 0 .
As pointed out in the introduction, Nicosia et al. (2021) considered the four possibly most common objective functions for this rescheduling problem. In this paper, we concentrate on finding a feasible schedule that minimizes the weighted number of late jobs. Following the standard three-field classification scheme of Graham et al. (1979), the problem is succinctly encoded as 1|resch-LIFO| w j U j .

Mathematical model
In this section, we present two integer linear programming (ILP) formulations for our problem 1|resch-LIFO| w j U j . The first model introduces binary variables for possible moves, while the second one employs binary variables for the assignment of jobs to positions and auxiliary binary variables for the relative order of jobs. Note that both formulations have O(n 2 ) variables (specifically, n 2 (n+1) and 2n 2 , respectively), but while in the first model O(n 4 ) constraints are needed (we will also introduce a variant with O(n 3 ) constraints), the number of constraints in the second one is only O(n 2 ).

Move formulation
In the first ILP formulation, hereinafter referred to as ILP-move1, we associate with each move i → j, i, j ∈ J with i < j a binary variable x i j such that each variable x i j takes value 1 if and only if move i → j is performed. Moreover, for each j ∈ J , binary variables U j indicate whether or not job j is late in the final sequence σ . With these variables, the problem can be formulated as follows: subject to n k= j+1 In (1), we minimize the weighted number of late jobs. While constraints (2) ensure that each job is moved at most once, (3) guarantees the LIFO policy. Constraints (4) limit to S the total number of jobs in the stack at any time and (5) ensure U j to be 1 if job j is late in the final sequence σ (for a large enough constant M). More precisely, the left-hand side (LHS) of (5) reflects the lateness of job j in the final sequence: while the first term indicates the completion time of job j in σ 0 , the second term expresses the decrease of the completion time resulting from all moves of jobs from 1, . . . , j − 1 in which j is nested in the final sequence; the third term indicates the increase of the completion time of job j as a consequence of its own move, and the fourth term is simply the due date of job j.
One might see the O(n 4 ) constraints (3) as a major burden on the computational performance of solving ILPmove1. Indeed, one may aggregate these constraints and replace (3) by constraints k h= j This yields a second version of the move-based ILP, which is referred to as ILPmove2 in the following. At first glance, this replacement may seem advisable, as it reduces the number of constraints to O(n 3 ). We investigated this presumption empirically (see Sect. 6) and found that ILPmove2 outperforms ILPmove1 for stack sizes larger than or equal to 4, 6, or 8 (depending on the particular test set), while for smaller stack sizes ILPmove1 retains the lead. This is somewhat surprising, as the respective constraints are not directly related to the stack size.

Assignment formulation
The second ILP formulation is based on assignment variables matching the jobs of J , which are numbered according to the initial sequence σ 0 , to new positions from I = {1, . . . , n}. In detail, the model employs assignment variables x jh ∈ {0, 1} for j ∈ J , and h ∈ I where x jh = 1 indicates that job j is placed in position h in σ . We also use an additional set of variables: for all k, h ∈ I with k < h, y kh ∈ {0, 1} indicates whether the job in position k has a larger index number than the job in position h. In other words, y kh = 1 if and only if the job in position k was initially placed after the job in position h (while satisfying the LIFO constraint). Beyond that, the variables z i j , i, j ∈ J with i < j indicate whether job i is placed at a larger position number than job j in the final sequence, i.e. z i j = 1 if and only if job i is placed after job j in σ . As in the move formulation, variable U j , j ∈ J also indicates here whether or not job j is late in the final sequence σ . The job in position h in the final sequence σ can be expressed as γ (h) = j∈J j x jh , while the position of job j can be derived as π( j) = h∈I h x jh . With these quantities, we get the following ILP formulation: subject to In (7), we minimize the weighted number of late jobs. Equations (8) and (9) are the usual assignment constraints. Constraints (10) and (11) guarantee that z i j is 1 if π(i) > π( j). In other words, variable z i j , i < j, assumes value 1 if and only if job i is placed after job j in σ . (12) and (13) ensure y kh to be 1 if γ (k) > γ (h), meaning that variable y kh , k < h, assumes value 1 if and only if the job in position k was initially placed after the job in position h. Constraints (14) ensure the LIFO policy. In fact, (14) is equivalent to the following implication: Because of the LIFO constraint, when moving job γ (h) from its initial to its final position, there have to be jobs with a larger index number than γ (h) in all positions nested in this move. However, since γ (h) is in turn nested in n l=h+1 y hl moves, the positions of the entire subsequence are moved forward by this number. Therefore, we have to consider all positions k in the final sequence σ for k ∈ γ (h) − n l=h+1 y hl , . . . , h − 1 and ensure that the index of the job placed in such a position k is larger than γ (h), i.e., that all jobs in these positions were initially placed after the job in position h, which is expressed by y kh = 1. Constraints (15) limit the total number of jobs in the stack at any given time to S. Finally, the LHS of inequality (16) reflects the lateness of job j in the final sequence where the completion time of j is composed of the first three expressions, namely, the sum of the processing times of all jobs that are in the initial sequence as well as in the final sequence located before job j, the processing time of job j, and the sum of the processing times of those jobs that succeed job j in σ 0 but precede it in the final sequence σ . Thus, (16) ensures U j to be 1 if job j is late in the final sequence σ (for a large enough constant M).

Dynamic programming
A straightforward dynamic programming algorithm for 1|resch-LIFO| w j U j with five nested for-loops was given in Nicosia et al. (2021). In that paper, a more complex dynamic program was also developed and presented in detail for the unweighted problem of minimizing the number of late jobs. Moreover, an adaptation of this approach to the weighted case was briefly mentioned in Nicosia et al. (2021). For the sake of self-containment, we will first lay out the resulting dynamic programming algorithm DynProStatic for 1|resch-LIFO| w j U j in detail. This approach does not yield a practically usable algorithm (see the experiments in Sect. 6.2), but it serves as a starting point for a number of substantial algorithmic improvements leading to our considerably faster dynamic program DynProImpr.

Static dynamic program
This section provides a detailed description of the pseudopolynomial dynamic programming algorithm for 1|resch-LIFO| w j U j which is briefly sketched in Nicosia et al. (2021). It is an extension of the algorithm presented in that paper for the unweighted case. For this purpose, let us first introduce the term -rearrangement to denote a feasible rearrangement of a subsequence that can be obtained by moves up to level . Moreover, all -rearrangements of a subsequence which lead to m for the weighted number of late jobs in it when the starting time is reduced by s are dominated by the -rearrangements that lead to the same weighted number of late jobs m with a time shift of s < s .
In our dynamic program, the state is defined as a quadruple (i, j, m, ), where i and j identify a subsequence, m is the weighted number of late jobs in the subsequence, and is the level. With each state (i, j, m, ), we associate the minimum required reduction of the starting time of subsequence σ 0 (i, j) to reach the given weighted number of late jobs m with moves up to level . This piece of information is formally defined as follows: S, let s(i, j, m, ) be the minimum decrease of the starting time of the subsequence σ 0 (i, j) in order to ensure a value of at most m for the weighted number of late jobs in it when the subsequence can be rearranged with moves up to level .
At this point, we want to emphasize that s(i, j, m, ) may be both positive and negative where negative values, i.e., an increase of the starting time, occur if the weighted number of late jobs in the (rearranged) subsequence is less than m.
At level = 0, the state values s(i, j, m, 0) are evaluated on the initial sequence using the lateness values of the jobs in it. First observe that although for each subse- This follows from the fact that any late job k in σ 0 (i, j) only becomes on time if the subsequence is moved forward by L k (σ 0 ). Through this starting time reduction, there is (at least) one late job less (i.e. job k), and the corresponding number m for the weighted number of late jobs reduces by the weight w k . However, as the number m, i.e., the largest allowed weighted number of late jobs in the subsequence, changes, the minimum reduction of the starting time does not necessarily have to change too. Hence, w k different states are assigned the same value L k (σ 0 ). Consequently, there exists (at most) one of these w k states that has exactly the given number of weighted late jobs with a starting time reduction of s.
In order to provide a formal initialization, we use the notation max [q] (L) to indicate the qth largest value in the multi-set L which corresponds to the qth entry in the nonincreasingly sorted multi-set. Additionally, we use to denote a union of multi-sets where the multiplicity of each element is the sum of its multiplicities in each single multiset. Formally, the initialization for all i, j ∈ J , i ≤ j and for all m = 0, . . . , W (i, j) − 1 is then as follows: For each level ≥ 1, the recursive extension rule is given as follows. For every given subsequence σ 0 (i, j), level , and number m, the state value s(i, j, m, ) is obtained by taking the minimum reduction of the starting time over all -rearrangements of σ 0 (i, j) that yield at most m for the weighted number of late jobs in it. For this reason, we compute for each possible move (i, k, ), and ≤ , the multi-set S(i, j, k, ) that contains the minimum reduction of the starting time for all weighted numbers of late jobs, that is, m = 0, . . . , W (i, j) − 1: As can be seen from (18), the multi-set S(i, j, k, ) is composed of three multi-sets representing the following three job subsets: the jobs nested in the move (i, k, ), the jobs from σ 0 (k + 1, j), and the moved job k. The values from the first multi-set are computed from the non-dominated ( − 1)rearrangements of the subsequence σ 0 (i + 1, k) where the starting time of all jobs is reduced by p i time units due to move i → k. The second multi-set contains the s(·) values of σ 0 (k + 1, j) where the starting time of the corresponding subsequence is not affected by the move. Finally, the third term corresponds to the multi-set that contains w i times the lateness of job i after move i → k is performed.
Recall that the multi-set S(i, j, k, ) contains the minimum starting time reductions for all m = 0, . . . , W (i, j)−1. Accordingly, the (m +1)-largest element of the multi-set represents the necessary time units by which σ 0 (i, j) needs to be moved forward after a move (i, k, ) with ≤ , to have a value of m for the weighted number of late jobs. Hence, the value of state s(i, j, m, ) corresponds to that move i → k for which the corresponding decrease of the starting time is minimal. Consequently, the new state value can be computed as follows: Finally, the optimal solution value, j∈J w j U j (σ * ), is given by min{m : s(1, n, m, S) ≤ 0}.
Hereinafter, we present a straightforward implementation of the algorithm sketched above which is illustrated in Algorithm 1. In the pseudocode, we can see that the states are generated from level = 0 up to S, since the recursion requires that the effects of moves nested in any move of level have already been evaluated beforehand. Additionally, for each level = 1, . . . , S, the subsequences need to be computed in a specific order to guarantee that when move (i, k, ) is examined, the evaluation of the effects of all moves (i , k , ) with k < i ≤ k has already taken place. Therefore, in an outer loop (Steps 9-21), the index j runs from 1 up to n, while in an inner loop the index i runs from j down to 1 (Steps 10-21). For any given subsequence σ 0 (i, j) and any level , we compute for each k = i, . . . , j the multi-set S (i, j, k, ). The union of the three multi-sets from which S(i, j, k, ) is composed (see Eq. (18)) is temporally stored in the list S k (Steps 12-18). Note that the procedure Append used in these steps is used for simply adding an element to the end of a list.

Improved dynamic program
In order to present an improved implementation of the dynamic programming algorithm, we take a closer look at the properties of the states s(i, j, m, ) computed in DynPro-Static. From these, we can derive the following observations which will then lead to the improved version.
Observation 2 For decreasing m, the values of s (i, j, m, ) are non-decreasing.
In other words, to achieve a smaller weighted number of late jobs, it will be necessary to move the subsequence forward by a larger (or at least not smaller) amount of time.
Observation 3 Let m be the minimum weighted number of late jobs that can be achieved by an optimal -rearrangement of the subsequence σ 0 (i, j) with fixed starting time C i−1 (σ 0 ). Then it holds that s(i, j, m, ) ≤ 0 for all m ≥ m .
The statement that s(i, j, m , ) ≤ 0 follows from the definition of a state. To obtain more late jobs than necessary, one would have to delay the subsequence which implies nonpositive s (i, j, m, ) values for m > m (cf. Observation 2).
Note that after performing the move (i, j, ), the resulting (already rearranged) subsequence cannot be split by any move at level > due to the LIFO constraint. However, if it is nested in a higher-level move, it will be moved forward as a whole. Therefore, all non-positive s (i, j, m, ) values, except for the one with the smallest m argument among them, are of no interest since they entail delaying the corresponding subsequence, and their computation can be skipped in order to save time. Consequently, for each σ 0 (i, j) and , we only record non-negative state values and the first non-positive one, but we disregard states with larger m corresponding to non-positive state values.
However, we will not consider all positive states either, as there is a natural limit how far a subsequence can be moved forward. In particular, after having performed moves up to level , for a job at position i at most S − preceding jobs can be moved behind i in the remaining levels. This yields the following bound.
Observation 4 The rearrangement of a subsequence σ 0 (i, j) produced by moves up to level cannot be moved forward by more than the processing time of S − jobs preceding it (or even fewer if i ≤ S − ). Therefore, the possible reduction of its starting time is limited by the sum of processing times of jobs 1, . . . , i − 1 and by the sum of the S − largest processing times. Formally, the reduction is bounded by It follows immediately from Observation 4 that if there is some state with s(i, j, m, ) > a(i, ), then none of the states s (i, j, m , ) with m ≤ m can be reached by any set of feasible moves. Consequently, these states do not have to be considered in the algorithm.
Hence, in order to reduce the number of state values that have to be calculated, it is useful to precompute the threshold values a(i, ) for each job i ∈ J and each level = 0, . . . , S. This is done by Algorithm 2. It builds a decreasingly sorted list A of the S largest processing times before each job i. If i − 1 < S, the missing elements are set to zero. Every time i is incremented by 1, p i−1 is inserted in A, and the smallest element in A is discarded (while i ≤ S, this element will be 0). For each fixed i, a(i, S) is always equal to zero, and the threshold values for each level < S can be easily obtained from the values at level + 1 by adding the next largest element from A. The complexity of the whole procedure is O(nS).
Algorithm 2 Computation of the thresholds a(i, ) 1: procedure Threshold 2: Let A be a list of length S with value 0 in each position 3: for = 0, . . . , S do 4: a(1, ) ← 0 5: for i = 2, . . . , n do 6: Insert p i−1 into list A such that A is sorted in non-increasing order 7: Remove the smallest element of A 8: a(i, S) ← 0 9: A further reduction of nonrelevant states can be obtained by the following dominance principle.
In our improved dynamic programming algorithm, we only record non-m-dominated states. This dominance relation between states enables us to significantly reduce the number of states to be considered which results in a crucial improvement in terms of running time.
Another observation which will give rise to an improved implementation concerns the number of moves that have to be examined when calculating s (i, j, m, ). Recall that for every given number m, the state value s(i, j, m, ) is obtained by taking the minimum reduction of the starting time over all possible moves (i, k, ) for k = i, . . . , j at some level ≤ that produce (at most) m late jobs in σ 0 (i, j). However, the following observation shows that it is not necessary to consider all moves (i, k, ), k = i, . . . , j.
Observation 6 In order to optimally rearrange the subsequence σ 0 (i, j) with moves up to level , a move (i, k, ) at some level ≤ with i < k is only worthy of examination if job k is late.
Proof Suppose job k is on time with respect to the given starting time is executed. While for the weighted lateness of the jobs in σ 0 (i + 1, k − 1) the effects of both moves are the same, the weighted lateness for jobs in σ 0 (k + 1, j) is smaller (or at least not greater) for move (i, k − 1, ) compared to move (i, k, ). Hence, a move (i, k, ) is worth examining only if job k is late.
In the following, we will present the algorithm Dyn-ProImpr, an improved implementation of dynamic programming that takes all observations stated above into account. For this purpose, we define four operations for handling sorted lists L of tuples v = (v 1 , v 2 ): Append v to L adds the tuple v at the end of list L; Head (L) returns the first tuple of L; Tail (L) returns the last tuple of L; and DeleteHead (L) deletes the first element of L. Furthermore, we will Merge two or more sorted lists into a single sorted list (which can be done in linear time). Last but not least, the function LessOrEqual ((v 1 , v 2 ), (v 1 , v 2 )) returns true if and only if v 1 ≤ v 1 and v 2 ≤ v 2 .
Taking into account Observation 2, for a fixed subsequence σ 0 (i, j) and a fixed level , the values s(i, j, m, ) form a (not strictly) decreasing sequence in m. Naturally, the sequence can be restricted to m ≤ W (i, j) − 1. The first part of this sequence consists (possibly) of values greater a(i, ) which are irrelevant by Observation 4. State values s(i, j, m, ) smaller or equal to a(i, ) and a m ≥ m = min{m : s(i, j, m, ) ≤ 0} are non-dominated and therefore relevant and will be stored in a list θ(i, j, ). Finally, non-positive state values except for the first one, that is s(i, j, m, ), will be simply ignored (cf. Observation 3).
As already mentioned, for each subsequence σ 0 (i, j) and for each level , we record an ordered list of nonm-dominated states denoted by θ(i, j, ). Each element of such a list is described by a tuple (m, s) and represents an -rearrangement with a total weighted number of late jobs of m that can be reached by a minimum advance s for the subsequence σ 0 (i, j), considering rearrangements up to level . The list θ(i, j, ) is sorted in decreasing order of the cost value s, and the elements (or tuples) in it represent a Pareto frontier of possible outcomes for the subsequence σ 0 (i, j). The endpoints of each such list θ(i, j, ) are given by (0, max{max k∈σ 0 (i, j) {L k (σ 0 )}, 0}) and ( k∈σ 0 (i, j): L k (σ 0 )>0 w k , 0). Algorithm 3 Dynamic program: DynProImpr 1: procedure Initialization (for = 0) 2: Let L be a list of all late jobs, sorted in non-increasing order of its lateness values in σ 0 3: for i = 1, . . . , n do 4: for j = i, . . . , n do 5: Tail (θ(i, j, 0)))] then 9: Append the tuple (M, L k (σ 0 )) to the list θ(i, j, 0) 10: M ← M + w k 11: Append (M, 0) to the list θ(i, j, 0) Procedure Initialization of Algorithm 3 settles the case = 0. At this level, the values of θ(i, j, 0) are evaluated on the initial subsequence σ 0 (i, j) using the lateness values of the jobs in it. Accordingly, we first create a list L of all late jobs in σ 0 , sorted in non-increasing order of the corresponding lateness values (Step 2). Subsequently, to span all subsequences σ 0 (i, j), two loops over all indices i and j are performed. For each subsequence σ 0 (i, j), the list is scanned from high to low lateness values in Steps 6-10: each late job k between i and j that is non-m-dominated (Step 8) originates a record that is inserted in θ(i, j, 0) (Step 9). The record has a time value m equal to the lateness of job k and a cost value s equal to the accumulated weights of all jobs with lateness not smaller than L k (σ 0 ). Note that the last entry in θ(i, j, 0) indicates the cost, i.e., the total weighted number of late jobs, of the subsequence with no time shift (Step 11).
For each subsequence σ 0 (i, j) and for each level = 1, . . . , S, the list θ(i, j, ) of non-m-dominated states corresponding to σ 0 (i, j) is generated as follows. All relevant insertion positions k ∈ σ 0 (i, j) (see Observation 6) for job i are considered. For each move (i, k, ), its effects on the subsequence σ 0 (i + 1, k) are computed from all non-mdominated states in θ(i + 1, k, − 1), knowing that the whole subsequence σ 0 (i + 1, k) is advanced by p i owing to the move. No effects occur on subsequence σ 0 (k + 1, j) whose non-m-dominated states are stored in θ(k + 1, j, ). The effect on job i can be computed directly: its new lateness value is C k (σ 0 ) − d i . These three lists of states are composed to produce the list of states that can be reached in σ 0 (i, j) with move (i, k, ). The compose procedure is described in Loop 1 of Algorithm 3. After computing the composed lists R k for all relevant k ∈ σ 0 (i, j), these lists R k are merged, and only non-m-dominated states are kept (Observation 5), which leads to the lists θ(i, j, ). The merge procedure is outlined in Loop 2 of Algorithm 3.
In the main procedure Recursion of Algorithm 3, we compute for each level = 1 up to S and every subsequence σ 0 (i, j) the list θ(i, j, ) in two loops. In Loop 1, we compute lists R k for k = i and every late job k ∈ σ 0 (i + 1, j) (cf. Observation 6). For this purpose, we first set up three temporary sorted lists R k,1 , R k,2 , and R k,3 in Steps 18-31, resembling the three components in (18). In detail, R k,1 consists of all those pairs of θ(i + 1, k, − 1) where the s-entry is reduced by p i and thereby remains positive. Additionally, R k,1 contains the first pair with a non-positive reduced s-value, where the s-value is replaced by 0 for the sake of simplicity (Steps 20-25). R k,2 equals θ(k+1, j, ) (Step 27), and the components of list R k,3 depend on the new lateness value of the moved job k: if C k (σ 0 ) − d i > 0, then R k,3 consists of the two states (0, C k (σ 0 ) − d i ) and (w i , 0); otherwise the list contains only the tuple (0, 0) (Steps 28-31). In Steps 34-40, the lists R k,1 , R k,2 , and R k,3 are merged in order to get the sorted list R k . Note that if the s argument is larger than a(i, ) (Step 37), the state related to the tuple is not included in R k , since it cannot be reached in any case. Finally, in Steps 41-48, the list θ(i, j, ) is created by keeping all non-m-dominated states from the merged lists R k ,  As Algorithm 3 is far from trivial, we give a detailed numerical example in Appendix 1 to illustrate the steps of the improved dynamic programming recursion.
It remains to analyze the computational complexity of Algorithm 3. It is easy to determine that the worst-case computational complexity of procedure Initialization is O(n 3 ). Since this is not the bottleneck of the complex-ity of the algorithm, we did not study any specialized data structure to possibly improve its complexity. In Recursion, Loop 1 (Steps 17-40) and Loop 2 (Steps 41-48) are executed O(n 2 S) times, namely, over all pairs (i, j) and for all levels . Each loop is executed O(n) times. Since for the tuples in θ(·), the m-argument is bounded by W (i, j), and the sargument is bounded by the sum of the S largest processing times, each iteration in Loop 1 and Loop 2 takes . Thus, the overall worst-case time complexity of Algorithm 3 is O(n 4 B).
The above discussion can be summed up in the following theorem, which improves upon the complexity of Algorithm 1 for large weight coefficients.

Branch-and-bound
As an alternative to the dynamic programming approaches which might become impractical for larger data coefficients, in particular for large weights, we devised a combinatorial branch-and-bound algorithm CombB&B for 1|resch-LIFO| w j U j . A preceding variant of the algorithm is described in Polimeno (2019). Hereafter, we discuss the branching strategy and bounding procedures as well as the search technique we employed.

Branching strategy
While dynamic programming works bottom-up since states at lower levels are computed first, branch-and-bound works top-down so that moves at higher levels correspond to earlier branching decisions. This processing strategy, however, does not allow the use of the definition of a move at level (recall that is the smallest value such that the move contains feasible nested moves at levels up to −1) since we do not know in advance the moves nested in it (due to the top-down approach) and therefore also not level . Thus, further terminology is necessary.
Definition 8 A move that does not contain nested moves is said to be at branching-level (B-level) 1. Recursively, a move is at B-level > 1 if it can contain feasible nested moves up to a B-level of − 1.
Definition 9 A move i → j at B-level is denoted as branching-move (B-move) (i, j, ). For notational convenience, we also define B-moves (i, i, ) for every B-level , meaning that job i is not moved at all.
Observe that -a move at B-level can but does not necessarily have to contain − 1 moves nested inside one another, whereas for a move at level it must contain − 1 moves nested inside each other; -a B-move (i, j, ) is itself nested in S − B-moves; -for a move at B-level , there always exists an ≤ such that it is a move at level .
The observation presented next is a direct result of the LIFO constraint and serves as a basis for the branching policy. j) is divided into at most three parts (less only if h = i and/or k = j), namely, σ 0 (i, h − 1), σ 0 (h, k), and σ 0 (k + 1, j), such that for all feasible B-moves (h , k , ) within σ 0 (i, j) with ≤ jobs h and k must belong to the same part. Furthermore, the rearrangement of any of the (at most) three resulting subsequences does not affect the starting time of the others.

Observation 10 When a B-move
When a subsequence σ 0 (i, j) is examined, all moves in which it is nested have already been decided due to the topdown approach, and therefore, its starting time is known and does not change subsequently. Hence, we can define a subproblem in the branch-and-bound tree as follows: Definition 11 A subproblem in the branch-and-bound tree corresponds to a quadruple (i, j, , μ) where the subsequence σ 0 (i, j) is to be optimally rearranged with moves up to a B-level of with a starting time C i−1 (σ 0 ) − μ; i.e., μ ≥ 0 is the reduction in the starting time of the subsequence compared to its initial starting time.
When examining a subproblem (i, j, , μ), the starting time and the residual number of levels are fixed, and therefore there is a natural limit on how far a job k ∈ σ 0 (i, j) can be moved forward by rearranging the subsequence σ 0 (i, j). In detail, at most k − i preceding jobs can be moved behind k in the remaining B-levels, so that the following threshold arises.
Observation 12 A job k of the subproblem (i, j, , μ) cannot be moved forward by more than the processing time of k − i jobs preceding it (or even fewer if ≤ k − i). Therefore, the possible reduction of its starting time is limited by the quantity Note that α(·) and the threshold a(·) (defined in Sect. 4.2) are closely related to each other, since α(1, k, ) = a(k, S − ). Consequently, because the computation of α(·) can be done in a similar way as the one for a(·) (see Algorithm 2), we do not provide a detailed description for computing the threshold values at this point. Whether or not a late job k in a considered subproblem (i, j, , μ) can be made on time with a set of feasible moves, depends on the value α (i, k, ). The corresponding definition is given below. Consider a subproblem (i, j, , μ). A job k ∈ σ 0 (i, j) is called repairable if it fulfills the following two properties:

Definition 13
(i) without rearranging the subsequence σ 0 (i, j) job k is late, i.e., C k (σ 0 ) − μ > d k ; (ii) the maximal possible reduction of the starting time α(i, k − 1, ) of job k in σ 0 (i, j) is larger than or equal to the current lateness of k, i.e., α( Note that if part (ii) of Definition 13 does not hold, job k is late regardless of how the subsequence σ 0 (i, j) is subsequently rearranged.
With the definition above, we are now able to state an observation that is of fundamental importance to limit the number of branches that need to be examined in the branchand-bound algorithm.

Observation 14
There exists an optimal solution of the subproblem (i, j, , μ) where all performed B-moves (h, k, ), i ≤ h < k ≤ j satisfy that job k is repairable.
Proof Suppose job k is not late with respect to the given starting time C i−1 (σ 0 ) − μ of the subsequence σ 0 (i, j).
For the lateness of job k, any B-move (h, k, ) with h < k does not yield an improvement compared to the B-move (h, k − 1, ), since job k is not late in either case. For the lateness of job h, B-move (h, k−1, ) is obviously preferable to B-move (h, k, ), while for the lateness of the jobs in σ 0 (i, h − 1), σ 0 (h + 1, k − 1), and σ 0 (k + 1, j), the effects of the two B-moves are the same. Thus, a B-move (h, k − 1, ) should be preferred over a B-move (h, k, ) for any h < k if k is on-time.
Contrarily, suppose that job k is late but not repairable. For the lateness of job k, any B-move (h, k, ) with h < k cannot yield any improvement compared to B-move (h, k − 1, ), since job k is late in any case. For the other jobs, the same arguments apply as above. Hence, a B-move (h, k − 1, ) should be preferred over a B-move (h, k, ) for any h < k if job k is late but not repairable.
Consequently, there exists an optimal solution of the subproblem (i, j, , μ) that does not contain any B-moves (h, k, ) for non-repairable jobs k.
After these preparations, we can define the branching rule of our algorithm. From any given subproblem (i, j, , μ), several subproblems are generated as follows: on the basis of Observation 14, we choose job k so that among all repairable jobs, k is the one with the largest index number, meaning that among all repairable jobs it is placed furthest behind. After fixing job k, all possible jobs h ∈ σ 0 (i, k) that can be moved after job k are considered. Thus, a branching decision in a subproblem (i, j, , μ) of the branch-and-bound tree is imposed by a B-move (h, k, ) As a result of the choice of k, the weighted lateness of σ 0 (k + 1, j) is known without further branching decisions, and only σ 0 (i, h − 1) and σ 0 (h + 1, k) have to be examined further. Thus, we can see that Observation 14 is essential for limiting the number of branches that need to be examined in the branch-and-bound algorithm.
Each branching decision imposed by a B-move (h, k, ) induces four different cost terms: the optimal costs z (1) of subsequence σ 0 (i, h − 1) obtained by a feasible rearrangement with moves up to B-level , the optimal costs z (2) of subsequence σ 0 (h + 1, k) obtained by a feasible rearrangement with moves up to B-level − 1, the costs z (3) of the moved job h in its new position, and the optimal costs z (4) of subsequence σ 0 (k + 1, j) (without any rearrangement). When all four values are known, they are summed up to get the optimal solution value z of the subproblem (i, j, , μ).
The recursive procedure Branch, outlined in Algorithm 4, takes the quadruple (i, j, , μ) as input and returns the optimal solution value z of the corresponding subproblem. When a subproblem (i, j, , μ) is examined, a loop runs from j down to i, until a repairable job k is found (Steps 3-6). All jobs succeeding k that are non-repairable are skipped (see Observation 14). If they are late, their weight is summed up in order to obtain z (4) (Step 5). Afterwards, for each job h in σ 0 (i, k), the corresponding branching decision is considered (Steps 8-13). Because of this approach, the number of successors in the branch-and-bound tree is not fixed a priori. For each choice of h, a B-move (h, k, ) is performed, and the corresponding costs are evaluated (Steps 9-13). Costs z (1) and z (2) are evaluated by recursive calls (Steps 10 and 11): z (1) is the optimal solution value of the subproblem (i, h − 1, , μ); that is, the minimum cost of subsequence σ 0 (i, h−1) at level with time shift equal to μ; z (2) is the optimal solution value of the subproblem (h+1, k, −1, μ+ p h ), which is the minimum cost of subsequence σ 0 (h + 1, k) at level − 1 with time shift μ + p h . Empty subsequences that occur when either h = i or h = k do not incur any costs and therefore do not imply any recursive calls; they form the recursion base. The value z (3) can be computed directly (Step 12): it corresponds to the weight of job h if C k (σ 0 ) − μ > d h and zero otherwise.
The procedure in Algorithm 4 is initially invoked with i = 1, j = n, = S, and μ = 0, which leads to the initial call Branch(1, n, S, 0).

Duplicate avoidance
The branching scheme described above has a major drawback, namely, that the same subproblems have to be optimized several times since they occur in several distinct branches of the branch-and-bound tree. For instance, the optimization of the subproblem (1, h, , 0) will be required in all nodes of the branch-and-bound tree of the form (1, h , , 0) with h > h, when h + 1 is the job selected to be moved. To avoid solving the same subproblems multiple times, a suitable data structure is defined to store the results of the subproblems once they have been solved. At the expense of increased consumption of memory space, this technique allows us to substantially reduce the computing time.

Bounding
The definition of a repairable job is not only the basis for the branching policy, but it is also useful for the purpose of a lower bound. In detail, for each subproblem (i, j, , μ), the sum of the weights of late but non-repairable jobs in it is a valid lower bound of its cost. For each successor corresponding to a move h → k, lower bounds ζ (1) and ζ (2) for z (1) and z (2) , respectively, are evaluated. If ζ (1) +ζ (2) +z (3) +z (4) < z, then the successor node in the branch-and-bound tree is optimized; otherwise it is fathomed. In addition to the lower bound, an upper bound is computed for each subproblem. It initially corresponds to the cost of the subsequence with no rearrangements and is updated every time a better rearrangement is found in one of the successors of the subproblem.

Search strategy
A subproblem represented by the quadruple (i, j, , μ) can have up to j − i + 1 successors. They are examined in an order that depends on their associated lower bound, i.e., ζ (1) + ζ (2) + z (3) + z (4) . More precisely, the successors are solved in non-decreasing order of their associated lower bound. Some preliminary computational tests showed that this strategy enables early detection of the optimal solution and thus makes it possible to substantially reduce the number of nodes in the branch-and-bound tree. Apart from this local ordering of the successors, the branch-and-bound tree is visited depth-first, since this allows for recursive implementation.

Computational experiments
This section provides computational experiments based on five data sets aiming for comparisons between the different solution approaches. All experiments were performed on an Intel Core i5 2.10 GHz computer (in 64-bit mode) with a memory of 8 GB. Each of the algorithms was coded in Pascal language, and for the integer linear programs, we used the commercial ILP solver Gurobi v9.1.1. Hereinafter, first, the procedure for generating the various instances is described, followed by a discussion of the results obtained.

Generation of test instances
We generated test instances with 50 and 100 jobs according to the data generation scheme proposed by Potts and Wassenhove (1988). For each instance of the test sets 1 to 4, we chose integer processing times p j and integer weights w j , independent and identically, uniformly distributed, respectively, with distribution parameters as given in Table 1.
Moreover, we chose independent and identically, uniformly distributed integer due dates d j ∼ U (P · d , P · d u ) for various lower and upper bounds d and d u , where P = j∈J p j is the sum of the processing times for all jobs. The choices for the two parameters d and d u are d ∈ {0.2, 0.4, 0.6, 0.8} and d u ∈ {0.2, 0.4, 0.6, 0.8, 1.0}, with d ≤ d u . Accordingly, this results in 14 pairs of parameter values. For each of the 14 resulting classes of instances, 10 instances were randomly generated, ultimately yielding a total of 140 instances for each value of n. Note that a similar test environment was used in Nicosia et al. (2021) to illustrate the influence of the stack capacity S on the solution structure for the three objective functions where strictly polynomial algorithms exist, but not for 1|resch-LIFO| w j U j .
Test set 5 was generated in a completely different way by the following procedure. For each instance of data set 1, the optimal solution for minimizing w j U j (completely reordering the given jobs) was computed. Subsequently, randomly selected jobs were moved forward in compliance with the LIFO policy and a stack capacity of 12. Clearly, when solving our stated problem with S = 12, we again obtain the optimal solution value. For smaller values of S, we expected to obtain hard-to-solve instances. Table 2 and Table 3 report on the experimental comparison between the different solution procedures for 1|resch-LIFO| w j U j presented in Sects. 3 to 5.

Performance comparison
Although the number of constraints of the assignmentbased ILP (ILPassign) is asymptotically smaller by one or two orders of magnitude than the number of constraints in the move-based ILPs (ILPmove1 and ILPmove2) (cf. Sect. 3), the running times for ILPassign were disproportionately long compared to all other solution approaches. Thus, we have not solved the majority of the instances with this solution method, and so we do not present any results for ILPassign. In this context, we would like to point out that for ILPassign, the relative gap between the optimal value of the LP relaxation at the root node and the optimal objective value is on average about 96% for all values of S, while for the move-based ILPs, it is often considerably smaller (see Table 4). Furthermore, DynProStatic could not be executed for test sets 3 and 4 due to excessively high memory usage caused by the high number of states required for solving the rescheduling problem. Recall that for these two sets, the weights are random variables with uniform distribution in [1, 1000], and that for each triple (i, j, ), the number of states to be computed is W (i, j).
In Tables 2 and 3, we report for each of the considered algorithms the average computation time (over 140 instances) needed to compute the optimal solution value. Since in some cases obtaining an optimal solution may take too long, we set a time limit of 900 000 milliseconds (15 minutes) for each computational experiment. In cases where the algorithm did not terminate within this time limit or where it terminated prematurely due to insufficient memory, we used a computation time limit of 900 000 milliseconds for taking the average values. For all the solution methods, additional information is provided in the respective second row. The values in these second rows have different meanings for the various algorithms, which is indicated by the different brackets: the values in parentheses (DynProStatic and DynProImpr) indicate the average number of states computed until the program terminates; the values in square brackets (CombB&B) indicate the average number of solved subproblems; for the values in curly brackets, the first number (CombB&B, ILP-move1, and ILPmove2) denotes the number of instances (out of 140) that cannot be solved within the predefined time limit or due to lack of memory; and the second number (ILPmove1 and ILPmove2) indicates the number of instances for which an optimal solution was found, but the optimality guarantee was not provided because the time out expired before the algorithm terminated. Clearly, the unsolved instances are also not taken into account when calculating the average number of solved subproblems.
As can be seen in Table 2, the dynamic programming algorithm DynProStatic presented in Nicosia et al. (2021) cannot compete at all with the other solution procedures, even with the move-based ILP formulation. Even for very small values of S, it consumes enormous computation times. For the ILPs, it must be said that they do not always terminate within the predefined time limit, but for almost all instances the optimal solution value has been found at that point, but without proving its optimality. In only 12 cases for ILPmove1 and 3 cases for ILPmove2 (out of 6300), the ILP solver stopped with a suboptimal solution after being interrupted by the time limit.
As can be expected, for smaller stack sizes, the lower computation times for ILPmove1 coincide with smaller relative LP gaps. However, it is interesting to note that for larger stack sizes, the average computation time for ILPmove2 is smaller than the time for ILPmove1, but the relative LP gap for ILPmove2 is on average still larger compared to ILP-move1 for all values of S. For S ≥ 10, the gaps of ILPmove2 even get closer to the gaps of ILPassign, although the running times are incomparable. This illustrates that the value of the LP gap at the root node has only limited explanation power for the performance of the ILP. The results for the gaps are presented in Table 4, where the relative LP gap for each instance is calculated by taking the difference between the optimal objective value of the ILP and the optimal LP relaxation objective value at the root node and dividing it by the former.
Nonetheless, compared to the ILP models and DynPro-Static, both DynProImpr and CombB&B dominate by several orders of magnitude and require comparatively really short average running times. For this reason, we only evaluated these two procedures for instances with 100 jobs, as shown in Table 3.
As a main outcome of our computational analysis, it turns out that for smaller stack capacities, i.e., less than or equal  instances that cannot be solved within the predefined time limit or due to lack of memory, the second number (ILPmove1 and ILPmove2) indicates the number of instances that have been solved to optimality despite a premature termination †In cases where the algorithm terminated prematurely due to a reached time limit of 900 000 milliseconds or due to lack of memory, the computation time was set to 900 000 milliseconds when computing the average computation time to lack of memory †In cases where the algorithm terminated prematurely due to a reached time limit of 900 000 milliseconds or due to lack of memory, the computation time was set to 900 000 milliseconds when computing the average computation time to 5 or 6 (depending on the particular test set), CombB&B performs better than DynProImpr, while for larger values of S, the improved dynamic program delivers outstanding results by comparison. Another interesting finding from our results is the following observation, which holds for both values of n: when comparing the results of the different solution approaches between sets 1 and 2 (recall that in both test sets, the weights are generated from the uniform distribution on the interval [1, 100], whereas the processing times are generated from U (1, 100) and U (1, 1000), respectively), the average computation times (and also the average number of computed states/subproblems) do not differ significantly for any of the dynamic programming algorithms and any of the considered stack capacities. This is rather surprising as it might have been expected that dynamic programming is more sensitive to the size of the input coefficients. In contrast, the branchand-bound procedure only produces similar results for a stack capacity smaller or equal to 4, while the running times are noticeably different for larger values of S. The same results can be observed when comparing test sets 3 and 4.
Recall that test sets 1 and 5 contain the same sets of jobs, but the initial ordering of set 5 was designed to obtain more difficult instances. For n = 100, this could indeed be observed for CombB&B, but not for DynProImpr. For n = 50, the comparison of algorithms does not show a significant trend. It seems that the effect of perturbing an optimal schedule by moving jobs with a stack capacity 12 (roughly 25%) yields instances which do not differ too much from randomly sorted sequences.

Conclusions
In this paper, we considered a rescheduling problem where jobs arrive in a given sequence which can be modified by extracting jobs from the sequence and putting them on a stack of limited capacity. Jobs can be reinserted from the stack into the sequence at a position further to the end (no forward moves) whereby the stack must be accessed according to a LIFO policy. While other objective functions were considered in a preceding paper, our goal in this paper is the minimization of the weighted number of late jobs in the modified sequence.
We study the exact solution of this NP-hard problem from several perspectives. We introduce two ILP models, an advanced algorithm based on dynamic programming and a branch-and-bound approach.
Summarizing our computational experiments, the ILP models soon reach their limits of practicability. However, it turns out that our advanced dynamic programming algorithm DynProImpr solves all our classes of test instances in less than 2 seconds (on average), while all other approaches exhibit a dramatic increase in their running time consumption. In particular, we want to emphasize the importance of the technical and implementational improvements applied to the previous dynamic program. Although the underlying algorithmic principle remains the same, the application of dominance relations and state reductions improves the performance by several orders of magnitude. Careful algorithm engineering turns a pseudo-polynomial algorithm of only theoretical value into a viable solution approach.
The branch-and-bound algorithm CombB&B performs even better than DynProImpr for smaller stack sizes, but becomes less efficient for larger stack sizes and larger weight coefficients. We pose as an open problem the improvement of its performance by developing tighter and efficiently computable lower bounds.
As a summary for a decision maker, we can conclude that even with today's amazing capabilities of commercial ILP solvers, the combinatorial difficulty of a rescheduling problem with a limited buffer can be much better handled by tailor-made solution algorithms. Looking for an effective one-size-fits-all solution, the dynamic programming approach can be recommended as the most effective and versatile algorithm. Its running time gains considerably from advanced algorithmic features.
For future research, it would be interesting to consider other policies for managing the stack, in particular, a queue environment (first-in/first-out, FIFO) or a random access buffer. Considering, for example, a chain of three sequential production stages would open up the question of two rescheduling phases in between the successive stages, but with an interdependent objective. Of course, generalizations to multistage production systems could follow.

Author Contributions Not applicable
Funding Open access funding provided by University of Graz. This study was partially funded by the University of Graz under the Field of Excellence "COLIBRI" and by the Regione Lombardia, grant agreement no. E97F17000000009, project AD-COM.

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

A Numerical example for Algorithm 3
In this appendix, we illustrate Algorithm 3 by a numerical example. For ease of comparison, we continue the example given in Nicosia et al. (2021), but with additional weights as required for our purpose.
Example 1 Consider a schedule σ 0 = 1, 2, 3, 4 with 4 jobs. The respective processing times, due dates, and weights are given in Table 5. Since the intention behind the example is to demonstrate how the lists θ(i, j, ) of non-m-dominated states are calculated, we confine our computation to the case S = 1. Note that it can be proceeded analogously for larger values of S.
To determine the minimum weighted number of late jobs in the sequence σ 0 with moves up to level 1, all ordered lists θ(i, j, ) of non-m-dominated states with i, j ∈ {1, 2, 3, 4}, i ≤ j, and ∈ {0, 1} need to be calculated.
At level = 0, the initialization of the improved dynamic programming algorithm is performed (Steps 1-11 of Algorithm 3). Recall that the values of θ(i, j, 0) are evaluated on the initial sequence σ 0 (i, j). Hence, with the lateness values already presented in Table 5 and the previously computed threshold values, a(i, 0), θ(i, j, 0) can easily be determined.
After computing R k for all k ∈ K, the list θ(i, j, 1) can be obtained by performing Steps 41-48. In order to do this, a set K is formed by selecting all tuples with the smallest m-value, i.e., the smallest first entry, among all the first elements of the lists R k , k ∈ K (Step 43). That tuple of set K with the smallest s-value, i.e., the smallest second entry (Step 44) is then added to θ(i, j, 1) (Step 45). Before the next element to be added to θ(i, j, 1) can be determined, the lists R k must be reduced by all tuples where both entries are larger or equal to the one just added to θ (Steps 46-48). For example, θ(2, 4, 1) is obtained as follows: Among all first elements of the lists R k , k ∈ {2, 3, 4}, we identify (8, 0) as that element which is the first to be appended to θ(2, 4, 1) (note that in our case, all the first elements are equal to (8, 0)). After decimating the three lists according to Steps 46-48, all three of these lists are empty, and we terminate. Hence, θ(2, 4, 1) is an (ordered) list containing only the tuple (8, 0). This result is also shown in Table 7 together with all other θ values.
As shown in the last row of Table 7, the optimal solution for stack capacity S = 1 has a weighted number of late jobs of 3. In this example, there is only one optimal schedule, namely, σ = 2, 3, 4, 1 . It can be obtained by the single move 1 → 4 that causes jobs 1 and 3 to be late. Table 7 Lists θ(i, j, 1) of non-m-dominated states for all i, j ∈ {1, 2, 3, 4} with i ≤ j