## Abstract

We study a single machine scheduling problem, where the goal is to maximize the weighted number of jobs completed exactly at their due-dates. The option of job-rejection is considered, i.e., the scheduler may perform only a subset of the jobs. An upper bound on the total permitted rejection cost is assumed. The problem is proved to be NP-hard, and a pseudo-polynomial dynamic programming algorithm is introduced. Our numerical tests indicate that the proposed algorithm performs well: medium size instances (of up to 100 jobs) are solved in less than 1 s.

## Introduction

The wide research area of Just-In-Time (JIT) scheduling contains mainly studies focusing on minsum objectives (where the goal is to minimize the total earliness/tardiness cost of all the jobs), or minmax objective (in which we aim to minimize the earliness/tardiness cost of the worst scheduled job). We refer the reader to some of the seminal papers and surveys dealing with JIT scheduling: Baker and Scudder (1990), Hall and Posner (1991), Gordon et al. (2002), Lauff and Werner (2004), and Janiak et al. (2015).

It appears that only a few published studies focused on the scheduling measure of maximizing the (weighted) number of jobs completed exactly at their due-dates. (An equivalent measure is clearly that of minimizing the weighted number of early and tardy jobs.) Lann and Mosheiov (1996) studied the problem on a single machine and on parallel machines, Bouzina and Emmons (1996) focused on the case of job-dependent time intervals, Hiraishi et al. (2002) proved NP-hardness for the case of time intervals on parallel machines, Sung and Vlach (2005) studied max-on-time jobs on parallel unrelated machines, Choi and Yoon (2007) proved strong NP-hardness for shop settings, Shabtay and Bensoussan (2012) focused on maximizing the weighted number of on time jobs on a two-machine flowshop and openshop, Mosheiov and Shabtay (2013) investigated the setting of a single machine with general position-dependent job processing times, Gerstl et al. (2015) addressed the problem of maximizing the weighted number of just-in-time jobs on a proportionate flowshop, Yin et al. (2016, 2017) studied maximum number of on-time jobs in the setting of two competing agents, Hung et al. (2019) focused on preemptive scheduling on parallel identical machine to maximize the number of on-time jobs, and Gerstl and Mosheiov (2020) studied the single machine setting with generalized due-dates. We refer the reader to the survey paper of Shabtay and Steiner (2012) on this topic, which mentions a number of additional relevant references focusing on Just-In-Time scheduling with controllable processing times.

Lann and Mosheiov (1996) introduced a polynomial time solution for the problem of minimizing the weighted number of early and tardy jobs on a single machine. Specifically, they introduced a dynamic programming solution algorithm that runs in \(O\left( {n^{2} } \right)\) time (where \(n\) is the number of jobs). In this note we extend this problem to a setting allowing *job–rejection*, i.e., a setting where not all the jobs must be processed. In their survey paper on scheduling with job-rejection, Shabtay et al. (2013) wrote: "… 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 costs.” It follows that when the option of job-rejection is valid, the scheduler may decide to process only a subset of the jobs, and those jobs which are not processed (i.e., totally rejected or outsourced) are penalized. The importance and practicality of job-rejection are demonstrated in the following selection of recently published papers, addressing various machine settings and cost functions: Zou and Miao (2016), Gerstl and Mosheiov (2017), Mosheiov and Strusevich (2017), Fiszman and Mosheiov (2018), Huang et al. (2018), Mor and Mosheiov (2018), Zhang et al. (2018), Dabiri et al. (2019), Kovalyov et al. (2019), Mor and Shapira (2019), Koulamas, and Kyparisis (2020), Mor and Mosheiov (2020), Mor and Shapira (2020a, b), Mor et al. (2020), Mosheiov and Pruwer (2020) and Wang et al. (2020).

In this note we consider a very practical setting in which the total permitted rejection cost is bounded. This means that the producer cannot reject all the jobs, and an upper bound on the total cost of the rejected jobs is assumed. We show that this problem becomes NP-hard. We then introduce a pseudo-polynomial dynamic programming (DP), thus proving that the problem is NP-hard in the ordinary sense. The DP was tested extensively and the results are promising. The worst case running time required for solving problems of up to 100 jobs (with various values of all input parameters) did not exceed 0.73 s.

In Sect. 2 we provide the notation and formulation of the problem. Section 3 contains the introduction of the DP algorithm. In Sect. 4 we report the results of our numerical tests. The last section contains conclusion and suggestions for future research.

## Formulation

We study a single machine \(n\) job problem. The input for the problem contains the following:

\(p_{j}\) is the processing time of job \(j, j = 1, \ldots ,n\);

\(d_{j}\) is the due-date of job \(j, j = 1, \ldots ,n\);

\(w_{j}\) is the weight of job \(j\) (i.e., the cost incurred when the job is not completed exactly at its due-date), \(j = 1, \ldots ,n\).

For a given schedule, the standard following notation is used:

\(C_{j}\) denotes the completion time of job \(j, j = 1, \ldots ,n\). (Jobs are scheduled continuously, starting at time zero, and preemption is not allowed).

\(E_{j} = \max \left\{ {d_{j} - C_{j} ,0} \right\}\) is the earliness of job \(j,\) \( j = 1, \ldots ,n\);

\(T_{j} = \max \left\{ {C_{j} - d_{j} ,0} \right\}\) is the tardiness of job \(j, j = 1, \ldots ,n\);

\(X_{j}^{E}\) is an earliness indicator reflecting whether job \(j\) is early: \(X_{j}^{E} = 1\) if \(E_{j} > 0\), and \(X_{j}^{E} = 0\) otherwise,\( j = 1, \ldots ,n\);

\(X_{j}^{T}\) is a tardiness indicator reflecting whether job \(j\) is tardy: \(X_{j}^{T} = 1\) if \(T_{j} > 0\), and \(X_{j}^{T} = 0\) otherwise,\( j = 1, \ldots ,n\).

In the original setting (see Lann and Mosheiov 1996), the objective function was minimum weighted number of jobs completed early or tardy: \(\mathop \sum \nolimits_{j = 1}^{n} w_{j} \left( {X_{j}^{E} + X_{j}^{T} } \right)\). In the current setting, jobs may be rejected, and an upper bound on the total permitted rejection cost is assumed. The decisions of the scheduler are (\(i\)) which jobs to process and which to reject, and (\(ii\)) what is the optimal schedule of the processed jobs. Let,

\(P\) denote the set of the processed jobs;

\(R\) denote the set of the rejected jobs;

\(r_{j}\) denote the rejection cost of job \(j,\) \( j = 1, \ldots ,n\);

\(U\) denote the upper bound on the total permitted rejection cost.

Thus, using the standard presentation of scheduling problems (see Graham et al. 1979), the problem studied in this note is:

## Dynamic programming algorithm

We first address the complexity status of the problem studied here.

###
**Theorem 1**

*Problem* \(1\left| { \mathop \sum \limits_{j \in R} r_{j} \le U} \right| \mathop \sum \limits_{j \in P} w_{j} \left( {X_{j}^{E} + X_{j}^{T} } \right)\) *is NP-hard*.

###
*Proof*

Consider a special case of the problem, where all the jobs share a common due-date at time zero, i.e., \(d_{j} = 0, j = 1, \ldots ,n\). In this case, for any schedule, all the processed jobs are tardy. The goal is reduced to minimizing total (tardiness) cost of the processed jobs, subject to the constraint that the total rejection cost of the rejected jobs does not exceed \(U\). Thus, the problem is:

This is equivalent to:

Note that the right-hand-side of the constraint is a constant, and thus the problem is equivalent to the knapsack problem, implying that it is NP-hard. \(\square\)

Next, we introduce a pseudo-polynomial dynamic programming algorithm. Recall (see Lann and Mosheiov 1996) that an optimal schedule exists with no early jobs. It follows that in an optimal schedule, the on-time jobs (i.e., those completed exactly at their due-date) are scheduled according to the Earliest Due-Date first (EDD) order. Hence, in the more general setting studied here (in which the solution contains a combination of on-time jobs, tardy jobs, and rejected jobs), the on-time jobs are scheduled according to EDD as well. We thus start by sorting (and renumbering) the jobs according to EDD. Then, at each iteration of the DP, a job is either processed to be completed exactly at its due-date (and is not penalized), or the job is delayed and penalized by \(w_{j}\), or is rejected and penalized by \(r_{j}\). [Obviously, when there is no upper bound on the rejection cost, we compare the tardiness cost with the rejection cost (for each job), and only the smaller is relevant.]

The following state variables are defined:

\(k\): The index of the last job completed on time, \(k = 1, \ldots ,n\).

\(j\): The index of the current job (to be processed or rejected), \(j = 1, \ldots ,n\).

\(r\): The total rejection cost of the rejected jobs so far, \(0 \le r \le U\).

The return function is:

\(f\left( {k,j,r} \right)\): the optimal cost of the jobs processed and completed not on time (i.e., the minimum cost of the tardy jobs) obtained by jobs \(j, j + 1, \ldots ,n\), given that job \(k\) was the last completed on time, \(j\) is the current job to be scheduled or rejected, and the total rejection cost of the rejected jobs so far is \(r.\)

In order to simplify the recursion, we define \(b_{j}\) to be the starting time of job \(j\) that guarantees completion on time (\(b_{j} = d_{j} - p_{j} ), j = 1, \ldots ,n\).

The recursion is the following:

The first option reflects the case that job \(j\) can be completed on time (\(d_{k} \le b_{j}\)) and can be rejected (\(r + r_{j + 1} \le U\)). In this case, all three decisions are relevant: schedule the job on time, delay the job or reject the job.

The second option reflects that case that job \(j\) cannot be completed on time but can be rejected. In this case, the job can either be delayed or rejected.

The third option reflects that case that job \(j\) can be completed on time and cannot be rejected. In this case, the job can either be scheduled on time or delayed.

The forth option reflects that case that job \(j\) cannot be completed on time and cannot be rejected. In this case, the job must be delayed.

Boundary condition: \(f\left( {k,n,r} \right) = 0\), for any \(k \le n\) and \(r \le U\) values.

\(f\left( {k,j,r} \right) = \infty\), if \(r > U\), for any \(k \le j \le n\) values.

The optimal solution is given by: \(f\left( {0,0,0} \right)\).

###
**Theorem 2**

*The running time of the dynamic programming is* \(O\left( {n^{2} U} \right)\).

Proof: Both \(k\) and \(j\) are bounded by \(n\), and \(r\) is bounded by \(U\). Hence, the total running time of the dynamic programming is \(\left( {n^{2} U} \right)\). \(\square\)

**Numerical Example** 1:

Consider a 6-job problem. The integer processing times were generated uniformly in the interval \(\left[ {1, 50} \right]\): \(p_{j} = \left( {38,27,32,41,49,48} \right)\).

The integer due-dates were generated uniformly in the interval \(\left[ {0, \mathop \sum \nolimits_{j = 1}^{6} p_{j} } \right]\):

\(d_{j} = \left( {2,7,47,112,165,202} \right)\).

The integer job-dependent weights and rejection costs were generated uniformly in the interval \(\left[ {1,20} \right]\): \(w_{j} = \left( {13,19,19,19,17,5} \right)\);

The rejection costs are: \(r_{j} = \left( {7,10,16,3,1,8} \right)\).

The upper bound the total permitted rejection cost is \(U = 8\).

Firstly, the jobs were sequenced and renumbered in EDD order. Applying our proposed DP, we obtained the following optimal solution:

The set of the processed jobs: \(P = \left\{ {3,4,6,2} \right\}\). The sequence of the *on-time* jobs is \(\left( {3, 4, 6} \right)\), implying that the set of *late* jobs contains a single job \(\left\{ 2 \right\}\).

The set of rejected jobs: \(R = \left\{ {1, 5} \right\}\), with total rejection cost \(\mathop \sum \nolimits_{ j \in R} e_{j} = 8 \le U\).

The optimal objective function value is \(\mathop \sum \nolimits_{j \in P} w_{j} \left( {X_{j}^{E} + X_{j}^{T} } \right) = w_{2} = 19\). \(\square\)

## Numerical Study

We executed numerical tests in order to measure the running times of the proposed DP as a function of all the input parameters. Random instances were generated with \(n = 20, 40, 60, 80\) and 100 jobs. Processing times were generated uniformly in the interval [1, \(p_{max} =\) 50]. Job-dependent weights were generated uniformly in the interval [1, \(w_{max} =\) 20]. Job-dependent rejection costs were generated uniformly in the interval [1, \(r_{max} =\) 20]. We considered a tightness factor of \(\phi = 0.1\) for generating the due-dates. For each combination of \(n\) and \( \phi\), the due-dates (\(d_{j} )\) were generated uniformly in the interval \(\left[ {\phi np_{max} , i\phi np_{max} } \right], i = 2,3,4\). Similarly, we considered a tightness factor of \(\varphi = 0.01\) to generate the upper bound on the total rejection cost. For each combination of \(n\) and \( \varphi\), the upper bound on the total rejection cost (\(U\)) was generated uniformly in the interval \(\left[ {\varphi nr_{max} , inr_{max} \varphi } \right]\), \(i = 2, 3,4\). Thus, for each \(n\) value, 9 different combinations were considered, and for each combination, 20 instances were generated and solved. [The C + + program was executed on an Intel (R) Core ™ i7-8650U CPU @ 1.90 GHz 16.0 GB RAM platform.]

The results are reported in Tables 1, 2 and 3, and in Figs. 1, 2 and 3. Based on our results, the proposed DP performs very well on medium size instances, i.e., of up to 100 jobs. Note that the worst case running time did not exceed 0.73 s for all instances of 100 jobs with the widest range of the upper bound on the total rejection cost \(\left( {U \in \left[ {0.01nr_{max} , 0.04nr_{max} } \right]} \right)\), as presented in Table 3. Note also that, as expected, the running times increased significantly with larger values of \(n\) and \(U\), while the due-dates range had only a minor effect. In summary, the DP algorithm appears to be useful for solving all medium size problems generated in our tests.

## Conclusion

Unlike other Just-In-Time scheduling measures, and despite being very practical, the measure of maximizing the weighted number of jobs completed exactly at their due-dates, has been studied by a relatively small number of researchers. We studied the problem of maximizing the weighted number of on-time jobs on a single machine, with the option of job-rejection. Following many real-life settings, an upper bound on the total permitted rejection cost is assumed. We proved that the problem is NP-hard, and a pseudo-polynomial dynamic programming algorithm was introduced. Based on our extensive numerical study, the proposed algorithm is efficient, and medium size instances (of up to 100 jobs) were easily solved.

A challenging topic for future research is the extension of the setting studied here to that of a non-symmetric cost structure, i.e. to allow different earliness and tardiness penalties. Another interesting topic is that of maximizing the weighted number of on-time jobs with the option of job-rejection in multi-machine settings.

## References

Baker K, Scudder G (1990) Sequencing with earliness and tardiness penalties: a review. Oper Res 38:22–36

Bouzina KI, Emmons H (1996) Interval scheduling on identical machines. J Global Optim 9:379–393

Choi B, Yoon S (2007) Maximizing the weighted number of just-in-time jobs in flow shop scheduling. J Sched 10:237–243

Dabiri M, Darestani SA, Naderi B (2019) Multi-machine flow shop scheduling problems with rejection using genetic algorithm. Int J Serv Oper Manag 32:158–172

Fiszman S, Mosheiov G (2018) Minimizing total load on a proportionate flowshop with position-dependent processing times and job-rejection. Inf Process Lett 132:39–43

Gerstl E, Mosheiov G (2017) Single machine scheduling problems with generalized due-dates and job-rejection. Int J Prod Res 55:3164–3172

Gerstl E, Mosheiov G (2020) Maximum number of on-time jobs on a single machine with generalized due-dates. J Sched. https://doi.org/10.1007/s10951-020-00638-7

Gerstl E, Mor B, Mosheiov G (2015) A note: maximizing the weighted number of just-in-time jobs on a proportionate flowshop. Inf Process Lett 115:159–162

Gordon V, Proth JM, Chu C (2002) A survey of the state-of-the-art of common due date assignment and scheduling research. Eur J Oper Res 139:1–25

Graham RL, Lawler EL, Lenstra JK, Kan AR (1979) Optimization and approximation in deterministic sequencing and scheduling a survey. Ann discret math. 5:287–326

Hall NG, Posner ME (1991) Earliness–tardiness scheduling problems. I: weighted deviation of completion times about a common due date. Oper Res 39:836–846

Hiraishi K, Levner E, Vlach M (2002) Scheduling of parallel identical machines to maximize the weighted number of just-in-time jobs. Comput Oper Res 29:841–848

Huang W, Wu CC, Liu S (2018) Single-machine batch scheduling problem with job rejection and resource dependent processing times. RAIRO-Oper Res 52:315–334

Hung HC, Lin BM, Posner ME, Wei JM (2019) Preemptive parallel-machine scheduling problem of maximizing the number of on-time jobs. J Sched 22:413–431

Janiak A, Janiak W, Krysiak T, Kwiatkowski T (2015) A survey on scheduling problems with due windows. Eur J Oper Res 242:347–357

Koulamas C, Kyparisis GJ (2020) The no-wait flow shop with rejection. Int J Prod Res. https://doi.org/10.1080/00207543.2020.1727042

Kovalyov MY, Mosheiov G, Šešok D (2019) Comments on “Proportionate flowshops with general position dependent processing times” [Inf. Process. Lett. 111 (2011) 174–177] and “Minimizing total load on a proportionate flowshop with position-dependent processing times and job-rejection” [Inf. Process. Lett. 132 (2018) 39–43]. Inf Process Lett 147:1–2

Lann A, Mosheiov G (1996) Single machine scheduling to minimize the number of early/tardy jobs. Comput Oper Res 23:769–781

Lauff V, Werner F (2004) Scheduling with common due date, earliness and tardiness penalties for multimachine problems: a survey. Math Computer Modelling 40:637–655

Mor B, Mosheiov G (2018) A note: minimizing total absolute deviation of job completion times on unrelated machines with general position-dependent processing times and job-rejection. Ann Oper Res 271:1079–1085

Mor B, Mosheiov G (2020) A note: flowshop scheduling with linear deterioration and job-rejection. 4OR Q J Oper Res. https://doi.org/10.1007/s10288-020-00436-z.

Mor B, Shapira D (2019) Improved algorithms for scheduling on proportionate flowshop with job-rejection. J Oper Res Soc 70:1997–2003

Mor B, Shapira D (2020a) Scheduling with regular performance measures and optional job rejection on a single machine. J Oper Res Soc 71:1315–1325. https://doi.org/10.1080/01605682.2019.1621222

Mor B, Shapira D (2020b) Regular scheduling measures on proportionate flowshop with job rejection. Comput Appl Math 39:1–14

Mor B, Mosheiov G, Shapira D (2020) Flowshop scheduling with learning effect and job rejection. J Sched 23:631–641. https://doi.org/10.1007/s10951-019-00612-y

Mosheiov G, Pruwer S (2020) On the minmax common-due-date problem: extensions to position-dependent processing times, job rejection, learning effect, uniform machines and flowshops. Eng Optim. https://doi.org/10.1080/0305215X.2020.1735380

Mosheiov G, Shabtay D (2013) Maximizing the weighted number of Just-In-Time jobs on a single machine with position-dependent processing times. J Sched 16:519–527

Mosheiov G, Strusevich VA (2017) Determining optimal sizes of bounded batches with rejection via quadratic min-cost flow. Nav Res Logist 64:217–224

Shabtay D, Bensoussan Y (2012) Maximizing the weighted number of just-in-time jobs in several two-machine scheduling systems. J Sched 15:39–47

Shabtay D, Steiner G (2012) Scheduling to maximize the number of just-in-time jobs: a survey. Just-in-time systems. Springer, New York, pp 3–20

Shabtay D, Gaspar N, Kaspi M (2013) A survey on offline scheduling with rejection. J Sched 16:3–28

Sung SC, Vlach M (2005) Maximizing Weighted number of Just-in-Time Jobs on Unrelated Parallel Machines. J Sched 8:453–460

Wang D, Yin Y, Jin Y (2020) Parallel-Machine rescheduling with job rejection in the presence of job unavailability. Rescheduling under disruptions in manufacturing systems. Springer, Singapore, pp 35–63

Yin Y, Cheng S-R, Cheng TCE, Wang D-J, Wu C-C (2016) Just-in-time scheduling with two competing agents on unrelated parallel machines. Omega 63:41–47

Yin Y, Cheng TCE, Wang D-J (2017) Two-agent flowshop scheduling to maximize the weighted number of just-in-time jobs. J Sched 20:313–335

Zhang X, Xu D, Du D, Wu C (2018) Approximation algorithms for precedence-constrained identical machine scheduling with rejection. J Comb Optim 35:318–330

Zou J, Miao C (2016) The single machine serial batch scheduling problems with rejection. Oper Res Int J 16:211–221

## Acknowledgements

This research was supported by the Israel Science Foundation (Grant No. ISF 2505/19). The second author was also supported by the Charles I. Rosen Chair of Management, and by The Recanati Fund of The School of Business Administration, The Hebrew University, Jerusalem, Israel.

## Funding

All authors certify that they have no affiliations with or involvement in any organization or entity with any financial interest or non-financial interest in the subject matter or materials discussed in this manuscript.

## Author information

### Affiliations

### Corresponding author

## Ethics declarations

### Conflict of interest

The authors have no conflicts of interest to declare that are relevant to the content of this article.

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

## About this article

### Cite this article

Mor, B., Mosheiov, G. Single machine scheduling to maximize the weighted number of on-time jobs with job-rejection.
*Oper Res Int J* (2021). https://doi.org/10.1007/s12351-021-00627-4

Received:

Revised:

Accepted:

Published:

### Keywords

- Scheduling
- Single machine
- Max-on-time
- Job-rejection
- Dynamic programming