Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria

Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria

Author's Accepted Manuscript Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria Stanisław Gawiejnowicz...

616KB Sizes 1 Downloads 47 Views

Author's Accepted Manuscript

Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria Stanisław Gawiejnowicz, Cezary Suwalski

www.elsevier.com/locate/caor

PII: DOI: Reference:

S0305-0548(14)00178-6 http://dx.doi.org/10.1016/j.cor.2014.06.020 CAOR3602

To appear in:

Computers & Operations Research

Received date: 9 January 2013 Revised date: 17 January 2014 Accepted date: 23 June 2014 Cite this article as: Stanisław Gawiejnowicz, Cezary Suwalski, Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria, Computers & Operations Research, http://dx.doi.org/10.1016/j. cor.2014.06.020 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting galley proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

Scheduling linearly deteriorating jobs by two agents to minimize the weighted sum of two criteria Stanislaw Gawiejnowicz∗, Cezary Suwalski∗ Adam Mickiewicz University in Pozna´ n, Faculty of Mathematics and Computer Science, Umultowska 87, 61-614 Pozna´ n, Poland

Abstract We consider scheduling jobs by two agents on a single machine. Each job is defined by a common release date, a deteriorating processing time that is a linear function of the job starting time and a weight or a due-date. Every agent constructs a partial schedule that includes only the agent’s jobs and is evaluated by the agent’s optimality criterion: the total weighted completion time or the maximum lateness. The aim is to find a complete schedule minimizing a weighted sum of the two criteria. We prove that the problem is N P-hard and show several properties that describe the structure of schedules for the problem. We also propose an exact algorithm and a meta-heuristic for the problem. Finally, we report the results of evaluation of the proposed algorithms by computational experiments. Keywords: agent scheduling, deteriorating jobs, total weighted completion time, maximum lateness, N P-hardness, algorithms 1. Introduction Agent scheduling is a new research area in modern scheduling theory, initiated by Agnetis et al [3] and Baker and Smith [5]. As opposed to classical scheduling, where jobs are processed on machines used in a centralized way, ∗

Corresponding author. Tel.: +48 61 829 5334; fax: +48 61 829 5315. Email addresses: [email protected] (Stanislaw Gawiejnowicz), [email protected] (Cezary Suwalski)

Preprint submitted to Computers & Operations Research

June 28, 2014

in agent scheduling jobs are processed on machines utilized by two or more competing agents. Moreover, the agents have their own optimality criteria, while in classical scheduling only one criterion is used. These two assumptions allow us to construct more realistic models of modern manufacturing processes in which competitiveness plays important role. Though agent scheduling is intensively studied recently, results of the research concern mainly problems with fixed job processing times that do not change in time. We refer the reader to papers by Agnetis et al [4] and Tuong et al [19] for reviews of this part of agent scheduling literature, and to monograph [1, Chaps. 3–5] for detailed discussion of the subject. In this paper, we consider a two-agent scheduling problem in which jobs have variable processing times that deteriorate, i.e., the processing time of each job is a non-decreasing function of the starting time of the job. The contribution of the paper is three-fold. First, we present a detailed analysis of the problem, proving its N P-hardness and several properties that describe the structure of schedules for the problem. Second, we propose for our problem an exact algorithm and a meta-heuristic, both written in a modern object-oriented programming language. Finally, we report the results of computational experiments that we have conducted in order to evaluate the quality of schedules generated by our algorithms. The problem under consideration can be formulated as follows. We are given a set J of independent jobs that are available for processing at time t0 > 0. The set J is divided into two subsets J1 and J2 such that J1 ∩J2 = ∅, J1 ∪ J2 = J , J1 = {J1A1 , J2A1 , . . . , JnA11 } and J2 = {J1A2 , J2A2 , . . . , JnA22 }, where n1 + n2 = n. Any job JjA1 from the set J1 is characterized by pro1 and weight wjA1 , where 1 ≤ j ≤ n1 . Any job JjA2 from cessing time pA j A2 2 the set J2 is characterized by processing time pA j and due-date dj , where k of job JjAk of agent Ak , k ∈ {1, 2}, is 1 ≤ j ≤ n2 . The processing time pA j Ak Ak k k = aA a linear function of the starting time of the job, i.e. pA j j + bj Sj k k for 1 ≤ j ≤ ni , where aA ≥ 0, bA ≥ 0 and SjAk ≥ t0 denote the basic j j processing time, the deterioration rate and the starting time of the job, respectively. Jobs from the set Jk are scheduled k that has the  by agent A optimality criterion fk , k ∈ {1, 2}, where f1 = A1 wj Cj := J A1 wj Cj and j

2 f2 = LA max := maxJ A2 {Cj − dj }. The aim is to find such a schedule σ that j  2 minimizes the criterion f (σ) := f1 (σ)+θf2 (σ) = A1 wj (σ)Cj (σ)+θLA max (σ), where wj (σ) and Cj (σ) denote the weight and the completion time of the jth

2

job in schedule σ, respectively, and θ > 0 is a given constant.  ThroughoutAthe 2 . paper, we denote the above problem as 1|pj = aj + bj Sj | A1 wj Cj + θLmax Despite the fact that scheduling problems with deteriorating processing times of jobs are very common in some applications (see, e.g., Gawiejnowicz [8, Sect. 5.4] for a review), only a few authors have considered agent scheduling problems of this type, studying mainly polynomially solvable cases or proposing heuristic algorithms for known N P-hard cases of such problems. Liu and Tang [15] have shown that single machine problems with proportional  A2 1 job processing times, 1|pj = bj Sj |LA max : Cmax ≤ U and 1|pj = bj Sj | A1 C j : A2 fmax ≤ U, can be solved in O(n1 log n1 ) and O(n1 log n1 + n2 log n2 ) time, respectively. Liu et al [16] generalized the results to a single machine batch scheduling environment, and Liu et al [14] extended them to proportionallinear processing times, pj = bj (a + bSj ). Lee et al [12] proposed a branchand-bound algorithm for a two-agent single-machine schedulingproblem with linear job processing times, pj = aj + bj Sj , and criteria A1 wj Cj and  A2 Uj , where Uj := 1 if Tj := maxj∈A2 {Cj − dj , 0} > 0 and Uj := 0 otherwise. Gawiejnowicz et al [9] proposed a branch-and-bound algorithm and a meta-heuristic for a single machine problem with proportional job processing timesand the total tardiness and the number of tardy jobs criteria, 1|pj = bj Sj | A1 Tj : A2 Uj = 0. Agent scheduling problems with other forms of variable job processing times have been considered, e.g., by Wan et al [20], Cheng et al [7], Li and Hsu [13] and Wu et al [21]. We refer the reader to [1, Chap. 6] for detailed discussion of agent scheduling problems with variable job processing times. This paper is organized as follows. In Section 2 we prove that problem  2 1|pj = aj + bj Sj | A1 wj Cj + θLA max is N P-hard regardless aj = 0 or not. In Section 3 we prove several basic properties of the problem in the case when aj = 0. In Section 4 and 5 we present for the latter case an exact algorithm and a meta-heuristic algorithm, respectively. Results of an experimental evaluation of both these algorithms are reported in Section 6. We complete the paper by Section 7 including conclusions and remarks on further research. 2. Complexity of problem 1|pj = aj + bj Sj |

 A1

2 wj Cj + θLA max

In this section, we show that the considered problem is computationally difficult. The problem with linear job procesing times, pj = aj + bj Sj with aj = 0 for 1 ≤ j ≤ n, includes thestrongly N P-hard scheduling problem 2 with fixed job processing times, 1|| A1 wj Cj + θLA max , considered by Baker 3

 2 and Smith [5]. Therefore, problem 1|pj = aj + bj Sj | A1 wj Cj + θLA max is strongly N P-hard as well. In view of this, in the remaining sections of the paper we focus on the case when aj = 0 for 1 ≤ j ≤ n and θ = 1. If n2 = 1, i.e. when agent A2 has only a single job, the problem can be solved as follows. First, in O(n1 log n1 ) time, we construct a schedule in which all jobs of agent A1 are scheduled in non-decreasing order of the b ratios (1+bjj )wj . Next, using the schedule we construct O(n1 ) new schedules in which the single job of agent A2 is scheduled before, among or after jobs of agent A1 . Finally, from the new schedules we select an optimal schedule. Below we show the problem becomes difficult when agent A2 has two jobs. Before we present the result, we formulate decision version of our problem. TWO-AGENT TIME-DEPENDENT SCHEDULING (TATDS): given inA1 A1 1 tegers n1 and n2 , job deterioration rates bA 1 , b2 , . . . , bn1 and job weights A2 A2 2 w1A1 , w2A1 , . . . , wnA11 of agent A1 , job deterioration rates bA 1 , b2 , . . . , bn2 and A2 A2 2 due-dates dA 1 , d2 , . . . , dn2 of agent A2 , starting time t0 > 0, constant θ > 0 and a threshold value y > 0, does there  exists a schedule σ for the n1 + n2 2 jobs starting from time t0 and such that A1 wj (σ)Cj (σ) + θLA max (σ) ≤ y? In the proof of the N P-completeness of the TATDS problem, we use the following decision problem. EQUAL PRODUCTS PROBLEM (EPP): given a set M = {1, 2, . . . , m} for some positive integer m, and a size xj ∈ Z + for each j ∈ Msuch that j∈M xj is a square, does there exist a subset M  ⊆ M such that xj = xj ? j∈M 

j∈M \M 

Problem EPP, known also as PRODUCT PARTITION, has been proved to be ordinarily N P-complete by Agnetis et al [2] and Gawiejnowicz [8]. Recently, Ng et al [18] have shown that it is strongly N P-complete. Before we begin our proof, we state an auxiliary result for computing the total weighted completion time, Jj ∈J wj Cj (σ), for a given non-idle schedule  σ for problem 1|pj = bj t| wj Cj . Lemma 1. Let wj =

bj bj +1



and Bj = 1 + bj for 1 ≤ j ≤ n. Then

wj Cj (σ) = t0 (B1 B2 · · · Bn − 1) .

Jj ∈J

4

(1)

Proof. If wj =  Jj ∈J

bj bj +1

and Bj = 1 + bj for 1 ≤ j ≤ n, then

wj Cj (σ) = t0



B1 −1 B1 B1

+

B2 −1 B1 B2 B2

+ ...+

Bn −1 B1 Bn

· · · Bn



= t0 (B1 − 1 + (B2 − 1)B1 + . . . + (Bn − 1)B1 · · · Bn−1 ) .

Simplifying the latter expression, we obtain formula (1).



Now, we are ready toprove the N P-completeness of the decision version 2 of problem 1|pj = bj Sj | A1 wj Cj + θLA max . Theorem 1. Problem TATDS is N P-complete even if θ = 1 and agent A2 has only two jobs. Proof. Let IEP P denote an instance of EPP problem, composed of set M = {1, 2, . . . , m} and size xj ∈ Z + for each j ∈ M. Construct instance 1 = xj − 1 and IT AT DS of problem TATDS as follows: t0 = 12 , n1 = m, bA j wjA1 =

A bj 1 A1 bj +1

A2 A2 A2 2 for 1 ≤ j ≤ n1 , n2 = 2, bA 1 = b2 = 1, d1 = 1, d2 = 2X, θ = 1  and y = 2X 2 − X − 1, where X 2 = j∈M xj . Givenschedule σ for instance IT AT DS , we can check in polynomial time 2 whether A1 wj Cj (σ) + LA max (σ) ≤ y. Hence, TATDS ∈ N P. Now, we show that instance IEP P has a solution if and only if instance IT AT DS has a solution.

Part ”if”. Assume that a giveninstance I EP P has a solution. Then there xj = xj . exists a set M  ⊆ M such that j∈M 

j∈M \M 

Denote by JM  and JM \M  the set of agent A1 jobs corresponding to elements of set M  and M \ M  , respectively. Since scheduling jobs in non bj ratios solves problem 1|p = b t| w j Cj decreasing order of the wj (1+b j j j) (Mosheiov [17]) and since the ratios are equal to 1 for all jobs of agent A1 , the order of jobs of the agent is immaterial. Therefore, we can construct a schedule σ for all jobs of agents A1 and A2 as follows. Starting from t0 = 12 , first we schedule job J1A2 of agent A2 . Next, in an arbitrary order, we schedule agent A1 jobs from set JM  , followed by job J2A2 of agent A2 . Finally, in an arbitrary order, we schedule agent A1 jobs from set JM \M  . Let SjAi (σ) and CjAi (σ) denote, respectively, the starting time and the completion time of job JjAi in schedule σ, where 1 ≤ j ≤ n1 for i = 1 and 5

A2 2 1 ≤ j ≤ n2 for i = 2. Similarly, let LA j (σ) denote the lateness of job Jj in schedule σ for 1 ≤ j ≤ 2. Notice that all job completion times and job latenesses are integer numbers. A2 A2 2 Under the notation, C1A2 (σ) = 12 × 2 = 1 and LA 1 (σ) = C1 (σ) − d1 = 1 − 1 = 0. Hence, by Eq. (1),



 wjA1 CjA1 (σ)

=

C1A2 (σ)



Bj − 1

=

j∈M 

Jj ∈JM 



xj − 1 = X − 1.

j∈M 

A2 A2 2 Similarly, C2A2 (σ) = X ×2 = 2X and LA 2 (σ) = C2 (σ)−d2 = 2X −2X = 0 and, by Eq. (1),



⎛ wjA1 CjA1 (σ) = C2A2 (σ) ⎝

Jj ∈JM 



j∈M \M 





Bj − 1⎠ = 2X ⎝



⎞ xj − 1⎠

j∈M \M 

= 2X(X − 1).  A2  A2 2 Therefore, since LA max (σ) = max L1 (σ), L2 (σ) = 0, we have  2 2 f (σ) = wj Cj (σ) + LA max (σ) = X − 1 + 2X(X − 1) = 2X − X − 1 ≤ y. A1

Thus, instance IT AT DS has a solution. Part ”only if”.  Assume now that there exists a schedule σ for instance 2 IT AT DS such that A1 wj Cj (σ) + LA max (σ) ≤ y. Since agent A2 has only two jobs, J1A2 and J2A2 , we have to consider the following four cases: (i) both jobs, J1A2 and J2A2 , are on time; (ii) only job J2A2 is late, (iii) only job J1A2 is late, (iv) both jobs, J1A2 and J2A2 , are late. In case (i), job J1A2 must be scheduled in σ as the first one, since otherwise 2 it would be late. Hence, S1A2 (σ) = 12 , C1A2 (σ) = 1 and LA 1 (σ) = 0. Denote by T the total product of the deterioration rates of agent A1 jobs scheduled between jobs J1A2 and J2A2 . Notice that then C1A2 (σ) ≤ S2A2 (σ) = T ≤ X, since otherwise job J2A2 would be late. Then, by Eq. (1), 2

f (σ) = T − 1 + 2T ( XT − 1) + max {0, 2(T − X)} = 2X 2 − T − 1 + max {0, 2(T − X)} . 6

Hence, f (σ) > y if 1 ≤ T < X and f (σ) ≤ y if T = X. In case (ii), job J1A2 must be scheduled as in case (i), i.e. S1A2 (σ) = 12 , 2 C1A2 (σ) = 1 and LA 1 (σ) = 0, since otherwise it would be late. Notice that A2 job J2 is late if X < S2A2 (σ) = T . Then f (σ) = 2X 2 − T − 1 + 2(T − X) = 2X 2 − X − 1 + (T − X) > y. In case (iii), job J2A2 must be scheduled at S2A2 (σ) = X, since otherwise 2 f (σ) > y. Therefore, C2A2 (σ) = 2X and LA 2 (σ) = 2X − 2X = 0. Notice that A2 A2 job J1 is late if 1 < S1 (σ). Denote by S the total product of the deterioration rates of agent A1 jobs scheduled before S1A2 (σ). Then, by Eq. (1), f (σ) = =

1 (S 2 1 (S 2

− 1) + S( X − 1) + 2X(X − 1) + max{S − 1, 0} S X − 1) + S( S − 1) + 2X(X − 1) + S − 1.

Hence, f (σ) = 2X 2 − X − 1 + 12 (S − 1) > y. In case (iv), both jobs, J1A2 and J2A2 , are late. Notice that job J1A2 is late if 1 < S1A2 (σ) and job J2A2 is late if X < S2A2 (σ). Denote the total product of the deterioration rates of agent A1 jobs scheduled before S1A2 (σ) and between S1A2 (σ) and S2A2 (σ) by S and TS , respectively. Then, by Eq. (1), 2

f (σ) = 12 (S − 1) + S( TS − 1) + 2T ( XT − 1) + max{S − 1, 2(T − X)} = 2X 2 − T − 1 − 12 (S − 1) + max{S − 1, 2(T − X)}. Notice that since job J1A2 is late, we have S − 1 ≥ 2. Similarly, since job J2A2 is late, we have T ≥ 2X + 1. Thus, 2T − S ≥ 2X what implies that S − 1 = 2(T − X) for any feasible values of S and T . Therefore, either max{S − 1, 2(T − X)} = 2(T − X) or max{S − 1, 2(T − X)} = S − 1. If max{S − 1, 2(T − X)} = 2(T − X), then f (σ) = 2X 2 − T − 1 − 12 (S − 1) + 2(T − X) = 2X 2 − X − 1 + (T − X) − 12 (S − 1) > y. If max{S − 1, 2(T − X)} = S − 1, then f (σ) = 2X 2 − T − 1 − 12 (S − 1) + S − 1 = 2X 2 − T − 1 + 12 (S − 1) > y. Hence, f (σ) ≤ y if and only if jobs J1A2 and J2A2 both are on time. Denote by M  and M \ M  the set of numbers Bj = bj + 1 = xj corresponding to 7

the deterioration rates of jobs scheduled in time interval [C1A2 , S2A2 ) and after   Bj = xj = X. A similar equality concerns C2A2 , respectively. Then 

j∈M 

j∈M 

set M \ M . Therefore, instance IEP P has a solution.



k asymptotically have no In view of Theorem 1 and since the values aA j impact on deteriorating job processing times (Mosheiov  [17]), in remaining 2 sections we consider only problem 1|pj = aj + bj Sj | A1 wj Cj + θLA max in Ak k ∈ {1, 2}, t0 = 1 and θ = 1. We denote the which aj = 0 for 1 ≤ j ≤ n,  2 latter problem by 1|pj = bj Sj | A1 wj Cj + LA max .

3. Properties of problem 1|pj = bj Sj |

 A1

2 wj Cj + LA max

In this section, we present several propertiesthat allow us to describe the 2 structure of schedules for problem 1|pj = bj Sj | A1 wj Cj + LA max and play an important role in the exact algorithm presented in Section 4. Throughout this section, unless stated otherwise, we apply the following notation. For brevity, if this does not lead to ambiguity, we drop symbol Ak Ak k k and write pj , wj and dj instead of pA and dA j , wj j , respectively. Given a   schedule for the problem, a subset of jobs Jk ⊆ Jk and jobs Jp , Jq ∈ Jk , where k ∈ {1, 2}, symbol Jp Jq means that either Jp is sequenced before Jq in the  schedule or Jp = Jq , while symbol JL denotes the last job in the subset Jk . Symbol σ denotes such a schedule for the problem, in which a job Ji starts  at time Si ≥ t0 and is followed by a job Jj . Similarly, symbol σ denotes such a schedule for the problem, in which a job Jj starts at time Si ≥ t0 and is followed by a job Ji . If the property under consideration concerns agent A1 , we also assume that in σ between Ji and Jj are sequenced jobs from a  subset J2 , unless stated otherwise. Similarly, if a property concerns agent  A2 , we also assume that in σ between Jj and Ji are sequenced jobs from  a subset J1 , unless stated otherwise.   Finally, for given σ and Jq ∈ Jk , Bq (σ) := Jp Jq (1 + bp ), provided that  Jp ∈ Jk and k ∈ {1, 2}. Before we start presenting the properties, notice that the completion time of the last job in a subset of jobs with proportional processing times does not depend on the order of jobs Moreover, any optimal schedule  in the subset. A2 for problem 1|p j = bj Sj | A12 wj Cj + Lmax does not include idle times, since the criterion A1 wj Cj + LA max is the sum of two regular criteria. 8

Property 1. If some jobs of agent A1 have equal there exists  weights, Athen 2 an optimal schedule for problem 1|pj = bj Sj | A1 wj Cj + Lmax in which the jobs are scheduled in non–decreasing order of their deterioration rates. Proof. Let Ji and Jj be two jobs of agent A1 such that wi = wj = w and bi ≥ bj . Then the weighted completion times of Ji and Jj in schedule σ are equal to wi Ci (σ) = w(1 + bi )Si and wj Cj (σ) = w(1 + bi )BL (σ)(1 + bj )Si ,  respectively. Moreover, for any Jk ∈ J2 we have Lk (σ) = Ck (σ) − dk = (1 + bi )Bk (σ)Si − dk .  Consider now schedule σ . Notice that the exchange of jobs Ji and Jj will  affect only the completion times of Ji , Jj and the jobs from J2 .    Then wj Cj (σ ) = w(1 + bj )Si , wi Ci (σ ) = w(1 + bj )BL (σ )(1 + bi )Si and     for any Jk ∈ J2 we have Lk (σ ) = Ck (σ ) − dk = (1 + bj )Bk (σ )Si − dk .    since wj Cj (σ )+wi Ci (σ )−wi Ci (σ)−wj Cj (σ) =  Since BL (σ ) = BL (σ) and  w (1 + bj ) + (1 + bj )BL (σ )(1 + bi ) − (1 + bi ) − (1 + bi )BL (σ)(1 + bj ) Si =    w(bj − bi )Si ≤ 0, we have A1 wj Cj (σ ) − A1 wj Cj (σ) ≤ 0.    Denote Bk := Bk (σ ). Since for any Jk ∈ J2 we have Bk (σ ) = Bk (σ), it   follows that Lk (σ ) − Lk (σ) = (bj − bi )Bk Si ≤ 0. Thus, Lmax (σ ) ≤ Lmax (σ).    Therefore, f (σ ) = f1 (σ ) + f2 (σ ) ≤ f1 (σ) + f2 (σ) = f (σ) and schedule  σ is not worse than schedule σ. Repeating, if necessary, a similar exchange for other pairs of jobs with equal weights, we obtain a schedule in which jobs of agent A1 are scheduled  in non–decreasing order of deterioration rates bj . Since in the proofs of other properties we apply similar reasoning and notation as above, we limit the proofs only to the most important parts. rates, then Property 2. If some jobs of agent A1 have equal deterioration  2 there exists an optimal schedule for problem 1|pj = bj Sj | A1 wj Cj + LA max in which the jobs are scheduled in non–decreasing order of their weights. Proof. Let Ji and Jj be two jobs of agent A1 such that bi = bj = b and wi ≥ wj . Denote B := 1+b. Then wi Ci (σ) = wi BSi , wj Cj (σ) = wj B 2 BL (σ)Si  and Lk (σ) = BBk (σ)Si − dk for any Jk ∈ J2 .     Similarly, wj Cj (σ ) = wj BSi , wi Ci (σ ) = wi B 2 BL (σ )Si and Lk (σ ) =   BBk (σ )Si − dk for any Jk ∈ J2 .    A2 2 Since Lk (σ ) = Lk (σ) for any Jk ∈ J2 , LA max (σ ) = Lmax (σ). Similarly, if    we denote BL := BL (σ ), then since BL (σ ) = BL (σ) and since wj Cj (σ ) + 9

   w C (σ )−w C (σ)−w C (σ) = (w −w )(1−BB )BS ≤ 0, i i i i j j j i L i A1 wj Cj (σ )−  A1 wj Cj (σ) ≤ 0. Repeating, if necessary, a similar exchange for other pairs of jobs with equal deterioration rates, we obtain a schedule in which jobs of agent A1 are  scheduled in non–decreasing order of weights wj . Property 3. If deterioration rates and weights of adjacent jobs Ji and Jj b of agent A1 are such that (1+bbii )wi ≤ (1+bjj )wj , then there exists an optimal  2 schedule for problem 1|pj = bj Sj | A1 wj Cj + LA max in which Ji precedes Jj . b

Proof. Let Ji and Jj be two jobs of agent A1 such that (1+bbii )wi ≥ (1+bjj )wj  2 and let σ be a schedule for problem 1|pj = bj Sj | A1 wj Cj + θLA max in which job Ji starts at time Si ≥ t0 and is immediately followed by job Jj . Then wi Ci (σ) = wi (1+bi )Si and wj Cj (σ) = wj (1+bi )(1+bj )Si . Similarly,   wj Cj (σ )  = wj (1 + bj )Si and  wi Ci (σ ) = wi (1 + bj )(1 + bi )Si .  Since A1 wj Cj (σ )− A1 wj Cj (σ) = (wi bj (1 + bi ) − wj bi (1 + bj )) Si ≤ 0   A2 2 and since LA  max (σ ) = Lmax (σ), schedule σ is not worse than σ. Property 4. If deterioration rates and weights of jobs of agent A1 are such b that bi ≤ bj whenever (1+bbii )wi ≤ (1+bjj )wj for 1 ≤ i = j ≤ n1 , then there exists  2 an optimal schedule for problem 1|pj = bj Sj | A1 wj Cj + LA max in which the bj jobs are scheduled in non–decreasing order of the ratios (1+bj )wj . Proof. Let Ji and Jj be two jobs of agent A1 such that bi ≥ bj whenever b bi ≥ (1+bjj )wj . (1+bi )wi Then wi Ci (σ) = wi (1 + bi )Si and wj Cj (σ) = wj (1 + bi )BL (σ)(1 + bj )Si .    Similarly, wj Cj (σ ) = wj (1+bj )Si and wi Ci (σ ) = wi (1+bj )B L (σ) )(1+bi )Si .    := B (σ ). Then, since B (σ ) = B (σ), w C (σ )− Denote B L L L L j j A 1  A1 wj Cj (σ) = (T1 − T2 )Si , where T1 = wi (1 + bi ) + wj (1 + bi )BL (1 + bj ) and T2 = wj (1 + bj ) + wi (1 + bj )BL (1 + bi ). Notice that T1 ≥ wi (1 + bi ) + wj (1 + bi )(1 + bj ), since BL ≥ 1 by definition. Similarly, from the same reason, T2 ≥ wj (1 + bj ) + wi (1 + bj )(1 + bi ).  − T ≤ w (1 + b )b − w (1 + b )b ≤ 0, w C (σ )− Therefore, since T 1 2 j j i i i j j j A 1  A1 wj Cj (σ) ≤ 0.   Similarly, since Lk (σ) = (1 + bi )Bk (σ)Si and Lk (σ ) = (1 + bj )Bk (σ )Si  A2 2 for any Jk ∈ J2 , LA max (σ ) ≤ Lmax (σ) since bi ≥ bj .   Thus, schedule σ is not worse than σ. 10

Property 5. If some jobs of agent A2 have then in any  equal due-dates, A2 optimal schedule for problem 1|pj = bj Sj | A1 wj Cj + Lmax the order of the jobs is immaterial. Proof. Let Ji and Jj be two jobs of agent A2 such that di = dj = d. Then Li (σ) = (1 + bi )Si − d and Lj (σ) = (1 + bi )BL (σ)(1 + bj )Si − d. Similarly,    Lj (σ ) = (1 + bj )Si − d and Li (σ ) = (1 + bj )BL (σ )(1 + bi )Si − d.   Since BL (σ ) = BL (σ), we have max{Li (σ), Lj (σ)} = Lj (σ) = Li (σ ) =    A2 2 max{Li (σ ), Lj (σ )}. Therefore, LA max (σ) = Lmax (σ ). Since a similar exchange for other pairs of jobs with equal due-dates does 2 not change the value of LA max as well,  the orderA2of the jobs in any optimal schedule for problem 1|pj = bj Sj | A1 wj Cj + Lmax is immaterial.   Property 6. In any optimal schedule for problem 1|pj = bj Sj | A1 wj Cj + 2 LA max jobs of agent A2 are scheduled in non–decreasing order of their duedates. Proof. Let Ji and Jj be two jobs of agent A2 such that di ≥ dj . Then Li (σ) = (1 + bi )Si − di and Lj (σ) = (1 + bi )BL (σ)(1 + bj )Si − dj .    Similarly, Lj (σ ) = (1+bj )Si −dj and Li (σ ) = (1+bj )BL (σ )(1+bi )Si −di .   Since Lj (σ) ≥ Li (σ ) and Lj (σ) ≥ Li (σ ), we have max{Li (σ), Lj (σ)} ≥    A2 2 max{Li (σ ), Lj (σ )}. Therefore, LA max (σ ) ≤ Lmax (σ). Repeating, if necessary, a similar exchange for other similar pairs of jobs, we obtain a schedule in which jobs of agent A2 are scheduled in non– decreasing order of due-dates dj .  Properties presented in this section may be divided into global and local ones. A global property describes how to schedule jobs in the whole of a schedule. In other words, a global property describes the structure of an optimal schedule. Hence, any application of such a property to a schedule leads to a new schedule with lower values of both agent criteria. Examples of global properties are Properties 1, 2, 4 and 5. A local property describes how to schedule jobs in a part of a schedule. In other words, a local property describes only the structure of locally optimal blocks of an agent jobs, not the optimal schedule. Hence, though application of such a property may decrease the value of an agent’s criterion, it not necessarily does the same for the other agent’s criterion. Examples of local properties are Properties 3 and 6. 11

Local and global properties differ in the strength of conditions specified for jobs of an agent. For example, the condition used in local Property 3 is stronger than the one used in global Property 4. Both these kinds of properties are used in an exact algorithm for our problem, discussed in Sections 4 and 6. 4. Exact algorithm for problem 1|pj = bj Sj |

 A1

2 wj Cj + LA max

In this section, we present an exact algorithm for the considered problem. We use the algorithm as a tool of comparison of the relative power of properties considered in Section 3 and in the evaluation of the quality of schedules generated by the meta-heuristic presented in Section 5. 4.1. General idea Our exact algorithm is a variant of a branch-and-bound algorithm. In order to find an optimal schedule, we implicitely construct all possible schedules starting from an initial random schedule. During the process, in order to decrease the amount of used space, we remember only the current schedule CurrentSolution and the best schedule BestSolution found so far. Similarly to branch-and-bound algorithms, we organize the constructed schedules in a tree and use a branching procedure to construct the part of the tree that is currently being investigated. The branching procedure uses the lexicographical order with respect to the initial indices of jobs and it is done either by generation at the next level of the tree a descendant or, if a new descendant cannot be created, a sibling. A descendant is a partial or complete schedule created from the current one by adding a single job. A sibling is a partial schedule that is the next to the current partial schedule. For example, in the case of n = 5 jobs, a descendant and a sibling of partial schedule (1, 4, 3) are in the form of (1, 4, 3, 2) and (1, 4, 5), respectively. In bounding procedure, in view of results of the first experiment reported in Section 6.3, we prune the tree either by applying global properties proved in Section 3 or by using the value of the best known solution. We control the running and stopping of the algorithm using Boolean variables Stop and NextSibling that are responsible for checking whether a stop condition is met and whether a new sibling can be created or not, respectively. A pseudo-code of our exact algorithm is presented in Listing 1.

12

Listing 1: Exact algorithm for problem 1|pj = bj Sj | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

 A1

2 wj Cj + LA max

// Initialization BestSolution ← random solution CurrentSolution ← empty solution Stop ← f a l s e NextSibling ← f a l s e // Main loop while ( not Stop ) do i f NextSibling SiblingOK ← create a sibling of CurrentSolution i f ( not SiblingOK ) Stop ← true NextSibling ← f a l s e else extend CurrentSolution by a single job i f ( not Stop ) i f CurrentSolution is not better than BestSolution NextSibling ← true else i f CurrentSolution contains all jobs i f CurrentSolution is better than BestSolution BestSolution ← CurrentSolution NextSibling ← true e l s e continue i f CurrentSolution is the last solution Stop ← true end while // Final solution return BestSolution

4.2. Implementation Our exact algorithm is implemented in C# 4.0 language and uses a new version of our library TEAC [10] and .NET Framework 4.0. C# is a modern object-oriented programming language that gives a great flexibility of the final code [6]. Moreover, this code can be easily modified and adopted to new problems. In order to give the reader a more deep insight into our implementation, below we describe its main details. Compared to the version of the library presented in [10], the new version of TEAC library is enriched by definitions of class BnBAlgorithm and interface IBnBIndividual that realize a branch-and-bound algorithm. Since the class implementing our agent scheduling problem, TwoAgentsSchedule, implements interfaces IBnBIndividual and IIndividual, it can be used by 13

both the branch-and-bound algorithm described here and a meta-heuristic algorithm described in Section 5. Class BnBAlgorithm is the main class of our exact algorithm. The main part of its definition, method Run, is presented in Listing 2. Listing 2: Method Run of class BnBAlgorithm 1 public void Run ( ) { 2 // Initialization 3 bool Stop = f a l s e ; 4 bool CanBeBetter = f a l s e ; 5 bool NextSibling = f a l s e ; 6 PartialSolution . MakeEmpty ( ) ; 7 // Start statistics 8 statistics . StartAlgoritm ( ) ; 9 // Main loop 10 do { 11 i f ( NextSibling ) { 12 bool SiblingOK = PartialSolution . CreateSibling ( ) ; 13 i f ( ! SiblingOK ) { Stop = true ; } 14 NextSibling = f a l s e ; 15 } else { 16 bool DescendantOK = PartialSolution . CreateDescendant ( ) ; 17 } 18 i f ( ! Stop ) { 19 CanBeBetter = PartialSolution . CanBeBetter ( FullSolution , bestValue ) ; 20 i f ( ! CanBeBetter ) { 21 // Update statistics 22 statistics . IncrementRejectCount ( PartialSolution . CurrentLevel ) ; 23 NextSibling = true ; 24 } else { 25 i f ( PartialSolution . IsFullSolution ( ) ) { 26 i f ( PartialSolution . IsBetter ( FullSolution , bestValue ) ) { 27 SetBestFullSolution ( ) ; 28 } 29 NextSibling = true ; 30 } e l s e { continue ; } 31 } 32 } 33 i f ( PartialSolution . IsLast ( ) ) { Stop = true ; } 34 } while ( ! Stop ) ; 35 // Stop statistics 36 statistics . EndAlgorithm ( ) ;

There are three main differences between method Run and the pseudocode from Listing 1. The first one is the using of methods StartAlgoritm, 14

IncrementRejectCount and EndAlgorithm that start, update and stop writing data to a statistics file, respectively. We have used the data from the file generating the tables presented in Section 6. The second difference is the fact that both PartialSolution and FullSolution must implement interface IBnBIndividual presented in Listing 3. Notice that before the execution of method Run we need to know the initial values of FullSolution and bestValue that are calculated using method CreateFirstFullSolution of interface IBnBIndividual. Listing 3: Interface IBnBIndividual 1 public i n t e r f a c e IBnBIndividual { 2 IBnBIndividual CreateFirstFullSolution ( ) ; 3 IBnBIndividual CloneBnB ( ) ; 4 i nt GetProblemSize ( ) ; 5 bool CanBeBetter ( IBnBIndividual FullSolution , double bestValue ) ; 6 bool CreateDescendant ( ) ; 7 void RandomFullSolution ( ) ; 8 bool CreateSibling ( ) ; 9 bool IsBetter ( IBnBIndividual FullSolution , double bestValue ) ; 10 bool IsFullSolution ( ) ; 11 bool IsLast ( ) ; 12 void MakeEmpty ( ) ; 13 i nt CurrentLevel { get ; s e t ; } 14 i nt MaxLevel { get ; } 15 }

The last difference concerns the criterion function f . Namely, since f includes a part related to the Lmax criterion that may be negative, it is possible that by adding to a partial schedule a job with large due date we can decrease the value of f . Therefore, we use in our exact algorithm a function called CanBeBetter instead of immediate comparing the value of criterion f for a given partial schedule and that one of the best solution found so far. Using global properties from Section 3 that define an order of jobs of particular agents, function CanBeBetter delays the comparison of the current schedule with the best found so far until the moment when all jobs of agent A2 have been scheduled. 5. Meta-heuristic for problem 1|pj = bj Sj |

 A1

2 wj Cj + LA max

In this section, we present a meta-heuristic algorithm for our problem.

15

5.1. General idea Our meta-heuristic is a variant of simple genetic algorithm and uses three sets of individuals: the base population, offspring population and temporary population. After the base population is created, as long as a stop condition is not met (in our case, it is achieving the maximal number of iterations saved in variable MaxGen), the algorithm generates a temporary population, builts an offspring population using the operators of crossing and mutation, evaluates it and creates a new population (see Listing 4). Listing 4: Meta-heuristic algorithm for problem 1|pj = bj Sj | 1 2 3 4 5 6 7 8 9 10 11 12 13 14



A1

2 wj Cj + LA max

// Initiatization i ← 0 Create base population P0 Evaluate P0 // Main loop while ( i ≤ MaxGen ) do Create temporary population Ti by preselection of Pi Create offspring population Oi by crossing and mutation of Ti Evaluate Oi Create population Pi+1 by postselection of Pi and Oi i ← i + 1 end while // Final solution return the best solution from population Pi

5.2. Implementation As in the case of the exact algorithm described in Section 4, our meta 2 heuristic for problem 1|pj = bj Sj | A1 wj Cj +LA max is implemented in C# 4.0 and uses a new version of TEAC library [10] and .NET Framework 4.0. In the meta-heuristic, offspring population size equals 50, the maximal number of generations maxGen equals 100, mutation probability equals 0.02 and crossover probability equals 0.80. Since in our problem a genom is an array of integers, we use the simple crossover operator (i.e. exchange of subchains between two individuals, subchain length equals 14 of the legth of genome), with tournament preselection (tournament size equals 5) and random postselection. We also use swap mutation, i.e. a simple exchange of two randomly selected jobs. The main part of code of the meta-heuristic is depicted in Listing 5.

16

Listing 5: The main part of the code of the meta-heuristic algorithm 1 public override void Evolve ( ) { 2 Population theTempPop ; 3 Population theOffspringPop ; 4 Population [ ] thePopsToSelectFrom = new Population [ 2 ] ; 5 while ( f a l s e == goal . Accomplished ( population ) ) { 6 theTempPop = preselection . SelectFrom ( population ) ; 7 theOffspringPop = crossover . ApplyTo ( theTempPop ) ; 8 mutation . ApplyTo ( theOffspringPop ) ; 9 fitness . EvaluatePopulation ( theOffspringPop ) ; 10 thePopsToSelectFrom [ 0 ] = population ; 11 thePopsToSelectFrom [ 1 ] = theOffspringPop ; 12 population = postselection . SelectFrom ( thePopsToSelectFrom ) ; 13 CurrentGeneration++; 14 population . Generation = CurrentGeneration ; 15 actualBest = Population . GetBestIndividual ( ) ; 16 i f ( 0 < actualBest . CompareTo ( bestFound ) ) 17 bestFound = actualBest . Clone ( ) ; 18 } 19 }

6. Computational experiments In this section, we describe the results of computational experiments that we have conducted in order to verify the quality of schedules generated by the algorithms described in Sections 4 and 5. 6.1. Hardware and software environment Our computational experiments have been conducted in two environments. The first (preliminary) experiment was running in C# 2.0 Microsoft Visual Studio 2005 environment with .NET Framework 2.0 on a notebook with Pentium M 1.4 GHz CPU, under control of Microsoft Windows XP Professional operating system with Service Pack 3. The aim of this experiment was to verify on a small set of random instances the power of local and global properties using the new version of the TEAC library [10]. The second (main) experiment was running in C# 4.0 Microsoft Visual 2010 environment with .NET Framework 4.0 on HP Compaq 6710b computer with Core 2 Duo CPU T7250 with 2.00GHz clock and 4 GB RAM memory, under control of Microsoft Windows 7 Professional with Service Pack 1. The aim of this experiment was to verify on a large set of random instances the quality of schedules generated by our algorithms. 17

6.2. Instance generation We tested our algorithms on randomly generated integer instances. Each instance was composed of n job deterioration rates of both agents, n1 job weigths of agent A1 and n2 job due-dates of agent A2 . Job deterioration rates of both agents and job weights of agent A1 were generated randomly from a uniform distribution, while job due-datesof agent A2 were generated ], where B = Jj ∈A1 (1 + bj ). randomly from the interval [ B2 , 3B 2 Generating these instances we have taken into consideration the fact that  A2 1|pj = bj Sj | A1 wj Cj + Lmax is a multiplicative problem. This means that in the problem the completion time of a job equals the product of factors, each equal to a job deterioration rate plus 1, corresponding to the job itself and all jobs preceding this job, while in any scheduling problem with fixed job processing times the completion time equals the sum of the basic processing time of the given job and basic processing times of all jobs that precede it. Therefore, job completion times in schedules constructed by our algorithms can be very big numbers. However, since we assumed that deterioration rates and weights are of double type that has 52 binary significant digits (see [6, Sect. 4.6.1] for details) and is consistent with IEEE 754-1985 standard that has scope from 5.0 × 10−324 up to 1.7 × 10+308 [11], we did not have problems with the scope of job completion times. In order to avoid the lost of accuracy, we assumed that the coefficients shall grow only up to a limit that is not larger than the product of all factors defined as above. For example, if the product is equal to 1010 and we generate instances with n = 10 jobs, no job deterioration rate or weight can be larger than 9. 6.3. Exact algorithm results As mentioned in Section 6.1, we have conducted two experiments with  2 our exact algorithm for problem 1|pj = bj Sj | A1 wj Cj + LA max . In the first experiment, we tested the efficiency of three types of our exact algorithm: pure, local and global ones. In pure exact algorithm we used only branching procedure, i.e. no properties were used at all. In local exact algorithm we discarded all partial schedules that did not satisfy the job orderings implied by the properties from Section 3. This allowed us to cut the search tree more efficiently, but only with respect to blocks of jobs, not complete schedules. Finally, in global exact algorithm, in addition to schedules discarded in the previous case, we also discarded all schedules for 18

which there existed such a job that after adding this job to a schedule it disturbed the job ordering implied by mentioned above properties. In the experiment, we assumed that the number of jobs n = 10, the starting time t0 = 1, the maximal job deterioration rate B = n = 10, the maximal job weight W ≈ n2 = 5 and the maximal due-date D = 5 × 106 . For each n, we generated 5 pairs (n1 , n2 ) : (3, 7), (4, 6), (5, 5), (6, 4) and (7, 3). For each pair, we generated 10 random instances with bj ∈ [1, B], wj ∈ [1, W ], dj ∈ [2, D]. In total, we generated 50 instances. The first experiment has shown that pure and local exact algorithm have unsatisfactory performance compared to the global exact algorithm that gave the best results. Therefore, in the second experiment we used only the global version of function CanBeBetter. Results of the second experiment are summarized in Table 1 (medium size instances) and Table 2 (large size instances). All values in the tables are averages for 10 instances. Symbols T , sd(T ), N, favg and sd(f ) denote the average computation time (in seconds), the standard deviation of T , the percentage of the number of visited nodes, the average value of criterion f and the standard deviation of f , respectively. The first four values are expressed as multiples of 10−5 , while the latter one is a multiplicity of 1011 . Symbol  means that the value of a given position is lower than 10−7 . In total, in this experiment we generated 600 instances. During experiments with our exact algorithm we noticed that its running time not always monotonically increases with the increase of instance size. For example, the running time for an instance with n = 19 jobs was equal to 29.72s, while for a larger instance, with n = 20 jobs, was equal to 20.09s. A similar behavior we noticed for instances with n = 23 and n = 24 jobs. 6.4. Meta-heuristic algorithm results As in the case of exact algorithm, we conducted for our meta-heuristic algorithm two experiments. However, as opposed to the exact algorithm case, in these experiments we did not use properties of the problem proved in Section 3, since we wanted to use the meta-heuristic as a black box. The aim of the first experiment was to fix some control parameters of the meta-heuristic. Thus, we used the 50 instances with n = 10 jobs that have been generated for the exact algorithm (see Section 6.3 for details). The quality of the schedules was satisfactory but an average computation time was quite high and equal to 1.24s. 19

n 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18

n1 4 5 6 7 4 5 6 7 4 5 6 7 5 6 7 8 5 6 7 8 6 7 8 9 6 7 8 9 7 8 9 10

n2 7 6 5 4 8 7 6 5 9 8 7 6 9 8 7 6 10 9 8 7 10 9 8 7 11 10 9 8 11 10 9 8

T sd(T ) 1,716 493 1,872 658 1,872 658 1,716 493 2,652 1,053 3,744 806 4,524 493 3,744 806 4,524 493 6,708 754 8,424 806 8,268 754 12,636 886 1,638 1,103 81,690 754 16,848 987 20,904 1,507 31,044 1,366 37,752 987 38,064 1,316 53,976 1,316 71,292 1,480 77,845 2,138 72,540 1,685 90,637 2,891 128,701 3,390 152,881 1,644 156,313 4,755 225,265 3,050 284,858 4,833 312,314 7,456 296,558 4,058

N favg sd(f ) 123 4,594,577,185,601.00 109.07 168 10,626,957,072,725.00 265.57 168 3,887,194,107,409.00 50.91 123 19,101,283,141,305.00 467.16 16 3,589,626,586,448.50 70.38 24 1,255,780,274,739.50 14.55 28 3,409,498,317,813.40 52.14 24 1,449,270,847,509.70 23.24 2 1,665,526,491,055.10 29.66 3 1,651,262,668,916.50 21.66 4 4,868,937,622,794.60 74.39 4 6,223,142,134,488.90 116.69  2,600,096,777,359.60 56.43 1 4,011,617,672,964.70 66.05 10 3,184,020,900,322.37 65.39 1 1,864,443,526,587.30 15.12  727,492,796,853.30 6.95  2,289,618,101,804.50 49.17  1,596,355,639,733.50 22.41  7,718,318,980,576.90 178.34  1,713,001,648,285.60 22.17  3,215,796,676,757.30 54.70  1,873,416,776,095.90 22.40  1,804,746,773,570.70 31.70  1,050,413,935,702.10 17.66  857,888,140,055.70 11.87  4,970,541,719,127.40 131.23  1,933,278,307,750.80 41.24  1,416,872,309,956.50 21.45  1,025,567,803,527.70 11.14  834,020,207,347.20 13.79  1,468,103,461,573.70 33.92

Table 1: Results of the second experiment with exact algorithm (medium size instances)

20

n 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25

n1 7 8 9 10 8 9 10 11 8 9 10 11 9 10 11 12 10 11 12 13 10 11 12 13 10 11 12 13

n2 12 11 10 9 12 11 10 9 13 12 11 10 13 12 11 10 13 12 11 10 14 13 12 11 15 14 13 12

T 386,102 534,303 631,960 637,264 977,190 1,231,004 1,351,125 1,266,572 1,704,623 2,295,399 2,694,761 2,707,865 4,216,083 5,212,929 5,606,520 5,310,118 9,652,718 11,192,136 11,263,272 10,015,264 17,282,883 21,112,083 22,862,727 21,685,075 30,779,933 39,817,227 45,990,343 46,407,178

sd(T ) N 8,678  8,197  19,225  7,289  8,707  29,208  16,402  17,316  26,352  10,813  10,379  19,132  23,443  24,624  52,941  25,796  102,125  57,981  160,591  25,718  161,419  236,109  43,490  65,223  245,038  808,937  300,276  748,775 

favg 5,727,800,998,264.30 5,029,008,300,341.60 3,406,737,666,157.70 3,452,857,329,548.40 1,230,428,814,931.10 2,899,266,266,989.90 1,844,925,519,985.40 818,372,179,240.40 6,180,888,067,627.50 11,383,625,771,553.20 299,260,631,152.00 8,174,224,404,128.00 23,220,927,131,291.90 21,660,368,004,663.80 23,731,307,841,121.40 24,431,506,628,288.90 60,041,819,230,727.60 55,900,427,284,823.60 20,347,711,615,877.10 45,708,852,746,566.00 62,731,171,673,302.80 52,008,795,252,071.60 71,871,599,794,418.50 62,968,309,912,703.00 90,794,390,861,471.60 66,771,827,024,117.40 69,954,045,823,178.50 77,383,615,281,695.10

sd(f ) 81.80 66.90 61.21 65.34 22.85 51.15 27.20 11.40 104.95 147.65 31.09 127.21 326.28 344.20 280.78 243.91 450.32 486.64 194.56 421.70 485.79 422.47 520.72 497.93 624.96 435.08 415.68 558.65

Table 2: Results of the second experiment with exact algorithm (large size instances)

21

In the second experiment we assumed that the number of jobs n is between 11 and 25, the largest value that we could serve using our hardware. For each n, we generated 4 pairs (n1 , n2 ) such that n1 + n2 = n and for any such a pair we generated 10 random instances applying the rules described in Section 6.2. For each instance, the meta-heuristic was executed 10 times. In total, in the experiment we generated 600 instances, and our meta-heuristic algorithm has performed 6,000 runs. In Table 3 we present results of the second experiment, corresponding to randomly selected instances from each pair (n1 , n2 ). In the table, first we give numbers #opt of runs in which an optimal solution has been found. Next, we present optimal values f  of criterion f and percentages rbest := (fbest − f  )/f  × 100%, ravg := (favg − f  )/f  × 100% and rworst := (fworst − f  )/f  × 100% of the best solution fbest , the average solution favg and the worst solution fworst that have been found in the 10 runs, respectively. Finally, we give average computation times Tavg (in seconds) that are about 30% smaller than those in the first experiment. n 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

n1 5 4 6 7 8 6 8 9 8 10 8 10 12 13 11

n2 6 8 7 7 7 10 9 9 11 10 13 12 11 11 14

#opt 10 4 3 8 4 5 3 1 2 1 0 0 0 0 0

f 12,327,481,987 1,852,097,615,556 1,921,347,356,436 1,821,403,801,306 402,402,008,983 123,223,166,928 42,138,205,701,579 555,660,873,317 64,012,038,542 2,015,539,074,450 2,539,579,417,240 10,158,317,267,846 13,607,998,370,286 47,405,486,562,095 70,230,343,422,056

rbest 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 2.60E-09 1.81E-09 4.78E-09 1.88E-09 1.27E-08

ravg 0.00E+00 3.74E-08 1.14E-07 1.43E-10 1.89E-07 1.57E-06 3.32E-08 8.90E-07 9.86E-07 8.72E-06 6.13E-07 2.51E-06 1.53E-06 1.22E-06 2.06E-07

rworst 0.00E+00 1.61E-07 6.31E-07 1.32E-09 1.82E-06 5.18E-06 1.41E-07 6.81E-06 3.94E-06 7.07E-05 5.83E-06 2.14E-05 4.58E-06 4.85E-06 6.91E-07

Tavg 0.39 0.39 0.42 0.45 0.48 0.53 0.56 0.59 0.64 0.66 0.70 0.72 0.75 0.80 0.84

Table 3: Selected results of the second experiment with meta-heuristic algorithm

Results in other groups of (n1 , n2 ) values were similar to those above. For example, for n1 = 5 and n2 = 6, number #opt was varying between 7 and 10, and values f  were changing between 1, 143, 066, 495 and 85, 781, 347, 638, 985. Percentage rbest was equal to 00E+00, while percentages ravg and rworst were 22

changing between 00E+00 and 4.66E-12, and 00E+00 and 4.66E-11, respectively. Times Tavg was varying between 0.34s and 0.39s. In order to give the reader a deeper insight into the results of the second experiment with our meta-heuristic algorithm, in Figure 1 we show optimal values of criterion f for schedules generated in this experiment in all runs. In the figure, on the X axis there are marked subsequent groups of 400 runs, while on the Y axis there are marked optimal values of f . Notice a huge difference between the minimal and the maximal values of the optimal values. This, as indicated in Section  6.2, is one Aof2 main difficulties in studying problems similar to 1|pj = bj Sj | A1 wj Cj + Lmax , not encountered in classic scheduling problems with fixed job processing times. 200,000,000,000,000

180,000,000,000,000

160,000,000,000,000

140,000,000,000,000

120,000,000,000,000

100,000,000,000,000

80,000,000,000,000

60,000,000,000,000

40,000,000,000,000

20,000,000,000,000

0 1

401

801

1201

1601

2001

2401

2801

3201

3601

4001

4401

4801

5201

5601

6000

Figure 1: Optimal values generated by meta-heuristic for runs no. 1 ≤ n ≤ 6000

Despite large differences between optimal values of criterion f for schedules generated by our meta-heuristic, the percentages rbest , ravg and rworst for all runs of the algorithm were on a low level. For all tested instances, excluding the ones with n = 18, the maximal values of rbest , ravg and rworst were equal to 4.15E-06, 4.46E-03 and 4.40E-02, respectively. The largest percentages, for instances with n = 18, were the following: rbest = 4.15E-06, 23

ravg = 4.57E-04 and rworst = 1.34E-03. The level of absolute errors was different, since though among the 6,000 runs of our meta-heuristic over 10% (i.e. 628) of absolute errors were equal to 0, the number of zero errors decreased with increase of instance size: in the first 2,000 of absolute error values there were 448 zeros, while in the second and in the third 2,000 of these values only 178 and 4, respectively. We also noticed that though all absolute errors were relatively small for medium size instances, they were few times bigger for large size instances. 7. Conclusions We considered a two-agent single machine problem of scheduling linearly deteriorating jobs with non-zero weights and due-dates. The objective was to minimize a weighted sum of the total weighted completion time and the maximum latess criteria. We have shown that the problem is N P-hard regardless the basic job processing times are equal to zero or not. We also proved several properties describing the structure of sub-optimal and optimal schedules for the considered problem, and proposed an exact algorithm and a meta-heuristic for the problem. Computational experiments have shown that the proposed meta-heuristic generates schedules close to optimal ones. Further research may concern further improvement of the performance of both proposed algorithms or applying meta-heuristics with populations of a variable size that may reduce the absolute error of schedules generated for large size instances of the problem under consideration. Acknowledgement The research of Dr. Gawiejnowicz has been supported by National Science Center Grant N N519 643340. [1] A. Agnetis, J-C. Billaut, S. Gawiejnowicz, D. Pacciarelli, A. Soukhal, Multiagent Scheduling: Models and Algorithms, Springer, BerlinHeidelberg, 2014, in press. [2] A. Agnetis, P. Detti, M. Pranzo, M.S. Sodhi, Sequencing unreliable jobs on parallel machines, Journal of Scheduling, 12 (2009), no. 1, 45–54. [3] A. Agnetis, P.B. Mirchandani, D. Pacciarelli, A. Pacifici, Scheduling problems with two competing agents, Operations Research, 52 (2004), no. 2, 229–242. 24

[4] A. Agnetis, D. Pacciarelli, A. Pacifici, Combinatorial models for multiagent scheduling problems, in: Multiprocessor Scheduling: Theory and Applications, E. Levner (ed.), Itech Education and Publishing, Vienna, 2007, pp. 21–46. [5] K.R. Baker, J.C. Smith, A multiple-criterion model for machine scheduling, Journal of Scheduling, 6 (2003), 7–16. [6] C# Language Specification 4.0, Microsoft Corporation, 2010, www.microsoft.com/en-us/download/details.aspx?id=7029. [7] T.C.E. Cheng, W.H. Wu, S.R. Cheng, C.C. Wu, Two-agent scheduling with position-based deteriorating jobs and learning effect, Applied Mathematics and Computation, 217 (2011), 8804–8824. [8] S. Gawiejnowicz, Time-Dependent Scheduling, Monographs in Theoretical Science: An EATCS Series, Springer, Berlin-New York, 2008. [9] S. Gawiejnowicz, W.C. Lee, C.L. Lin, C.C. Wu, Single-machine scheduling of proportionally deteriorating jobs by two agents, Journal of the Operational Research Society, 62 (2011), 1983–1991. [10] S. Gawiejnowicz, T. Onak, C. Suwalski, A new library for evolutionary algorithms, Lecture Notes in Computer Science, 3911 (2006), 414-421. [11] ANSI/IEEE Std 754-1985. IEEE Standard for Binary Floating-Point Arithmetic, The IEEE, New York, 1985. [12] W.C. Lee, W.J. Wang, Y.R. Shiau, C.C. Wu, A single-machine scheduling problem with two-agent and deteriorating jobs, Applied Mathematical Modelling, 34 (2010), no. 10, 3098-3107. [13] D.C. Li, P.H. Hsu, Solving a two-agent single-machine scheduling problem considering learning effect, Computers & Operations Research, 39 (2012), 1644–1651. [14] P. Liu, N. Yi, X.Y. Zhou, Two-agent single-machine scheduling problems under increasing linear deterioration, Applied Mathematical Modelling, 35 (2011), 2290–2296.

25

[15] P. Liu, L. Tang, Two-agent scheduling with linear deteriorating jobs on a single machine, Lecture Notes in Computer Science, 5092 (2008), 642–650. [16] P. Liu, L. Tang, X.Y. Zhou, Two-agent group scheduling with deteriorating jobs on a single machine, International Journal of Advanced Manufacturing Technology, 47 (2010), 657-664. [17] G. Mosheiov, Scheduling jobs under simple linear deterioration, Computers & Operations Research, 21 (1994), no. 6, 653–659. [18] C.T. Ng, M.S. Barketau, T.C.E. Cheng, M.Y. Kovalyov, ”Product Partition” and related problems of scheduling and systems reliability: Computational complexity and approximation, European Journal of Operational Research, 207 (2010), 601–604. [19] N.H. Tuong, A. Soukhal, J.C. Billaut, Single-machine multi-agent scheduling problems with a global objective function, Journal of Scheduling, 15 (2012), 311–321. [20] G.H. Wan, S.R. Vakati, J.Y.T. Leung, M. Pinedo, Scheduling two agents with controllable processing times, European Journal of Operational Research, 205 (2010), 528–539. [21] W.H. Wu, S.R. Cheng, C.C. Wu, Y.Q. Yin, Ant colony algorithms for a two-agent scheduling with sum-of processing times-based learning and deteriorating considerations, Journal of Intelligent Manufacturing, 23 (2012), 1985–1993.

26