1 Introduction

The scheduling measure considered in this note is that of total absolute deviation of completion times (TADC). This measure arises in many service systems, where the main objective is to provide customers with identical or similar quality of service. It reflects their total time-in-system or total waiting time. TADC was introduced by Kanet (1981). He showed that minimizing TADC on a single machine can be solved in \(O\left( {n\log n} \right) \), where n is the number of jobs. A number of extensions have been published: Mosheiov (2008) solved TADC on a single machine and on parallel identical machines with position-dependent job processing times. Oron (2008) and Li et al. (2009) focused on minimizing TADC on a single machine with simple linear deterioration of the job processing times. Koulamas and Kyparisis (2008) studied TADC with past-sequence-dependent setup times. Yang and Kuo (2009, 2010) considered TADC with both time-dependent increasing processing times (deterioration) and position-dependent decreasing processing times (learning). A further extension to parallel identical machines and deteriorating jobs was studied by Huang and Wang (2011). Mani et al. (2011) also studied TADC with past-sequence-dependent setup times and learning, and focused on parametric analysis of the learning index. Mor and Mosheiov (2011) solved TADC on uniform and unrelated machines, and also studied a more general bi-criteria objective function (containing a linear combination of TADC and total completion time). Chen et al. (2015) studied the same bi-criteria objective with past-sequence-dependent setup times and a learning effect. Recently, Ben-Yehoshua et al. (2015) focused on minimizing TADC on a two-machine no-wait proportionate flowshop.

In this note we study a scheduling problem with the TADC objective in a more general setting. First, we allow the option of job-rejection, which became a popular topic among researchers in recent years. This is reflected in the recently published survey of Shabtay et al. (2013). Shabtay et al. claim that “in many practical cases, mostly in highly loaded make-to-order production systems, accepting all jobs may cause a delay in the completion of orders which in turn may lead to high inventory and tardiness cost. Thus, in such systems, the firm may wish to reject the processing of some jobs by either outsourcing them or rejecting them all together”. Technically, in scheduling models considering rejection, the rejected jobs are penalized, and this cost becomes a factor in the objective function (in addition to the cost of a standard classical scheduling measure). Some of the very recent papers dealing with various models of scheduling with job-rejection are: Thevenin et al. (2015), Ou et al. (2015), Wang et al. (2016), Mor and Mosheiov (2016), Zhong et al. (2017) and Agnetis and Mosheiov (2017), Gerstl and Mosheiov (2017), Gerstl et al. (2017) and Mosheiov and Strusevich (2017).

Secondly, following another popular topic in scheduling research, we consider position-dependent job processing times. Scheduling problems with variable job processing times (either starting-time-dependent or position-dependent) have attracted many scheduling researchers in recent years; see e.g. Gawiejnowicz (2008) and more recently Rudek (2012), Sun et al. (2013), Agnetis et al. (2014), Gerstl et al. (2017) and Pei et al. (2017). In most cases, such extensions increase significantly the complexity of the problems, even if the processing times are restricted either to monotone functions of the job starting times or the job positions (reflecting aging or learning), or to specific functions (such as linear or exponential). In this study, we consider general position-dependent processing times, and thus no restrictions on their functional form are assumed. Finally, the machine setting assumed in this note is that of parallel unrelated. Thus, the processing time of a job is a function of: (1) the job itself, (2) the machine to which it is assigned, and (3) the position in the sequence processed on this machine.

In summary, in this note we consider a more general version (than those published so far) of a scheduling problem with a TADC objective. Specifically, we extend TADC in three aspects simultaneously: we minimize TADC (1) on parallel unrelated machines, with (2) general position-dependent job processing times, and (3) allowing the option of job-rejection. We show that the problem remains polynomially solvable in the number of jobs.

2 Formulation

We consider an n-job m-machine scheduling problem. Job processing times are assumed to be position-dependent, and the machines are unrelated. The set of jobs is denoted by N. The set of jobs assigned to machine i is denoted \(N_i , i=1,\ldots ,m\). The number of jobs assigned to machine i is \(n_i \left( {=\left| {N_i } \right| } \right) \). The scheduler may decide to process only a subset of the jobs and reject the others. Let P denote the set of the processed jobs (with \(n_{P} =\left| P \right| \) denoting the number of processed jobs), and R denote the set of the rejected jobs (with \(n_{R} =\left| R \right| \) denoting the number of rejected jobs). It follows that \(N=P\cup R=(\mathop \bigcup \nolimits _{i=1}^m N_i )\cup R\), and \(\mathop {\sum }\nolimits _{i=1}^m n_{i} +n_{r} =n_{P} +n_{R} =n\).

The processing time of job j if assigned to position r on machine i is denoted by \(p_{ijr} , i=1,\ldots ,m; j=1,\ldots ,n; r=1,\ldots ,n_i \). For a given job schedule, \(C_j \left( { j\in P} \right) \) denotes the completion time of job j. Total absolute deviation of job completion times on machine i is given by: \(\mathop {\sum }\nolimits _{k\in N_i } \mathop {\sum }\nolimits _{l\in N_i , l\ne k} \left| {C_k -C_l } \right| \). TADC on all m machines is given by \(TADC=\mathop {\sum }\nolimits _{i=1}^m \mathop {\sum }\nolimits _{k\in N_i } \mathop {\sum }\nolimits _{l\in N_i , l\ne k} \left| {C_k -C_l } \right| \). The rejection cost of job j is denoted by \(e_j , j=1,\ldots ,n.\) The total rejection cost is given by \(TR=\mathop {\sum }\nolimits _{j\in R} e_j \). The objective function considered in this note is the sum of both: \(TADC+TR\). Using the standard three-field notation of scheduling problems, the problem studied here is:

$$\begin{aligned} R/rejection, p_{jr} /TADC+TR. \end{aligned}$$

3 A polynomial time solution for \(R/rejection, p_{jr} /TADC+TR\)

In this section we introduce a polynomial time solution procedure, which is based on solving a sequence of linear assignment problems. The single machine TADC problem was solved by Kanet (1981), who introduced a solution based on matching job processing times to positions. The positional weight of position r is given by: \(W_r =-r^{2}+nr+2r-n-1; r=1,\ldots ,n\). Recall that the input to our problem contains the position-dependent job processing times on each machine and the job-dependent rejection costs. Thus, the input consists of m matrices of size \(n\times n\) (each matrix contains the job-position processing times on one machine), and a vector of size n containing the rejection costs. Recall that \(n_i \) is the number of jobs assigned to machine \(i, i=1,...,m \left( {n_{P} =\mathop {\sum }\nolimits _{i=1}^m n_{i} } \right) \), \(n_{R}\) is the number of rejected jobs, and \(n_{P} +n_{R} =n\).

Assume first that the vector \(\left( {n_1 , n_2 ,\ldots ,n_m ,n_r } \right) \) is given. In order to build the input for a linear assignment problem, we first create a matrix based on the job-position processing times, consisting of \(m+1\) blocks. Block \(i \left( {i=1,\ldots ,m} \right) \) is of size \(n\times n_i , i=1,\ldots m\), and contains the processing times in the first \(n_i \) positions of machine i. Block \(m+1\) (reflecting the rejected jobs) is of size \(n\times \left( {n-\mathop {\sum }\nolimits _{i=1}^m n_i } \right) \), and contains “1” in all entries. Block \(m+1\) can be regarded as a “pseudo-rejection machine”. For convenience we define \(n_{m+1} =n_{R} =n-\mathop {\sum }\nolimits _{i=1}^m n_{i} \): the number of columns in block \(m+1 \)is the number of rejected jobs. Note that the size of the matrix is \(n\times n\). Thus, the processing time matrix, denoted , PROC, is the following (see Fig. 1 for the special case of \(m=2\)):

$$\begin{aligned} PROC_{ijr} =\left\{ \begin{array}{lllll} p_{ijr} , &{}\quad i=1,\ldots ,m; &{}j=1,\ldots ,n; &{}r=1,\ldots ,n_i \\ 1,&{}\quad i=m+1; &{} j=1,\ldots ,n; &{} r=1,\ldots ,n_{m+1} \\ \end{array}\right. \end{aligned}$$

The cost matrix has an identical structure (of \(m+1\) blocks). Block \(i \left( {i=1,...,m} \right) \) contains \(W_{ijr} =W_{ir} , i=1,\ldots ,m; j=1,\ldots ,n; r=1,\ldots n_i \). Thus, the weight of job j if assigned to position r on machine i (on which \(n_i \) jobs are processed) is: \(W_{ir} =-r^{2}+n_i r+2r-n_i-1 \) Note that all lines in block are identical. Block \(m+1\) contains \(e_{ijr} =e_j \) for \(i=1,\ldots ,n_{m+1} \), i.e., the rejection cost, which is machine- and position-independent, is identical for all entries of a given row in this block. Thus, the cost matrix, denoted COST, is the following (see Fig. 2 for the case of \(m=2)\):

$$\begin{aligned} COST_{ijr}=\left\{ \begin{array}{llll} W_{ijr} ,&{}\quad i=1,\ldots ,m; &{}j=1,\ldots ,n; &{}r=1,\ldots ,n_i \\ e_j ,&{}\quad i=m+1;&{} j=1,\ldots ,n;&{} r=1,\ldots ,n_{m+1}\\ \end{array}\right. \end{aligned}$$
Fig. 1
figure 1

The processing time matrix (PROC) for a 2-machine problem

Fig. 2
figure 2

The cost matrix (COST) for a 2-machine problem

We define the standard binary variables: \(X_{ijr} =1\) if job j is assigned to position r on machine i, or if job j is rejected (i.e., assigned to any position on the pseudo-rejection machine \(m+1)\), and \(X_{ijr} =0\) otherwise, \(i=1,\ldots ,m+1; j=1,\ldots ,n; r=1,\ldots ,n_i \). The resulting assignment problem is the following:

$$\begin{aligned} MIN&\quad \mathop {\sum }\nolimits _{i=1}^{m+1} \mathop {\sum }\nolimits _{j=1}^n \mathop {\sum }\nolimits _{r=1}^{n_i } X_{ijr} PROC_{ijr} COST_{ijr}\\ S.T.&\\&\quad \mathop {\sum }\nolimits _{i=1}^{m+1}\mathop {\sum }\nolimits _{r=1}^{n_i } X_{ijr} =1 \qquad j=1,\ldots , n.\\&\quad \mathop {\sum }\nolimits _{j=1}^n X_{ijr} =1,\qquad \quad \quad \quad i=1,\ldots ,m+1; ~ r=1,\ldots ,n_i\\&\quad X_{jr} \,\, binary, \quad \qquad \quad \quad \quad \qquad i=1,\ldots ,m+1;~ j=1,\ldots ,n; r=1,\ldots ,n_i \end{aligned}$$

Recall that this assignment problem is defined for given numbers of jobs assigned to the m machines and a given number of rejected jobs. We denote this problem \(AP\left( {n_1 , n_2 ,\ldots ,n_m , n_{m+1} =n_r } \right) \). This standard \(\left( {n\times n} \right) \) assignment problem is known to be solved in \(O\left( {n^{3}} \right) \). It is clear that this problem should be solved for all possible vectors \((n_1 , n_2 ,\ldots ,n_{m+1} )\) (such that \(\mathop {\sum }\nolimits _{i=1}^{m+1} n_i =n)\). The number of allocation vectors of n numbers into \(m+1\) sets is bounded by \(\frac{\left( {2n} \right) ^{m+1}}{m!}\); see Stirzaker (1994). In fact, if the number of processed jobs \(n_P =\mathop {\sum }\nolimits _{i=1}^m n_i \) is known, then the number of the (remaining) rejected jobs is determined. Thus, the latter expression can be reduced to \(\frac{\left( {2n} \right) ^{m}}{\left( {m-1} \right) !}\); see Ji and Cheng (2010). It follows that the number of assignment problems to be solved does not exceed \(O\left( {n^{m}} \right) \), which is polynomial in the number of jobs for a given number of machines. We conclude that

Table 1 Job-position processing times: machine 1 (Example 1)
Table 2 Job-position processing times: machine 2 (Example 1)
Table 3 Job-dependent rejection costs (Example 1)

Theorem 1

For a given number of machines, problem \(R/rejection, p_{jr} \hbox { }/TADC+TR\) can be solved in polynomial time in the number of jobs.

Numerical Example 1:

We solved a 10-job 2-machine problem. The job-position processing times on the two machines are given in Tables 1 and 2, respectively. The rejection costs are provided in Table 3. We solved \(AP\left( {n_1 , n_2 ,\ldots ,n_{m+1} } \right) \) for all possible allocation vectors. The resulting solution is the following: \(n_1 =4, n_2 =5, n_r =1\). The job sequence on machine 1: (9, 3, 6, 7). The job sequence on machine 2: (5, 2, 10, 1, 4). The rejected job: job 8. Total TADC of the processed jobs: 106. Total rejection cost: 23. Total cost: 129.

4 Conclusion

We solved a scheduling problem with the objective of minimizing total absolute deviations of job completion times (TADC). We extended the classical setting in three aspects simultaneously: (1) we considered parallel unrelated machines, (2) we assumed general position-dependent job processing times, and (3) we allowed the option of job-rejection. We showed that the problem in this very general form is solved in polynomial time in the number of jobs. Solving TADC with position- or time-dependent job processing time and job rejection, is a challenging topic for future research.