Single-machine earliness–tardiness scheduling with two competing agents and idle time

ABSTRACT Two-agent scheduling has gained a lot of research attention recently. Two competing agents who have their own objective functions have to perform their respective set of jobs on one or more shared machines. This study considers a two-agent single-machine earliness and tardiness scheduling problem where jobs have distinct due dates and unforced idleness in between any two consecutive jobs is allowed. The objective is to minimize the total earliness and tardiness of jobs from one agent given that the maximum earliness–tardiness of jobs from the other agent cannot exceed an upper bound. In other words, each job from the second agent has a hard due window, whereas each job from the first agent will incur a penalty if completed either before or after its due date. Two mathematical models of the problem are presented, and several necessary optimality conditions are derived. By exploiting the established dominance properties, heuristic algorithms are developed for the problem. Finally, computational experiments are conducted to assess the models and heuristic procedures.


Introduction
Simultaneous use of one or more processing resources by two or more competing agents is a situation that occurs in many manufacturing and service environments. Baker and Smith (2003) and Agnetis et al. (2004) were pioneers who brought the concept of two agents into the field of scheduling. Two agents who have their own objective functions compete to perform their respective jobs on one or more common resources, and the goal is to find a joint schedule for their two sets of jobs. A two-agent scheduling problem can be viewed as a Pareto-optimization problem or as a constrained optimization problem. In the latter case, the goal is to find a joint schedule that optimizes the objective function of one agent with the restriction that the objective function of the second agent cannot exceed a given bound. Also, in the Pareto-optimization case, a two-agent scheduling problem is different from a classical bi-objective scheduling problem in that all jobs do not contribute to both objectives. For more details on scheduling with two or more agents, the reader is referred to Agnetis et al. (2014).
Single-machine scheduling problems with a single agent have received considerable attention and a lot of articles exist concerning these problems (e.g. Birgin and Ronconi 2012;Tseng and Chen 2013). However, it seems that work remains to be done concerning two-agent single-machine scheduling problems. Recently, Choi and Chung (2014) considered two two-agent single-machine scheduling problems with the objective of minimizing either the total weighted completion times or the weighted number of tardy jobs of one agent while maintaining the weighted number of on-time jobs of the other agent above a given threshold. They established the complexities of a variety of special cases for the two problems, depending on the conditions of processing times and weights. More recently, Oron, Shabtay, and Steiner (2015) studied two-agent single-machine scheduling problems with equal job processing times. In addition to providing polynomial time procedures, they provided the complexity classification of different variants of the problems. Yin et al. (2013a) considered two-agent scheduling on a single machine in which jobs have different release times. For the problem with the objective of minimizing the number of tardy jobs from one agent subject to an upper bound on the maximum lateness of the other agent's jobs, they provided branch-and-bound and simulated annealing algorithms. A similar study was carried out by Yin et al. (2015c). Moreover, Wang et al. (2015b) presented a branch-and-bound algorithm for a similar problem with the objective of minimizing the sum of the maximum weighted completion time of the first agent and the total weighted completion time of the second agent. Furthermore, some researchers have brought the ageing and learning effects (Yin, Cheng, and Wu 2012;Wu, Lee, and Liou 2013;Gawiejnowicz and Suwalski 2014;Choi 2015;Yin et al. 2015a), due date assignment (Wang et al. 2015a(Wang et al. , 2015cYin et al. 2015b) and batch delivery (Yin et al. 2016) into the two-agent scheduling.
Most of the research concerning scheduling with two or more competing agents has considered regular objective functions, i.e. increasing functions of the job completion times. However, only a few articles in the literature have investigated multi-agent scheduling with objective functions that are not necessarily increasing with the job completion times, namely, non-regular objective functions. Mor and Mosheiov (2010) dealt with two two-agent single-machine scheduling problems with the objective of minimizing either the maximum earliness or the total weighted earliness of one agent, subject to an upper bound on the maximum earliness of the other agent. They introduced a polynomial-time algorithm for the first problem and a heuristic for the other. Yin, Cheng, and Wu (2012) and Yin et al. (2015a) studied similar problems in which the job processing times are subject to change due to deterioration phenomena, and proposed dominance properties and polynomial-time algorithms for the problems with the objective of minimizing the maximum earliness cost, the total earliness cost or the total weighted earliness cost of the first agent. Gerstl and Mosheiov (2013) considered two-agent scheduling on a single machine and on identical/uniform parallel machines, where the objective is to minimize the total weighted earliness-tardiness of one agent, subject to an upper bound on the maximum weighted earliness-tardiness of the other agent. Focusing only on the setting of identical job processing times as well as a common due date, they presented several dominance properties, and showed that the problems are polynomially solvable. Yin et al. (2013b) developed branch-andbound and simulated annealing algorithms for a two-agent single-machine scheduling problem with the objective of minimizing the total weighted earliness cost of all jobs, subject to an upper bound on the earliness cost of one agent. Cheng (2014) considered similar problems with the objective of minimizing a certain objective function such as the maximum earliness cost, total weighted earliness cost and total weighted earliness-tardiness cost of all jobs, subject to an upper bound on a certain objective function of one agent such as the maximum/total earliness cost, maximum/total tardiness cost and total earliness-tardiness cost. The author provided a polynomial-time algorithm for the maximum earliness cost case and NP-hardness proofs for the total weighted earliness cost and total weighted earliness-tardiness cost cases. More recently, Shabtay, Dover, and Kaspi (2015) provided complexity results and polynomial-time algorithms for some single-machine two-agent scheduling problems, where at least one of the agent's objectives is to maximize the weighted number of jobs completed exactly at the due date, thus avoiding both earliness and tardiness.
This article investigates a two-agent single-machine earliness and tardiness scheduling problem in which jobs have distinct due dates and unforced idleness is allowed. The objective of this problem, which is viewed as a constrained optimization problem, is to minimize the total earliness and tardiness of one agent, subject to a given upper bound on the maximum earliness-tardiness of the other agent. Earliness-tardiness criteria reflect the just-in-time objective, since both early and tardy jobs incur penalties. In the earliness-tardiness scheduling problems, specifying an order in which to execute the jobs is not enough, since it may be advantageous to have periods of unforced idleness (Hoogeveen 2005). The two-agent single-machine earliness and tardiness scheduling problem under consideration is an extension of the unweighted version of the single-machine problem investigated by Gerstl and Mosheiov (2013); rather than focusing on the special case of identical jobs, that is, jobs with equal processing times, and a common due date, the present article takes into account the general case of job-dependent processing times and due dates. The problem is mathematically modelled and then a number of dominance properties providing necessary conditions for any given solution to be optimal is derived. Moreover, by exploiting the dominance properties, some heuristic algorithms that allow unforced idleness are proposed to solve the problem.
The rest of the article is organized as follows. In the next section, the problem is described and formulated. Section 3 is devoted to the derivation of several dominance properties. In Section 4, heuristic algorithms are proposed to solve the problem, followed by Section 5 providing computational results. Finally, Section 6 concludes the article and points to future work.

Problem definition
There are n non-preemptive jobs belonging to two competing agents to be scheduled on a single machine. The machine is continuously available and can process at most one job at any point in time. Moreover, there is no need for set-ups, and all the jobs are available at time zero. Following Agnetis et al. (2004), the two agents are denoted by A and B, and their respective sets of jobs by J A and J B , respectively. The sets J A and J B contain n A and n B jobs, respectively (with n A + n B = n). Associated with each job j belonging to J A or J B is a processing time p j and a due date d j .
The objective is to find a joint schedule for the job sets J A and J B that minimizes the total earliness and tardiness of the jobs belonging to J A , with the restriction that the maximum earliness-tardiness of the jobs belonging to J B cannot exceed a given bound Q. Using the three-field notation scheme extended by Agnetis et al. (2004), this problem is denoted by 1|| j∈J A (E j + T j ) : max j∈J B (E j + T j ) ≤ Q, where, E j and T j denote the earliness and tardiness of job j, respectively. For a given feasible schedule to the problem, E j = max{0, d j − C j } and T j = max{0, C j − d j }, where C j denotes the completion time of job j; clearly, E j T j = 0 for every j. The objective function considered is non-regular; that is, it is not necessarily non-decreasing in the completion times of the jobs belonging to J A . Because of the different due dates, it may be advantageous to have periods of unforced idleness in between consecutive jobs; this means that inserting idle times is necessary in addition to finding a job sequence. As a result, existing methods for two-agent single-machine scheduling (including exact methods and heuristics) that only find a job sequence cannot solve this problem.
for every job j belonging to J B . In other words, each job from agent B has a hard due window, whereas each job from agent A may be completed at any time, although it will incur a penalty if completed either before or after its due date. As a result, if the value of Q is selected to be zero, a schedule is feasible only if all the jobs belonging to J B are on time.
The problem described above has many real-life applications. For instance, consider a facility that produces perishable products for two types of customer, where each job from one customer should be finished as close to its due date as possible (otherwise it is penalized), while each job from the other customer has a hard customer due window. As another real-world application, consider a machine that has to process jobs from an agent, each of which incurs a penalty if completed either before or after its due date (like, for example, a perishable product). In addition, there is a number of preventive maintenance activities to be performed, each of which has to be completed at a given due window; these activities can then be interpreted as the jobs from agent B. Furthermore, this kind of scheduling problem may be found in transportation situations that involve two agents owning their transportation resources (such as trains or planes), since it may be the case that a penalty is incurred if the departure of a resource belonging to one agent does not occur at a predetermined time, while the departure of a resource belonging to the other agent has to occur in a predetermined time window. Du and Leung (1990) proved that the single-agent single-machine scheduling problem with distinct due dates and the objective of minimizing the total tardiness is NP hard. Since this problem is not harder than the problem with the objective of minimizing the total earliness and tardiness, even the single-agent case of the problem considered here is NP hard. Note that every single-machine earliness and tardiness problem without simplifying assumptions is clearly NP hard too. However, some special cases with simplifying assumptions have been shown to be polynomially solvable, such as the single-agent problem with identical job processing times (Garey, Tarjan, and Wilfong 1988) or with a large common due date (Kanet 1981).

Mathematical formulation
In this subsection, the problem is formulated using two different approaches, namely the positionbased and sequence-based approaches.
To formulate the problem using the position-based approach, the following decision variables are introduced: C k Completion time of the job assigned to position k, for k = 1, . . . , n X jk 1, if job j is processed as the kth job; 0, otherwise The problem can then be formulated as the following position-based mathematical model: subject to: where C 0 = 0. The objective function (1) minimizes the total earliness and tardiness of the jobs belonging to J A . Constraints (2) ensure that the maximum earliness-tardiness of the jobs belonging to J B cannot exceed the bound Q. Constraints (3) make sure that only one job is assigned to each position, and constraints (4) that each job is scheduled only once. Constraints (5) ensure that the processing of the job assigned to each position k cannot start before the processing of the job assigned to position k -1 is completed. Finally, constraints (6) specify that the decision variables X jk are binary.
To formulate the problem using the sequence-based approach, however, the following decision variables are used: First, the problem is formulated as the following disjunctive programming model: subject to: The objective function (7) minimizes the total earliness and tardiness of the jobs belonging to J A . Constraints (8) ensure that the maximum earliness-tardiness of the jobs belonging to J B cannot exceed the bound Q. Disjunctive constraints (9) make sure that the processing of each job may only start after the processing of the previously scheduled jobs has been completed.
Denoting by M a big number, disjunctive constraints (9) can then be reduced to the following conjunctive constraints, thus providing the sequence-based mathematical model of the problem under consideration. As can be seen, the pair of constraints (10) enforces that either job j precedes job j (i.e. X jj = 0) or job j precedes job j (i.e. X jj = 1).
The position-based and sequence-based models would, respectively, have 3n + n B n and n 2 − n + n B constraints as well as n 2 and (n 2 − n)/2 binary variables, while both require the same number of n continuous variables. The sequence-based model obviously needs fewer than half the binary variables required by the other model, although it may need more constraints in addition to possessing big M constraints. However, to recognize which model is easier to solve in practice, they are numerically compared in Section 5.

Necessary optimality conditions
In this section, several dominance properties providing necessary conditions for any given solution to be optimal are derived.
As mentioned earlier, in the earliness-tardiness problem under consideration specifying an order in which to process the jobs is not enough, since it may be advantageous to have periods of unforced idleness. As the objective function is not necessarily non-decreasing in the completion times of the jobs belonging to J A , it can easily be seen that the machine may be kept idle while a job is waiting for processing; that is, the optimal solution to the problem is not necessarily non-delay.
Property 1: Given a feasible schedule in which there are two adjacent jobs j and j belonging to J A , with j following j and p j ≥ d j − d j , there should be no idleness in between the processing of these two jobs.
Proof: Suppose by contradiction that there is an idle time between two adjacent jobs j and j belonging to J A (thus, C j < C j − p j ), and p j ≥ d j − d j . There are three cases to be considered.

Case 1: d j ≤ C j
Job j is on time or tardy, and from p j ≥ d j − d j , job j is not completed at its due date, i.e. it is tardy; as a result, the objective can be reduced by processing job j earlier and eliminating the idle time (thus processing job j at C j ).
Job j is early, and regardless of whether job j is on time, early or tardy, the objective can clearly be reduced by postponing the processing of job j and eliminating the idle time (thus completing job j at C j − p j ).
Job j is early, while fromp j ≥ d j − d j , job j is tardy; as a result, the objective can be reduced by postponing the processing of job j by d j − C j and then processing job j at the completion of job j, i.e. at d j (thus eliminating the idle time).
Therefore, in all cases the schedule with no idleness in between the processing of the two jobs is better than the original schedule.
It is easy to show that even when one or both adjacent jobs belong to J B , the schedule with no idleness in between the two jobs remains feasible and would be at least as good as the original schedule; that is, regardless of whether the two adjacent jobs belong to J A or J B , Property 1 holds. However, in searching for an optimal schedule, attention is restricted to the set of schedules satisfying Property 1 only for the jobs belonging to J A .
The following corollary then follows immediately.

Corollary 1:
In any optimal schedule, if there is unforced idleness in between the processing of two adjacent jobs j and j belonging to J A with j following j, then p j < d j − d j .
Property 2: Given a feasible schedule in which, after the processing of a job j belonging to J A , the machine is idle for a time period I, if d j > C j , job j should be scheduled to complete at C j + min{I, d j − C j }.
Proof: From d j > C j , job j is early, and postponing its processing by min{I, d j − C j }, regardless of whether it becomes early or on time, reduces the objective.
Property 3: Given a feasible schedule in which, before the processing of a job j belonging to J A , the machine is idle for a time period I, if d j < C j , job j should be scheduled to complete at C j − min{I, C j − d j }.
Proof: From d j < C j , job j is tardy, and shifting it earlier by min{I, C j − d j }, regardless of whether it becomes tardy or on time, reduces the objective. Now, suppose that S 1 denotes a feasible schedule in which there are two adjacent jobs j and j , with j following j. Let I be the idle time between the two jobs (of course, I may be zero). Denoting by t the starting time of job j, the completion times of jobs j and j in S 1 are C j (S 1 ) = t + p j and C j (S 1 ) = C j (S 1 ) + I + p j , respectively. Assume that S 2 denotes the same schedule in which adjacent jobs j and j are interchanged with the idle time I in between, and all other jobs are completed at the same time as in S 1 . The completion times of jobs j and j in S 2 are then C j (S 2 ) = t + p j and C j (S 2 ) = C j (S 2 ) + I + p j , respectively. Obviously, C j (S 1 ) = C j (S 2 ). Depending on whether jobs j and j belong to J A or J B , the three following cases in which at least one of the two jobs belongs to J A are then considered.
Case 1: Both jobs j and j belong to J A In this case, since all the jobs belonging to J B are completed in S 2 at the same time as in S 1 , schedule S 2 is feasible, too.
Property 4: If d j ≤ t + p j , d j ≤ t + p j and p j > p j , then S 2 dominates S 1 .
Proof: From d j ≤ t + p j and d j ≤ t + p j , both jobs j and j are tardy in S 1 as well as in S 2 (as job j is tardy in S 1 , from Property 3 it is easy to show that I = 0). Then, the contributions to the objective function of jobs j and j under S 1 and S 2 are From p j > p j , we have Thus, S 2 dominates S 1 .
The proofs of Properties 5-11 are omitted since they are similar to the proof of Property 4.
Property 5: If d j ≤ t + p j , t + p j ≤ d j ≤ t + p j + I + p j and 2t + p j > 2d j − p j , then S 2 dominates S 1 .
Property 6: If t + p j ≤ d j ≤ t + p j + I + p j , d j ≤ t + p j and 2d j − p j > 2t + p j , then S 2 dominates S 1 .
Property 9: If d j ≥ t + p j + I + p j and d j ≤ t + p j , then S 2 dominates S 1 .
Property 10: If t + p j ≤ d j ≤ t + p j + I + p j ≤ d j and 2t + 2I + p j > 2d j − 3p j , then S 2 dominates S 1 .
Property 11: If d j ≥ t + p j + I + p j , d j ≥ t + p j + I + p j and p j < p j , then S 2 dominates S 1 .
Case 2: Job j belongs to J A and job j to J B In this case, schedule S 2 remains feasible if E j (S 2 ) + T j (S 2 ), i.e. |C j (S 2 ) − d j |, does not exceed Q.
Property 12: If 2d j − 2p j > 2t + I + p j and d j − Q ≤ t + p j , then S 2 dominates S 1 .
This means that S 2 is feasible too. From 2d j − 2p j > 2t + I + p j , we have d j > t + p j ; that is, job j is early in S 1 , while it may be early or tardy in S 2 (job j does not contribute to the objective function). So, the contribution to the objective function of job j under S 1 is E j (S 1 ) = d j − t − p j . If job j is early in S 2 , its contribution to the objective Thus, S 2 dominates S 1 .
Case 3: Job j belongs to J B and job j to J A Again, to show that S 2 dominates S 1 , it is necessary to first show its feasibility; schedule S 2 remains feasible if E j (S 2 ) + T j (S 2 ), i.e. |C j (S 2 ) − d j |, does not exceed Q.
Property 13: If 2d j − 2p j < 2t + I + p j and d j + Q ≥ t + p j + I + p j , then S 2 dominates S 1 .

Proof:
The proof is similar to that of Property 12.

Proposed solution methods
Owing to the NP-hardness of the problem under consideration, the mathematical models presented in Section 2 can only achieve optimal solutions for small instances. It is therefore necessary to develop heuristic procedures that produce reasonably good schedules for large problem instances within a reasonable amount of time. As mentioned earlier, unlike existing algorithms for two-agent singlemachine scheduling, a method to solve this problem has to find an order in which to sequence the jobs as well as the job starting times.
Before describing the algorithms proposed to heuristically solve the problem, it is necessary to explain how the derived dominance properties can be applied to enhance the quality of a given feasible schedule. They test whether the schedule satisfies the necessary optimality conditions. If a given property is satisfied, the schedule is then properly modified. The application of the dominance properties may result in a schedule better than the original one, even though the resulting schedule may not be optimal. Denoting by Job[k] the kth job in a given feasible schedule, the dominance properties are employed as a neighbourhood search strategy in the following manner. Improvement procedure: Step 1. For k = 1 to n, consider shifting Job[k] later or earlier through Property 2 or 3 if it belongs to J A .

3.2.
For k = Pos_active to n -1, if at least one of Job [k] and Job[k + 1] belongs to J A and one of Properties 4-13 is satisfied when interchanging these two jobs, do the following: a. Interchange Job [k] and Job[k + 1] (with the initial idle time in between). b. For k = k and then k + 1, consider shifting Job[k ] later or earlier through Property 2 or 3 if it belongs to J A . c. Set Active = 1 and count = count + 1. d. If count = 1, set Pos_active = k -1; set Pos_active = 1 if k = 1.
The first step of the improvement procedure attempts to modify the starting times of the jobs belonging to J A from left to right through Property 2 or 3. Doing this, it is easy to see that the resulting schedule satisfies Property 1 as well. This step serves as a timing algorithm for the original job sequence. Starting from the beginning of the schedule, the procedure then considers interchanging any two adjacent jobs through one of Properties 4-13. Whenever an interchange results in an improvement, the two jobs are interchanged with the initial idle time in between, although the procedure immediately attempts to modify the starting time of each of them that belongs to J A through Property 2 or 3. As a result, the procedure always maintains a schedule that satisfies Properties 1-3. The improvement procedure then continues until no further improvement can be achieved; obviously, it results in a schedule that satisfies all the necessary optimality conditions. It is easy to show that the time complexity of the improvement procedure, dictated by Step 3, is bounded by O(n 2 ).
To generate a feasible solution to the problem, a schedule construction algorithm (SCA) is employed based on the earliest due date (EDD) rule. In SCA, every job j belonging to J B is first scheduled randomly so as to complete at [d j − Q, d j + Q], and then, the jobs belonging to J A are selected to be added to the schedule by taking their due dates into account. First, a list of the jobs belonging to J A is created based on the EDD rule. Starting from the top going down, each job is then removed from the list with probability pr, and put in the idle periods occurring in the schedule randomly; with probability 1pr it remains in the list. The process repeats until all jobs are scheduled. Following preliminary experiments, the probability pr is set to 0.7; the worst performance has been observed for pr > 0.75, while for values between 0.5 and 0.75 the algorithm performance is not affected considerably by pr.
Now consider a simple heuristic (SH), that simply uses a random search strategy hybridized with the dominance properties to solve the problem. That is, a number NS max of schedules is constructed using SCA and then the quality of every generated schedule is enhanced by implementing the improvement procedure, having a role in the intensification of the search. The contribution of SCA can be observed by comparing the performance of SH with a heuristic in which the jobs belonging to J A are selected to be added to the schedule arbitrarily (and not by taking their due dates into account).
To efficiently solve the problem, however, three more advanced solution procedures are proposed which, unlike the simple algorithm SH, utilize an additional means for intensifying the search; that is, after applying the improvement procedure to a newly generated schedule, a local search is performed with the hope of attaining an improved schedule, as follows. A number n of neighbouring schedules is iteratively produced by applying perturbations to the current schedule and then enhancing the quality of each neighbouring schedule through the improvement procedure. To exploit locally promising regions, however, once a better schedule is obtained, it becomes the current schedule and the local search is repeated. As a result, the local search is terminated when no improvement in the current schedule is observed over the n iterations. The general structure of the advanced heuristics, called AH1, AH2 and AH3, can then be summarized as follows: Step 1. Set No_Schedules = 1.
Step 2. While No_Schedules ≤ NS max , do the following: 2.1. Construct a feasible schedule by using SCA.

2.2.
Apply the improvement procedure to the generated schedule; denote by Sch the resulting schedule. 2.3. Set No_Neighbours = 1. 2.4. While No_Neighbours ≤ n, do the following: a. Generate a neighbouring schedule by applying perturbations to Sch. b. Apply the improvement procedure to the neighbouring schedule. If the resulting schedule is better than Sch, replace Sch by the resulting schedule and set No_Neighbours = 1; otherwise, increment No_Neighbours by one.

Increment No_Schedules by one.
Step 3. Return the best schedule found.
In AH1, the perturbation is generated by the insertion operator. In other words, to produce a schedule in the neighbourhood of the current schedule, one of the jobs belonging to J A is randomly selected and inserted immediately before another randomly chosen job which may belong to J A or J B . To clarify, consider job j belonging to J A is selected to be inserted before job j and after job j (i.e. j is the job preceding job j in the current schedule). In the case where the idle time between jobs j and j is smaller than p j , job j is first shifted to the left as early as possible if it belongs to J B , and then, job j is inserted immediately before job j by postponing the processing of j and some later jobs, if necessary. It is noted that the application of the improvement procedure to the neighbouring schedule may then cause the starting times (as well as the positions) of job j and the other jobs belonging to J A to be adjusted. However, if it is not possible to construct a feasible schedule by inserting job j before j , the perturbation is regenerated.
AH2 proceeds similarly to AH1 with the difference that the perturbation is larger, as it is generated through a multiple application of the swap operator. That is, to produce a schedule in the neighbourhood of the current schedule, Job [1] and Job [2] are interchanged-with the initial idle time in between-with a predefined probability; whether they are interchanged or not, the interchange of Job [2] and Job [3] is then considered, and so on. Following preliminary experiments, two adjacent jobs are interchanged with a probability of 0.5 if both belong to J A , with a probability of 1 if both belong to J B , and with a probability of 0.8 otherwise. Nevertheless, in the cases where at least one of the two adjacent jobs belongs to J B , interchanging is considered only if the resulting schedule remains feasible. The contribution of this swap-based operator against the insertion operator can be clearly observed by comparing the performance of AH2 with AH1. It is noted that preliminary experiments have shown that a single application of the swap operator by which just two adjacent or non-adjacent jobs in the current schedule are swapped provides a rather poor performance compared to the insertion operator (since this schedule is an output of the improvement procedure, swapping only two adjacent jobs, where at least one of them belongs to J A , may not lead to a better schedule).
Finally, in AH3 the perturbation is generated by both the insertion and swap-based operators; that is, each time a neighbouring schedule has to be generated, one of the two operators is probabilistically selected. Following preliminary experiments, the insertion and swap-based operators are selected to be applied with the same probability; the worst performance has been observed when the insertion operator is selected with a probability larger than 0.6, while setting its selection probability to a value between 0.3 and 0.5 does not affect significantly the performance of the algorithm.

Computational results
Computational experiments are conducted in this section to assess the performance of the positionbased and sequence-based models and the three proposed heuristics. The algorithms have been coded in Visual C++ and run on a 2.27 GHz Pentium IV processor with 2 GB of RAM. In addition, the mathematical models have been implemented in CPLEX 11. The job processing times are uniformly sampled from the range [1, 100]. The job due dates are drawn from a uniform distribution between (1 − TF − RDD/2)P total and (1 − TF + RDD/2)P total , where P total is the total processing time of all the jobs, TF is the tardiness factor, and RDD is the relative range of the due dates. Following Cheng et al. (2011), the combination (TF, RDD) takes the values (0.25, 0.5), (0.25, 0.75), (0.5, 0.5) and (0.5, 0.75). Moreover, the upper bound Q is 10n, and the proportion of jobs from agent A, denoted by PJA, takes the values 0.4, 0.5 and 0.6. Accordingly, there are 12 instances for a given problem size.
The computational experiments are conducted in two parts. The first part of the experiments is to compare the performance of the position-based and sequence-based models. A number of problem instances with sizes ranging from 4 to 10 jobs is generated, where there are two instances for each problem size (two out of 12 instances have been selected at random). The mathematical models are allowed to solve the problem instances within the maximum computational time of 1000 s. The results obtained are shown in Table 1.
From Table 1, it can be observed that both models are capable of optimally solving all the instances with up to seven jobs. However, as the number of jobs increases, the position-based model is unable to optimally solve the instances within the time limit imposed, while the other model obtains optimal solutions very quickly. As a result, when evaluating and comparing the performance of the proposed algorithms, the sequence-based model providing much better performance serves as a benchmark.
In the second part of the experiments, a number of problem instances in seven different sizes ranging from 10 to 100 jobs is generated. In the experiments, NS max is set to 10,000 for the instances with up to 30 jobs, and to 20,000 for those with a larger number of jobs. Each heuristic has been run five independent times for each problem instance, and the minimum, average and maximum of the objective values obtained have been provided. In addition, the sequence-based model is allowed to solve the problem instances within the maximum computational time of 7200 s. For a given problem instance, the quality of a solution obtained by any of the alternatives is then measured by the mean percentage difference from the best found solution. Besides, the 12 instances for the same problem size have been averaged, best values are indicated in bold, and the (average) central processing unit (CPU) times are in seconds. First, to observe the contribution of SCA, the performance of SH is compared with a heuristic, called SH-EDD, in which the jobs belonging to J A are selected to be added to the schedule arbitrarily and not based on the EDD rule. A comparison between SH and SH-EDD is given in Table 2.
From Table 2, it can be observed that SH is capable of attaining better solutions in almost the same CPU time, in particular for the instances with 20 or more jobs. This performance comparison can serve to validate the effectiveness and efficiency of SCA.
A comparison between the sequence-based model and the three more advanced heuristics is then given in Table 3; the detailed results can be found in the supplementary file. It is noted that CPLEX is capable of attaining optimal solutions for all of the instances with up to 15 jobs and for nine out of 24 instances with 20 or 30 jobs. As the number of jobs increases, however, it fails to find optimal solutions within the time limit imposed; for six out of 24 instances with 70 or 100 jobs, CPLEX has failed to identify even a feasible solution. Moreover, in some cases CPLEX has terminated before the time limit is spent owing to memory limitations. In addition, AH1, AH2 and AH3, which exploit an additional means for intensifying the search, are vastly superior to SH in terms of solution quality, although SH requires a much shorter computation time.
From Table 3, it can be observed that AH2 is capable of finding better solutions than AH1, but at the expense of more computational effort, as the perturbation generated by a multiple application of the swap operator clearly requires more CPU time than the perturbation generated by a single application of the insertion operator. However, when comparing AH2 and AH3, AH3, which makes use of both the insertion and swap-based operators with the same probability, produces much better solutions in a shorter time; its relative performance becomes better as the problem size becomes larger. In particular, AH3 is capable of achieving optimal solutions for 31 out of 33 instances whose optimality has been verified by CPLEX. It is noted that the experimental results show that TF, RDD and PJA have no clear influence on the performance of AH3. Finally, to investigate the contribution of the derived dominance properties to the performance of AH3, a comparison is performed between AH3 and AH3 without Properties 4-13, called AH3-P(4-13), in which Properties 4-13 are not incorporated, i.e. only the first step of the improvement procedure is applied. Recall that, given a feasible schedule, the first step of the improvement procedure determines the timing of the processing of the jobs belonging to J A through Property 2 or 3, so that the resulting schedule satisfies Property 1 as well. This step is the only component of AH3 that serves as a timing process, and consequently, incorporating Properties 1-3 is essential for the quality of AH3; that is, their contribution to the performance of AH3 is clear. Nevertheless, since the insertion and swap-based operators consider job interchanges, a question that may arise is whether AH3 does not perform better without incorporating Properties 4-13 but with generating an additional number NS max of schedules using SCA (recall that the improvement procedure considers interchanging any two adjacent jobs through one of Properties 4-13). Accordingly, to make a proper comparison, NS max in AH3-P(4-13) has been set to a value larger than 10,000 for the instances with up to 30 jobs and larger than 20,000 for those with a larger number of jobs, such that AH3-P(4-13) terminates when the time spent by AH3 is reached. A comparison between AH3 and AH3-P(4-13) is then given in Table 4.
From Table 4, it can be observed that AH3 is capable of achieving significantly better results (in the same CPU time) for all problem sizes; even the worst results achieved by AH3 are better than the best results of AH3-P(4-13). As the number of jobs increases, the performance of AH3-P(4-13) deteriorates further and substantially. This very poor performance is, of course, due to the lack of a sufficient search depth. Hence, to achieve an appropriate balance between restarting and search depth, thus increasing the algorithm's performance, it is required to embed Properties 4-13 in the improvement procedure.

Conclusion and future work
This article considers a two-agent single-machine earliness and tardiness scheduling problem with job-dependent due dates, where unforced idleness is allowed. The objective is to find a joint schedule for the jobs of both agents so as to minimize the total earliness and tardiness of jobs from the first agent with the restriction that the maximum earliness-tardiness of jobs from the second agent cannot exceed a given bound. Indeed, each job from the first agent will incur a penalty if it is not completed exactly on its due date, while each job from the second agent has a hard due window. The problem is formulated using the position-based as well as the sequence-based approach, and then, several dominance properties providing necessary conditions for any given schedule to be optimal are established. To efficiently solve this NP-hard problem, some heuristic procedures are proposed in which the dominance properties are incorporated as a neighbourhood search strategy. It is demonstrated, through computational experimentation, that the sequence-based model provides much better performance than the position-based model, although it can only achieve optimal solutions for small instances. Moreover, computational experiments based on randomly generated instances of the problem suggest that the proposed heuristic procedure, which makes use of both the insertion and swap-based operators to generate the perturbation, is able to obtain optimal or near-optimal solutions within a reasonable amount of time.
Determining the optimal schedule to the problem considered here is very hard, as the optimal schedule in the class of non-delay schedules does not necessarily remain optimal after allowing unforced idleness; that is, the problem is to optimize the job sequence and the job starting times simultaneously. Therefore, it remains a challenging future research topic for proposing an exact algorithm, based on branch-and-bound, for example. A branch-and-bound algorithm to explore an optimal solution to this problem may be constructed as follows. The branching procedure may be based on developing the schedule from the beginning. However, given a partial or complete sequence at a node, a timing algorithm is required to optimally insert idle times, i.e. to determine the starting times of the jobs scheduled at that node; Properties 1-3 can be embedded in such an algorithm. To speed up the search process, in addition to applying Properties 4-13 to eliminate dominated partial schedules, a tight lower bound has to be established for the total earliness and tardiness of unscheduled jobs that belong to J A . It is also required to test whether it is possible to generate a feasible schedule at a node; if some job belonging to J B (even those not yet scheduled) cannot be completed at its due window, the node is discarded. Finally, it is noted that the search process may be further speeded up using the third advanced heuristic proposed here to obtain an initial incumbent solution, thus starting initially with a good upper bound.

Disclosure statement
No potential conflict of interest was reported by the authors.