Skip to main content
Log in

Scheduling with two competing agents to minimize total weighted earliness

  • Original Paper
  • Published:
Annals of Operations Research Aims and scope Submit manuscript

Abstract

We study a single machine scheduling problem with two competing agents and earliness measures. Given a common deadline for all the jobs of both agents, the objective function is minimizing the total weighted earliness of the first agent, subject to an upper bound on the maximum earliness of the jobs of the second agent. This problem was recently proved to be NP-hard, leaving the question of the complexity class open. We introduce a pseudo-polynomial dynamic programming algorithm, implying that the problem is NP-hard in the ordinary sense. An extensive numerical study indicates that the dynamic programming is very effective for solving medium size instances. We also propose an efficient heuristic, which is shown numerically to produce very close-to-optimal schedules. The dynamic programming algorithm is extended to any (given) number of agents, proving NP-hardness in the ordinary sense of the general multi-agent setting. Finally, we study the inverse problem of minimizing the maximum earliness of one agent subject to an upper bound on the maximum total weighted earliness of the second agent. We introduce a pseudo-polynomial dynamic programming algorithm, a simple greedy-type heuristic and a lower bound. Our numerical tests verify that the heuristic produces very small optimality gaps.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1

Similar content being viewed by others

References

  • Agnetis, A., Billaut, J. C., Gawiejnowicz, S., Pacciarelli, D., & Soukhal, A. (2014). Multiagent scheduling. Berlin: Springer.

    Book  Google Scholar 

  • Agnetis, A., Mirchandani, P. B., Pacciarelli, D., & Pacifici, A. (2004). Scheduling problems with competing agents. Operations Research, 52, 229–242.

    Article  Google Scholar 

  • Agnetis, A., Pacciarelli, D., & Pacifici, A. (2007). Multi-agent single machine scheduling. Annals of Operations Research, 150, 3–15.

    Article  Google Scholar 

  • Baker, K. R., & Smith, J. C. (2003). A multiple-criterion model for machine scheduling. Journal of Scheduling, 6, 7–16.

    Article  Google Scholar 

  • Cheng, S. R. (2014a). Scheduling two-agents with a time-dependent deterioration to minimize the minsum earliness measures. Asia-Pacific Journal of Operational Research, 31, 1–10.

    Article  Google Scholar 

  • Cheng, S. R. (2014b). Some new problems on two-agent scheduling to minimize the earliness costs. International Journal of Production Economics, 156, 24–30.

    Article  Google Scholar 

  • Cheng, T. C. E., Chung, Y.-H., Liao, S.-C., & Lee, W.-C. (2013). Two-agent single-machine scheduling with release times to minimize the total weighted completion time. Computers & Operations Research, 40, 353–361.

    Article  Google Scholar 

  • Donatas, E., & T’kindt, V. (2014). Two-agent scheduling on uniform parallel machines with min–max criteria. Annals of Operations Research, 213, 79–94.

    Article  Google Scholar 

  • Gawiejnowicz, S., & Suwalski, C. (2014). Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria. Computers and Operations Research, 52, 135–146.

    Article  Google Scholar 

  • Gerstl, E., & Mosheiov, G. (2013). Scheduling problems with two competing agents to minimized weighted earliness–tardiness. Computers & Operations Research, 40, 109–116.

    Article  Google Scholar 

  • Gerstl, E., & Mosheiov, G. (2014). Single machine just-in-time scheduling problems with two competing agents. Naval Research Logistics, 61, 1–16.

    Article  Google Scholar 

  • Kellerer, H., & Strusevich, V. A. (2010). Fully polynomial approximation schemes for a symmetric quadratic knapsack problem and its scheduling applications. Algorithmica, 57, 769–795.

    Article  Google Scholar 

  • Li, D.-C., & Hsu, P.-H. (2012). Solving two-agent single-machine scheduling problem considering learning effect. Computers & Operations Research, 39, 1644–1651.

    Article  Google Scholar 

  • Mor, B., & Mosheiov, G. (2010). Scheduling problems with two competing agents to minimize minmax and minsum earliness measures. European Journal of Operational Research, 206, 540–546.

    Article  Google Scholar 

  • Mor, B., & Mosheiov, G. (2011). Single machine batch scheduling with two competing agents to minimize total flowtime. European Journal of Operational Research, 215, 524–531.

    Article  Google Scholar 

  • Oron, D., Shabtay, D., & Steiner, G. (2015). Single machine scheduling with two competing agents and equal job processing times. European Journal of Operational Research, 244, 86–99.

    Article  Google Scholar 

  • Wan, G., Vakati, S. R., Leung, J. Y.-T., & Pinedo, M. (2010). Scheduling two agents with controllable processing times. European Journal of Operational Research, 205, 528–539.

    Article  Google Scholar 

  • Yin, Y., Cheng, S. R., & Wu, C. C. (2012). Scheduling problems with two agents and a linear non-increasing deterioration to minimize earliness penalties. Information Sciences, 189, 282–292.

    Article  Google Scholar 

  • Zuobao, W., & Weng, M. X. (2005). Multiagent scheduling method with earliness and tardiness objectives in flexible job shops. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, 35, 293–301.

    Article  Google Scholar 

Download references

Acknowledgments

This research was supported by the Israel Science Foundation (grant No.1286/14). The third author was supported in part by the Recanati Fund of The School of Business Administration, and Charles I. Rosen Chair of Management, The Hebrew University of Jerusalem, Israel.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Enrique Gerstl.

Appendices

Appendix 1: Proofs of Properties 14

Proof of Property 1

Consider an optimal schedule, say q, in which an A-job is scheduled between B-jobs. By moving this A job to be scheduled after all the B-jobs, we obtain a new feasible schedule \(q^{\prime }\), with a strictly smaller total weighted earliness of the A-jobs. This contradicts the optimality of schedule q. \(\square \)

Proof of Property 2

Consider an optimal schedule q consisting of a single block of the B-jobs (Property 1), in which the first B-job (say k) is not the largest, and the largest B-job (say l) is scheduled later. Assume that this block starts at time t. Clearly, the maximum earliness of the B-jobs is given by \(D-(t+p_{k})\). Create a new schedule \(q^{\prime }\) by moving job l to be first and start at t. \(q^{\prime }\) is clearly feasible (the maximum earliness becomes smaller: \(D-(t+p_{l}))\), with no impact on the total weighted earliness of the A-jobs, implying that \(q^{\prime }\) is optimal as well. \(\square \)

Proof of Property 3

The two-block claim follows Property 1. The order of the jobs within each block is easily proved by a standard pair-wise interchange argument. \(\square \)

Proof of Property 4

Consider an optimal schedule q with \(t>t_{min}+\max \left\{ p_{max}^{A},p_{max}^{B}\right\} \). Create a new schedule \(q^{\prime }\) by replacing the last A-job scheduled prior to the B-block with the B-block. It is clear that \(q^{\prime }\) is feasible since the new t value is larger than the original (and in particular not smaller than \(t_{min})\). Moreover, the total weighted earliness of the A-jobs in \(q^{\prime }\) is strictly smaller than that of q, contradicting the optimality of q. \(\square \)

Fig. 2
figure 2

The optimal solution of the two-agent problem solved in Example 1

Fig. 3
figure 3

a The optimal solution of the two-agent problem solved in Example 2, b the schedule obtained by Heuristic 2 in Example 2, c the lower bound obtained in Example 2 based on a preemptive schedule

Appendix 2: numerical examples

Example 1

(for problem \(1/ {d_{j}=D (deadline)}/ {\sum \nolimits _{j=1}^{n^{A}} {w_{j}^{A}E_{j}^{A}} :E_{max}^{B}})\):

Consider a 2-agent problem, where each agent needs to process 7 jobs. The job processing times of Agent A are: \(p_{1}^{A}=1,\, p_{2}^{A}=2,\, p_{3}^{A}=7,\, p_{4}^{A}=8,\, p_{5}^{A}=4,\, p_{6}^{A}=5,\, p_{7}^{A}=6.\) The weights of the jobs of Agent A are: \(w_{1}^{A}=8,\, w_{2}^{A}=2,\, w_{3}^{A}=7,\, w_{4}^{A}=1,\, w_{5}^{A}=3,\, w_{6}^{A}=4,\, w_{7}^{A}=2.\) The job processing times of Agent B are: \(p_{1}^{B}=8,\, p_{2}^{B}=2,\, p_{3}^{B}=1,\, p_{4}^{B}=3,\, p_{5}^{B}=7,\, p_{6}^{B}=2,\, p_{7}^{B}=4.\) The upper bound on the maximum earliness of Agent B is \(U=33\). It follows that \(P^{A}=33,\, P^{B}=27\), and \(D=P^{A}+P^{B}=60\). The smallest possible starting time of the B-block is \(t_{min}=D-U-p_{max}^{B}=19\). The largest possible starting time of the B-block is \(t_{min}+max \left\{ p_{max}^{A},p_{max}^{B} \right\} =27\). The optimal solution obtained by the DP given in Sect. 3 (see Fig. 2) consists of the following job sequence: Job 4 of Agent A is first (starts at zero and is completed at 8); Job 7 of Agent A (completed at 14); Job 6 of Agent A (completed at 19); The block of all the B-jobs (in the interval [19, 46]); Job 5 of Agent A (completed at 50); Job 3 of Agent A (completed at 57); Job 2 of Agent A (completed at 59); Job 1 of Agent A (completed at \(D=60)\). The total cost (weighted earliness of Agent A) is 361.

Example 2

(for problem \(1 /{d_{j}=D \,(deadline)}/ {E_{max}^{B}: \sum \nolimits _{j=1}^{n^{A}} {w_{j}^{A}E_{j}^{A}} })\):

We use the same data of Example 1 (processing times of both agents, and weights of Agent A). As above, \(P^{A}=33, P^{B}=27\), \(D=P^{A}+P^{B}=60\). The upper bound on the total weighted earliness of Agent A is \(U=310\). The interval of a feasible t-values is [0, 33]. The optimal solution obtained by the DP given in Sect. 6 (see Fig. 3a) consists of the following job sequence: Job 4, Job 7, Job 2, the B-block, Job 5, Job 6, Job 3, Job 1. \(t^{opt}=16\). The optimal maximal earliness of Agent B is \(E_{max}^{B}=D-t^{opt}-p_{max}^{B}=60-16-8=36\).

We now solve the problem using Heuristic 2. The schedule obtained by the heuristic (see Fig. 3b) consists of the following job sequence: Job 4, Job 7, the B-block, Job 5, Job 6, Job 3, Job 2, Job 1. \(t^{heur}=14\). Thus, the maximal earliness of Agent B obtained by Heuristic 2 is \(E_{max}^{B}=D-p_{max}^{B}=60-14-8=38\). Note that the total weighted earliness of Agent A is 252 (smaller than \(U=310)\).

Finally, we calculate the lower bound obtained by the following preempted schedule (see Fig. 3c): Job 4, Job 7, Job 5 (starts at time 14 and is preempted at time 17 by the B-block), the B-block (which starts at time 17 and is completed at time 44), the last unit of time of Job 5, Job 6, Job 3, Job 2, Job 1. \(t^{LB}=17\). The lower bound on the maximal earliness of Agent B is \(E_{max}^{B}=D-t^{LB}-p_{max}^{B}=60-17-8=35\).

In summary: the optimal \(E_{max}^{B}\) in Example 2 (obtained by the DP) is 36, the heuristic value is 38, and the lower bound is 35.

Appendix 3: a dynamic programming for the case of \(m\,B\)-agents

We now assume that each Agent \(B_{i}\) has a set \(J^{B_{i}}\) of \(n^{B_{i}}\) jobs, \(i=1,\ldots ,m\). The above definitions of \(p_{j}^{B_{i}}\), \(P^{B_{i}}\), \(p_{max}^{B_{i}}, D\), \(U_{i}\) and \(t_{i}\) remain unchanged, \(i=1,\ldots ,m\). Clearly, Properties 13 remain valid. Similar to the case of \(m=2\), the number of B-blocks may reduce when two (or more) B-blocks are processed continuously with no A-jobs among them. Again, without loss of generality we assume \(t_{1}\le t_{2}\le \cdots \le t_{m}\). A lower bound on \(t_{i}\) is given by: \(t_{min}^{B_{i}}=D-U_{i}-p_{max}^{B_{i}} \). An upper bound is \(t_{min}^{B_{i}}+\max \left\{ p_{max}^{A},p_{max}^{B_{i}}\right\} \), \(i=1,\ldots ,m\). The extension of Property 4 to the setting of m agents is that an optimal schedule exists such that the starting times of the \(B_{i}\)-blocks are bounded by: \(t_{min}^{B_{i}}\le t_{i}\le t_{min}^{B_{i}}+\max \left\{ p_{max}^{A},p_{max}^{B_{i}}\right\} \), \(i=1,\ldots ,m\).

The A-jobs are scheduled in (at most) \(m+1\) blocks. We sort the jobs in a non-decreasing order of \(p_{j}^{A}/w_{j}^{A}\). The updated state variables are the following:

j :

The number of \(A-\)jobs already scheduled;

\(e_{i}\) :

The total processing time of the A-jobs scheduled after block \(B_{i}\) and prior to block \(B_{i+1}\), \(i=1,\ldots ,m-1\)

\(e_{m}\) :

The total processing time of the A-jobs scheduled after block \(B_{m}\).

\(P_{j}^{A}-\sum \nolimits _{i=1}^m e_{i} \) is the total processing time of the A-jobs scheduled prior to block \(B_{1}\).

Let \(f_{t_{1},\ldots {,t}_{m}}\left( j,e_{1},\ldots ,e_{m} \right) \) denote the optimal total weighted earliness of the jobs \(j+1, j+2,\ldots ,n^{A}\) (of Agent A), given a total load of \(e_{i}\) of the A-jobs scheduled after the \(B_{i}\)-block, \(i=1,\ldots ,m\).

The DP compares \(m+1\) options at each iteration: schedule the next A-job as late as possible after block \(B_{i},i=1,\ldots m\), or as late as possible prior to block \(B_{1}\). The recursion becomes:

$$\begin{aligned}&f_{t_{1},\ldots {,t}_{m}}\left( j,e_{1},\ldots ,e_{m} \right) \\&\quad =min\left\{ {\begin{array}{ll} {\begin{array}{ll} \left\{ {\begin{array}{c} \left( D-t_{1}+\left( P_{j}^{A}-\sum \nolimits _{i=1}^m e_{i} \right) \right) w_{j+1}^{A}+f_{t_{1},{\ldots ,t}_{m}}\left( j+1,e_{1},\ldots ,e_{m} \right) \\ \infty \\ \end{array} } \right\} &{}\quad {\begin{array}{l} if \,P_{j+1}^{A}-\sum \nolimits _{i=1}^m e_{i} \le t_{1}\\ otherwise\\ \end{array} } \\ \left\{ {\begin{array}{ll} \left( D-t_{2}+e_{1} \right) w_{j+1}^{A}+f_{t_{1},{\ldots ,t}_{m}}\left( j+1,e_{1}+p_{j+1}^{A},e_{2},\ldots ,e_{m} \right) \\ \infty \\ \end{array} } \right\} &{}\quad {\begin{array}{c} if \,t_{1}+P^{B_{1}}+e_{1}+p_{j+1}^{A}\le t_{2} \\ otherwise\\ \end{array} } \\ \left\{ {\begin{array}{ll} \left( D-t_{3}+e_{2} \right) w_{j+1}^{A}+f_{t_{1},{\ldots ,t}_{m}}\left( j+1,e_{1},e_{2}+p_{j+1}^{A},\ldots ,e_{m} \right) \\ \infty \\ \end{array} } \right\} &{}\quad {\begin{array}{l} if \,t_{2}+P^{B_{2}}+e_{2}+p_{j+1}^{A}\le t_{3} \\ otherwise\\ \end{array} }\\ \ldots \\ \ldots \\ \ldots \\ \left\{ {\begin{array}{ll} e_{m}w_{j+1}^{A}+f_{t_{1},{\ldots ,t}_{m}}\left( j+1,e_{1},{\ldots {,e}_{m-1},e}_{m}+p_{j+1}^{A} \right) \\ \infty \\ \end{array} } \right\} &{}\quad {\begin{array}{l} if\, t_{m}+P^{B_{m}}+e_{m}+p_{j+1}^{A}\le D \\ otherwise\\ \end{array} } \\ \end{array} }\\ \end{array} } \right\} \end{aligned}$$

The boundary conditions are:

$$\begin{aligned} f_{t_{1},{\ldots ,t}_{m}}=f_{t_{1},{\ldots ,t}_{m}}( n^{A},e_{1},\ldots ,e_{m})=0,\quad e_{1},\ldots ,e_{m}=0,1,\ldots ,P^{A},\quad e_{1}+\ldots +e_{m}\le P^{A}. \end{aligned}$$

The solution is given by: \(f_{t_{1},{\ldots ,t}_{m}}\left( 0,0,\ldots ,0 \right) \).

The DP needs to be executed for all relevant combinations of \(t_{i}\), which leads to the following:

Theorem 7

For the general setting of \(m \, B\)-agents, the running time of the DP is: \(O\left( \left( n^{A} \right) ^{m+1}{(p_{max}^{A})}^{m}\times \left( max \left\{ p_{max}^{A},p_{max}^{B} \right\} \right) ^{m} \right) \) time, where \(p_{max}^{B}=\max \left\{ p_{max}^{B_{i}},i=1,\ldots m\right\} \)

Proof

\(e_{i}, i=1,\ldots ,m \) is bounded by \(P^{A}\), which is bounded by \(n^{A}p_{max}^{A}\). Therefore, for given \(t_{1},t_{2},\ldots ,t_{m}\), the running time is \(O\left( \left( n^{A} \right) ^{m+1}{(p_{max}^{A})}^{m} \right) \). The DP is repeated up to \(\left( max \left\{ p_{max}^{A},p_{max}^{B} \right\} \right) ^{m} \) times. Thus, the total running time is:

$$\begin{aligned} O\left( \left( n^{A} \right) ^{m+1}{(p_{max}^{A})}^{m}\times \left( max \left\{ p_{max}^{A},p_{max}^{B} \right\} \right) ^{m} \right) . \end{aligned}$$

\(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gerstl, E., Mor, B. & Mosheiov, G. Scheduling with two competing agents to minimize total weighted earliness. Ann Oper Res 253, 227–245 (2017). https://doi.org/10.1007/s10479-016-2310-5

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10479-016-2310-5

Keywords

Navigation