Adjusting scheduling model with release and due dates in production planning

Motivated by the conjecture that an interaction between scheduling and pre-scheduling phases in production planning may give certain benefits, we conduct a detailed study of the optimality conditions and dominance relations for a strongly NP-hard single-machine scheduling model when jobs have release and due-dates and the objective is to minimize maximum job lateness. By exploring the inherent structure of the problem, we establish the optimality conditions when the problem can be efficiently solved. We come to an NP-hard special case of the problem with only two possible job release times, that as we show allows stricter dominance rules and optimality conditions verifiable in polynomial time. The established properties give a potential of a beneficial interaction between scheduling and pre-scheduling phases in production planning, and also provide basic theoretical background for the construction of efficient heuristic and implicit enumerative algorithms. Subjects: Applied Mathematics; Computer Mathematics; Mathematical Modeling; Foundations & Theorems


Introduction
The term scheduling refers to the assignment of a set of requests to the given set of resources over time with the objective to optimize a given objective criterion. The requests are called jobs or tasks and a resources are called machines or processors, whereas the aim is to choose the order of PUBLIC INTEREST STATEMENT Scheduling problems are mathematical problems formalized for the solution of diverse practical real-life problems. They deal with a finite set of requests or jobs to be performed (or scheduled) on a finite (and limited) set of resources called machines or processors. The aim is to choose the order of processing the jobs on the machines so as to meet a given objective criterion. In this paper we study a scenario with a single machine when jobs have arrival and due dates: a job cannot be assigned to the machine before its arrival time, whereas it is desirable to complete it by its due date; if this is not possible, we wish to minimize the maximum job deviation from its due date (the so-called lateness). The problem is known to be intractable. Still, we derive conditions that lead to its optimal solution in polynomial time.
each scheduling time t (given by job release or completion time), among the jobs released by time t schedules one with the the largest delivery time (or smallest due-date). Since the number of scheduling times is O(n) and at each scheduling time search for a minimal/maximal element in an ordered list is accomplished, the time complexity of the heuristic is O(n log n). J-heuristic is sometimes referred to as EDD-heuristic (Earliest Due-Date) or alternatively, LDT-heuristic (Largest Delivery Time).
J-heuristic gives the worst-case approximation ratio of 2, i.e. it delivers a solution which is at most twice worse than an optimal one. There are polynomial time algorithms with a better approximation for problem 1|r j , q j |C max . Potts (1980) has proposed a modification of J-heuristic that repeatedly applies J-heuristic O(n) times and obtains an improved approximation ratio of 3/2. Hall and Shmoys (1992) have expanded the later algorithm resulting in an improved approximation ratio of 4/3 by applying J-heuristic to the forward and backward versions of the problem simultaneously, and also proposed two polynomial approximation schemes (their algorithms allow partial order on the set of jobs). The idea of the usefulness of the simultaneous application of J-heuristic in forward and backward fashions was earlier exploited by Nowicki and Smutnicki (1994). In a more recent work (Vakhania Perez, & Carballo, 2013), the magnitude , no-more than the optimal objective value divided by the specially determined job processing time, is used to derive a more accurate worst-case approximation ratio of 1 + 1∕ for J-heuristic. The value of parameter can be brutally determined in time O(n log n) using an easily calculable lower bound on the optimal objective value instead of using the optimal objective value itself.
As to the special cases of our problem, if all job release times or delivery times are equal, J-heuristic (its original version) gives an optimal solution, and with integer release times and unit processing times, it also delivers an optimal solution. If job release times, processing times and delivery time are restricted in such way that each r j lies in the interval [q − q j − p j − A, q − q j − A], for some constant A and suitably large q, then the problem can also be solved in time O(n log n), see Hoogeveen (1995). Garey, Johnson, Simons, and Tarjan (1981) have proposed an O(n log n) algorithm for the feasibility version with equal-length jobs (in the feasibility version job due-dates are replaced by deadlines and a schedule in which all jobs complete by their deadlines is looked for). Later in Vakhania (2004) was proposed an O(n 2 log n) algorithm for the minimization version with two possible job processing times.
For other related criteria, in Vakhania (2009) an O(n 3 log n) algorithm that minimizes the number of late jobs with release times on a single-machine when job preemptions are allowed. Without preemptions, two polynomial-time algorithms for equal-length jobs on single machine and on a group of identical machines were proposed in Vakhania (2013Vakhania ( , 2012, respectively, with time complexities O(n 2 log n) and O(n 3 log n log p max ), respectively. Problem 1|r j , q j |C max has been shown to be useful for the solution of the multiprocessor scheduling problems. For example, for the feasibility version with m identical machines and equal-length jobs, algorithms with the time complexities O(n 3 log log n) and O(n 2 m) were proposed in Simons (1983) and Simons and Warmuth (1989), respectively. In Vakhania (2003) was proposed an O(q max mn log n + O(m n)) algorithm for the minimization version of the latter problem, where q max is the maximal job delivery time and < n is a parameter.
The problem 1|r j , q j |C max is commonly used for the solution of more complex job-shop scheduling problems as well. A solution of the former problem gives a strong lower bound for job-shop scheduling problems. In the classical job-shop scheduling problem the preemptive version of J-heuristic applied for a specially derived single-machine problem immediately gives a lower bound, see, for example, Carlier (1982), Carlier and Pinson (1989) and Brinkkotter and Brucker (2001) and more recent works of Gharbi and Labidi (2010) and Della Croce and T'kindt (2010). Carlier and Pinson (1998) have used a straightforwardly generalized J-heuristic for the solution of the multiprocessor job-shop problem with identical machines. It can also be adopted for the case when parallel machines are unrelated, see Vakhania and Shchepin (2002). J-heuristic can be useful for parallelizing the computations in scheduling job-shop Perregaard and Clausen (1998), and also for the parallel batch scheduling problems with release times Condotta, Knust, and Shakhlevich (2010).
Besides the above mentioned applications in multiprocessor, shop and batch scheduling problems, our problem has numerous immediate real-life applications in various production chains, CPU time sharing in operating systems (jobs being the processes to be executed by the processor), wireless sensor network transmission range distribution (where jobs are mobile devices with their corresponding ranges that can be modeled as release and due dates).
By exploring the inherent structural properties of the problem, here we derive new optimality conditions when practical special cases of our problem can be solved optimally in a low degree polynomial time. In particular, we provide explicit conditions that lead to an efficient solution of the problem by a mere application of J-heuristic. Then we study further useful structural properties of the J-schedules (ones created by J-heuristic) leading to the optimal solution of other versions of the problem with the same computational cost as that of J-heuristic. Finally, we focus on a special case of our problem with only two allowable job release times r 1 and r 2 with r 1 < r 2 (abbreviated 1|{r 1 , r 2 }|L max or 1|{r 1 , r 2 }, {q i }|C max ). Although the latter problem remains NP-hard, it admits stricter dominance rules and optimality conditions leading to the corresponding polynomial-time verification procedures (and the reduction of the search space).
Employing the presented optimality and dominance conditions, a practitioner may simulate the scheduling phase under these conditions in real time (solving efficiently the scheduling problem under these conditions). Then it is verified whether the obtained solution also solves the original instance, i.e. if it is feasible for that instance. Otherwise, it might be possible to adopt the production process so that the optimality conditions are met. Carrying out this kind of simulation for a variety of arisen in a given production instances, a practitioner may adjust the pre-scheduling decisions and hence convert the initially determined scheduling model to another more restricted one admitting an efficient solution method. In this way, the production process might be adjusted to the optimality and dominance conditions resulting in a useful interaction between pre-scheduling and scheduling phases in production planning.
In the next subsection we give the basic concepts and some other preliminaries. In Section 3 we study efficiently identifiable conditions and cases when our generic problem can be solved in polynomial time. In Section 4 we show that the special case of the problem with only two allowable job due-dates remains NP-hard. Section 5 is devoted to the latter problem. In the first part of this section we give general properties for the polynomial time solution, whereas in Sections 5.1 and 5.2 we derive stricter dominance relations and other particular versions that can be efficiently solved. We give the final remarks in Section 6.

Basic concepts and definitions
Now we give a formal definition of our general scheduling problem. We have n jobs j(j = 1, … , n) and single machine available at the time 0 . Each job j become available at its release time or head r j , needs continuous processing time p j on the machine, and needs an additional delivery time or tail q j after the completion on the machine (note that q j needs no machine time in our model). The heads and tails are non-negative integral numbers while a processing time is a positive integer. A feasible schedule S assigns to each job j a starting time t j (S), such that t j (S) ≥ r j and t j (S) ≥ t k (S) + p k , for any job k included earlier in S; the first inequality says that a job cannot be started before its release time, and the second one reflects the restriction that the machine can handle only one job at the time. The completion time of job j, c j (S) = t j (S) + p j ; the full completion time of j in S, C j (S) = c j (S) + q j . Our objective is to find an optimal schedule, i.e. a feasible schedule S with the minimal value of the maximal full job completion time | | S | | = max j C j (called the makespan).
In an equivalent formulation 1|r j |L max , the delivery time q j of every job j is replaced by the duedate d j which is the desirable time for the completion of job j. Here the maximum job lateness L max (the difference between the job completion time and its due-date) needs to be minimized.
Given an instance of 1|r j , q j |C max , one can obtain an equivalent instance of 1|r j |L max as follows.
Take a suitably large constant K (no less than the maximum job delivery time) and define due-date of every job j as d j = K − q j . Vice-versa, given an instance of 1|r j |L max , an equivalent instance of 1|r j , q j |C max can be obtained by defining job delivery times as q j = D − d j , where D is a suitably large constant (no less than the maximum job due date). It is straightforward to see that the pair of instances defined in this way are equivalent; i.e. whenever the makespan for the version 1|r j , q j |C max is minimized, the maximum job lateness in 1|r j |L max is minimized, and vice-versa. We refer the reader to an early paper by Bratley, Florian, and Robillard (1973) for more details.
Next, we give a more detailed description of J-heuristic. It distinguishes n scheduling times, the time moments at which a job is assigned to the machine. Initially, the earliest scheduling time is set to the minimum job release time. Among all jobs released by that time a job with the mini-mum due-date (the maximum delivery time, alternatively) is assigned to the machine (ties being broken by selecting a longest job). Iteratively, the next scheduling time is either the completion time of the latest assigned so far job to the machine or the minimum release time of a yet unassigned job, whichever is more (as no job can be started before the machine gets idle nether before its release time). And again, among all jobs released by this scheduling time a job with the minimum due-date (the maximum delivery time, alternatively) is assigned to the machine. Note that the heuristic creates no gap that can be avoided always scheduling an already released job once the machine becomes idle, whereas among yet unscheduled jobs released by each scheduling time it gives the priority to a most urgent one (i.e. one with the smallest due-date or alternatively the largest delivery time).
We will use for the initial J-schedule, i.e. one obtained by the application of Jackson's heuristic (J-heuristic, for short) to the originally given problem instance, and S opt for an optimal schedule. A J-schedule has a particular structure that enables us to deduce our conditions. Two basic classes of jobs in a J-schedule might be distinguished: the "urgent" (critical) and "non-urgent" (non-critical) ones. Critical jobs (that we call kernel jobs) are ones which may potentially realize the maximum value of the objective function in an optimal schedule S opt (we call such jobs overflow jobs). In a J-schedule, the critical jobs form tight sequences that extend to limited time intervals. We call such sequences of critical jobs kernels. Then the non-critical jobs (that we call emerging jobs) are to be distributed within the remained intervals (in between the kernels) in some optimal fashion. Starting from Section 3, we derive conditions when this can be done in polynomial time. We need to introduce some preliminary definitions before we define formally the above mentioned notions.
A J-schedule may contain a gap, which is its maximal consecutive time interval in which the machine is idle. We assume that there occurs a 0-length gap c j , t j whenever job i starts at its earliest possible starting time, i.e. its release time, immediately after the completion of job j; here t j (c j , respectively) denotes the starting (completion, respectively) time of job j.
A block in a J-schedule is its consecutive part consisting of the successively scheduled jobs without any gap in between preceded and succeeded by a (possibly a 0-length) gap. J-schedules have useful structural properties. The following basic definitions, taken from Vakhania (2004), will help us to expose these properties. Job e is called an emerging job in schedule S if e ∈ B(S) and q e < q o(S) . The latest scheduled emerging job before the overflow job o(S) is called live and is denoted by l.
The kernel of S, K(S) is a sequence consisting of the jobs scheduled in schedule S between the live emerging job l(S) and the overflow job o(S), not including l(S) but including o(S) (note that the tail of any job K(S) is no less than of o(S)). Abusing slightly the terminology, we shall also use kernel for the corresponding set of jobs, and denote by r(K) the minimum job release time in kernel K.
It follows that every kernel is contained in some block in S, and the number of kernels in S equals to the number of the overflow jobs in it. Furthermore, since any kernel belongs to a single block, it may contain no gap. Note that if a J-schedule S has no emerging job then it will also have no kernel; then the overflow job in schedule S will not be part of any kernel. In general, we shall use E S for the set of all emerging jobs scheduled before kernel K(S) in schedule S. Figure 1 illustrates the above introduced notions for an instance with 6 jobs below. Schedule consists of two blocks B 1 y B 2 . Block B 2 is critical containing the overflow job 5 and kernel K( ) = {6, 5}.
Job 4 is the only emerging job. There is a gap [16,18] in .
If a J-schedule S is not optimal then there must exist an emerging job forcing the delay of the kernel jobs in K(S) and that of the overflow job o(S) which must be restarted earlier (see Lemma 2 a bit later). We denote the amount of this forced delay by Δ l = c l (S) − r(K(S)).
Observation 1 In any feasible schedule, the jobs of kernel K( ) may be restarted earlier by at most Δ l time units.
Proof Immediately follows from the definition of Δ l and from the fact that no job of kernel K( ) is released earlier than at time r(K( )). ✷ In order to reduce the maximum job lateness ( | | S | | ) in S, we apply an emerging job e for K(S), that is, we reschedule e after K(S). Technically, we accomplish this into two steps: first we increase artificially the release time of e, assigning to it a magnitude, no less than the latest job release time in K(S); then we apply the J-heuristic to the modified in this way problem instance. Since now the release time of e is no less than that of any job of K(S), and q e is less than any job tail from K(S), the J-heuristic will give priority to the jobs of K(S) and job e will be scheduled after all these jobs.
If we apply the live emerging job l, then it is easy to see that there will arise a gap before the jobs of kernel K(S) if no other emerging job scheduled in S behind kernel K(S) gets included before kernel K(S) taking the (earlier) position of job l. In general, while we apply any emerging job e ∈ E(S), we avoid such a scenario by increasing artificially the release time of any such an emerging job which may again push the jobs in kernel K(S) in the newly constructed schedule that we call a complementary to S schedule and denote by S e .
Below we illustrate the construction of schedule l . The table specifies a problem instance with 9 jobs. Schedules and l are illustrated in Figures 2 and 3, respectively (the numbers within the circles stand for the full completion times of the corresponding jobs).

The cases and conditions for polynomial time solution of the problem
In this section we give conditions leading to the efficient solution of our generic problem. These conditions are derived as a consequence of the analysis of J-schedule immediately and hence provide an O(n log n) time decision.
Lemma 1 If the overflow job o( ) is scheduled at its release time, then is optimal.
Proof If o( ) is scheduled at its release time r o( ) then its starting time t o( ) = r o( ) . Hence job o( ) starts at its early starting time in and ends at its minimum completion time. Therefore, o( ) can not be rescheduled earlier in , i.e. there is no scheduling Suppose there is a non-empty sequence E of jobs in B( ) scheduled before o( ). If we reschedule some jobs of E after o( ) the in the resultant schedule ′ at least one job e will be completed no earlier than at the moment C o( ) ( ). But as e is not an emerging job, q e ≥ q o( ) and therefore the full completion time of e, C e ( ), will be no less than If set E is empty, then o( ) is scheduled in at its release time, therefore by Lemma 1, is optimal.
The case when has no kernel is quite similar. ✷ The following two lemmas state earlier known results that we have mentioned in the introduction. Their proofs are presented for the sake of completeness of this presentation.
Lemma 3 If all release times r i (i = 1, … , n) of jobs in are equal to a constant r, then is optimal.
Proof As all jobs i(i = 1, … , n) are released at the time r, then the J-heuristic in each iteration schedules the job j with largest tail. This gives us a schedule , such that jobs are scheduled in nonincreasing order. Then cannot contain an emerging job and by Lemma 2, is optimal. ✷ Lemma 4 Let be a J-schedule with jobs i(i = 1, … , n) with integer release times r i and unit processing times p i = 1 (i = 1, … , n). Then is optimal.
Proof Since the release time r i each job i is an integer number and its processing time is 1, during the execution of that job no other more urgent job may be released. Hence, at each scheduling time t, J-heuristic, among all the released by that time moment jobs, will include one with the largest tail. In addition, in , every job is scheduled at its release time r i or at the completion time of another job. If job o( ) is scheduled at time t = r o( ) , then is optimal by Lemma 1. If o( ) is scheduled at the completion time of another job k so that job o( ) was released before the completion time of that job, then q k ≥ q o( ) . Hence, there may exist no emerging job and is optimal by Lemma 2. ✷ Lemma 5 Let jobs in J = i j j=1, …, n be ordered by a non-decreasing sequence of their release times.
Then is optimal if for any neighboring jobs i j and i j+1 (j = 1, … , n − 1), r i j+1 ≥ r i j + p i j .
Proof By the condition in the lemma, every job i j (j = 1, … , n) is scheduled in in the interval r i j , r i j + p i j . So, the starting time of each job in is t j = r i j , i.e. each job i j begins at its early starting time in . This is true, in particular, for job o( ) and therefore, by Lemma 1, is optimal. ✷ Figure 4 illustrates schedule for an instance possessing the above indicated property.
For the given k job release times, r 1 ≤ ⋯ ≤ r k , let J i i = 1, … , k be the set of jobs released at the time r i .
Theorem 1 For a given instance of problem 1|r j , q j |C max , the initial J-schedule is optimal if o( ) ∈ J 1 .
Proof By the condition, at any scheduling time behind release times r 2 , … r k , job o( ) was released. Then by J-heuristic, for each job i scheduled in before job o( ), q i ≥ q o( ) . Hence, does not contain an emerging job and it is optimal by Lemma 2. ✷ Assume K is any kernel which forms part of some J-schedule S (K can be a kernel of other J-schedule distinct from S). Then we will say that job e ∈ E S is scheduled within kernel K if there is at least one job from that kernel scheduled before and after job e in schedule S.

Lemma 6
If job e is scheduled within kernel K( ) in schedule S then |S| > | |.
Proof First, it is easy to see that no job from kernel K( ) scheduled before job e can be the overflow job in schedule S. Neither job e can be the overflow job in S as it is succeeded by at least one kernel job j ∈ K( ) with q j ≥ q e . Furthermore, no job k scheduled after kernel K( ) can be the overflow job in schedule S as the right-shift of such a job in schedule S cannot be more than that of a more urgent kernel job.

Figure 4. Every job i j is scheduled in the interval
It follows that only a job from kernel K( ) scheduled after job e may be the overflow job in schedule S. But because of the forced right-shift imposed by job e, the job j from kernel K( ) scheduled the last in schedule S cannot complete earlier in schedule S than job o( ) was completed in schedule , i.e. c j (S) ≥ c o( ) ( ). At the same time, by the definition of kernel K( ) job j is no less urgent than job o( ), i.e. q j ≥ q o( ) . Then C j (S) ≥ C o( ) ( ) and hence |S| ≥ | |. ✷ As a consequence of Lemmas 2 and 6 we get the following corollary: Corollary 1 In any schedule better than , an emerging job is rescheduled behind kernel K( ).
4. The NP-hardness of 1|{r 1 , r 2 }, {q 1 , q 2 }|C max From here on, we shall focus our attention on the special case of our problem with only 2 allowable job release times and tails. As we have seen earlier, J-heuristic delivers an optimal schedule whenever we have a single release time or a single tail (or due-date), i.e. the problems 1|q j |C max and 1|r j |C max (1||L max and 1|r j , d j = d|L max ) are solvable in an almost linear time n log n (the general setting 1|r j , q j |C max being strongly NP-hard). Now we show that we arrive at an NP-hard problem by allowing two distinct release times or tails; i.e. the problem 1|{r 1 , r 2 }, {q 1 , q 2 }|C max is already NP-hard. For the convenience, let us consider the version with due-dates 1|{r 1 , r 2 }, {d 1 , d 2 }|L max .
Proof We use the reduction from an NP-hard SUBSET SUM problem for the feasibility version of 1|{r 1 , r 2 }, {d 1 , d 2 }|L max , in which we wish to know if there exists a feasible schedule that meets all job due-dates (i.e. in which all jobs are completed no later than their due-dates). In SUBSET SUM problem we are given a finite set of integer numbers C = {c 1 , c 2 , … , c n } and an integer number B ≤ ∑ n i=1 c i . 1 This decision problem gives a "yes" answer iff there exists a subset of C which sums up to B. Given an arbitrary instance of SUBSET SUM, we construct our scheduling instance with n + 1 jobs with the total length of ∑ n =1 c + 1 as follows.
We have n partition jobs 1, … , n released at time r 1 = 0 with p i = c i , r i = 0 and d i = ∑ n =1 c + 1, for i = 1, … , n. Besides these partition jobs, we have another separator job I, released at time r 2 = B with p I = 1, r I = r 2 and with the due-date d I = B + 1. Note that this transformation creating an instance of 1|{r 1 , r 2 }, {d 1 , d 2 }|L max is polynomial as the number of jobs is bounded by the polynomial in n, and all magnitudes can be represented in binary encoding in O(n) bits. Now we prove that there exists a feasible schedule in which all jobs meet their due-dates iff there exists a solution to our SUBSET SUM problem. In one direction, suppose there is a solution to SUBSET SUM formed by the numbers in set C ′ ⊆ C. Let J ′ be the set of the corresponding partition jobs in our scheduling instance. Then we construct a feasible schedule in which all jobs meet their due-dates as follows (see Figure 5). We first schedule the partition jobs from set J ′ in the interval [0, B] in a nondelay fashion (using for instance, Jackson's heuristic). Then we schedule the separator job at time B completing it by its due-date B + 1 and then the rest of the partition jobs starting from time B + 1 again in a non-delay fashion by Jackson's heuristic. Observe then that the latest scheduled job will be completed exactly at time ∑ n =1 c + 1 and all the jobs will meet their due-dates. Therefore, there exists a feasible schedule in which all jobs meet their due-dates whenever SUBSET SUM has a solution. In the other direction, suppose there exists a feasible schedule S in which all jobs meet their duedates. Then in that schedule, the separator job mist be scheduled in the interval [B, B + 1), whereas the latest scheduled partition job must be completed by time ∑ n =1 c + 1. But this may only be possible if the interval [0, B] in schedule S is completely filled in by the partition jobs, i.e. there must be a corresponding subset J ′ of the partition jobs that fill in completely the interval [0, B] in schedule S (if this interval were not completely filled out in schedule S then the completion time of the latest scheduled partition job would be ∑ n =1 c + 1 plus the total length of the gap within the interval [0, B] and hence that job would not meet its due-date (seeas illustrated in Figure 6). Now clearly, the processing times of the jobs in set J ′ form the corresponding solution to SUBSET SUM. ✷

Tractable special cases of problem 1|{r 1 , r 2 }, {q i }|C max
In Section 4 we have shown that the version of our general problem with two job release times, i.e., the problem 1|{r 1 , r 2 }, {q i }|C max , is NP-hard. In this section we establish some useful properties of an optimal solution to this problem that can be verified in time O(n log n).
Assume that the sequence of jobs {i j }|j = 1, … , m) is enumerated so that the first m jobs of the sequence are ones released at time r 1 and the next n − m jobs are ones released at time r 2 (m < n). We let J 1 and J 2 stand for the set of jobs released at the time r 1 and r 2 , respectively.

Lemma 7 If
∑ m j=1 p i j + r 1 ≤ r 2 then is optimal.
Proof Since ∑ m j=1 p i j + r 1 ≤ r 2 , J-heuristic in the first m iterations will schedule all the jobs released at time r 1 . As the jobs i j , j = 1, … , m) are released simultaneously at the time r 1 , they are scheduled optimally by Lemma 3.
By the condition in the Lemma, all jobs released at the time r 1 are completed by time r 2 , and hence all the jobs in set J 2 are available for scheduling at time r 2 . Then again J-heuristic will schedule all these jobs optimally (Lemma 3). Now clearly, by pasting together the two above partial schedules, we obtain a complete optimal schedule (as if there arises a gap between the two portions of that schedule then it is unavoidable). ✷ Lemma 8 Let k < m be such that for the first k jobs with the largest tails in schedule the equality ∑ k l=1 p i j l = r 2 − r 1 holds. Then is optimal.
Proof We distinguish the following two cases based on the fact that for the first k jobs with the largest tails released at time r 1 , ∑ k l=1 p i j l = r 2 − r 1 is satisfied: In this case ∑ m l=1 p i j l = r 2 − r 1 and by Lemma 7, schedule is optimal (with the equality being hold for any tow neighboring jobs).
Case 2: k < m. Let ′ be the J-schedule for the first k jobs. Since all these jobs are released at the time r 1 , they are scheduled optimally by Lemma 3. Further, since ∑ k l=1 p i j l ≤ r 2 − r 1 , the earliest stating time of the jobs i j k+1 , … , i j m is r 2 . Hence by time r 2 , all the remaining yet unscheduled n − k jobs become simultaneously available. Let ′′ be the J-schedule for these jobs. Since all yet unscheduled jobs are available by time r 2 , ′′ is optimal by Lemma 3. Now let be the J-schedule obtained joining the J-schedules ′ and ′′ . Note that schedule has no gap, hence it consists of a single block. By our construction, there exists no emerging job in schedule Figure 6. A non-feasible schedule (g is the gap and l g is the total length of that gap).
, and it is optimal by Lemma 2. ✷ Below we let i, i ≤ k, be the earliest arisen job from J 1 during the construction of schedule , such that t i + p i > r 2 , and we let q ′ be the largest tail among the tails of the jobs released at time r 2 .
Lemma 9 If q i ≥ q ′ , then is optimal.
Proof As it is easily seen, because q i ≥ q ′ , schedule contains no emerging job and hence is optimal by Lemma 2. ✷ Due to Theorem 1, from now on, let us assume that o( ) ∈ J 2 and that B( ) contains at least one emerging job (otherwise, schedule is optimal by Lemma 2. Proof By the contradiction, suppose that kernel K( ) contains at least one job j ∈ J 1 . Then for all i ∈ J 1 scheduled before kernel K( ), q i ≥ q j (by J-heuristic). As o( ) is the job with smallest tail of kernel K( ) (by the J-heuristic and the definition of kernel K( )), q j ≥ q o( ) and hence, q i ≥ q o( ) . Then schedule may have no emerging job. We came to a contradiction proving our claim. ✷ Observation 3 For problem 1|{r 1 , r 2 }, {q i }|C max , E( ) ⊂ J 1 and for any emerging job e ≠ l, q e ≥ q l .
Proof The first statement follows from the fact that the earliest scheduled job of kernel K( ) in schedule belongs to set J 2 which, in turn, follows from the J-heuristic. The second claim also follows from J-heuristic which schedules all jobs released at time r 1 (in particular, the jobs from E( )) in the non-increasing order of their tails (in particular, up to time r 2 before the jobs of kernel K( )), whereas job l is the latest scheduled one from set E( ) in schedule . ✷

Observation 4
The kernel K( ) contains jobs with the largest tails from set J 2 scheduled in the nonincreasing order of their tails.
Proof By Observation 3, E( ) ⊂ J 1 . By definition the live emerging job, l is the last job scheduled before kernel K( ) released at time r 1 and the first job with completion time greater than or equal to r 2 . There may exist no job of set J 2 scheduled before job l in schedule (job l starts strictly before time r 2 ). Then by J-heuristic, the first job of kernel K( ) must be one with the largest tail from set J 2 and the following jobs must be scheduled in the non-increasing order of their tails. Moreover, all these jobs pertain to set J 2 by Observation 2. ✷ Recall that, for a given J-schedule S, the complementary schedule S l always contains a gap before jobs of kernel K(S), i.e. the earliest scheduled job of K(S) starts at its release time in schedule S l . In general, for any emerging job e ∈ E(S), the complementary schedule S e may contain a gap or not, depending on the length of that job (compared to that of job l). We will see this in more details later.
Observation 5 The order of the jobs scheduled after time r 2 , and before and after job e (particularly that of the jobs of K( )) is the same in both schedules and e .
Proof Note that since all jobs of kernel K( ) and the jobs scheduled after this kernel in were released by time r 2 , J-heuristic should have been scheduled these jobs in the non-increasing order of their tails in schedule . Then J-heuristic will also schedule all the former jobs in the same order in schedule e , i.e. the jobs before job e and after that job (also released by time r 2 ), in particular, ones of kernel K( ) will be included in the same order in both schedules. ✷

Let now J[e]
be the set of all jobs j scheduled after r 2 in such that q e < q j < q o( ) . It follows that all jobs from set J[e] are scheduled immediately after kernel K( ) and before job e in e .

Observation 6 J[e] ⊂ J 2 .
Proof First note that set J [e] has no job with the tail equal to q e . Besides, K( ) ⊂ J 2 and q k > q l , for every job k ∈ K( ). Furthermore, by J-heuristic, for every job j ∈ J 1 scheduled in before K( ), q j ≥ q l , and for every job i ∈ J 1 scheduled after K( ), q i ≤ q l , hence q i ≤ q e as q e ≥ q l and the Observation follows from the definition of set J [e]. ✷ Proposition 1 Without loss of generality, it might be assumed that all the jobs j with q j = q e scheduled after kernel K( ) in are included behind job e in complementary schedule e .
Observation 7 In schedule e , the jobs of kernel K( ) and those of set J[e] are left-shifted by the same amount, whereas all jobs j with q j ≤ q e are right-shifted also by the same amount.
Proof Note that while constructing schedule , J-heuristic schedules all the jobs in the non-increasing order of their tails behind time r 2 (as all of them are released by that time moment). While constructing schedule e , the same set of jobs plus job e are available behind time r 2 . In particular, it is easy to see that if p e ≥ Δ l , all jobs of kernel K( ) and those from set J[e] will be left-shifted by Δ l , and if p e < Δ l this left-shift will equal to p e , whereas any j with q j ≤ q e will be scheduled behind job e and will be right-shifted correspondingly. ✷

Lemma 10
(1) If p e > Δ l , then e has a gap of length p e − Δ l .
(2) If p e ≤ Δ l , then e has no gap.
Proof First note that Δ l is now c l ( ) − r 2 . By the definition of e , no job j ∈ J 1 with q j < q e scheduled after K( ) in will be scheduled before K( ) in e . If p e ≥ Δ l , in schedule e , the jobs of kernel K( ) and of set J[e] will have the left-shift of length Δ l (which is the maximum possible by Observation 1). Then e will have a gap of length p e − Δ l . If p e < Δ l , the jobs of kernel K( ) and those of set J[e] will have a left-shift of length p e , hence e will have no gap. ✷ Due to Lemma 10 we define the gap e in schedule e as follows: for all e ∈ E( ). p j ) − Δ l + p e + q e .
In this case, e has a gap of length e .
If p e ≤ Δ l , then by the definition of set J[e] and the construction of schedule e , the jobs of kernel K( ) and those of set J[e] will be left-shifted by amount p e in schedule e . Therefore, Note that in this case e has no gap. ✷

Consider the following inequality:
Lemma 12 If p e ≥ Δ l and the inequality (1) for job e ∈ E( ) holds, then in S opt job e is scheduled before kernel K( ).
Proof As p e ≥ Δ l , e has a gap by Lemma 10 and kernel K( ) starts at its early starting time r(K( )) = r 2 in schedule e . By inequality (1), C e ( e ) ≥ C o( ) ( ); hence, | | e | | ≥ | |. Then it follows that job e cannot be scheduled after kernel K( ) in schedule S opt and the lemma is proved. ✷

Theorem 3
If p e ≥ Δ l for every e ∈ E( ) and the inequality (1) is satisfied for job e, then is optimal.
Proof Recall that if schedule is not optimal, kernel K( ) must be restarted earlier. This will be possible only if at least one job e ∈ E( ) is rescheduled after kernel K( ). Suppose e is a schedule with a better (smaller) makespan than schedule . Then similarly, it is straightforward to verify that, by the condition of the Theorem, inequality (1) yields C e ( e ) ≥ C o( ) ( ) for every e ∈ E( ). Then by Lemma 12, schedule must be optimal. ✷ Let E S, l = e ∈ E S ⧵ l | p e ≥ p l .
Lemma 13 If the inequality (1) is satisfied for job l, then in S opt any job e ∈ E , l is scheduled before kernel K( ).
Proof By Lemma 12, l is scheduled in S opt before K(S opt ). Let k be the last job scheduled of J [l] in (recall that J[l] is the set of all jobs j scheduled after r 2 in such that q l < q j < q o( ) ). By J-heuristic, job k has the tail less than the jobs of set J [l]. By the definition of the set J[l], without loss of generality we assume that the J-heuristic schedules job l after job k in l . In addition, the starting time of job l must be the completion time of job k in l , i.e. t l ( l ) = c k ( l ) (by Proposition 1 and because by J-heuristic, for any job i scheduled after of k in , q i < q k and therefore q i ≤ q l , by the definition of set J[l]).
It is easy to see that for all e ∈ E , l , e ≥ l (because p e ≥ p l and by the definition of e ). Besides, job k is scheduled after jobs of kernel K( ) in e and job e can be scheduled before or after job k in e . We respectively distinguish the following two cases. If job e is scheduled in e after of job k, the starting time of job e in schedule e is equal to the starting time of job l in schedule l , i.e. t e ( e ) = t l ( l ) since for any job i scheduled after job l in l , q i ≤ q l and q i < q e since q e ≥ q l . As the inequality (1)  p j + q e .
(1)  Proof Suppose first J[e] ≠ �. Consider the set of the emerging jobs from schedule included in between job e and kernel K( ), the jobs of kernel K( ) and ones from set J [e]. Note that these are the jobs which will be included before job e in schedule e . These jobs will be left-shifted by p e time units in the latter schedule ( see Lemma 10). Since job j is one of these jobs, it will also be left-shifted by the same amount and job e will start immediately after after job j in schedule e (if there are jobs scheduled after kernel with the tail equal to q e , they will be included behind job e by Proposition 1). It follows that the completion time of job e in schedule e is equal to that of job j in schedule . This For the first case above (the overflow job o( e ) is scheduled before kernel K( )), again | | e | | ≤ | |. Indeed, any job scheduled before kernel K( ) in schedule must have the full completion time no more than job o( ) (by the definition of the overflow job) whereas the set of all jobs scheduled before kernel K( ) in schedule is the same as that in schedule e except that job e is rescheduled behind kernel K( ) in schedule e . ✷

Observation 11
If p e ≤ Δ l and J[e] ≠ �, then the overflow job in schedule e is: (1) Job k if C k ( ) > C o( ) ( ) − p e and C k ( ) > c j ( ) + q e .
( Proof Below we prove each of these cases using the fact that the overflow job in schedule e is in set {o( ), e, k} (Observation 8).
(1) By the definition of the overflow job in , C o( ) ( ) ≥ C k ( ). Since p e ≤ Δ l , job o( ) will have the left-shift of length p e in e , i.e. C o( ) ( e ) = C o( ) ( ) − p e (By Observation 7 and Lemma 10). By Observation 10, C k ( e ) = C k ( ), and the inequality C k ( ) > C o( ) ( ) − p e implies that C k ( e ) > C o( ) ( e ). By Property 1, c e ( e ) = c j ( ). Hence, the full completion time of job e in e , C e ( e ) = c j ( ) + q e and since C k ( ) > c j ( ) + q e , C k ( e ) > C e ( e ). Then C k ( e ) > C o( ) ( e ) and C k ( e ) > C e ( e ), yields that k is the overflow job in e .
(2) From C o( ) ( e ) = C o( ) − p e and C e ( e ) = c j ( ) + q e (see the proof of the above claim 1), and from c j ( ) + q e > C o( ) ( ) − p e , we get that C e ( e ) > C o( ) ( e ). From C k ( e ) = C k ( ) (Observation 10) and c j ( ) + q e > C k ( ), C e ( e ) > C k ( e ). Then C e ( e ) > C o( ) ( e ) and C e ( e ) > C k ( e ) yields that e is the overflow job in e .
(3) By the definition of the overflow job in , C o( ) ( ) ≥ C k ( ), and we have seen that C o( ) ( e ) = C o( ) ( ) − p e . By Observation 10, C k ( e ) = C k ( ). Then from the inequality We also know that C e ( e ) = c j ( ) + q e . Then inequality . Thus similarly to the above two cases, ( (2) Job e if c o( ) ( ) + q e > C o( ) ( ) − p e and c o( ) ( ) + q e > C k ( ). ( Proof Is analogous to that of Lemma 11. ✷ Theorem 7 Schedule e is optimal if p e < Δ l , k ∈ J 1 and k = o( e ).
Proof Schedule e is better than schedule due to Theorem 6. Moreover, we show that there may exist no better schedule than e . It suffices to consider potential rearrangements in which only the emerging jobs are involved (see Lemma 2). To this end, note first that C o( ) ( ) ≥ C k ( ). In other words, the former kernel K( ) need not be further left-shifted, whereas we show that job k cannot be further left-shifted. Indeed, let S be a schedule in which some emerging job(s) are rescheduled behind kernel K( ). Since k ∈ J 1 , q e ≥ q k for any emerging job e ∈ E( ) (due to J-heuristic). Hence the J-heuristic will include any such emerging job before job k in schedule S. Let us consider the following two possibilities.
(1) If schedule S has no gap, then because of the above observations and due to the fact that the set of jobs scheduled before job k in both schedules e and S is the same, job k is started and completed in schedule S at the same time as in schedule e . Hence, |S| = | e |.
(2) If schedule S has a gap, then since in schedule S all the rescheduled emerging jobs are included before job k, the latter job will be right-shifted by the length of that gap. Then C k (S) > C k ( e ) and hence |S| > | e |.We have showed that there may exist no schedule better than e and the proof is complete (Figure 9). ✷ As we illustrate below with an instance of our problem, the above theorem cannot be extended to the case when k = o( e ) and p e ≥ Δ l , as then we are forced to solve the subset sum problem (see Section 4). Thus the problem bottleneck is reached when these conditions hold. The table below specifies our problem instance. In Figures 10 and 11, illustrating schedule l and an optimal schedule, respectively, for that instance, the numbers within the circles are the full completion times of the corresponding jobs.

Conclusion
Based on the analysis of the J-schedules, we have established formal conditions when an optimal solution can be efficiently obtained. Our analysis yielded strict explicit relationships and polynomial time solution of these particular cases. We have conducted a similar study for an NP-hard spacial case of our generic problem with only two allowable job release times. Due to our conjecture of adaptive production planning, these results may stimulate the development of more efficient production planning allowing a beneficial interaction between scheduling and pre-scheduling phases for the scheduling models with release and delivery times, in particular.
Our study essentially relied on the partition of the whole scheduling horizon into two basic types of intervals containing urgent (kernel) and non-urgent (emerging) jobs, and extracting and treating the conflicts occurring between these two types of intervals. Such an analysis give some practical intuition on the general perspectives and potential conflicts that may occur while using simple heuristic rules for the solution of the problem at scheduling phase. Based on the derived dominance rules, one may assert when such conflicts may be efficiently resolved, and how. A practitioner may either choose to follow these rules for particular real-life instances or even modify some data that might be altered to avoid these conflicts and obtain an optimal solution for a modified instance, adjusting the production to the conditions and dominance rules. A practitioner may also choose to go deeper and expand the given optimality conditions and dominance relations into more complex heuristic methods depending on the nature of the problem instances that arise in his/her particular application.
For future work, it would be interesting to extend the presented results (limited to a single-machine environment) to more general scheduling models such as multiprocessor and shop scheduling.