**Theoretical and Computational Research in Various Scheduling Models**

Editors **Chin-Chia Wu Win-Chin Lin**

MDPI • Basel • Beijing • Wuhan • Barcelona • Belgrade • Manchester • Tokyo • Cluj • Tianjin

*Editors* Chin-Chia Wu Feng Chia University Taiwan

Win-Chin Lin Feng Chia University Taiwan

*Editorial Office* MDPI St. Alban-Anlage 66 4052 Basel, Switzerland

This is a reprint of articles from the Special Issue published online in the open access journal *Mathematics* (ISSN 2227-7390) (available at: https://www.mdpi.com/journal/mathematics/special issues/Theor Comput Res Var Sched Model).

For citation purposes, cite each article independently as indicated on the article page online and as indicated below:

LastName, A.A.; LastName, B.B.; LastName, C.C. Article Title. *Journal Name* **Year**, *Volume Number*, Page Range.

**ISBN 978-3-0365-3018-5 (Hbk) ISBN 978-3-0365-3019-2 (PDF)**

© 2022 by the authors. Articles in this book are Open Access and distributed under the Creative Commons Attribution (CC BY) license, which allows users to download, copy and build upon published articles, as long as the author and publisher are properly credited, which ensures maximum dissemination and a wider impact of our publications.

The book as a whole is distributed by MDPI under the terms and conditions of the Creative Commons license CC BY-NC-ND.

## **Contents**


## **About the Editors**

**Chin-Chia Wu** is a Professor in the Department of Statistics, Feng Chia University, Taiwan. He received his Doctoral Degree from the Graduate Institute of Management, School of Management, at the National Taiwan University of Science and Technology, Taiwan, in 1997. His teaching and research interests include applied statistics and operations research. He has published more than 180 papers in SCI/SSCI journals.

**Win-Chin Lin** is an associate professor in the Department of Statistics, Feng Chia University, Taiwan. He received his doctoral degree from the Department of Statistics, Iowa State University, USA, in 1998. His teaching and research interests include applied statistics, experimental designs, and scheduling.

## **Preface to "Theoretical and Computational Research in Various Scheduling Models"**

The long-standing field of research with great practical value in operation research involves designing effective methods to find the best solution to perform certain jobs or policies with or without certain constraints. The literature shows that numerous papers have been written on scheduling theory and its applications over a long time. To solve various scheduling problems in different real-life environments, the literature also assesses many studies on developing exact methods or approximate algorithms, through deriving computational complexity, or evaluating their performance by using simulation results.

However, there are a lot of challenging scheduling problems in new application domains which have yet to be further explored. Thus, scheduling issues have always been a popular field of research, with many potential real-life applications including assignment, manufacturing, and logistics.

This Special Issue aims to provide a bridge to facilitate the interaction between the researcher and the practitioner in scheduling questions. Although discrete mathematics is a common method to solve scheduling problems, the further development of this method is limited due to the lack of general principles, which poses a major challenge to this research field. Papers that have made significant contributions to methodological progress or created model innovations to solve major and well-documented scheduling problems are welcome. The studies can be theoretical, methodological, computational, or application-oriented. In addition, relevant statistical applications in social systems are also welcome. Potential topics include but are not limited to the following:


**Chin-Chia Wu, Win-Chin Lin** *Editors*

## *Article* **Two-Agent Preemptive Pareto-Scheduling to Minimize Late Work and Other Criteria**

#### **Ruyan He \* and Jinjiang Yuan**

School of Mathematics and Statistics, Zhengzhou University, Zhengzhou 450001, China; yuanjj@zzu.edu.cn **\*** Correspondence: heruyan219@163.com or heruyan219@gs.zzu.edu.cn

Received: 12 August 2020; Accepted: 28 August 2020; Published: 5 September 2020

**Abstract:** In this paper, we consider three preemptive Pareto-scheduling problems with two competing agents on a single machine. In each problem, the objective function of agent *A* is the total completion time, the maximum lateness, or the total late work while the objective function of agent *B* is the total late work. For each problem, we provide a polynomial-time algorithm to characterize the trade-off curve of all Pareto-optimal points.

**Keywords:** two-agent; Pareto-scheduling; late work; trade-off curve; polynomial time

#### **1. Introduction**

In recent decades, scheduling with two competing agents and scheduling with late-work criterion have been two hot topics in scheduling research. However, research for the combination of the two topics has not been studied extensively. One reason for this phenomenon stems from the fact that the single-machine scheduling problem for minimizing the total late work is already NP-hard when preemption is not allowed. Given the polynomial solvability of the preemptive scheduling problem for minimizing the total late work, we study the single-machine two-agent preemptive Pareto-scheduling problems with the total late work being one of the criteria.

**Problem Formulation:** Consider two competing agents *<sup>A</sup>* and *<sup>B</sup>*. For each agent *<sup>X</sup>* ∈ {*A*, *<sup>B</sup>*}, let <sup>J</sup> *<sup>X</sup>* <sup>=</sup> {*J<sup>X</sup>* <sup>1</sup> , *<sup>J</sup><sup>X</sup>* <sup>2</sup> , ... , *<sup>J</sup><sup>X</sup> nX* } be the set of jobs of agent *<sup>X</sup>*, where <sup>J</sup> *<sup>A</sup>* ∩ J *<sup>B</sup>* <sup>=</sup> <sup>∅</sup> and the jobs in <sup>J</sup> *<sup>X</sup>* are called the *X*-jobs. Each job *J<sup>X</sup> <sup>j</sup>* has a processing time *<sup>p</sup><sup>X</sup> <sup>j</sup>* > 0 and a due date *<sup>d</sup><sup>X</sup> <sup>j</sup>* ≥ 0 which are integrally valued. The *<sup>n</sup>* <sup>=</sup> *nA* <sup>+</sup> *nB* independent jobs in <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* need to be preemptively processed on a single machine. Let *PX* = <sup>∑</sup>*nX <sup>j</sup>*=<sup>1</sup> *<sup>p</sup><sup>X</sup> <sup>j</sup>* and *P* = *PA* + *PB*. All jobs considered in this paper are available at time zero. Our problems allow us to assume that the maximum due date of all jobs is at most *P*.

Let *σ* be a feasible schedule which assigns the jobs for processing in pieces in the interval [0, +∞). To enhance the flexibility of analysis, we allow the existence of idle times in a feasible schedule. The *completion time* of job *J<sup>X</sup> <sup>j</sup>* in *<sup>σ</sup>* is denoted as *<sup>C</sup><sup>X</sup> <sup>j</sup>* (*σ*). The *late work* of *<sup>J</sup><sup>X</sup> <sup>j</sup>* in *<sup>σ</sup>*, denoted *<sup>Y</sup><sup>X</sup> <sup>j</sup>* (*σ*), is the amount of processing time of *J<sup>X</sup> <sup>j</sup>* after its due date *<sup>d</sup><sup>X</sup> <sup>j</sup>* in *<sup>σ</sup>*. If *<sup>Y</sup><sup>X</sup> <sup>j</sup>* (*σ*) = 0, *<sup>J</sup><sup>X</sup> <sup>j</sup>* is called *early* in *σ*. If 0 < *Y<sup>X</sup> <sup>j</sup>* (*σ*) < *<sup>p</sup><sup>X</sup> <sup>j</sup>* , *<sup>J</sup><sup>X</sup> <sup>j</sup>* is called *partially early* in *<sup>σ</sup>*. If *<sup>Y</sup><sup>X</sup> <sup>j</sup>* (*σ*) = *<sup>p</sup><sup>X</sup> <sup>j</sup>* , *<sup>J</sup><sup>X</sup> <sup>j</sup>* is called *late* in *σ*.

The scheduling criteria related to our research are given by ∑ *C<sup>A</sup> <sup>j</sup>* <sup>=</sup> <sup>∑</sup>*nA <sup>j</sup>*=<sup>1</sup> *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) (the *total completion time* of the *A*-jobs under schedule *σ*), *L<sup>A</sup>* max <sup>=</sup> max{*C<sup>A</sup> <sup>j</sup>* (*σ*) <sup>−</sup> *<sup>d</sup><sup>A</sup> <sup>j</sup>* : 1 ≤ *j* ≤ *nA*} (the *maximum lateness* of the *A*-jobs in schedule *σ*), and ∑*<sup>j</sup> Y<sup>X</sup> <sup>j</sup>* <sup>=</sup> <sup>∑</sup>*nX <sup>j</sup>*=<sup>1</sup> *<sup>Y</sup><sup>X</sup> <sup>j</sup>* (*σ*) (the *total late work* of the *X*-jobs under schedule *σ*). Then the three *Pareto-scheduling problems* studied in this paper are given by

$$\begin{cases} \label{10} 1 \mid \mathtt{pmtn} | \, ^\# (\sum \prescript{A}{j}{\sum} \prescript{Y}{j}{\sum}) , \\ \quad 1 \mid \mathtt{pmtn} | \, ^\# (L\_{\mathtt{max}}^A \prescript{}{\Sigma} \prescript{Y}{j}{\} , \\ \quad 1 \mid \mathtt{pmtn} | \, ^\# (\sum \prescript{}{j}{\sum} \prescript{}{\Sigma} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \prescript{}{j}{\sum} \pres^{}}$$

For each of the above three problems, we aim to find all the Pareto-optimal points of the problem and for each point a corresponding Pareto-optimal schedule. The formal definitions of Pareto-optimal point and Pareto-optimal schedule can be found in T'kindt and Billaut [1]. In this paper, the set of Pareto-optimal points forms a curve. Then we use the term *trade-off curve* to describe the set of Pareto-optimal points.

**Literature Review:** There is a huge amount of literature in scheduling with two competing agents and scheduling with late work criterion. Limited to the space of this paper, we only review some most related results.

Two-agent scheduling was first introduced by Agnetis et al. [2]. The authors proposed two important models for single-machine scheduling with two competing agents: constrained optimization model and Pareto optimization model. They studied nine problems arising from the different criteria combinations for the two agents and stated time complexity results for most of the resulting cases, where the scheduling criteria include the maximum regular cost function, the total (weighted) completion time and the number of tardy jobs. Early research on two-agent scheduling problems can also be found in Cheng et al. [3,4], Lee et al. [5], Leung et al. [6], and Ng et al. [7]. Agnetis et al. [8] applied the concept of price of fairness in resource allocation to two-agent single-machine scheduling problems, in which one agent aims at minimizing the total completion time, while the other agent wants to minimize the maximum tardiness with respect to a common due date. They further discussed the problem in which both agents wish to minimize the total completion time of their own jobs. Zhang et al. [9] studied the price of fairness in a two-agent single-machine scheduling problem in which both agents *A* and *B* want to minimize their own total completion time, and agent *B* has exactly two jobs.

There are few results on the two-agent scheduling problems with precedence constraints. Agnetis et al. [2] considered the two-agent problem with precedence constraints on single machine, i.e., 1|*prec*<sup>|</sup> *<sup>f</sup> <sup>A</sup>* max : *f <sup>B</sup>* max and solved this problem in polynomial time. Mor and Mosheiov [10] extended a classical single-machine scheduling problem, where the objective is to minimize maximum cost, given general job-dependent cost functions and general precedence constraints which was solved by the well-known Lawler's Algorithm. First, they allowed the option of job rejection. Then, they studied the more general setting of two competing agents, where job rejection is allowed either for one agent or for both. They showed that both extensions can be solved in polynomial time. Gao and Yuan [11] considered the Pareto-scheduling with two agents *A* and *B* for minimizing the total completion time of *A*-jobs and a maximum cost of *B*-jobs with precedence constraints. They showed that the problem can be solved in polynomial time. More recent results on two-agent scheduling problems can be found in Agnetis et al. [12], Liu et al. [13], Oron et al. [14], Perez-Gonzalez and Framinan [15], and Yuan [16,17].

Scheduling related to late-work criterion was first studied by Blazewicz and Finke [18]. Since then, several research groups have focused on this performance measure, obtaining a set of interesting results. Potts and Van Wassenhove [19] considered a single-machine scheduling problem where the goal is minimizing the total amount of late work. They showed that the problem is NP-hard and presented a pseudo-polynomial-time algorithm. Potts and Van Wassenhove [20] further proposed a branch-bound algorithm for the same problem and presented two fully polynomial-time approximation schemes with running times *O*( *<sup>n</sup>*<sup>2</sup> ) and *<sup>O</sup>*( *<sup>n</sup>*<sup>3</sup> ), respectively. Hariri et al. [21] considered a single-machine problem of minimizing the total weighted late work. They presented an *O*(*n* log *n*) algorithm for the preemptive total weighted late work problem. For papers that consider scheduling problem of minimizing other total late-work criteria, the reader may refer to the survey paper of Sterna [22].

Up to now, people have done little research about the combination of two-agent scheduling with late-work criterion. Wang et al. [23] addressed a two-agent scheduling problem where the objective is to minimize the total late work of the first agent, with the restriction that the maximum lateness of the second agent cannot exceed a given value. For small-scale problem instances, they established two pseudo-polynomial dynamic programming algorithms. For medium- to large-scale problem instances, they presented a branch-and-bound algorithm. Zhang and Wang [24] presented a two-agent scheduling problem where the objective is to minimize the total weighted late work of agent *A*, while keeping the maximum cost of agent *B* cannot exceed a given bound *U*. They addressed the complexity of those problems, and presented the optimal polynomial-time algorithms or pseudo-polynomial-time algorithm to solve the scheduling problems, respectively. Zhang and Yuan [25] considered the same problem as above and further studied the three versions of the problem.

Our research also uses some results in the single-machine preemptive scheduling with forbidden intervals (or maintenance activities), i.e., 1, *hm*|pmtn| *f* , where "1, *hm*" means that there are *m* forbidden intervals on the single machine and " *f* " is the objective function to be minimized. Without reviewing this scheduling topic in detail, we only state two known results used in our discussion. Lee [26] showed that problem 1, *hm*|pmtn| ∑ *Cj* can be solved by the preemptive SPT rule in *O*(*m* + *n* log *n*) time and problem 1, *hm*|pmtn|*L*max can be solved by the preemptive EDD rule in *O*(*m* + *n* log *n*) time.

**Our Contributions:** In Section 2, we introduce some notations and definitions and present several important lemmas. In Section 3, we show that the trade-off curve of problem 1|pmtn| #(∑ *C<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> j* ) can be determined in *O*(*nnAnB*) time. In Section 4, we show that the trade-off curve of problem 1|pmtn| #(*L<sup>A</sup>* max, ∑ *Y<sup>B</sup> <sup>j</sup>* ) can be determined in *O*(*nnAnB*) time. In Section 5, we show that the trade-off curve of problem 1|pmtn| #(∑ *Y<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) can be determined in *O*(*n* log *n*) time. Finally, some concluding remarks are given in Section 6.

#### **2. Preliminaries**

Let <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* be the job instance to be preemptively scheduled on a single machine. The preemption assumption allows us to schedule each job in pieces. For a piece *J<sup>X</sup> <sup>j</sup>* of job *<sup>J</sup><sup>X</sup> j* , we use *p<sup>X</sup> <sup>j</sup>* to denote the length (processing time) of *<sup>J</sup><sup>X</sup> <sup>j</sup>* and use *<sup>C</sup><sup>X</sup> <sup>j</sup>* (*σ*) to denote the completion time of *J<sup>X</sup> <sup>j</sup>* in schedule *σ*.

In the following, we consider the Pareto-scheduling problem 1|pmtn| #(*f <sup>A</sup>*, ∑ *Y<sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*, where *<sup>f</sup> <sup>A</sup>* is a regular objective function of the *<sup>A</sup>*-jobs or *<sup>f</sup> <sup>A</sup>* <sup>=</sup> <sup>∑</sup> *<sup>Y</sup><sup>A</sup> <sup>j</sup>* . We use <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) to denote the set of all Pareto-optimal points of this problem.

In a schedule *<sup>σ</sup>* of <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*, each *<sup>B</sup>*-job *<sup>J</sup><sup>B</sup> <sup>j</sup>* is partitioned into two parts: the *early part <sup>J</sup>BE <sup>j</sup>* (*σ*) and the *late part JBY <sup>j</sup>* (*σ*), where *<sup>J</sup>BE <sup>j</sup>* (*σ*) is processed before time *<sup>d</sup><sup>B</sup> <sup>j</sup>* in *<sup>σ</sup>* and *<sup>J</sup>BY <sup>j</sup>* (*σ*) is processed after time *d<sup>B</sup> <sup>j</sup>* in *<sup>σ</sup>*. Moreover, *<sup>p</sup>BE <sup>j</sup>* (*σ*) = *<sup>p</sup><sup>B</sup> <sup>j</sup>* <sup>−</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*) and *<sup>p</sup>BY <sup>j</sup>* (*σ*) = *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*) are used to denote the lengths (processing times) of *JBE <sup>j</sup>* (*σ*) and *<sup>J</sup>BY <sup>j</sup>* (*σ*), respectively. A part of length 0 is called a *trivial part*. We allow the existence of trivial parts to enhance flexibility in analysis. Then we have

$$\sum\_{j=1}^{n\_B} \mathcal{Y}\_j^B(\sigma) = \sum\_{j=1}^{n\_B} p\_j^{BY}(\sigma) = P\_B - \sum\_{j=1}^{n\_B} p\_j^{BE}(\sigma). \tag{1}$$

For convenience, we renumber the *B*-jobs such that

$$d\_1^{\mathcal{B}} \le d\_2^{\mathcal{B}} \le \cdots \le d\_{n\_{\mathcal{B}}}^{\mathcal{B}} \le P \tag{2}$$

and keep this numbering throughout this paper. Let *σ<sup>B</sup>* <sup>0</sup> = (*J<sup>B</sup>* <sup>1</sup> , *<sup>J</sup><sup>B</sup>* <sup>2</sup> , ... , *<sup>J</sup><sup>B</sup> nB* ) which schedules the *B*-jobs in the EDD order described in (2). From Potts and Van Wassenhove [19], the optimal value of problem <sup>1</sup>|pmtn<sup>|</sup> <sup>∑</sup> *Yj* on instance <sup>J</sup> *<sup>B</sup>* is given by *<sup>T</sup>*max(*σ<sup>B</sup>* <sup>0</sup> ). Then we have the following lemma.

**Lemma 1.** *For each point* (*<sup>f</sup>* <sup>∗</sup>,*Y*∗) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*)*, we have T*max(*σ<sup>B</sup>* <sup>0</sup> ) ≤ *Y*<sup>∗</sup> ≤ *PB.*

To make our analysis operational, we now consider an integer *<sup>Y</sup>*<sup>∗</sup> <sup>∈</sup> [*T*max(*σ<sup>B</sup>* <sup>0</sup> ), *PB*] and present a procedure to schedule the *B*-jobs preemptively with a particular structure. This procedure imitates the algorithm in Hariri et al. [21] for solving problem 1|pmtn| ∑ *wjYj*.

**Algorithm 1:** For scheduling the *B*-jobs according to the value of *Y*∗.

**Input:** The *<sup>B</sup>*-jobs <sup>J</sup> *<sup>B</sup>* with the EDD order in (2) and an integer *<sup>Y</sup>*<sup>∗</sup> <sup>∈</sup> [*T*max(*σ<sup>B</sup>* <sup>0</sup> ), *PB*]. **Step 1:** Determine the minimum index *j* <sup>∗</sup> ∈ {1, 2, ... , *nB*} such that *<sup>p</sup><sup>B</sup>* <sup>1</sup> + *<sup>p</sup><sup>B</sup>* <sup>2</sup> <sup>+</sup> ··· <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>j</sup>*<sup>∗</sup> ≥ *Y*∗. Then *p<sup>B</sup>* <sup>1</sup> + *<sup>p</sup><sup>B</sup>* <sup>2</sup> <sup>+</sup> ··· <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>j</sup>*∗−<sup>1</sup> <sup>&</sup>lt; *<sup>Y</sup>*∗. Please note that if *<sup>Y</sup>*<sup>∗</sup> <sup>=</sup> 0, then we have *<sup>j</sup>* <sup>∗</sup> = 1. We call *J<sup>B</sup> j*∗ the *critical B-job* corresponding to *Y*∗.

**Step 2:** Decompose the critical *B*-job *J<sup>B</sup> <sup>j</sup>*<sup>∗</sup> into two parts *<sup>J</sup>BE <sup>j</sup>*<sup>∗</sup> and *<sup>J</sup>BY <sup>j</sup>*<sup>∗</sup> such that

$$p\_{j^\*}^{BY} = Y^\* - \sum\_{j=1}^{j^\*-1} p\_j^B \text{ and } p\_{j^\*}^{BE} = p\_{j^\*}^B - p\_{j^\*}^{BY} = \sum\_{j=1}^{j^\*} p\_j^B - Y^\*.$$

We call *JBE <sup>j</sup>*<sup>∗</sup> and *<sup>J</sup>BY <sup>j</sup>*<sup>∗</sup> the *early part* and the *late part* of *<sup>J</sup><sup>B</sup> <sup>j</sup>*<sup>∗</sup> , respectively, corresponding to *Y*∗. Set <sup>J</sup> *BE*(*Y*∗) = {*JBE <sup>j</sup>*<sup>∗</sup> , *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗+1, *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗+2,..., *<sup>J</sup><sup>B</sup> nB* } and <sup>J</sup> *BY*(*Y*∗) = {*J<sup>B</sup>* <sup>1</sup> , *<sup>J</sup><sup>B</sup>* <sup>2</sup> ,..., *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗−1, *<sup>J</sup>BY <sup>j</sup>*<sup>∗</sup> }.

**Step 3:** Generate a schedule *<sup>σ</sup>B*(*Y*∗) of the *<sup>B</sup>*-jobs <sup>J</sup> *<sup>B</sup>* <sup>=</sup> <sup>J</sup> *BE*(*Y*∗) ∪ J *BY*(*Y*∗) in the following way:

**(3.1)** From time *<sup>P</sup>*<sup>∗</sup> :<sup>=</sup> *<sup>P</sup>* <sup>+</sup> 1, schedule the jobs (or pieces) in <sup>J</sup> *BY*(*Y*∗) consecutively in the order *J<sup>B</sup>* <sup>1</sup> , *<sup>J</sup><sup>B</sup>* <sup>2</sup> ,..., *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗−1, *<sup>J</sup>BY <sup>j</sup>*<sup>∗</sup> .

**(3.2)** Schedule the jobs (or pieces) in <sup>J</sup> *BE*(*Y*∗) by using the algorithm in Hariri et al. [21] for solving problem 1|pmtn<sup>|</sup> <sup>∑</sup> *Yj* on instance <sup>J</sup> *BE*(*Y*∗):

Beginning from time *d<sup>B</sup> nB* , schedule the jobs (or pieces) in <sup>J</sup> *BE*(*Y*∗) backwards in the order *JB nB* , *<sup>J</sup><sup>B</sup> nB*−1, ... , *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗+1, *<sup>J</sup>BE <sup>j</sup>*<sup>∗</sup> such that each job (or piece) in <sup>J</sup> *BE*(*Y*∗) is scheduled as late as possible subject to its due date.

**Output:** The schedule *σB*(*Y*∗) of the *B*-jobs.

It can be observed that Procedure(*Y*∗) runs in *O*(*n*) time. An objective function of the *A*-jobs, denoted *f <sup>A</sup>*, is called *regular* if *f <sup>A</sup>* is nondecreasing in the completion times of the *A*-jobs. Please note that ∑ *C<sup>A</sup> <sup>j</sup>* and *<sup>L</sup><sup>A</sup>* max are regular, but ∑ *Y<sup>A</sup> <sup>j</sup>* is not regular since the preemptive assumption. The following lemma is critical in our discussion.

**Lemma 2.** *Consider problem* 1|*pmtn*| #(*f <sup>A</sup>*, ∑ *Y<sup>B</sup> <sup>j</sup>* ) *on instance* <sup>J</sup> *<sup>A</sup>* ∪ J *B, where either <sup>f</sup> <sup>A</sup>* <sup>=</sup> <sup>∑</sup> *<sup>Y</sup><sup>A</sup> <sup>j</sup> or <sup>f</sup> <sup>A</sup> is a regular objective function of the A-jobs. Assume that* (*<sup>f</sup>* <sup>∗</sup>,*Y*∗) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) *and let <sup>σ</sup>B*(*Y*∗) *be the schedule of* <sup>J</sup> *<sup>B</sup> generated by Procedure(Y*∗*). Then there exists a Pareto-optimal schedule <sup>π</sup> corresponding to* (*<sup>f</sup>* <sup>∗</sup>,*Y*∗) *in which the B-jobs are scheduled in the same manner as that in σB*(*Y*∗)*. Such a Pareto-optimal schedule π is called a Y*∗*-standard schedule in the sequel.*

**Proof.** Let *σ* be a Pareto-optimal schedule corresponding to (*f* <sup>∗</sup>,*Y*∗) such that *C*max(*σ*) is as small as possible. Then no idle exists in *σ*, and so, *C*max(*σ*) = *P*.

The late parts of *B*-jobs can be scheduled arbitrarily late without affecting the objective values *f <sup>A</sup>* and ∑ *Y<sup>B</sup> <sup>j</sup>* . Thus, by shifting the late parts of *B*-jobs in *σ*, we obtain a new Pareto-optimal schedule *σ*<sup>1</sup> corresponding to (*f* <sup>∗</sup>,*Y*∗) such that the following property (P1) holds for *σ*1.

**(P1)** The late parts of *B*-jobs are scheduled consecutively in the interval [*P*∗, *P*∗ + *Y*∗] in an arbitrary order without idle time.

We next generate a Pareto-optimal schedule *σ*<sup>2</sup> corresponding to (*f* <sup>∗</sup>,*Y*∗) such that following property (P2) holds for *σ*2.

**(P2)** For every nontrivial early part *JBE <sup>j</sup>* (*σ*2) and every nontrivial late part *<sup>J</sup>BY <sup>k</sup>* (*σ*2) among the *B*-jobs, we have *j* ≥ *k*.

If *σ*<sup>1</sup> has the property (P2), we just set *σ*<sup>2</sup> = *σ*1. Otherwise, there are a nontrivial early part *JBE <sup>j</sup>* (*σ*1) and a nontrivial late part *JBY <sup>k</sup>* (*σ*1) among the *<sup>B</sup>*-jobs, such that *<sup>j</sup>* < *<sup>k</sup>*. From (2), we have *<sup>d</sup><sup>B</sup> <sup>j</sup>* <sup>≤</sup> *<sup>d</sup><sup>B</sup> k* . Let *<sup>δ</sup>* <sup>=</sup> min{*pBE <sup>j</sup>* (*σ*1), *<sup>p</sup>BY <sup>k</sup>* (*σ*1)}. By exchanging an amount of length *<sup>δ</sup>* between *<sup>J</sup>BE <sup>j</sup>* (*σ*1) and *<sup>J</sup>BY <sup>k</sup>* (*σ*1) in *σ*1, we obtain a new schedule without changing the objective values but with improving in the direction we need. Repeating this procedure, we eventually obtain a new Pareto-optimal schedule *σ*<sup>2</sup> corresponding to (*f* <sup>∗</sup>,*Y*∗) such that both properties (P1) and (P2) hold for *σ*2.

Let *σ*<sup>3</sup> be the schedule obtained from *σ*<sup>2</sup> by rescheduling (if necessary) the early parts of *B*-jobs in the order *JBE* <sup>1</sup> (*σ*) <sup>≺</sup> *<sup>J</sup>BE* <sup>2</sup> (*σ*) ≺···≺ *<sup>J</sup>BE nB* (*σ*). Since the EDD property described in (2), the early parts of *B*-jobs in *σ*<sup>2</sup> are also early in *σ*3. Then *σ*<sup>3</sup> is a Pareto-optimal schedule corresponding to (*f* <sup>∗</sup>,*Y*∗) such that properties (P1) and (P2), and additionally, the following property (P3), hold for *σ*3.

**(P3)** The early parts of *B*-jobs are scheduled in the order *JBE* <sup>1</sup> (*σ*3) <sup>≺</sup> *<sup>J</sup>BE* <sup>2</sup> (*σ*3) ≺···≺ *<sup>J</sup>BE nB* (*σ*3).

Please note that ∑*nB <sup>j</sup>*=<sup>1</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*3) = <sup>∑</sup>*nB <sup>j</sup>*=<sup>1</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σB*(*Y*<sup>∗</sup>)) = *<sup>Y</sup>*∗. Since *<sup>σ</sup>*<sup>3</sup> has the three properties (P1)–(P3), from Procedure (*Y*∗) for generating *σB*(*Y*∗), we know that *σ*<sup>3</sup> and *σB*(*Y*∗) have the same early parts and late parts of *<sup>B</sup>*-jobs. Then, in both schedules, the early parts of *<sup>B</sup>*-jobs are given by <sup>J</sup> *BE*(*Y*∗) = {*JBE <sup>j</sup>*<sup>∗</sup> , *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗+1, *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗+2, ... , *<sup>J</sup><sup>B</sup> nB* } and the late parts of *<sup>B</sup>*-jobs are given by <sup>J</sup> *BY*(*Y*∗) = {*J<sup>B</sup>* <sup>1</sup> , *<sup>J</sup><sup>B</sup>* <sup>2</sup> , ... , *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗−1, *<sup>J</sup>BY <sup>j</sup>*<sup>∗</sup> }, as defined in Step 2 of Procedure(*Y*∗).

Now let *π* be the schedule obtained from *σ*<sup>3</sup> by the following two actions: (i) from time *P*∗, reschedule the late parts in <sup>J</sup> *BY*(*Y*∗) consecutively in the order *<sup>J</sup><sup>B</sup>* <sup>1</sup> , *<sup>J</sup><sup>B</sup>* <sup>2</sup> , ... , *<sup>J</sup><sup>B</sup> <sup>j</sup>*∗−1, *<sup>J</sup>BY <sup>j</sup>*<sup>∗</sup> , and (ii) without changing the processing order of *A*-jobs and the processing order of the early parts of *B*-jobs, reschedule them such that the early parts of *B*-jobs are scheduled as late as possible subject to their due dates, and then, the *A*-jobs are scheduled as early as possible.

Clearly, in schedule *π*, the *B*-jobs are scheduled in the same manner as that in *σB*(*Y*∗). Then we have ∑*nB <sup>j</sup>*=<sup>1</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*π*) = *<sup>Y</sup>*∗. From the construction of *<sup>π</sup>*, we have *<sup>f</sup> <sup>A</sup>*(*π*) <sup>≤</sup> *<sup>f</sup> <sup>A</sup>*(*σ*3) = *<sup>f</sup>* <sup>∗</sup>. The Pareto-optimality of (*f* <sup>∗</sup>,*Y*∗) further implies that (*f <sup>A</sup>*(*π*), ∑*nB <sup>j</sup>*=<sup>1</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*π*)) = (*f* <sup>∗</sup>,*Y*∗). Consequently, *π* is a required Pareto-optimal schedule corresponding to (*f* ∗,*Y*∗). The lemma follows.

From Lemmas 1 and 2, the Pareto-scheduling problem 1|pmtn| #(*f <sup>A</sup>*, ∑ *Y<sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* can be solved by the following general approach:

For each value *<sup>Y</sup>*<sup>∗</sup> <sup>∈</sup> [*T*max(*σ<sup>B</sup>* <sup>0</sup> ), *PB*], run Procedure(*Y*∗) to obtain the schedule *<sup>σ</sup>B*(*Y*∗) of the *<sup>B</sup>*-jobs. Determine the intervals occupied by the *B*-jobs in *σB*(*Y*∗) and regards these intervals as forbidden intervals. The intervals which are not occupied by the *B*-jobs in *σB*(*Y*∗) is called the free-time intervals. Then solve problem 1, *hm*|pmtn<sup>|</sup> *<sup>f</sup> <sup>A</sup>* on instance <sup>J</sup> *<sup>A</sup>* to obtain a *<sup>Y</sup>*∗-standard schedule.

The above approach cannot be implemented in polynomial time since it enumerates all the possible choices of *<sup>Y</sup>*∗. Therefore, in the next three sections, for *<sup>f</sup> <sup>A</sup>* ∈ {<sup>∑</sup> *<sup>C</sup><sup>A</sup> <sup>j</sup>* , *<sup>L</sup><sup>A</sup>* max, ∑ *Y<sup>A</sup> <sup>j</sup>* }, we will present polynomial-time algorithms, respectively, to characterize the trade-off curves.

To this end, we set *Y*(0) = *T*max(*σ<sup>B</sup>* <sup>0</sup> ), and run Procedure(*Y*(0)) to obtain the schedule *<sup>σ</sup>B*(*Y*(0)). Assume that the intervals occupied by the *<sup>B</sup>*-jobs are given by *<sup>h</sup>*1, *<sup>h</sup>*2, ... , *hm*, where *hi* = [*τ*(*i*) <sup>1</sup> , *<sup>τ</sup>*(*i*) <sup>2</sup> ] is the *i*-th interval, *i* = 1, 2, . . . , *m*, such that

$$0 \le \tau\_1^{(1)} < \tau\_2^{(1)} < \tau\_1^{(2)} < \tau\_2^{(2)} < \dots < \tau\_1^{(m)} < \tau\_2^{(m)}.\tag{3}$$

From the implementation of Procedure(*Y*(0)), we have

$$
\pi\_1^{(m)} = P^\* \text{ and } \pi\_2^{(m)} = P^\* + Y^{(0)}.\tag{4}
$$

For each *<sup>Y</sup>*<sup>∗</sup> <sup>∈</sup> [*Y*(0), *PB*], we define *<sup>i</sup>* <sup>∗</sup> to be the maximum index in {1, 2, ... , *m* − 1} such that *Y*<sup>∗</sup> − *<sup>Y</sup>*(0) <sup>≥</sup> <sup>∑</sup>*<sup>i</sup>* ∗−1 *<sup>i</sup>*=<sup>1</sup> (*τ*(*i*) <sup>2</sup> <sup>−</sup> *<sup>τ</sup>*(*i*) <sup>1</sup> ) and let *<sup>τ</sup>*<sup>∗</sup> <sup>∈</sup> [*τ*(*<sup>i</sup>* ∗) <sup>1</sup> , *<sup>τ</sup>*(*<sup>i</sup>* ∗) <sup>2</sup> ) such that *<sup>Y</sup>*<sup>∗</sup> <sup>−</sup>*Y*(0) <sup>=</sup> <sup>∑</sup>*<sup>i</sup>* ∗−1 *<sup>i</sup>*=<sup>1</sup> (*τ*(*i*) <sup>2</sup> <sup>−</sup> *<sup>τ</sup>*(*i*) <sup>1</sup> )+(*τ*<sup>∗</sup> <sup>−</sup> *<sup>τ</sup>*(*<sup>i</sup>* ∗) <sup>1</sup> ). From the implementation of Procedure(*Y*∗) again, the set of time intervals occupied by the *B*-jobs in schedule *<sup>σ</sup>B*(*Y*∗), denoted by <sup>I</sup>(*σB*(*Y*<sup>∗</sup>)), is given by

$$\mathcal{L}(\boldsymbol{\sigma}^{\mathcal{B}(Y^{\*})}) = \{ [\mathbf{r}^{\*}, \mathbf{r}\_{2}^{(i^{\*})}], [\mathbf{r}\_{1}^{(i^{\*}+1)}, \mathbf{r}\_{2}^{(i^{\*}+1)}], \dots, [\mathbf{r}\_{1}^{(m-1)}, \mathbf{r}\_{2}^{(m-1)}], [P^{\*}, P^{\*} + Y^{\*}] \}. \tag{5}$$

We will write *hi*<sup>∗</sup> = [*τ*∗, *<sup>τ</sup>*(*<sup>i</sup>* ∗) <sup>2</sup> ], *hi* = [*τ*(*i*) <sup>1</sup> , *<sup>τ</sup>*(*i*) <sup>2</sup> ] for *i* = *i* ∗ + 1, *i* <sup>∗</sup> + 2, . . . , *m* − 1, and *hm* = [*P*∗, *P*<sup>∗</sup> + *Y*∗]. The above discussion will help us to construct the trade-off curves easily.

#### **3. The First Problem**

In this section, we consider problem 1|pmtn| #(∑ *C<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. By the job-exchanging argument, we can verify that the *A*-jobs must be scheduled in the SPT order in every Pareto-optimal schedule. Thus, in this section, we renumber the *A*-jobs by the SPT order such that *p<sup>A</sup>* <sup>1</sup> <sup>≤</sup> *<sup>p</sup><sup>A</sup>* <sup>2</sup> ≤···≤ *<sup>p</sup><sup>A</sup> nA* . Then we only consider the schedules in which the *A*-jobs are scheduled in the order *J<sup>A</sup>* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>A</sup>* <sup>2</sup> ≺···≺ *<sup>J</sup><sup>A</sup> nA* .

Given a point (*C*∗,*Y*∗) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*), let *<sup>σ</sup>* be the *<sup>Y</sup>*∗-standard schedule of <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. Then the set of forbidden intervals (occupied by the *B*-jobs) is given by (5) and the *A*-jobs are preemptively scheduled in the order *J<sup>A</sup>* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>A</sup>* <sup>2</sup> ≺ ··· ≺ *<sup>J</sup><sup>A</sup> nA* from time 0 in the free-time intervals as early as possible. Thus, there are *m* − *i* ∗ + 1 forbidden intervals and the first forbidden interval in *σ* is given by *hi*<sup>∗</sup> = [*τ*∗, *<sup>τ</sup>*(*<sup>i</sup>* ∗) <sup>2</sup> ].

If *PA* ≤ *τ*∗, then all the *A*-jobs are scheduled before the first forbidden interval *hi*<sup>∗</sup> in *σ*. In this case, we have no further action.

In general, suppose that *PA* > *τ*∗. Then at least one *A*-job completes after *hi*<sup>∗</sup> in *σ*. Let *J<sup>A</sup> <sup>k</sup>*(*σ*) be the first *A*-job which completes after *hi*<sup>∗</sup> in *σ*. Then, there are totally *nA* − *k*(*σ*) + 1 *A*-jobs completing after *hi*<sup>∗</sup> in *σ*.

For each index *<sup>j</sup>* ∈ {*k*(*σ*), *<sup>k</sup>*(*σ*) + 1, ... , *nA*}, we define *<sup>i</sup>*[*j*] to be the interval index such that *<sup>J</sup><sup>A</sup> j* completes after interval *hi*[*j*] and before interval *hi*[*j*]+<sup>1</sup> in *<sup>σ</sup>*, or equivalently, *<sup>τ</sup>*(*i*[*j*]) <sup>2</sup> < *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) <sup>≤</sup> *<sup>τ</sup>*(*i*[*j*]+1) <sup>1</sup> . We further define

$$e(\sigma) = \min \{ \mathbb{C}\_j^A(\sigma) - \pi\_2^{(i[j])} : j = k(\sigma), k(\sigma) + 1, \dots, n\_A \}. \tag{6}$$

An *A*-job *J<sup>A</sup> <sup>j</sup>* with *<sup>j</sup>* ∈ {*k*(*σ*), *<sup>k</sup>*(*σ*) + 1, ... , *nA*} is called a *crucial A-job* in *<sup>σ</sup>* if *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) <sup>−</sup> *<sup>τ</sup>*(*i*[*j*]) <sup>2</sup> = *e*(*σ*). Please note that if *J<sup>A</sup> <sup>j</sup>* is a crucial *<sup>A</sup>*-job in *<sup>σ</sup>*, then the interval [*τ*(*i*[*j*]) <sup>2</sup> , *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*)] is fully occupied by job *<sup>J</sup><sup>A</sup> j* in *σ*, implying that *J<sup>A</sup> <sup>j</sup>* is the first *A*-job completing after interval *hi*[*j*] in *σ*. In this case, we call interval *hi*[*j*] the *nearest* forbidden interval corresponding to crucial *A*-job *J<sup>A</sup> <sup>j</sup>* in *σ*.

Set *<sup>δ</sup>l*(*σ*) = *<sup>τ</sup>*(*l*) <sup>2</sup> <sup>−</sup> *<sup>τ</sup>*(*l*) <sup>1</sup> (*σ*), *i* <sup>∗</sup> ≤ *l* ≤ *m*, to be the length of the forbidden interval *hl* in *σ*. In particular, if *l* = *i* <sup>∗</sup>, then *τ*(*l*) <sup>1</sup> (*σ*) = *τ*∗. Let

$$\theta(\sigma) = \min\{\varepsilon(\sigma), \delta\_{i^\*}(\sigma)\}. \tag{7}$$

Please note that when the schedule *σ* is given, the *A*-job index *k*(*σ*) can be determined in *O*(*nA*) time, the interval indices *i*[*j*] for *j* ∈ {*k*(*σ*), *k*(*σ*) + 1, ... , *nA*} can be determined in *O*(*nA*) time. After that, the value *e*(*σ*) defined in (6) can be determined in *O*(*nA*) time. Finally, the value *θ*(*σ*) can be determined by its definition in (7) in constant time. Then we have the following lemma.

**Lemma 3.** *Given the Y*∗*-standard schedule σ in advance, the values k*(*σ*) *and θ*(*σ*) *can be determined in O*(*nA*) *time.*

For each *Y* ∈ [*Y*∗,*Y*<sup>∗</sup> + *θ*(*σ*)], let *σ* be the *Y*-standard schedule. Then *σ* is obtained from *σ* by shifting the first *Y* − *Y*<sup>∗</sup> units of *hi*<sup>∗</sup> to the last forbidden interval and then moving the *A*-jobs in {*J<sup>A</sup> k*(*σ*) , *J<sup>A</sup> <sup>k</sup>*(*σ*)+1, ... , *JnA* } left to eliminate the idle times accordingly. This means that *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ* ) ≤ *C<sup>A</sup> <sup>j</sup>* (*σ*) − (*Y* − *Y*∗) for *j* ∈ {*k*(*σ*), *k*(*σ*) + 1, ... , *nA*}. Assume that the total completion time of *A*-jobs in *σ* is *C*. According to Lemma 2, (*C*,*Y*) is a Pareto-optimal point. In the following, we consider the trade-off curve between (*C*∗,*Y*∗) and (*C*,*Y*). For convenience, point (*C*,*Y*) is simply called point *Y*.

We will show that the trade-off curve for *Y* ∈ [*Y*∗,*Y*<sup>∗</sup> + *θ*(*σ*)) is a line segment. However, the point *Y*∗ + *θ*(*σ*) may have the singularity.

**Lemma 4.** *For each point* (*C*,*Y*) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) *with <sup>Y</sup>* <sup>∈</sup> [*Y*∗,*Y*<sup>∗</sup> <sup>+</sup> *<sup>θ</sup>*(*σ*))*, we have <sup>C</sup>*−*C*<sup>∗</sup> *<sup>Y</sup>*−*Y*<sup>∗</sup> <sup>=</sup> <sup>−</sup>(*nA* <sup>−</sup> *<sup>k</sup>*(*σ*) + 1)*.*

**Proof.** For each *Y* ∈ [*Y*∗,*Y*<sup>∗</sup> + *θ*(*σ*)), we have *Y* − *Y*<sup>∗</sup> < *θ*(*σ*) ≤ *e*(*σ*). When we change *σ* to *σ* , no crucial *A*-jobs are moved left across their corresponding nearest forbidden intervals in *σ* . As a result, compared with *<sup>σ</sup>*, each of the completion times of the *nA* <sup>−</sup> *<sup>k</sup>*(*σ*) + <sup>1</sup> *<sup>A</sup>*-jobs in {*J<sup>A</sup> k*(*σ*) , *J<sup>A</sup> <sup>k</sup>*(*σ*)+1, ... , *<sup>J</sup><sup>A</sup> nA* } has decreased *Y* − *Y*<sup>∗</sup> units in *σ* . Thus, we have *C* − *C*<sup>∗</sup> = −(*nA* − *k*(*σ*) + 1)(*Y* − *Y*∗), as required.

Let <sup>J</sup> *<sup>A</sup> <sup>c</sup>* (*σ*) be the set of crucial *A*-jobs in *σ*. We use Δ(*σ*) to denote the total length of all the nearest forbidden intervals corresponding to the *κ*(*σ*) crucial *A*-jobs in *σ*, i.e.,

$$\Delta(\sigma) = \sum \{ \delta\_{\bar{i}[\bar{j}]}(\sigma) \, : \, J\_{\bar{j}}^A \in \mathcal{J}\_c^A(\sigma) \}.$$

The following lemma is only used to display the singularity of point *Y*∗ + *θ*(*σ*).

**Lemma 5.** *For the point* (*C*,*Y*) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) *with Y* <sup>=</sup> *<sup>Y</sup>*<sup>∗</sup> <sup>+</sup> *<sup>θ</sup>*(*σ*)*, we have the following three statements.*


**Proof.** When *σ* changes to *σ* , each of the *nA* <sup>−</sup> *<sup>k</sup>*(*σ*) + <sup>1</sup> *<sup>A</sup>*-jobs in {*J<sup>A</sup> k*(*σ*) , *J<sup>A</sup> <sup>k</sup>*(*σ*)+1, ... , *<sup>J</sup><sup>A</sup> nA* } is moved left *θ*(*σ*) units, and in the case that *e*(*σ*) = *θ*(*σ*), the crucial *A*-jobs are also moved left across their corresponding nearest forbidden intervals in *σ* . Thus, we have

$$\mathcal{C} = \mathcal{C}^\* - \Delta^\*(\sigma') - (n\_A - k(\sigma) + 1)\theta(\sigma),\tag{8}$$

where Δ∗(*σ* ) = 0 if *e*(*σ*) > *θ*(*σ*) and Δ∗(*σ* ) = ∑{*δi*[*j*](*σ* ) : *J<sup>A</sup> <sup>j</sup>* ∈ J *<sup>A</sup> <sup>c</sup>* (*σ*)} if *e*(*σ*) = *θ*(*σ*). The key point is that *δi*<sup>∗</sup> (*σ* ) = *δi*<sup>∗</sup> (*σ*) − *θ*(*σ*) and *δl*(*σ* ) = *δl*(*σ*) for *l* = *i* ∗ + 1, *i* ∗ + 2, . . . , *m*.

Under the assumption of (i), we have Δ∗(*σ* ) = 0. From (8), we have *C* = *C*<sup>∗</sup> − (*nA* − *k*(*σ*) + 1)*θ*(*σ*). Under the assumption of (ii), we have Δ∗(*σ* ) = Δ(*σ*) − *θ*(*σ*). From (8), we have *C* = *C*<sup>∗</sup> − Δ(*σ*) − (*nA* − *k*(*σ*))*θ*(*σ*).

Under the assumption of (iii), we have Δ∗(*σ* ) = Δ(*σ*). From (8), we have *C* = *C*<sup>∗</sup> − Δ(*σ*) − (*nA* − *k*(*σ*) + 1)*θ*(*σ*). The lemma follows.

**Theorem 1.** *Algorithm 2 generates the trade-off curve of* 1|*pmtn*| #(∑ *C<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) *in O*(*nnAnB*) *time.*

**Proof.** The correctness of Algorithm 2 is guaranteed by Lemmas 2 and 4. We estimate the time complexity of the algorithm in the following.

The preprocessing procedure runs in *O*(*nA* log *nA* + *nB* log *nB*) time. Each of Steps (1.1) and (1.2) runs in *O*(*nB*) time, so Step 1 runs in *O*(*nB*) time.

After Step 1, the algorithm has *K* iterations. In each iteration, either one forbidden interval is eliminated or at least one *A*-job is moved left across its corresponding nearest forbidden interval. Since *m* ≤ *nB*, we have *K* = *O*(*nAnB*).

At each iteration, Step 2 runs in *O*(*nA* + *m*) = *O*(*n*) time. From Lemma 3, Step (3.1) runs in *O*(*nA*) time. Thus, each iteration runs in *O*(*n*) time.

The above discussion establishes the *O*(*nnAnB*)-time complexity of Algorithm 2.


**Input:** Instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*.

**Preprocessing:** Renumber the *A*-jobs such that *p<sup>A</sup>* <sup>1</sup> <sup>≤</sup> *<sup>p</sup><sup>A</sup>* <sup>2</sup> ≤···≤ *<sup>p</sup><sup>A</sup> nA* and renumber the *B*-jobs such that *d<sup>B</sup>* <sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>B</sup>* <sup>2</sup> ≤···≤ *<sup>d</sup><sup>B</sup> nB* .

**Step 1:** Do the following: **(1.1)** Generate schedule *σ<sup>B</sup>* <sup>0</sup> which schedules the *<sup>B</sup>*-jobs in the order *<sup>J</sup><sup>B</sup>* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>B</sup>* <sup>2</sup> ≺···≺ *<sup>J</sup><sup>B</sup> nB* in the interval [0, *PB*] without idle times. Then calculate the value *Y*(0) = *T*max(*σ<sup>B</sup>* 0 ).

**(1.2)** Run Procedure(*Y*(0)) to obtain the schedule *σB*(*Y*(0)) of the *B*-jobs. Determine the intervals occupied by the *<sup>B</sup>*-jobs in *<sup>σ</sup>B*(*Y*(0)), say *<sup>h</sup>*1, *<sup>h</sup>*2, ... , *hm*, where *hi* = [*τ*(*i*) <sup>1</sup> , *<sup>τ</sup>*(*i*) <sup>2</sup> ] is the *i*-th interval, *i* = 1, 2, . . . , *m*, as described in (3). Then regard *h*1, *h*2,..., *hm* as forbidden intervals which will be updated in the implementation of the algorithm. We take the convention that the forbidden intervals are just occupied by the *B*-jobs.

**(1.3)** Set *t*<sup>0</sup> := 1 and set *i* := 0.

**Step 2:** Do the following:

**(2.1)** Generate the *<sup>Y</sup>*(*i*)-standard schedule *<sup>σ</sup><sup>i</sup>* of <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* in which *hti* , *hti*+1,..., *hm* are the forbidden intervals and the *A*-jobs are preemptively scheduled in the order

*JA* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>A</sup>* <sup>2</sup> ≺···≺ *<sup>J</sup><sup>A</sup> nA* as early as possible. Determine the value *<sup>C</sup>*(*i*) <sup>=</sup> <sup>∑</sup>*nA <sup>j</sup>*=<sup>1</sup> *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σi*).

**(2.2)** If *J<sup>A</sup> nA* (and so, every *A*-job) is scheduled before the first forbidden interval *hti* in *σi*, then set *K* = *i* and go to Step 4. (In this case, we have obtained the whole trade-off curve.) If *J<sup>A</sup> nA* completes after *hti* in *σi*, then go to Step 3. (In this case, we use *Jk*(*σi*) to denote the first *A*-job completing after *hti* in *σi*.)

**Step 3:** Do the following:

**(3.1)** Calculate the values *k*(*σi*) and *θ*(*σi*).

**(3.2)** Define a left closed right open segment <sup>L</sup>*<sup>i</sup>* in the interval [*Y*(*i*),*Y*(*i*) <sup>+</sup> *<sup>θ</sup>*(*σi*)) by the following way:

$$\mathcal{L}\_i: \frac{\mathbb{C} - \mathbb{C}^{(i)}}{Y - Y^{(i)}} = -(n\_A - k(\sigma\_i) + 1), \ Y \in [Y^{(i)}, Y^{(i)} + \theta(\sigma\_i)).$$

**(3.3)** Set *<sup>Y</sup>*(*i*+1) := *<sup>Y</sup>*(*i*) + *<sup>θ</sup>*(*σi*) and *hm* := [*P*∗, *<sup>P</sup>*<sup>∗</sup> + *<sup>Y</sup>*(*i*+1)]. Moreover, if *<sup>θ</sup>*(*σi*) = *<sup>δ</sup>ti* (*σi*), then set *ti*+<sup>1</sup> := *ti* + 1; and if *θ*(*σi*) < *δti* (*σi*), then set *ti*+<sup>1</sup> :<sup>=</sup> *ti* and *hti*<sup>+</sup><sup>1</sup> := [*τ*(*ti*) <sup>1</sup> <sup>+</sup> *<sup>θ</sup>*(*σi*), *<sup>τ</sup>*(*ti*) <sup>2</sup> ] (which is obtained from interval *hti* by deleting the first *θ*(*σi*) units.) **(3.4)** Set *i* := *i* + 1. Go to Step 2. **Step 4:** Output the trade-off curve <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) = <sup>L</sup><sup>0</sup> ∪ L<sup>1</sup> ∪···∪L*K*−<sup>1</sup> ∪ {(*C*(*K*),*Y*(*K*))}.

It can be observed that the total interruption time (i.e., the number of interruptions) of all the jobs in each schedule generated by Algorithm 2 is upper bounded by 1 + *m* ≤ 1 + *nB*.

Let us consider the job instance *I*<sup>1</sup> displayed in Table 1. The trade-off curve of problem 1|pmtn| #(∑ *C<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) on instance *I*<sup>1</sup> is shown in Figure 1.

**Table 1.** The job instance *I*1.


Please note that *<sup>P</sup>*<sup>∗</sup> <sup>=</sup> *<sup>P</sup>* <sup>+</sup> <sup>1</sup> <sup>=</sup> 16. Let <sup>Ω</sup> <sup>=</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*). The key steps in applying Algorithm <sup>2</sup> to solve the instance *I*<sup>1</sup> are as follows:


**Figure 1.** Trade-off curve.

#### **4. The Second Problem**

In this section, we consider problem 1|pmtn| #(*L<sup>A</sup>* max, ∑ *Y<sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* <sup>J</sup> *<sup>B</sup>*. By the job-shifting argument, we can verify that for each Pareto-optimal point, there is a corresponding Pareto-optimal schedule in which the *A*-jobs are scheduled in the EDD order. Thus, in this section, we renumber the *A*-jobs by the EDD order such that *d<sup>A</sup>* <sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>A</sup>* <sup>2</sup> ≤···≤ *<sup>d</sup><sup>A</sup> nA* . Then we only consider the schedules in which the *A*-jobs are scheduled in the order *J<sup>A</sup>* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>A</sup>* <sup>2</sup> ≺···≺ *<sup>J</sup><sup>A</sup> nA* .

For a point (*L*∗,*Y*∗) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*), let *<sup>σ</sup>* be a *<sup>Y</sup>*∗-standard schedule of <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. Then the set of forbidden intervals (occupied by the *B*-jobs) is given by (5) and the *A*-jobs are preemptively scheduled in the order *J<sup>A</sup>* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>A</sup>* <sup>2</sup> ≺ ··· ≺ *<sup>J</sup><sup>A</sup> nA* from time 0 in the free-time intervals. Thus, there are *m* − *i* ∗ + 1 forbidden intervals and the first forbidden interval in *<sup>σ</sup>* is given by *hi*<sup>∗</sup> = [*τ*∗, *<sup>τ</sup>*(*<sup>i</sup>* ∗) <sup>2</sup> ].

If *PA* ≤ *τ*∗, then all the *A*-jobs are scheduled before the first forbidden interval *hi*<sup>∗</sup> in *σ*. In this case, we have no further action.

In general, suppose that *PA* > *τ*∗. Then at least one *A*-job completing after *hi*<sup>∗</sup> in *σ*. Let *J<sup>A</sup> <sup>k</sup>*(*σ*) be the first *A*-job which completes after *hi*<sup>∗</sup> in *σ*. Then, there are totally *nA* − *k*(*σ*) + 1 *A*-jobs completing after *hi*<sup>∗</sup> in *σ*.

Let *L*<sup>∗</sup> = *L<sup>A</sup>* max(*σ*) be the maximum lateness of *A*-jobs in *σ*. An *A*-job *J<sup>A</sup> <sup>j</sup>* with *k*(*σ*) ≤ *j* ≤ *nA* is called *critical* in *σ* if *L<sup>A</sup> <sup>j</sup>* (*σ*) = *<sup>L</sup><sup>A</sup>* max(*σ*). Again, we use <sup>J</sup> *<sup>A</sup> <sup>c</sup>* (*σ*) to denote the set of all critical *A*-jobs. Then <sup>J</sup> *<sup>A</sup> <sup>c</sup>* (*σ*) = {*J<sup>A</sup> <sup>j</sup>* : *<sup>L</sup><sup>A</sup> <sup>j</sup>* (*σ*) = *L*∗, *k*(*σ*) ≤ *j* ≤ *nA*}.

For each critical *A*-job *J<sup>A</sup> <sup>j</sup>* , we define *<sup>i</sup>*[*j*] to be the interval index such that *<sup>J</sup><sup>A</sup> <sup>j</sup>* completes after interval *hi*[*j*] and before interval *hi*[*j*]+<sup>1</sup> in *<sup>σ</sup>*, or equivalently, *<sup>τ</sup>*(*i*[*j*]) <sup>2</sup> < *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) <sup>≤</sup> *<sup>τ</sup>*(*i*[*j*]+1) <sup>1</sup> . Define

$$\lambda(\sigma) = \max \{ \mathbb{C}^A\_j(\sigma) - \tau\_2^{(i[j])} : J^A\_j \in \mathcal{J}^A\_\varepsilon(\sigma) \}. \tag{9}$$

A critical *A*-job *J<sup>A</sup> <sup>j</sup>* is called a *desired A-job* in *<sup>σ</sup>* if *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) <sup>−</sup> *<sup>τ</sup>*(*i*[*j*]) <sup>2</sup> = *λ*(*σ*). In this case, interval *hi*[*j*] is called the nearest forbidden interval corresponding to desired *A*-job *J<sup>A</sup> <sup>j</sup>* in *σ*. We further define

$$BL(\sigma) = \max \{ L\_j^A(\sigma) : \mathbb{C}\_j^A(\sigma) \le \pi^\* \},\tag{10}$$

and

$$
\Delta(\sigma) = L^\*-BL(\sigma). \tag{11}
$$

In the case that no *A*-job completes before interval *hi*<sup>∗</sup> , we define *BL*(*σ*) = −∞ and Δ(*σ*)=+∞. Moreover, we define

$$\vartheta(\sigma) = \min\{\min\{\lambda(\sigma), \delta\_{\mathbb{H}^\*}(\sigma)\}, \,\Delta(\sigma)\}. \tag{12}$$

Please note that when the schedule *σ* is given, the values *C<sup>A</sup> <sup>j</sup>* (*σ*) and *<sup>L</sup><sup>A</sup> <sup>j</sup>* (*σ*), *j* = 1, 2, ... , *nA*, and *<sup>L</sup>*<sup>∗</sup> can be determined in *<sup>O</sup>*(*nA*) time. Then the set <sup>J</sup> *<sup>A</sup> <sup>c</sup>* (*σ*) and the interval indices *i*[*j*] for *JA <sup>j</sup>* ∈ J *<sup>A</sup> <sup>c</sup>* (*σ*) can be determined in *O*(*nA*) time. After that, the value *λ*(*σ*), *BL*(*σ*) and Δ(*σ*) can be determined in *O*(*nA*) time. Finally, the value *ϑ*(*σ*) can be determined by its definition in (12) in constant time. Then we have the following lemma.

**Lemma 6.** *Given the Y*∗*-standard schedule σ in advance, the values* Δ(*σ*) *and ϑ*(*σ*) *can be determined in O*(*nA*) *time.*

If Δ(*σ*) = 0, then *BL*(*σ*) = *L*∗. In this case, (*L*∗,*Y*∗) is the last Pareto-optimal point.

Suppose that Δ(*σ*) > 0. Then *ϑ*(*σ*) > 0. For each *Y* ∈ [*Y*∗,*Y*<sup>∗</sup> + *ϑ*(*σ*)], let *σ* be the *Y*-standard schedule. Then *σ* is obtained from *σ* by shifting *Y* − *Y*<sup>∗</sup> units of *hi*<sup>∗</sup> to the last forbidden interval and then moving the *<sup>A</sup>*-jobs in {*J<sup>A</sup> k*(*σ*) , *J<sup>A</sup> <sup>k</sup>*(*σ*)+1, ... , *JnA* } left to eliminate the idle times accordingly. This means that *L<sup>A</sup> <sup>j</sup>* (*σ* ) <sup>≤</sup> *<sup>L</sup><sup>A</sup> <sup>j</sup>* (*σ*) − (*Y* − *Y*∗) for *j* ∈ {*k*(*σ*), *k*(*σ*) + 1, ... , *nA*}. Assume that the

maximum lateness of *A*-jobs in *σ* is *L*. According to Lemma 2, (*L*,*Y*) is a Pareto-optimal point. In the following, we consider the trade-off curve between (*L*∗,*Y*∗) and (*L*,*Y*). For convenience, point (*L*,*Y*) is simply called point *Y*.

We will show that the trade-off curve for *Y* ∈ [*Y*∗,*Y*<sup>∗</sup> + *ϑ*(*σ*)) is a line segment. Discussion for the singularity of the point *Y*∗ + *ϑ*(*σ*) will be omitted. This does not affect the characterization of the trade-off curve.

**Lemma 7.** *Suppose that* <sup>Δ</sup>(*σ*) <sup>&</sup>gt; <sup>0</sup>*. For each point* (*L*,*Y*) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) *with <sup>Y</sup>* <sup>∈</sup> [*Y*∗,*Y*<sup>∗</sup> <sup>+</sup> *<sup>ϑ</sup>*(*σ*))*, we have <sup>L</sup>*−*L*<sup>∗</sup> *<sup>Y</sup>*−*Y*<sup>∗</sup> <sup>=</sup> <sup>−</sup>1*.*

**Proof.** For each *Y* ∈ [*Y*∗,*Y*<sup>∗</sup> + *ϑ*(*σ*)), we have *Y* − *Y*<sup>∗</sup> < *ϑ*(*σ*). When we change *σ* to *σ* , no desired *A*-jobs are moved left across their corresponding nearest forbidden intervals in *σ* . As a result, compared with *σ*, each desired job must move forward *Y* − *Y*<sup>∗</sup> units and the other *A*-jobs move forward at least *Y* − *Y*<sup>∗</sup> units in *σ* . Thus, the desired *A*-jobs in *σ* are also critical *A*-jobs in *σ* . Then we have *<sup>L</sup>*−*L*<sup>∗</sup> *<sup>Y</sup>*−*Y*<sup>∗</sup> <sup>=</sup> <sup>−</sup>1, as required.

**Theorem 2.** *Algorithm 3 generates the trade-off curve of* 1|*pmtn*| #(*L<sup>A</sup>* max, ∑ *Y<sup>B</sup> <sup>j</sup>* ) *in O*(*nnAnB*) *time.*

**Algorithm 3:** Trade-off curve of problem 1|pmtn| #(*L<sup>A</sup>* max, ∑ *Y<sup>B</sup> j* ).

**Input:** Instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*.

**Preprocessing:** Renumber the *A*-jobs such that *d<sup>A</sup>* <sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>A</sup>* <sup>2</sup> ≤···≤ *<sup>d</sup><sup>A</sup> nA* and renumber the *B*-jobs such that *d<sup>B</sup>* <sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>B</sup>* <sup>2</sup> ≤···≤ *<sup>d</sup><sup>B</sup> nB* .

**Step 1:** Do the following:

**(1.1)** Generate schedule *σ<sup>B</sup>* <sup>0</sup> which schedules the *<sup>B</sup>*-jobs in the order *<sup>J</sup><sup>B</sup>* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>B</sup>* <sup>2</sup> ≺···≺ *<sup>J</sup><sup>B</sup> nB* in the interval [0, *PB*] without idle times. Then calculate the value *Y*(0) = *T*max(*σ<sup>B</sup>* 0 ).

**(1.2)** Run Procedure(*Y*(0)) to obtain the schedule *σB*(*Y*(0)) of the *B*-jobs. Determine the intervals occupied by the *<sup>B</sup>*-jobs in *<sup>σ</sup>B*(*Y*(0)), say *<sup>h</sup>*1, *<sup>h</sup>*2, ... , *hm*, where *hi* = [*τ*(*i*) <sup>1</sup> , *<sup>τ</sup>*(*i*) <sup>2</sup> ] is the *i*-th interval, *i* = 1, 2, . . . , *m*, as described in (3). Then regard *h*1, *h*2,..., *hm* as forbidden intervals which will be updated in the implementation of the algorithm. We take the convention that the forbidden intervals are just occupied by the *B*-jobs.

**(1.3)** Set *t*<sup>0</sup> := 1 and set *i* := 0.

**Step 2:** Do the following:

**(2.1)** Generate the *<sup>Y</sup>*(*i*)-standard schedule *<sup>σ</sup><sup>i</sup>* of <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* in which *hti* , *hti*+1,..., *hm* are the forbidden intervals and the *A*-jobs are preemptively scheduled in the order

*JA* <sup>1</sup> <sup>≺</sup> *<sup>J</sup><sup>A</sup>* <sup>2</sup> ≺···≺ *<sup>J</sup><sup>A</sup> nA* as early as possible. Determine the values *<sup>L</sup>*(*i*) <sup>=</sup> *<sup>L</sup><sup>A</sup>* max(*σi*).

**(2.2)** Determine the value Δ(*σi*). Moreover, if Δ(*σi*) > 0, determine the value *ϑ*(*σi*).

**(2.3)** If Δ(*σi*) = 0, then set *K* = *i* and go to Step 4. (In this case, we have obtained the whole trade-off curve.)

If Δ(*σi*) > 0, then go to Step 3. (In this case, we have *ϑ*(*σi*) > 0.)

**Step 3:** Define a left closed right open segment <sup>L</sup>*<sup>i</sup>* in the interval [*Y*(*i*),*Y*(*i*) <sup>+</sup> *<sup>ϑ</sup>*(*σi*)) by the following way:

$$\mathcal{L}\_i \colon \frac{L - L^{(i)}}{Y - \mathcal{Y}^{(i)}} = -1, \ Y \in [Y^{(i)}, Y^{(i)} + \vartheta(\sigma\_i)).$$

**(3.3)** Set *<sup>Y</sup>*(*i*+1) := *<sup>Y</sup>*(*i*) + *<sup>ϑ</sup>*(*σi*) and *hm* := [*P*∗, *<sup>P</sup>*<sup>∗</sup> + *<sup>Y</sup>*(*i*+1)]. Moreover, if *<sup>ϑ</sup>*(*σi*) = *<sup>δ</sup>ti* (*σi*), then set *ti*+<sup>1</sup> := *ti* + 1; and if *ϑ*(*σi*) < *δti* (*σi*), then set *ti*+<sup>1</sup> :<sup>=</sup> *ti* and *hti*<sup>+</sup><sup>1</sup> := [*τ*(*ti*) <sup>1</sup> <sup>+</sup> *<sup>ϑ</sup>*(*σi*), *<sup>τ</sup>*(*ti*) <sup>2</sup> ] (which is obtained from interval *hti* by deleting the first *ϑ*(*σi*) units.) **(3.4)** Set *i* := *i* + 1. Go to Step 2. **Step 4:** Output the trade-off curve <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*) = <sup>L</sup><sup>0</sup> ∪ L<sup>1</sup> ∪···∪L*K*−<sup>1</sup> ∪ {(*L*(*K*),*Y*(*K*))}.

**Proof.** Correctness of Algorithm 3 is guaranteed by Lemmas 2 and 7. The time complexity can be estimated by the similar way of Theorem 1 by putting Lemma 6 in discussion.

It can be observed that the total interruption time (i.e., the number of interruptions) of all the jobs in each schedule generated by Algorithm 3 is upper bounded by 1 + *m* ≤ 1 + *nB*.

Let us consider the job instance *I*<sup>2</sup> displayed in Table 2. The trade-off curve of problem 1|pmtn| #(*L<sup>A</sup>* max, ∑ *Y<sup>B</sup> <sup>j</sup>* ) on instance *I*<sup>2</sup> is shown in Figure 2.


Please note that *<sup>P</sup>*<sup>∗</sup> <sup>=</sup> *<sup>P</sup>* <sup>+</sup> <sup>1</sup> <sup>=</sup> 19. Let <sup>Ω</sup> <sup>=</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*). The key steps in applying Algorithm <sup>3</sup> to solve the instance *I*<sup>2</sup> are as follows:


**Figure 2.** Trade-off curve.

#### **5. The Third Problem**

In this section, we consider problem 1|pmtn| #(∑ *Y<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. We renumber the *A*-jobs by the EDD order such that *d<sup>A</sup>* <sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>A</sup>* <sup>2</sup> ≤···≤ *<sup>d</sup><sup>A</sup> nA* .

For a point (*YA*,*YB*) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*), a *<sup>Y</sup>B*-standard schedule of <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* corresponding to (*YA*,*YB*) can be obtained in the following way in *O*(*n*) time: (i) Run Procedure(*YB*) to obtain the schedule *σB*(*YB*) of the *B*-jobs, and (ii) run the algorithm in Hariri et al. [21] for solving problem <sup>1</sup>|pmtn<sup>|</sup> <sup>∑</sup> *Yj* to schedule the *<sup>A</sup>*-jobs in the free-time intervals not occupied by the *<sup>B</sup>*-jobs in *<sup>σ</sup>B*(*YB*). Thus, we only need to consider the trade-off curve of problem 1|pmtn| #(∑ *Y<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. We first establish a nice property for problem 1|pmtn<sup>|</sup> <sup>∑</sup> *Yj* in the following lemma.

**Lemma 8.** *Let* J = {*J*1, *J*2, ... , *Jn*} *be a job instance of problem* 1|*pmtn*| ∑ *Yj. Let* U *be a subset of* J *such that there is a schedule of instance* J *such that all the jobs in* U *are early. Then there is an optimal schedule of problem* 1|*pmtn*| ∑ *Yj on instance* J *such that all the jobs in* U *are early.*

**Proof.** We first prove the result for problem 1|pmtn| ∑ *Yj* without maintenance intervals by induction on |U|. The result holds trivially if |U| = 0.

Inductively, suppose that |U| = *k* ≥ 1, U = {*Jj*<sup>1</sup> , *Jj*<sup>2</sup> , ... , *Jjk*}, *dj*<sup>1</sup> ≤ *dj*<sup>2</sup> ≤ ··· ≤ *djk* , and there is a feasible schedule of instance J such that all the jobs in U are early. Moreover, the result holds for every proper subset of U (the induction hypothesis).

Since U\{*Jjk*} is a proper subset of U, from the induction hypothesis, there is an optimal schedule *<sup>π</sup>* of problem 1|pmtn| <sup>∑</sup> *Yj* on instance J such that all the *<sup>k</sup>* − 1 jobs *Jj*<sup>1</sup> , *Jj*<sup>2</sup> , ... , *Jjk*−<sup>1</sup> are early in *π*. Since all the jobs in U are early in some feasible schedule, we have *pj*<sup>1</sup> + *pj*<sup>2</sup> + ··· + *pjk* ≤ max{*dj*<sup>1</sup> , *dj*<sup>2</sup> , ... , *djk*} <sup>=</sup> *djk* . This implies that all the *<sup>k</sup>* <sup>−</sup> 1 jobs *Jj*<sup>1</sup> , *Jj*<sup>2</sup> , ... , *Jjk*−<sup>1</sup> are completed by time *djk* in *<sup>π</sup>* and at least *pjk* units of time in the interval [0, *djk* ] are not occupied by the *<sup>k</sup>* <sup>−</sup> 1 jobs *Jj*<sup>1</sup> , *Jj*<sup>2</sup> , ... , *Jjk*−<sup>1</sup> . If *Cjk* (*π*) ≤ *djk* , i.e., *Jjk* is early in *π*, then *π* is a required optimal schedule.

Suppose in the following that *Cjk* (*π*) > *djk* . Then there is a certain index *i* ∈ {0, 1, ... , *pjk*} such that for job *Jjk* , the first *i* unit pieces *Jjk*,1(*π*), *Jjk*,2(*π*), ... , *Jjk*,*i*(*π*) are early in *π* and the last *pjk* − *i* unit pieces *Jjk*,*i*+1(*π*), ... , *Jjk*,*pj k* (*π*) are late in *π*. Let S be the time space which consists of the last *pjk* − *i* units of time in the interval [0, *djk* ] that are not occupied by the *<sup>k</sup>* <sup>−</sup> 1 jobs *Jj*<sup>1</sup> , *Jj*<sup>2</sup> , ... , *Jjk*−<sup>1</sup> and the *<sup>i</sup>* unit pieces *Jjk*,1(*π*), *Jjk*,2(*π*), ... , *Jjk*,*i*(*π*) of *Jjk* . Let T be the time space which consists of the *pjk* − *i* units of time that are occupied by the *pjk* − *i* unit pieces *Jjk*,*i*+1(*π*), ... , *Jjk*,*pj k* (*π*) of *Jjk* . Let *σ* be the schedule of J obtained from *π* by exchanging the subschedules in S and in T . Then *Jjk* is early in *σ*. Moreover, ∑ *Yj*(*σ*) ≤ ∑ *Yj*(*π*) − |T | + |S| = ∑ *Yj*(*π*), implying that *σ* is also optimal. Now all the jobs in U = {*Jj*<sup>1</sup> , *Jj*<sup>2</sup> , ... , *Jjk*} are early in *σ*. Consequently, *σ* is an optimal schedule of problem 1|pmtn| ∑ *Yj* on instance J such that all the jobs in U are early. The result follows by the induction principle.

We next use Lemma 8 to prove the following useful lemma.

**Lemma 9.** *Let* J = {*J*1, *J*2, ... , *Jn*} *be a job instance of problem* 1|*pmtn*| ∑ *Yj. Let π be a schedule of the jobs in* J *. Then there is an optimal schedule σ of problem* 1|*pmtn*| ∑ *Yj on instance* J *such that Yj*(*σ*) ≤ *Yj*(*π*) *for j* = 1, 2, . . . , *n.*

**Proof.** For each *j* ∈ {1, 2, ... , *n*}, we partition *Jj* into two parts *Jj* and *Jj* such that *pj* = *pj* − *Yj*(*π*) is the early work of *Jj* in *π*, *pj* = *Yj*(*π*) is the late work of *Jj* in *π*, and *dj* = *dj* = *dj*. Let J = {*Jj* , *Jj* : *j* = 1, 2, ... , *n*}. Let *π* be the schedule of J which is obtained from *π* by just regarding the early part of *Jj* in *π* as job *Jj* and regarding the late part of *Jj* in *π* as job *Jj* . Then all the jobs in {*Jj* : *j* = 1, 2, ... , *n*} are early in *π* . According to Lemma 8, there is an optimal schedule *σ* of problem 1|pmtn| ∑ *Yj* on instance J such that all the jobs in {*Jj* : *j* = 1, 2, ... , *n*} are early. Since the preemptive assumption, the two instances J and J have no essential difference for problem 1|pmtn| ∑ *Yj*, *σ* is an optimal schedule of problem 1|pmtn| ∑ *Yj* on instance J . The result follows by noting that *Yj*(*σ*) = *Yj*(*σ*) ≤ *pj* = *Yj*(*π*) for *j* = 1, 2, . . . , *n*.

Let *<sup>Y</sup>AB* be the optimal value of problem 1|pmtn<sup>|</sup> <sup>∑</sup> *Yj* on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. We have the following lemma.

**Lemma 10.** *For each point* (*YA*,*YB*) <sup>∈</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*)*, we have Y<sup>A</sup>* <sup>+</sup> *<sup>Y</sup><sup>B</sup>* <sup>=</sup> *<sup>Y</sup>AB.*

**Proof.** Let *σ* be a Pareto-optimal schedule of problem 1|pmtn| #(∑ *Y<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* such that ∑ *Y<sup>A</sup> <sup>j</sup>* (*σ*) = *<sup>Y</sup><sup>A</sup>* and <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*) = *<sup>Y</sup>B*. From Lemma 9, there is an optimal schedule *<sup>σ</sup>* of 1|pmtn<sup>|</sup> <sup>∑</sup> *Yj* on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>* such that <sup>∑</sup> *<sup>Y</sup><sup>A</sup> <sup>j</sup>* (*σ* ) <sup>≤</sup> <sup>∑</sup> *<sup>Y</sup><sup>A</sup> <sup>j</sup>* (*σ*) and <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ* ) <sup>≤</sup> <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*). The optimality of *σ* implies that ∑ *Yj*(*σ* ) = *YAB*. From the property of Pareto-optimal point, we can obtain that ∑ *Y<sup>A</sup> <sup>j</sup>* (*σ* ) = ∑ *Y<sup>A</sup> <sup>j</sup>* (*σ*) and <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ* ) = ∑ *Y<sup>B</sup> <sup>j</sup>* (*σ*). Thus, we have *<sup>Y</sup><sup>A</sup>* +*Y<sup>B</sup>* = *<sup>Y</sup>AB*. The result follows.

**Theorem 3.** *The trade-off curve of problem* 1|*pmtn*| #(∑ *Y<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) *on instance* <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup> can be determined in O*(*n* log *n*) *time.*

**Proof.** Let *<sup>Y</sup>*(0) *<sup>A</sup>* be the optimal value of problem 1|pmtn|*Y<sup>A</sup> <sup>j</sup>* on instance <sup>J</sup> *<sup>A</sup>*. Let *<sup>Y</sup>*(0) *<sup>B</sup>* be the optimal value of problem 1|pmtn|*Y<sup>B</sup> <sup>j</sup>* on instance <sup>J</sup> *<sup>B</sup>*. Recall that *<sup>Y</sup>AB* is the optimal value of problem <sup>1</sup>|pmtn<sup>|</sup> <sup>∑</sup> *Yj* on instance <sup>J</sup> *<sup>A</sup>* ∪ J *<sup>B</sup>*. From Hariri et al. [21], *<sup>Y</sup>*(0) *<sup>A</sup>* , *<sup>Y</sup>*(0) *<sup>B</sup>* , and *<sup>Y</sup>AB* can be determined in *O*(*nA* log *nA*) time, *O*(*nB* log *nB*) time, and *O*(*n* log *n*) time, respectively.

Please note that *Y*(0) *<sup>A</sup>* is the minimum total late work of *A*-jobs among all Pareto-optimal points and *Y*(0) *<sup>B</sup>* is the minimum total late work of *B*-jobs among all Pareto-optimal points. Thus, from Lemma 10, the trade-off curve is the line segment

$$Y^A + Y^B = Y^{AB}{}\_{\prime} \ Y^{(0)}\_{B} \leq \mathcal{Y}^B \leq \mathcal{Y}^{AB} - \mathcal{Y}^{(0)}\_{A}{}\_{\prime}$$

connecting point (*YAB* <sup>−</sup> *<sup>Y</sup>*(0) *<sup>B</sup>* ,*Y*(0) *<sup>B</sup>* ) to point (*Y*(0) *<sup>A</sup>* ,*YAB* <sup>−</sup> *<sup>Y</sup>*(0) *<sup>A</sup>* ). So, the overall complexity to obtain the trade-off curve is given by *O*(*n* log *n*).

It can be observed that the total interruption time (i.e., the number of interruptions) of all the jobs in each Pareto-optimal schedule is upper bounded by max{*nA*, *nB*} + 2.

Let us consider the job instance *I*<sup>3</sup> displayed in Table 3. The trade-off curve of problem 1|pmtn| #(∑ *Y<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>Y</sup><sup>B</sup> <sup>j</sup>* ) on instance *I*<sup>3</sup> is shown in Figure 3.


Please note that *<sup>P</sup>*<sup>∗</sup> <sup>=</sup> *<sup>P</sup>* <sup>+</sup> <sup>1</sup> <sup>=</sup> 23. Let <sup>Ω</sup> <sup>=</sup> <sup>Ω</sup>(<sup>J</sup> *<sup>A</sup>*, <sup>J</sup> *<sup>B</sup>*). The key steps to solve the instance *<sup>I</sup>*<sup>3</sup> are as follows:


**Figure 3.** Trade-off curve.

#### **6. Conclusions**

This paper considers three preemptive Pareto-scheduling problems with two competing agents on a single machine. Two agents compete to perform their respective jobs on a common single machine and each agent has his own criterion to optimize. In each problem, the goal of agent *A* is to minimize the total completion time, the maximum lateness, or the total late work while agent *B* wants to minimize the total late work. For each problem, we provide a polynomial-time algorithm to characterize the trade-off curve of all Pareto-optimal points.

Late-work criterion can be met in all cases where the penalty imposed on a solution depends on the number of tardy units of jobs performed in a system. For example, in production planning where the manufacturer is concerned with minimizing any order delays which cause financial loss, in control systems where the accuracy of control procedures depends on the amount of information provided as their input, in agriculture where performance measures based on due dates, and so on. In the case where two criteria need to be minimized, the trade-off curve results an ideal solution. Once the trade-off curve is characterized, decision makers can make decisions as needed.

For the future research, the trade-off curve of the problem 1|pmtn| #(∑ *C<sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *wjY<sup>B</sup> <sup>j</sup>* ) or 1|pmtn| #(*L<sup>A</sup>* max, ∑ *wjY<sup>B</sup> <sup>j</sup>* ) is worthy of study. Since the existence of precedence constraints on scheduling problems reflects real-life problems, it is also worthy to study the two-agent problems with precedence constraints. Another interesting future research direction is to investigate fairness issues when the total late work is one of the criteria in two-agent scheduling problems.

**Author Contributions:** Conceptualization, methodology, and writing—original manuscript: R.H.; project management, supervision, and writing—review: J.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the National Natural Science Foundation of China under grant numbers 11671368 and 11771406.

**Acknowledgments:** The authors would like to thank the Associate Editor and two anonymous referees for their constructive comments and helpful suggestions.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## *Article* **Two-Agent Pareto-Scheduling of Minimizing Total Weighted Completion Time and Total Weighted Late Work**

#### **Yuan Zhang †, Zhichao Geng \*,† and Jinjiang Yuan †**

School of Mathematics and Statistics, Zhengzhou University, Zhengzhou 450001, China; zy2020@gs.zzu.edu.cn (Y.Z.); yuanjj@zzu.edu.cn (J.Y.)

**\*** Correspondence: zcgeng@zzu.edu.cn

† These authors contributed equally to this work.

Received: 26 October 2020; Accepted: 16 November 2020; Published: 20 November 2020

**Abstract:** We investigate the Pareto-scheduling problem with two competing agents on a single machine to minimize the total weighted completion time of agent *A*'s jobs and the total weighted late work of agent *B*'s jobs, the *B*-jobs having a common due date. Since this problem is known to be NP-hard, we present two pseudo-polynomial-time exact algorithms to generate the Pareto frontier and an approximation algorithm to generate a (1 + )-approximate Pareto frontier. In addition, some numerical tests are undertaken to evaluate the effectiveness of our algorithms.

**Keywords:** scheduling; two agents; pareto frontier; approximation algorithms

#### **1. Introduction**

**Problem description and motivation:** Multi-agent scheduling has attracted an ever-increasing research interest due to its extensive applications (see the book of Agnetis et al. [1]). Among the common four problem-versions (including lexical-, positive-combination-, constrained-, and Pareto-scheduling, as shown in Li and Yuan [2]) for a given group of criteria for multiple agents, Pareto-scheduling has the most important practical value, since it reflects the effective tradeoff between the actual and (usually) conflicting requirements of different agents.

Our considered problem is formally stated as follows. Assume that two agents (A and B) compete to process their own sets of independent and non-preemptive jobs on a single machine. The set of the *nX* jobs from agent *<sup>X</sup>* ∈ {*A*, *<sup>B</sup>*} is <sup>J</sup>*<sup>X</sup>* <sup>=</sup> {*J<sup>X</sup>* <sup>1</sup> , *<sup>J</sup><sup>X</sup>* <sup>2</sup> , ··· , *<sup>J</sup><sup>X</sup> nX* } with J*<sup>A</sup>* ∩ J*<sup>B</sup>* = *φ*. For convenience, we call a job from agent *X* an *X*-job. All jobs are available at time zero, and are scheduled consecutively without idle time due to the regularity of the objective functions as shown later. Each job *J<sup>X</sup> <sup>j</sup>* has a processing time *<sup>p</sup><sup>X</sup> <sup>j</sup>* and a weight *w<sup>X</sup> <sup>j</sup>* . In addition, each B-job *<sup>J</sup><sup>B</sup> <sup>j</sup>* has also a common due date *<sup>d</sup>*. We assume that all parameters *<sup>p</sup><sup>X</sup> j* , *w<sup>X</sup> <sup>j</sup>* and *d* are known integers.

Let *σ* be a schedule. We use *C<sup>X</sup> <sup>j</sup>* (*σ*) to denote the completion time of job *<sup>J</sup><sup>X</sup> <sup>j</sup>* in *σ*. The objective function of agent A is the total weighted completion time, denoted by ∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*), while the objective function

*Mathematics* **2020**, *8*, 2070; doi:10.3390/math8112070 www.mdpi.com/journal/mathematics

of agent B is the total weighted late work, denoted by ∑ *w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*). Here, the late work *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*) of job *<sup>J</sup><sup>B</sup> j* indicates the amount processed after the due date *d*, specifically,

$$\mathbf{Y}\_{j}^{B}(\sigma) = \begin{cases} \mathbf{0}, & \text{if } \mathbb{C}\_{j}(\sigma) \le d, \\ \mathbf{C}\_{j}^{B}(\sigma) - d, & \text{if } d < \mathbb{C}\_{j}^{B}(\sigma) \le d + p\_{j}^{B}, \\ \mathbf{p}\_{j}^{B}, & \text{if } \mathbb{C}\_{j}^{B}(\sigma) > d + p\_{j}^{B}. \end{cases} \tag{1}$$

Following Hariri et al. (1995) [3], job *J<sup>B</sup> <sup>j</sup>* is said to be *early*, *partially early*, and *late* in *<sup>σ</sup>*, if *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*) = 0, 0 < *Y<sup>B</sup> <sup>j</sup>* (*σ*) < *<sup>p</sup><sup>B</sup> <sup>j</sup>* , and *<sup>Y</sup><sup>B</sup> <sup>j</sup>* (*σ*) = *<sup>p</sup><sup>B</sup> <sup>j</sup>* , respectively.

Falling into the category of Pareto-scheduling, the problem studied in this paper aims at generating all Pareto-optimal points (PoPs) and the corresponding Pareto-optimal schedules (PoSs) (the definitions of PoPs and PoSs will be given in Section 2) of all jobs with regard to ∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* and ∑ *w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ). Using the notations in Agnetis et al. [1], our studied scheduling problem can be denoted by <sup>1</sup>|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ). For this problem, we will devise some efficient approximate algorithms.

Our considered scheduling model arises from many practical scenarios. For example, in a factory, two'concurrent projects (*A* and *B*), each containing a certain amount of activities with distinct importance, have to share a limited resource. The former focuses on the mean completion time of its activities. In contrast, the latter requires its activities to be completed before the due date as much as possible, since, otherwise, the shortcomings of some key technical forces after the due date will occur and result in irretrievable loss. It is necessary to model the goal of project *B* as the weighted late work, that is, minimizing the parts left unprocessed before the due date. In addition, two projects naturally have to negotiate to seek a trade-off method of utilizing the common resource.

For another example, in a distribution center, two categories (*A*- and *B*-) goods are stored in a warehouse, in which the former comprises common goods and the latter comprises fresh goods with a shelf life. It is hoped that the shipping preparations for the *A*-goods will be completed as soon as possible. However, due to their limited shelf life, if they are transported after a certain time, the *B*-goods will not be fresh enough when they reach the customers. Therefore, it is reasonable to respectively model the goals of A-goods and B-goods by minimizing the total weighted completion time and the total weighted late work, and seek an efficient transportation method.

**Related works and our contribution:** Numerous works have addressed multi-agent scheduling problems in the literature. With the aim of this paper, we only summarize briefly some related results. Wan et al. [4] provided a strongly polynomial-time algorithm for the two-agent Pareto-scheduling problem on a single machine to minimize the number of the tardy *A*-jobs and the maximum cost of the *B*-jobs. Later, Wan et al. [5] investigated two Pareto-scheduling problems on a single machine with two competing agents and a linear-deterioration processing time: 1||#(*E<sup>A</sup>* max, *E<sup>B</sup>* max) and 1||#(<sup>∑</sup> *<sup>E</sup><sup>A</sup> <sup>j</sup>* , *<sup>E</sup><sup>B</sup>* max), where ∑ *E<sup>A</sup> <sup>j</sup>* is the total earliness of the A-jobs and *E<sup>X</sup>* max is the maximum earliness of the X-jobs. For these two problems, they respectively proposed a polynomial-time algorithm. Gao and Yuan [6] showed that the following two Pareto-scheduling problems with a positional due index and precedence constraints are both polynomially solvable: 1||#(<sup>∑</sup> *<sup>C</sup><sup>A</sup> <sup>j</sup>* , *<sup>f</sup> <sup>B</sup>* max) and 1||#(*<sup>f</sup> <sup>A</sup>* max, *f <sup>B</sup>* max), where *f <sup>X</sup>* max indicates the maximum cost of the X-jobs. He et al. [7] extensively considered the versions of the problems in Gao and Yuan [6] with deteriorating or shortening processing times and without positional due indices and precedence constraints, and devised polynomial-time algorithms. Yuan et al. [8] showed the single-machine preemptive problem 1|*rj*, *pmtn*| #(*L<sup>a</sup>* max : *L<sup>b</sup>* max) can be solved in a polynomial time, where *L<sup>X</sup>* max indicates the maximum lateness of the X-jobs. Wan [9] investigated the single-machine two-agent scheduling problem to minimize the maximum costs with position-dependent jobs, and developed a polynomial-time algorithm.

While most results on Pareto-scheduling concentrate on devising exact algorithms to obtain the Pareto frontier, there are also some methods (such as [10–14]) of developing approximate algorithms to generate the approximate Pareto frontier. Dabia et al. [10] adopted the trimming technique to derive the approximate Pareto frontier for some multi-objective scheduling problems. Yin et al. [15] considered two just-in-time (JIT) scheduling problems with two competing agents on unrelated parallel machines, in which the one agent's criterion is to maximize the weighted number of its JIT jobs, and another agent's criterion is either to maximize its maximum gains from its JIT jobs or to maximize the weighted number of its JIT jobs. They showed that the two problems are both unary NP-hard when the machine number is not fixed, and proposed either a polynomial-time algorithm or a fully polynomial-time approximation scheme (FPTAS) when the machine number is a constant. Yin et al. [16] also considered similar problems in the setting of a two-machine flow shop, and provided two pseudo-polynomial-time exact algorithms to find the Pareto frontier. Chen et al. [17] studied a multi-agent Pareto-scheduling problem in a no-wait flow shop setting, in which each agent's criterion is to maximize its own weighted number of JIT jobs. They showed that it is unary NP-hard when the number of agents is arbitrary, and presented pseudo-polynomial time algorithms and an (1, 1 − ,...,1 − )-approximation algorithm when the number of agents is fixed.

From the perspective of methodology, as a type of optimization problem, the multi-agent scheduling problem's solution algorithms potentially allow for exploiting the optimal robot path planning by a gravitational search algorithm (Purcaru et al. [18]) and optimization based on phylogram analysis (Soares et al. [19]).

In the prophase work (Zhang and Yuan [20]), we proved that the constrained scheduling problem of minimizing the total late work of agent A's jobs with equal due dates subject to the makespan of agent B's jobs not exceeding a given upper bound, is NP-hard even if agent B has only one job. It implies the NP-hardness of our considered problem in this paper. Thus we limit the investigation to devising pseudo-polynomial-time exact algorithms and an approximation algorithm to generate the approximate Pareto frontier.

In addition, in our recent work (Zhang et al. [21]), we considered several three-agent scheduling problems under different constraints on a single machine, in which the three agents' criteria are to minimize the total weighted completion time, the weighted number of tardy jobs, and the total weighted late work. Among those problems, there are two questions related to this paper: 1|*p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> j* | #(Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> j* ), which is solved in *O*(*nAn*<sup>2</sup> *BUAUB*), and 1|*p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> <sup>j</sup>* , *<sup>d</sup><sup>B</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>B</sup> j* | #(Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ), which is solved in *O*(*nAnBUAUB*). The notation *p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> <sup>j</sup>* represents that the jobs of the first agent have inversely agreeable processing times and weights, i.e., the smaller the processing time for a job, the greater its weight, and the notation *d<sup>B</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>B</sup> <sup>j</sup>* represents that the jobs of agent *B* have inversely agreeable due dates and weights. *U<sup>A</sup>* and *U<sup>B</sup>* are the upper bounds on the criteria Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* and <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* , respectively. In contrast to Zhang et al. [21], in this article we remove the constraint *p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> <sup>j</sup>* and turn to the optimization problem of *B*-jobs having a common due date.

The remainder of the paper is organized as follows. In Section 2, some preliminaries are provided. In Sections 3 and 4, we present two dynamic programming algorithms and an FPTAS. In Section 5, some numeral tests are undertaken to show the algorithms' efficiency. Section 6 concludes the paper and suggests the future research direction.

#### **2. Preliminaries**

For self-consistency, in this section we describe some notions and properties related to Pareto-scheduling, and we present other useful notations in the description of the algorithms in the following sections.

**Definition 1.** *Consider two m-vectors u* = (*u*1, *u*2,..., *um*) *and v* = (*v*1, *v*2,..., *vm*)*.*

*(i) We say that u dominates v, denoted by u v, if ui* ≤ *vi for i* = 1, 2, . . . , *m. (ii) We say that u strictly dominates v, denoted by u* ≺ *v, if u v and u* = *v. (iii) Given a constant* > 0*, we say that u -dominates v, denoted by u v, if and only if ui* ≤ (1 + )*vi for i* = 1, 2, . . . , *m.*

**Definition 2.** *Given two agents' criteria γA*(*σ*) *and γB*(*σ*)*, a feasible schedule σ is called Pareto-optimal and the corresponding objective vector* (*γA*(*σ*), *γB*(*σ*)) *is called a Pareto-optimal point, if no other feasible schedule <sup>π</sup> satisfies* (*γA*(*π*), *<sup>γ</sup>B*(*π*)) <sup>≺</sup> (*γA*(*σ*), *<sup>γ</sup>B*(*σ*))*. All the Pareto-optimal points form the Pareto frontier, denoted by P.*

Let **R** be the set of the objective vectors of all feasible schedules, and **Q** be a subset of **R**.

**Definition 3.** *A vector u* ∈ *Q is called non-dominated in Q, if there exists no other vector v* ∈ *Q such that v* ≺ *u.*

It is not difficult to see that, for the above definitions, the latter is an extension of the former, and especially when **Q** is exactly equal to **R**, all the non-dominated vectors in **Q** compose the Pareto-optimal frontier. The following lemma establishes the relationship between sets **P** and a subset **Q** ⊆ **R**.

**Lemma 1.** *For any set Q with P* ⊆ *Q* ⊆ *R, if O is the set including all the non-dominated vectors in Q, then O* = *P.*

**Proof.** By Definition 2, for each Pareto-optimal point **u** ∈ **P**, there is no other vector **v** ∈ **R** such that **v** ≺ **u**, and naturally, such a fact also holds for the set **Q**, since **Q** ⊆ **R**. Then, it follows that **P** ⊆ **O** by the definition of the set **O**. Next we show that **O** ⊆ **P**. If not, we pick up one vector **w** from **O** \ **P**. Again by Definition 2, there is some vector **w** ∈ **P** such that **w** ≺ **u**. Nevertheless, this is impossible, since **w** ∈ **P** ⊆ **Q** leads to no existence of such a vector **w** in **Q** by the assumption of **w** and Definition 3. Thus **O** = **P**.

From Lemma 1, to generate the Pareto frontier **P**, an alternative is to first determine a set **Q** with **P** ⊆ **Q** ⊆ **R**, and then delete the dominated vectors in **Q**. Throughout the reminder of this paper, such a subset **Q** is called an *intermediate set*. Obviously, **R** is also an intermediate set.

**Definition 4.** *For a given constant* > 0*, a* (1 + )*-approximate Pareto frontier, denoted by P, is a set of the objective vectors satisfying, for any* (*γA*(*σ*), *<sup>γ</sup>B*(*σ*)) <sup>∈</sup> *<sup>P</sup>, there exists at least one objective vector* (*γA*(*σ* ), *γB*(*σ* )) <sup>∈</sup> *<sup>P</sup> such that* (*γA*(*σ* ), *γB*(*σ* ))  (*γA*(*σ*), *<sup>γ</sup>B*(*σ*))*.*

**Definition 5.** *A family of algorithms* {A : > 0} *is called a* **fully polynomial-time approximation scheme** *(FPTAS) if, for each* > 0*,* A *generates a* (1 + )*-approximate Pareto frontier with a running time in the polynomial in the instance size and* 1/*.*

Besides those already mentioned in Section 1, the following notations will also be used later:



#### **3. An Exact Algorithm**

In this section a dynamic programming algorithm for problem 1|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ) is presented. For description convenience, for a given schedule *σ*, the job set J is divided into the following four subsets: <sup>J</sup> *<sup>A</sup>*<sup>1</sup> (*σ*) = {*J<sup>A</sup> <sup>j</sup>* : *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) <sup>≤</sup> *<sup>d</sup>*}, <sup>J</sup> *<sup>A</sup>*<sup>2</sup> (*σ*) = {*J<sup>A</sup> <sup>j</sup>* : *<sup>C</sup><sup>A</sup> <sup>j</sup>* (*σ*) <sup>&</sup>gt; *<sup>d</sup>*}, <sup>J</sup> *<sup>B</sup>*<sup>1</sup> (*σ*) = {*J<sup>B</sup> <sup>j</sup>* : *<sup>s</sup><sup>B</sup> <sup>j</sup>* (*σ*) < *d*}, and <sup>J</sup> *<sup>B</sup>*<sup>2</sup> (*σ*) = {*J<sup>B</sup> <sup>j</sup>* : *<sup>s</sup><sup>B</sup> <sup>j</sup>* (*σ*) ≥ *d*}. Obviously, such a partition of the job set is well defined for a given schedule.

The following lemma establishes the structural properties of the Pareto-optimal schedule.

**Lemma 2.** *For each Pareto-optimal point* (*C*,*Y*) *of problem* <sup>1</sup>|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* )*, there is a Pareto-optimal schedule σ such that*

$$(\text{i)}\ \mathcal{J}^{A\_1}(\sigma) \prec\_{\sigma} \mathcal{J}^{B\_1}\_{\phantom{A\_2}}(\sigma) \prec\_{\sigma} \mathcal{J}^{A\_2}(\sigma) \prec\_{\sigma} \mathcal{J}^{B\_2}(\sigma).$$

*(ii) the jobs in* <sup>J</sup> *<sup>B</sup>*<sup>1</sup> (*σ*) *are sequenced in the non-increasing order of their weights and the jobs in* <sup>J</sup> *<sup>B</sup>*<sup>2</sup> (*σ*) *are sequenced arbitrarily.*

*(iii) the jobs in* <sup>J</sup> *<sup>A</sup>*<sup>1</sup> (*σ*) *and* <sup>J</sup> *<sup>A</sup>*<sup>2</sup> (*σ*) *are sequenced according to the weighted shortest processing time (WSPT) rule.*

**Proof.** In Lemma 2, statement (i) can easily be observed, since the jobs in <sup>J</sup> *<sup>B</sup>*<sup>2</sup> (*σ*) are late and this will not result in any increase in their total late work when moving them to the end of the schedule, and as many A-jobs as possible can be positioned before the B-jobs in <sup>J</sup> *<sup>B</sup>*<sup>1</sup> (*σ*), provided that the last job in <sup>J</sup> *<sup>B</sup>*<sup>1</sup> (*σ*) is not late. The left two statements in Lemma 2 can easily be proved by an interchange argument and the detail is omitted here.

Lemma 2 allows us only to consider the feasible schedules simultaneously satisfying the conditions (i)-(iii). To this end, we re-number the *nA* jobs in <sup>J</sup> *<sup>A</sup>* in the WSPT order and the *nB <sup>B</sup>*-jobs in the maximum weight first (MW) order so that

$$\frac{p\_1^A}{w\_1^A} \le \frac{p\_2^A}{w\_2^A} \le \cdots \le \frac{p\_{n\_A}^A}{w\_{n\_A}^A}.\tag{2}$$

$$w\_1^B \ge w\_2^B \ge \cdots \ge w\_{n\_B}^B. \tag{3}$$

Such a sorting takes *O*(*n* log *n*) time.

According to Lemma 1, the algorithm to be described adopts the strategy of first finding the intermediate set dynamically and then deleting the dominated points in it. It is necessary to mention that in the proposed algorithm we appropriately relax the conditions to find a modestly larger intermediate set. For briefly describing the dynamic programming algorithm, we introduce the following terminologies and notations.



To solve problem 1|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ), we have to first compute <sup>Γ</sup>˜( −*n* →*A*, ←− 1 ) and then obtain the Pareto-frontier **Q**˜ 1. This can be realized by dynamically computing the sets Γ( −→*x* , ←−*y* ) for all the possible choices of the tuple (*x*, *y*). Note that each ( −→*x* , ←−*y* )-schedule can be obtained either by adding job *J<sup>A</sup> <sup>x</sup>* to some ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* )-schedule, or by adding job *J<sup>B</sup> <sup>y</sup>* to some ( −→*x* , ←−− *y* + 1)-schedule. Therefore, we can informally describe our dynamic programming algorithm as follows.

Initially, set Γ( −→0 , ←−−− *nB* <sup>+</sup> <sup>1</sup>) = {(0, *<sup>t</sup>*0, *<sup>t</sup>*0, 0, 0) : *<sup>d</sup>* <sup>−</sup> *<sup>p</sup><sup>A</sup>* max <sup>+</sup> <sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>0</sup> <sup>≤</sup> *<sup>d</sup>* <sup>+</sup> *<sup>p</sup><sup>B</sup>* max − 1} and Γ( −→*x* , ←−*y* ) = ∅ if (*x*, *y*) = (0, *nB* + 1). Then we recursively generate all the state sets Γ( −→*x* , ←−*y* ) from the previously-generated sets Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* ) and <sup>Γ</sup>( −→*x* , ←−− *y* + 1). Specifically,

• For each state (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) with Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* ) <sup>=</sup> *<sup>φ</sup>*, add two states (*<sup>t</sup>* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* ) and (*t* <sup>1</sup> , *t* <sup>2</sup> , *t* <sup>3</sup> , *C*,*Y*) to the set Γ( −→*x* , ←−*y* ), with

$$(t\_1', t\_2', t\_3', \mathbb{C}', \mathbb{Y}') = (t\_1 + p\_{\ge}^A, t\_2, t\_3, \mathbb{C} + w\_{\ge}^A (t\_1 + p\_{\ge}^A), \mathbb{Y})\_\*$$

and

$$(t\_1^{\prime\prime}, t\_2^{\prime\prime}, t\_3^{\prime\prime}, \mathbb{C}^{\prime\prime}, \mathbb{Y}^{\prime\prime}) = (t\_1, t\_2, t\_3 + p\_{\ge}^A, \mathbb{C} + w\_{\ge}^A(t\_3 + p\_{\ge}^A), \mathbb{Y}).$$

These two states respectively correspond to the newly obtained ( −→*x* , ←−*y* )-schedules by scheduling job *JA <sup>x</sup>* immediately following the subschedule *π*<sup>1</sup> and immediately following the subschedule *π*3, in some ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) schedule *π* that corresponds to the state (*t*1, *t*2, *t*3, *C*,*Y*). Note that the first case occurs only when *t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ≤ *t*<sup>2</sup> is satisfied.

• For each state (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −→*x* , ←−− *y* + 1), also add two two states (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* ) and (*t* <sup>1</sup> , *t* <sup>2</sup> , *t* <sup>3</sup> , *C*,*Y*) to the set Γ( −→*x* , ←−*y* ), with

$$(t\_{1}^{\prime}, t\_{2}^{\prime}, t\_{3}^{\prime}, \mathbb{C}^{\prime}, \mathcal{Y}^{\prime}) = (t\_{1}, t\_{2} - p\_{y}^{B}, t\_{3}, \mathbb{C}, \mathcal{Y} + w\_{y}^{B} \max\{t\_{2} - d^{B}, 0\}),$$

and

$$(t\_1^{\prime\prime}, t\_2^{\prime\prime}, t\_3^{\prime\prime}, \mathbb{C}^{\prime\prime}, \mathbb{Y}^{\prime\prime}) = (t\_1, t\_2, t\_3, \mathbb{C}, \mathbb{Y} + w\_y^B p\_y^B).$$

These two states respectively correspond to the newly obtained ( −→*x* , ←−*y* )-schedules by scheduling job *JB <sup>y</sup>* immediately preceding the subschedule *π*<sup>2</sup> and immediately following the subschedule *π*4, in some ( −→*x* , ←−− *y* + 1) schedule *π* that corresponds to the state (*t*1, *t*2, *t*3, *C*,*Y*). Note that the first case occurs only when *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* < *d<sup>B</sup>* is satisfied.

Note that, if in the above state-generation procedures we replace sets Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) and Γ( −→*x* , ←−− *y* + 1) with sets Γ˜( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) and Γ˜( −→*x* , ←−− *y* + 1), then the resulting set of new states, denoted by Γ ( −→*x* , ←−*y* ), may be different from Γ( −→*x* , ←−*y* ). Recall that, when deleting those dominated vectors in the sets Γ( −→*x* , ←−*y* ) and Γ ( −→*x* , ←−*y* ), the newly obtained sets are respectively denoted by Γ˜( −→*x* , ←−*y* ) and Γ˜( −→*x* , ←−*y* ), which will be shown to be identical in the following lemma.

**Lemma 3.** Γ˜( −→*x* , ←−*y* ) = Γ˜( −→*x* , ←−*y* )*.*

**Proof.** Since Γ˜( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* ) <sup>⊆</sup> <sup>Γ</sup>( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) and Γ˜( −→*x* , ←−− *y* + 1) ⊆ Γ( −→*x* , ←−− *y* + 1), it follows that Γ ( −→*x* , ←−*<sup>y</sup>* ) <sup>⊆</sup> Γ( −→*x* , ←−*y* ) by the generation procedure of the new states as described previously. If Γ( −→*x* , ←−*y* ) = Γ ( −→*x* , ←−*y* ), then naturally Γ˜( −→*x* , ←−*y* ) = Γ˜( −→*x* , ←−*y* ). In the following, suppose that Γ( −→*x* , ←−*<sup>y</sup>* ) \ <sup>Γ</sup> ( −→*x* , ←−*<sup>y</sup>* ) <sup>=</sup> <sup>∅</sup>. We next show that each state (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* ) ∈ Γ( −→*x* , ←−*<sup>y</sup>* ) \ <sup>Γ</sup> ( −→*x* , ←−*<sup>y</sup>* ) is dominated by a state (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>C</sup>*,*Y*) <sup>∈</sup> Γ ( −→*x* , ←−*<sup>y</sup>* ), namely, *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>* <sup>1</sup>, *t*<sup>2</sup> ≥ *t* <sup>2</sup>, *t*<sup>3</sup> ≤ *t* <sup>3</sup>, *C* ≤ *C* ,*Y* ≤ *Y* .

Let *π* be an ( −→*x* , ←−*y* )-schedule corresponding to (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* ). According to the above discussion, there are four possibilities of deriving *π* from some schedule *π*, which is assumed to correspond to the state (*t*1, *t*2, *t*3, *C*,*Y*) in Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* ) or <sup>Γ</sup>( −→*x* , ←−− *y* + 1).

**Case 1.** *π* is obtained from *π* by scheduling job *J<sup>A</sup> <sup>x</sup>* directly after subschedule *π*1. Then (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) with *t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* <sup>≤</sup> *<sup>t</sup>*2, and there is a state ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>C</sup>*˜,*Y*˜) <sup>∈</sup> <sup>Γ</sup>˜( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) such that ˜*t*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*1, ˜*t*<sup>2</sup> <sup>≥</sup> *<sup>t</sup>*2, ˜*t*<sup>3</sup> <sup>≤</sup> *<sup>t</sup>*3, *<sup>C</sup>*˜ <sup>≤</sup> *<sup>C</sup>*, and *<sup>Y</sup>*˜ <sup>≤</sup> *<sup>Y</sup>*. Let *<sup>π</sup>*˜ be an ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* )-schedule corresponding to ( ˜*t*1, ˜*t*2, ˜*t*3, *C*˜,*Y*˜), and let *π* be the ( −→*x* , ←−*y* )-schedule obtained from *π*˜ by scheduling *J<sup>A</sup> <sup>x</sup>* directly after schedule *π*˜ 1. Let (*t*1, *t*2, *t*3, *C*,*Y*) be the state corresponding to *π*. Note that the above operation to get *π* is feasible since ˜*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* <sup>≤</sup> *<sup>t</sup>*<sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>≤</sup> ˜*t*2. Then we have (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>C</sup>*,*Y*)=( ˜*t*<sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , ˜*t*2, ˜*t*3, *C*˜ + *w<sup>A</sup> <sup>x</sup>* ( ˜*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*˜). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* )=(*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* , *t*2, *t*3, *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*), we have

$$\begin{cases} \overline{t\_1} = \widetilde{t\_1} + p\_x^A \le t\_1 + p\_x^A = t\_1', \\ \overline{t\_2} = \widetilde{t\_2} \ge t\_2 = t\_2', \\ \overline{t\_3} = \widetilde{t\_3} \le t\_3 = t\_3', \\ \overline{C} = \widetilde{C} + w\_x^A (\widetilde{t\_1} + p\_x^A) \le \overline{C} + w\_x^A (t\_1 + p\_x^A) = \mathcal{C}', \\ \overline{Y} = \bar{Y} \le Y = Y'. \end{cases} \tag{4}$$

**Case 2.** *π* is obtained from *π* by scheduling *J<sup>A</sup> <sup>x</sup>* directly after schedule *π*3. Then (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* ), and there is a state ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>C</sup>*˜,*Y*˜) <sup>∈</sup> <sup>Γ</sup>˜( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* ) such that ˜*t*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*1, ˜*t*<sup>2</sup> <sup>≥</sup> *<sup>t</sup>*2, ˜*t*<sup>3</sup> <sup>≤</sup> *<sup>t</sup>*3, *<sup>C</sup>*˜ <sup>≤</sup> *<sup>C</sup>*, and *<sup>Y</sup>*˜ <sup>≤</sup> *<sup>Y</sup>*. Let *<sup>π</sup>*˜ be an ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* )-schedule corresponding to ( ˜*t*1, ˜*t*2, ˜*t*3, *C*˜,*Y*˜), and let *π* be the ( −→*x* , ←−*y* )-schedule obtained from *π*˜ by scheduling *J<sup>A</sup> <sup>x</sup>* directly after schedule *π*˜ 3. Let (*t*1, *t*2, *t*3, *C*,*Y*) be the state corresponding to *π*. Then we have (*t*1, *t*2, *t*3, *C*,*Y*)=( ˜*t*1, ˜*t*2, ˜*t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* , *C*˜ + *w<sup>A</sup> <sup>x</sup>* ( ˜*t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*˜). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* )=(*t*1, *t*2, *t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* , *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*), we have

$$\begin{cases} \overline{l\_1} = \underline{l\_1} \le t\_1 = t\_{1'}' \\\\ \overline{l\_2} = \underline{l\_2} \ge t\_2 = t\_{2'}' \\\\ \overline{l\_3} = \underline{l\_3} + p\_x^A \le t\_3 + p\_x^A = t\_3' \\\\ \overline{\mathsf{C}} = \mathsf{C} + w\_x^A(\underline{l\_3} + p\_x^A) \le \mathsf{C} + w\_x^A(t\_3 + p\_x^A) = \mathsf{C}', \\\\ \overline{\mathsf{Y}} = \overline{\mathsf{Y}} \le \mathsf{Y} = \mathsf{Y}'. \end{cases} \tag{5}$$

**Case 3.** *π* is obtained from *π* by scheduling *J<sup>B</sup> <sup>y</sup>* directly before schedule *π*2. Note that in this case, the condition *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* <sup>&</sup>lt; *<sup>d</sup><sup>B</sup>* must be satisfied. Then (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>C</sup>*,*Y*) <sup>∈</sup> <sup>Γ</sup>( −→*x* , ←−− *y* + 1), and there is a state ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>C</sup>*˜,*Y*˜) <sup>∈</sup> <sup>Γ</sup>˜( −→*x* , ←−− *<sup>y</sup>* <sup>+</sup> <sup>1</sup>) such that ˜*t*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*1, ˜*t*<sup>2</sup> <sup>≥</sup> *<sup>t</sup>*2, ˜*t*<sup>3</sup> <sup>≤</sup> *<sup>t</sup>*3, *<sup>C</sup>*˜ <sup>≤</sup> *<sup>C</sup>*, and *<sup>Y</sup>*˜ <sup>≤</sup> *<sup>Y</sup>*. Let *<sup>π</sup>*˜ be an ( −→*x* , ←−− *y* + 1)-schedule corresponding to ( ˜*t*1, ˜*t*2, ˜*t*3, *C*˜,*Y*˜), and let *π* be the ( −→*x* , ←−*y* )-schedule obtained from *π*˜ by scheduling *J<sup>B</sup> <sup>y</sup>* directly before schedule *π*2. Let (*t*1, *t*2, *t*3, *C*,*Y*) be the state corresponding to *π*. The above

operation to obtain *<sup>π</sup>* is feasible. In fact, ˜*t*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , which means there are enough spaces for *J<sup>B</sup> <sup>y</sup>* to be scheduled in. In the following we will illustrate that the condition ˜*t*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* < *d* is satisfied.

**Claim 1.** *If* ˜*t*<sup>2</sup> = *<sup>t</sup>*2*, then* ˜*t*<sup>2</sup> ≤ *d.*

Suppose to the contrary that ˜*t*<sup>2</sup> > *d*, then *J<sup>B</sup> <sup>y</sup>* is partially early or late in *π*, implying that *J<sup>B</sup> <sup>y</sup>*+1, *<sup>J</sup><sup>B</sup> <sup>y</sup>*+2, ... , *<sup>J</sup><sup>B</sup> nB* are all late in *π*˜, i.e., there is no job in *π*˜ 2, which further suggests that ∑*x <sup>j</sup>*=<sup>1</sup> *p<sup>A</sup> <sup>j</sup>* <sup>=</sup> ˜*t*<sup>1</sup> <sup>+</sup> ˜*t*<sup>3</sup> <sup>−</sup> ˜*t*2. What is more, since *<sup>Y</sup>*˜ <sup>≤</sup> *<sup>Y</sup>*, the jobs *<sup>J</sup><sup>B</sup> <sup>y</sup>*+1, *<sup>J</sup><sup>B</sup> <sup>y</sup>*+2, ... , *<sup>J</sup><sup>B</sup> nB* are also late in *π*, which also indicates that *Y*˜ = *Y* and ∑*<sup>x</sup> <sup>j</sup>*=<sup>1</sup> *p<sup>A</sup> <sup>j</sup>* = *<sup>t</sup>*<sup>1</sup> + *<sup>t</sup>*<sup>3</sup> − *<sup>t</sup>*2. From ˜*t*<sup>1</sup> + ˜*t*<sup>3</sup> − ˜*t*<sup>2</sup> = *<sup>t</sup>*<sup>1</sup> + *<sup>t</sup>*<sup>3</sup> − *<sup>t</sup>*2, ˜*t*<sup>1</sup> ≤ *<sup>t</sup>*1, ˜*t*<sup>2</sup> ≥ *<sup>t</sup>*2, and ˜*t*<sup>3</sup> <sup>≤</sup> *<sup>t</sup>*<sup>3</sup> we know that ˜*t*<sup>2</sup> <sup>=</sup> *<sup>t</sup>*<sup>2</sup> contradicts ˜*t*<sup>2</sup> <sup>=</sup> *<sup>t</sup>*2. Thus, ˜*t*<sup>2</sup> <sup>≤</sup> *<sup>d</sup>B*. Claim 1 follows.

If ˜*t*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* <sup>≥</sup> *<sup>d</sup>B*, then ˜*t*<sup>2</sup> <sup>=</sup> *<sup>t</sup>*2. From Claim 1 we have ˜*t*<sup>2</sup> <sup>≤</sup> *<sup>d</sup>* <sup>&</sup>lt; *<sup>d</sup>* <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , i.e., ˜*t*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* < *d*, which is a contradiction. Thus the condition ˜*t*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* < *d<sup>B</sup>* is satisfied and the operation to get *π* is feasible. Then we have (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>C</sup>*,*Y*)=( ˜*t*1, ˜*t*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , ˜*t*3, *C*˜,*Y*˜ + *w<sup>B</sup> <sup>y</sup>* max{ ˜*t*<sup>2</sup> − *<sup>d</sup>*, 0}). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* )=(*t*1, *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , *t*3, *C*,*Y* + *w<sup>B</sup> <sup>y</sup>* max{*t*<sup>2</sup> − *d*, 0}), we have

$$\begin{cases} \overline{t\_1} = \tilde{t\_1} \le t\_1 = t\_{1'}' \\\\ \overline{t\_2} = \tilde{t\_2} - p\_y^B \ge t\_2 - p\_y^B = t\_{2'}' \\\\ \overline{t\_3} = \tilde{t\_3} \le t\_3 = t\_{3'}' \\\\ \overline{\mathcal{C}} = \mathcal{C} \le \mathcal{C} = \mathcal{C}'. \end{cases} \tag{6}$$

Next we prove that *Y* ≤ *Y* . In fact, if ˜*t*<sup>2</sup> = *t*2, then *Y* = *Y*˜ + *w<sup>B</sup> <sup>y</sup>* max{ ˜*t*<sup>2</sup> <sup>−</sup> *<sup>d</sup>*, 0} ≤ *<sup>Y</sup>* <sup>+</sup> *<sup>w</sup><sup>B</sup> <sup>y</sup>* max{*t*<sup>2</sup> − *d*, 0} = *Y* . If ˜*t*<sup>2</sup> = *<sup>t</sup>*2, then from Claim 1 we know that ˜*t*<sup>2</sup> ≤ *<sup>d</sup>*, and then *<sup>t</sup>*<sup>2</sup> − *<sup>d</sup>* < 0. Thus we have *<sup>Y</sup>* <sup>=</sup> *<sup>Y</sup>*˜ <sup>≤</sup> *<sup>Y</sup>* <sup>=</sup> *<sup>Y</sup>* .

**Case 4.** *π* is obtained from *π* by scheduling *J<sup>B</sup> <sup>y</sup>* directly after schedule *π*4. Then (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −→*x* , ←−− *<sup>y</sup>* <sup>+</sup> <sup>1</sup>), and there is a state ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>C</sup>*˜,*Y*˜) <sup>∈</sup> <sup>Γ</sup>˜( −→*x* , ←−− *<sup>y</sup>* <sup>+</sup> <sup>1</sup>) such that ˜*t*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*1, ˜*t*<sup>2</sup> <sup>≥</sup> *<sup>t</sup>*2, ˜*t*<sup>3</sup> <sup>≤</sup> *<sup>t</sup>*3, *<sup>C</sup>*˜ <sup>≤</sup> *<sup>C</sup>*, and *<sup>Y</sup>*˜ <sup>≤</sup> *<sup>Y</sup>*. Let *<sup>π</sup>*˜ be an ( −→*x* , ←−− *y* + 1)-schedule corresponding to ( ˜*t*1, ˜*t*2, ˜*t*3, *C*˜,*Y*˜), and let *π* be the ( −→*x* , ←−*y* )-schedule obtained from *π*˜ by scheduling *J<sup>A</sup> <sup>x</sup>* directly after schedule *π*˜ 3. Let (*t*1, *t*2, *t*3, *C*,*Y*) be the state corresponding to *π*. Then we have (*t*1, *t*2, *t*3, *C*,*Y*)=( ˜*t*1, ˜*t*2, ˜*t*3, *C*˜,*Y*˜ + *w<sup>B</sup> <sup>y</sup> p<sup>B</sup> <sup>y</sup>* ). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *C* ,*Y* )=(*t*1, *t*2, *t*3, *C*,*Y* + *w<sup>B</sup> <sup>y</sup> p<sup>B</sup> <sup>y</sup>* ), we have

$$\begin{cases} \overline{t\_1} = \widetilde{t\_1} \le t\_1 = t\_{1'}' \\ \overline{t\_2} = \widetilde{t\_2} \ge t\_2 = t\_{2'}' \\ \overline{t\_3} = \widetilde{t\_3} \le t\_3 = t\_{3'}' \\ \overline{\mathsf{C}} = \mathsf{C} \le \mathsf{C} = \mathsf{C}' \\ \overline{Y} = \widetilde{Y} + w\_y^B p\_y^B \le Y + w\_y^B p\_y^B = Y'. \end{cases} \tag{7}$$

The result follows.

**Theorem 1.** *Algorithm <sup>1</sup> solves the Pareto-frontier scheduling problem* <sup>1</sup>|*d<sup>B</sup> <sup>j</sup>* = *d*| #(Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ) *in O*(*nAnBdPsumUAUB*) *time.*

**Algorithm 1:** For problem 1|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> j* )

**<sup>1</sup>** Set Γ( −→0 , ←−−− *nB* <sup>+</sup> <sup>1</sup>) = {(0, *<sup>t</sup>*0, *<sup>t</sup>*0, 0, 0) : *<sup>d</sup>* <sup>−</sup> *<sup>p</sup><sup>A</sup>* max <sup>+</sup> <sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>0</sup> <sup>≤</sup> *<sup>d</sup>* <sup>+</sup> *<sup>p</sup><sup>B</sup>* max − 1} and set Γ( −→*x* , ←−*y* ) = ∅ if (*x*, *y*) = (0, *nB* + 1). **<sup>2</sup> for** *x* = 0, 1, . . . , *nA, y* = *nB* + 1, *nB*,...,1*,* **do <sup>3</sup> for** *each* (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*<sup>y</sup>* )*,* **do <sup>4</sup> if** 0 < *x* ≤ *nA,* **then <sup>5</sup>** Γ( −→*x* , ←−*y* ) := Γ( −→*x* , ←−*<sup>y</sup>* ) <sup>∪</sup> (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*<sup>3</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*) **<sup>6</sup> end <sup>7</sup> if** <sup>0</sup> <sup>&</sup>lt; *<sup>x</sup>* <sup>≤</sup> *nA and t*<sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* ≤ *t*2*,* **then <sup>8</sup>** Γ( −→*x* , ←−*y* ) := Γ( −→*x* , ←−*<sup>y</sup>* ) <sup>∪</sup> (*t*<sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *t*2, *t*3, *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*) **<sup>9</sup> end <sup>10</sup> end <sup>11</sup> for** *each* (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ( −→*x* , ←−− *y* + 1)*,* **do <sup>12</sup> if** 1 ≤ *y* < *nB* + 1*,* **then <sup>13</sup>** Γ( −→*x* , ←−*y* ) := Γ( −→*x* , ←−*<sup>y</sup>* ) <sup>∪</sup> (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>C</sup>*,*<sup>Y</sup>* <sup>+</sup> *<sup>w</sup><sup>B</sup> <sup>y</sup> p<sup>B</sup> y* ) **<sup>14</sup> end <sup>15</sup> if** <sup>1</sup> <sup>≤</sup> *<sup>y</sup>* <sup>&</sup>lt; *nB* <sup>+</sup> <sup>1</sup> *and t*<sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* < *d,* **then <sup>16</sup>** Γ( −→*x* , ←−*y* ) := Γ( −→*x* , ←−*<sup>y</sup>* ) <sup>∪</sup> (*t*1, *<sup>t</sup>*<sup>2</sup> <sup>−</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , *t*3, *C*,*Y* + *w<sup>B</sup> <sup>y</sup>* max{*t*<sup>2</sup> − *d*, 0}) **<sup>17</sup> end <sup>18</sup> end <sup>19</sup>** For each newly generated Γ( −→*x* , ←−*y* ), set Γ( −→*x* , ←−*y* ) := Γ˜( −→*x* , ←−*y* ) **<sup>20</sup> end <sup>21</sup>** Generate **Q**˜ <sup>1</sup> and, for each state (*C*,*Y*) <sup>∈</sup> **<sup>Q</sup>**˜ 1, derive the corresponding optimal schedule by backtracking.

**Proof.** The correctness of Algorithm 1 is guaranteed by Lemma 2, Lemma 1, and Lemma 3. Here we only analyze its time complexity. The initialization step takes *O*(*P*sum + *nAnB*) time, which is dominated by the final time complexity of Algorithm 1. In the implementation of Algorithm 1, we guarantee that Γ( −→*x* , ←−*y* ) = Γ˜( −→*x* , ←−*<sup>y</sup>* ). Note that 0 <sup>≤</sup> *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>B</sup>* and *<sup>d</sup><sup>B</sup>* <sup>−</sup> *<sup>p</sup><sup>A</sup>* max + 1 ≤ *t*<sup>3</sup> ≤ *P*sum, then each state set Γ( −→*x* , ←−*y* ) contains *O*(*dBP*sum*UAUB*) states. Moreover, Γ( −→*x* , ←−*y* ) is obtained by performing at most two (constant) operations on the states in Γ( −−→*<sup>x</sup>* <sup>−</sup> 1, ←−*y* ) Γ( −→*x* , ←−− *y* + 1) for *x* = 0, 1, ... , *nA*, *y* = *nB* + 1, *nB*, ... , 1. Note that the upper bounds of Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* and <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* are given by *<sup>U</sup><sup>A</sup>* <sup>=</sup> <sup>∑</sup>*nA <sup>j</sup>*=<sup>1</sup> *<sup>w</sup><sup>A</sup> <sup>j</sup> <sup>P</sup>*sum and *<sup>U</sup><sup>B</sup>* <sup>=</sup> <sup>∑</sup>*nB <sup>j</sup>*=<sup>1</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>p</sup><sup>B</sup> j* , respectively. Thus, the overall running time of Algorithm 1 is *O*(*nAnBdP*sum*UAUB*).

#### **4. An FPTAS**

In this section, for problem 1|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ), we first give another dynamic programming algorithm, and then turn it into an FPTAS by the trimming technique. As for Algorithm 1, we first introduce the following terminologies and notations.


*<sup>A</sup>*-jobs of <sup>J</sup> *<sup>A</sup> <sup>x</sup>* , and the total weighted late work of the *<sup>B</sup>*-jobs of <sup>J</sup> *<sup>B</sup> <sup>y</sup>* . Note that a state of (*x*, *y*) at least corresponds to some (*x*, *y*)-schedule.


Clearly, **Q**<sup>2</sup> is an intermediate set. Similarly to the discussion for Algorithm 1, we can generate all the Γ(*x*, *y*) for all the possible choices of the tuple (*x*, *y*) dynamically in the following way.

Initially, set Γ(0, 0) = {(0, 0, 0, 0, 0, 0, 0)} and Γ(*x*, *y*) = ∅ if (*x*, *y*) = (0, 0). Then we recursively generate all the state sets Γ(*x*, *y*) from the previously generated sets Γ(*x* − 1, *y*) and Γ(*x*, *y* − 1). Specifically,

• For each state (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) ∈ Γ(*x* − 1, *y*) with Γ(*x* − 1, *y*) = ∅, add two states (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* ) and (*t* <sup>1</sup> , *t* <sup>2</sup> , *t* <sup>3</sup> , *W*, *k*, *C*,*Y*) to the set Γ(*x*, *y*), with

$$\begin{array}{l} (t\_1', t\_2', t\_3', \mathcal{W}', k', \mathcal{C}', \mathcal{Y}') = (t\_1 + p\_x^A, t\_2 + p\_x^A, t\_3 + p\_x^A, \mathcal{W}, k, \mathcal{C} + w\_x^A(t\_1 + p\_x^A) + \mathcal{W}p\_x^A, \mathcal{Y}) \\ + w\_k^B \max\{\min\{t\_2 + p\_x^A - d^B, p\_x^A\}, 0\}, \text{and} (t\_1'', t\_2'', t\_3'', \mathcal{W}', k'', \mathcal{C}', \mathcal{Y}') \\ = (t\_1, t\_2, t\_3 + p\_x^A, \mathcal{W} + w\_x^A, k, \mathcal{C} + w\_x^A(t\_3 + p\_x^A), \mathcal{Y}). \end{array}$$

These two states respectively correspond to the newly obtained (*x*, *y*)-schedules by scheduling job *JA <sup>x</sup>* immediately following the subschedule *π*<sup>1</sup> and immediately following the subschedule *π*3, in some (*x* − 1, *y*) schedule *π* that corresponds to the state (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*). Note that the first case occurs only when *t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ≤ *t*<sup>2</sup> is satisfied.

• For each state (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) ∈ Γ(*x*, *y* − 1), also add two two states (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* ) and (*t* <sup>1</sup> , *t* <sup>2</sup> , *t* <sup>3</sup> , *W*, *k*, *C*,*Y*) to the set Γ(*x*, *y*), with

$$(t\_1', t\_2', t\_3', W', k', \mathbb{C}', Y') = (t\_1, t\_2 + p\_{y'}^B, t\_3 + p\_{y'}^B, \mathcal{W}, y, \mathbb{C} + \mathcal{W}p\_{y'}^B, Y + w\_y^B \max\{t\_2 + p\_y^B - d^B, 0\}),$$

and

$$(t\_1^{\prime\prime}, t\_2^{\prime\prime}, t\_3^{\prime\prime}, \mathcal{W}^{\prime\prime}, k^{\prime\prime}, \mathcal{C}^{\prime\prime}, \mathcal{Y}^{\prime\prime}) = (t\_1, t\_2, t\_3, \mathcal{W}, k, \mathcal{C}, \mathcal{Y} + \mathcal{w}\_{\mathcal{Y}}^{B} p\_{\mathcal{Y}}^{B}) \dots$$

These two states respectively correspond to the newly obtained (*x*, *y*)-schedules by scheduling job *J<sup>B</sup> y* immediately after *π*<sup>2</sup> and immediately following the subschedule *π*4, in some (*x*, *y* − 1) schedule *π* that corresponds to the state (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*). Note that the first case occurs only when *t*<sup>2</sup> < *d<sup>B</sup>* is satisfied.

Note that, if in the above state-generation procedures we replace sets Γ(*x* − 1, *y*) and Γ(*x*, *y* − 1) with sets <sup>Γ</sup>˜(*<sup>x</sup>* <sup>−</sup> 1, *<sup>y</sup>*) and <sup>Γ</sup>˜(*x*, *<sup>y</sup>* <sup>−</sup> <sup>1</sup>), then the resulting set of new states, denoted by <sup>Γ</sup> (*x*, *y*), may be different from Γ(*x*, *y*). Recall that, when deleting those dominated vectors in the sets Γ(*x*, *y*) and Γ (*x*, *y*), the newly obtained sets are respectively denoted by Γ˜(*x*, *y*) and Γ˜(*x*, *y*), which will be shown to be identical in the following lemma, and its proof is similar to that of Lemma 3.

**Lemma 4.** Γ˜(*x*, *y*) = Γ˜(*x*, *y*)*.*

**Theorem 2.** *Algorithm <sup>2</sup> solves* <sup>1</sup>|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ) *in O*(*nAn*<sup>2</sup> *BdPsumW<sup>A</sup> sumUAUB*) *time.*

**Algorithm 2:** For solving 1|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> j* )

**<sup>1</sup>** Set Γ(0, 0) = {(0, 0, 0, 0, 0, 0, 0)} and set Γ(*x*, *y*) = ∅ if (*x*, *y*) = (0, 0). **<sup>2</sup> for** *x* = 0, 1, . . . , *nA, y* = 0, 1, . . . , *nB,* **do <sup>3</sup> for** *each* (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) ∈ Γ(*x* − 1, *y*)*,* **do <sup>4</sup> if** 0 < *x* ≤ *nA,* **then <sup>5</sup>** <sup>Γ</sup>(*x*, *<sup>y</sup>*) :<sup>=</sup> <sup>Γ</sup>(*x*, *<sup>y</sup>*) <sup>∪</sup> (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*<sup>3</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *W* + *w<sup>A</sup> <sup>x</sup>* , *k*, *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*) **<sup>6</sup> if** *<sup>k</sup>* <sup>=</sup> <sup>0</sup> *or (k* <sup>=</sup> <sup>0</sup> *and t*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* <sup>−</sup> *<sup>d</sup><sup>B</sup>* <sup>&</sup>lt; *<sup>p</sup><sup>B</sup> <sup>k</sup> ),* **then <sup>7</sup>** <sup>Γ</sup>(*x*, *<sup>y</sup>*) :<sup>=</sup> <sup>Γ</sup>(*x*, *<sup>y</sup>*) <sup>∪</sup> (*t*<sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *t*<sup>2</sup> + *p<sup>A</sup> <sup>x</sup>* , *t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* , *W*, *k*, *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ) + *W p<sup>A</sup> <sup>x</sup>* ,*Y* + *w<sup>B</sup> <sup>k</sup>* max{min{*t*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* <sup>−</sup> *<sup>d</sup>*, *<sup>p</sup><sup>A</sup> <sup>x</sup>* }, 0}) **<sup>8</sup> end <sup>9</sup> end <sup>10</sup> end <sup>11</sup> for** *each* (*t*1, *t*2, *t*3, *C*,*Y*) ∈ Γ(*x*, *y* − 1)*,* **do <sup>12</sup> if** 0 < *y* ≤ *nB,* **then <sup>13</sup>** <sup>Γ</sup>(*x*, *<sup>y</sup>*) :<sup>=</sup> <sup>Γ</sup>(*x*, *<sup>y</sup>*) <sup>∪</sup> (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>W</sup>*, *<sup>k</sup>*, *<sup>C</sup>*,*<sup>Y</sup>* <sup>+</sup> *<sup>w</sup><sup>B</sup> <sup>y</sup> p<sup>B</sup> y* ) **<sup>14</sup> if** *t*<sup>2</sup> < *d,* **then <sup>15</sup>** <sup>Γ</sup>(*x*, *<sup>y</sup>*) :<sup>=</sup> <sup>Γ</sup>(*x*, *<sup>y</sup>*) <sup>∪</sup> (*t*1, *<sup>t</sup>*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , *t*<sup>3</sup> + *p<sup>B</sup> <sup>y</sup>* , *W*, *y*, *C* + *W p<sup>B</sup> <sup>y</sup>* ,*Y* + *w<sup>B</sup> <sup>y</sup>* max{*t*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* − *d*, 0}) **<sup>16</sup> end <sup>17</sup> end <sup>18</sup> end <sup>19</sup> The elimination step:** for each newly generated Γ(*x*, *y*), set Γ(*x*, *y*) := Γ˜(*x*, *y*) **<sup>20</sup> end <sup>21</sup>** Generate **Q**˜ <sup>2</sup> and, for each state (*C*,*Y*) <sup>∈</sup> **<sup>Q</sup>**˜ 2, derive the corresponding optimal schedule by

**Proof.** The correctness of Algorithm 2 is guaranteed by the discussion above. Next we only analyze its time complexity. The initialization step takes *O*(*nAnB*) time, which is dominated by the final time complexity of Algorithm 2. In the implementation of Algorithm 2, we guarantee thatΓ(*x*, *y*) = Γ˜(*x*, *y*). Note that 0 <sup>≤</sup> *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> *<sup>d</sup><sup>B</sup>* and *<sup>d</sup>* <sup>−</sup> *<sup>p</sup><sup>A</sup>* max <sup>+</sup> <sup>1</sup> <sup>≤</sup> *<sup>t</sup>*<sup>3</sup> <sup>≤</sup> *<sup>P</sup>*sum, 0 <sup>≤</sup> *<sup>k</sup>* <sup>≤</sup> *nB* and 0 <sup>≤</sup> *<sup>W</sup>* <sup>≤</sup> *<sup>W</sup><sup>A</sup>* sum, then each state set Γ(*x*, *y*) contains *O*(*nBdP*sum*W<sup>A</sup>* sum*UAUB*) states. Moreover, Γ(*x*, *y*) is obtained by performing at most two (constant) operations on the states in Γ(*x* − 1, *y*) <sup>Γ</sup>(*x*, *<sup>y</sup>* − <sup>1</sup>) for *<sup>x</sup>* = 0, 1, ... , *nA*, *<sup>y</sup>* = 0, 1, ... , *nB*. Thus, the overall running time of Algorithm 2 is *O*(*nAn*<sup>2</sup> *BdBP*sum*W<sup>A</sup>* sum*UAUB*).

Next we turn Algorithm 2 into an FPTAS in the following way. Set Δ = 1 + <sup>2</sup>*<sup>n</sup>* , *<sup>L</sup>*<sup>1</sup> <sup>=</sup> *log*Δ*d*, *<sup>L</sup>*<sup>3</sup> <sup>=</sup> *log*Δ(*P*sum), *<sup>L</sup><sup>W</sup>* <sup>=</sup> *log*Δ(*W<sup>A</sup>* sum), *<sup>L</sup><sup>A</sup>* <sup>=</sup> *log*Δ(*UA*) and *<sup>L</sup><sup>B</sup>* <sup>=</sup> *log*Δ(*UB*). Set *<sup>I</sup>*<sup>1</sup> *<sup>i</sup>* = [Δ(*i*−1), <sup>Δ</sup>*<sup>i</sup>* ] for *i* = 1, 2, ... , *L*1, *I*<sup>3</sup> *<sup>i</sup>* = [Δ(*i*−1), <sup>Δ</sup>*<sup>i</sup>* ] for *i* = 1, 2, ... , *L*3, *I<sup>W</sup> <sup>i</sup>* = [Δ(*i*−1), <sup>Δ</sup>*<sup>i</sup>* ] for *i* = 1, 2, ... , *LW*, *I<sup>A</sup> <sup>i</sup>* = [Δ(*i*−1), <sup>Δ</sup>*<sup>i</sup>* ] for *i* = 1, 2, ... , *L<sup>A</sup>* and *I<sup>B</sup> <sup>i</sup>* = [Δ(*i*−1), <sup>Δ</sup>*<sup>i</sup>* ] for *i* = 1, 2, ... , *LB*. For *x* = 0, 1, ... , *nA* and *y* = 0, 1, ... , *nB*, Γ(*x*, *y*) is obtained from Γ(*x*, *y*) by the following operation: for any two states (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) and (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) in Γ(*x*, *y*), if (*t*1, *t*3, *W*, *C*,*Y*) and (*t*1, *t*3, *W*, *C*,*Y*) fall into the same box *I*<sup>1</sup> *<sup>u</sup>* <sup>×</sup> *<sup>I</sup>*<sup>3</sup> *<sup>v</sup>* <sup>×</sup> *<sup>I</sup><sup>W</sup> w* × *IA <sup>p</sup>* <sup>×</sup> *<sup>I</sup><sup>B</sup> <sup>q</sup>* for *u* = 1, 2, ... , *L*1, *v* = 1, 2, ... , *L*3, *w* = 1, 2, ... , *LW*, *p* = 1, 2, ... , *L<sup>A</sup>* and *q* = 1, 2, ... , *L<sup>B</sup>* with

backtracking.

*<sup>t</sup>*<sup>2</sup> <sup>≤</sup> *<sup>t</sup>*2, remaining the first one. Note that it takes *<sup>O</sup>*(*L*1*L*3*L<sup>W</sup> <sup>L</sup>ALB*) time to partition the boxes. Moreover, we define

$$\mathbf{Q}\_3 = \{ (\mathbb{C}, \mathbb{Y}) : (t\_1, t\_2, t\_3, \mathbb{W}, k, \mathbb{C}, \mathbb{Y}) \in \check{\Gamma}(n\_{A\prime} n\_B) \} \tag{8}$$

and let **Q**˜ <sup>3</sup> be the set of non-dominated vectors in **Q**3.

**Theorem 3.** *Algorithm <sup>3</sup> is an FPTAS for solving* <sup>1</sup>|*d<sup>B</sup> <sup>j</sup>* = *d*| #(∑ *w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>∑</sup> *<sup>w</sup><sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> j* )*.*


**<sup>1</sup>** Set Γ(0, 0) = {(0, 0, 0, 0, 0, 0, 0)} and set Γ(*x*, *y*) = ∅ if (*x*, *y*) = (0, 0).

**<sup>2</sup> for** *x* = 0, 1, . . . , *nA, y* = 0, 1, . . . , *nB,* **do**

**<sup>3</sup>** the same operations with Algorithm 2

**<sup>4</sup> The elimination step:** for each newly generated Γ(*x*, *y*), set Γ(*x*, *y*) := Γ(*x*, *y*)

**<sup>5</sup> end**

**<sup>6</sup>** Generate **Q**˜ <sup>3</sup> and, for each state (*C*,*Y*) <sup>∈</sup> **<sup>Q</sup>**˜ 3, derive the corresponding optimal schedule by backtracking.

**Proof.** By induction on *z* = *x* + *y*, We prove that, for any state (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* ) ∈ Γ(*x*, *y*), there is a state (*t*1, *t*2, *t*3, *W*, *k* , *<sup>C</sup>*,*Y*) <sup>∈</sup> <sup>Γ</sup>(*x*, *<sup>y</sup>*) such that *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> <sup>Δ</sup>*zt* <sup>1</sup>, *t*<sup>2</sup> ≤ *t* <sup>2</sup>, *<sup>t</sup>*<sup>3</sup> <sup>≤</sup> <sup>Δ</sup>*zt* <sup>3</sup>, *<sup>W</sup>* <sup>≤</sup> <sup>Δ</sup>*zW* , *<sup>C</sup>* <sup>≤</sup> <sup>Δ</sup>*zC* and *<sup>Y</sup>* <sup>≤</sup> <sup>Δ</sup>*zY* .

This is obviously true for *z* = 0. Inductively suppose that it holds up to *z* − 1. Next we show that it also holds for *z*. Recall that each state (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* ) ∈ Γ(*x*, *y*) is derived from some state (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) in Γ(*x* − 1, *y*) or Γ(*x*, *y* − 1). Let *π* be an (*x*, *y*)-schedule corresponding to (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* ), and let *π* be a schedule corresponding to the state (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*). Using the induction hypothesis, there is a state (*t* 1, *t* 2, *t* 3, *W* , *k*, *C*,*Y*) in Γ(*x* − 1, *y*) or Γ(*x*, *y* − 1) such that *t* <sup>1</sup> <sup>≤</sup> <sup>Δ</sup>*z*−1*t*1, *<sup>t</sup>* <sup>2</sup> ≤ *t*2, *t* <sup>3</sup> <sup>≤</sup> <sup>Δ</sup>*z*−1*t*3, *<sup>W</sup>* <sup>≤</sup> <sup>Δ</sup>*z*−1*W*, *<sup>C</sup>* <sup>≤</sup> <sup>Δ</sup>*z*−1*C*, and *<sup>Y</sup>* <sup>≤</sup> <sup>Δ</sup>*z*−1*Y*. Let *<sup>π</sup>* be an (*<sup>x</sup>* <sup>−</sup>1, *<sup>y</sup>*)-schedule or (*x*, *y* − 1)-schedule corresponding to (*t* 1, *t* 2, *t* 3, *W* , *k*, *C*,*Y*), and if it is feasible, let *π*˜ be the (*x*, *y*)-schedule obtained from *<sup>π</sup>* by performing the same operation that we perform on *<sup>π</sup>* to get *<sup>π</sup>* . Let ( ˜*t*1, ˜*t*2, ˜*t*3, *W*˜ , ˜ *k*, *C*˜,*Y*˜) be the state corresponding to *π*˜. Furthermore, there is a state (*t*1, *t*2, *t*3, *W*, ˜ *k*, *C*,*Y*) ∈ Γ(*x*, *y*) in the same box with ( ˜*t*1, ˜*t*2, ˜*t*3, *W*˜ , ˜ *<sup>k</sup>*, *<sup>C</sup>*˜,*Y*˜) such that *<sup>t</sup>*<sup>1</sup> <sup>≤</sup> <sup>Δ</sup> ˜*t*1, *<sup>t</sup>*<sup>2</sup> <sup>≤</sup> ˜*t*2, *<sup>t</sup>*<sup>3</sup> <sup>≤</sup> <sup>Δ</sup> ˜*t*3, *<sup>W</sup>* <sup>≤</sup> <sup>Δ</sup>*W*˜ , *<sup>C</sup>* <sup>≤</sup> <sup>Δ</sup>*C*˜ and *<sup>Y</sup>* <sup>≤</sup> <sup>Δ</sup>*Y*˜. There are four possible ways to get *π* from *π*.

**Case 1.** *π* is obtained from *π* by scheduling *J<sup>A</sup> <sup>x</sup>* directly after schedule *π*1. Note that in this case, the condition *t*<sup>2</sup> + *p<sup>A</sup> <sup>x</sup>* <sup>−</sup> *<sup>d</sup><sup>B</sup>* <sup>&</sup>lt; *<sup>p</sup><sup>B</sup> <sup>k</sup>* must be satisfied. Then (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) ∈ Γ(*x* − 1, *y*), and the operation to get *π*˜ is feasible since *t* <sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* <sup>−</sup> *<sup>d</sup><sup>B</sup>* <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* <sup>−</sup> *<sup>d</sup><sup>B</sup>* <sup>&</sup>lt; *<sup>p</sup><sup>B</sup> <sup>k</sup>* . Then we have ( ˜*t*1, ˜*t*2, ˜*t*3, *W*˜ , ˜ *k*, *C*˜,*Y*˜)=(*t* <sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *t* <sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *t* <sup>3</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *<sup>W</sup>* , *<sup>k</sup>*, *<sup>C</sup>* + *<sup>w</sup><sup>A</sup> <sup>x</sup>* (*t* <sup>1</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* ) + *W p <sup>A</sup> <sup>x</sup>* ,*Y* + *<sup>w</sup><sup>B</sup> <sup>k</sup>* max{min{*t* <sup>2</sup> + *pA <sup>x</sup>* <sup>−</sup> *<sup>d</sup>B*, *<sup>p</sup><sup>A</sup> <sup>x</sup>* }, 0}). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* )=(*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* , *t*<sup>2</sup> + *p<sup>A</sup> <sup>x</sup>* , *t*<sup>3</sup> + *pA <sup>x</sup>* , *W*, *k*, *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>1</sup> + *p<sup>A</sup> <sup>x</sup>* ) + *W p<sup>A</sup> <sup>x</sup>* ,*Y* + *w<sup>B</sup> <sup>k</sup>* max{min{*t*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* <sup>−</sup> *<sup>d</sup>B*, *<sup>p</sup><sup>A</sup> <sup>x</sup>* }, 0}), we have

$$\begin{cases} \overline{t\_1} \le \Delta \overline{t\_1} = \Lambda (\hat{t}\_1 + p\_x^A) \le \Delta^2 (t\_1 + p\_x^A) = \Delta^2 t\_1', \\ \overline{t\_2} \le \hat{t}\_2 = \hat{t}\_2 + p\_x^A \le t\_2 + p\_x^A = t\_2', \\ \overline{t\_3} \le \Delta \overline{t\_3} = \Lambda (\hat{t}\_3 + p\_x^A) \le \Delta^2 (t\_3 + p\_x^A) = \Delta^2 t\_3', \\ \overline{W} \le \Delta \hat{W} = \Delta \hat{W} \le \Delta^2 \mathcal{W} = \Delta^2 \mathcal{W}\_r \\ \bar{k} = k = k', \\ \overline{\mathcal{C}} \le \Delta \mathcal{C} = \Lambda (\hat{\mathcal{C}} + w\_x^A (\hat{t}\_1 + p\_x^A) + \hat{\mathcal{W}} p\_x^A) \le \Delta^2 (\mathcal{C} + w\_x^A (t\_1 + p\_x^A) + \mathcal{W} p\_x^A) = \Delta^2 \mathcal{C}', \\ \overline{\mathcal{T}} \le \Delta \hat{\mathcal{Y}} = \Lambda (\hat{\mathcal{Y}} + w\_x^B \max\{\min\{\hat{t}\_2 + p\_x^A - d^B, p\_x^A\}, 0\}) \le \Delta^2 (\mathcal{Y} + w\_x^B \max\{\min\{t\_2 + p\_x^A - d^B, p\_x^A\}, 0\}) = \Delta^2 \mathcal{Y}. \end{cases} \tag{9}$$

**Case 2.** *π* is obtained from *π* by scheduling *J<sup>A</sup> <sup>x</sup>* directly after schedule *π*3. Then (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) ∈ <sup>Γ</sup>(*<sup>x</sup>* <sup>−</sup> 1, *<sup>y</sup>*), and *<sup>π</sup>*˜ is clearly a feasible schedule. Then we have ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>W</sup>*˜ , ˜ *k*, *C*˜,*Y*˜)=(*t* 1, *t* 2, *t* <sup>3</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* , *W* + *w<sup>A</sup> <sup>x</sup>* , *<sup>k</sup>*, *<sup>C</sup>* + *<sup>w</sup><sup>A</sup> <sup>x</sup>* (*t* <sup>3</sup> <sup>+</sup> *<sup>p</sup><sup>A</sup> <sup>x</sup>* ),*Y*). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* )=(*t*1, *t*2, *t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* , *W* + *w<sup>A</sup> <sup>x</sup>* , *k*, *C* + *w<sup>A</sup> <sup>x</sup>* (*t*<sup>3</sup> + *p<sup>A</sup> <sup>x</sup>* ),*Y*), we have

$$\begin{cases} \overline{t\_1} \le \Delta \hat{t}\_1 = \Delta \hat{t}\_1 \le \Delta^z t\_1 = \Delta^z t\_1', \\\\ \overline{t\_2} \le \hat{t}\_2 = \hat{t}\_2 \le t\_2 = t\_2', \\\\ \overline{t\_3} \le \Delta \hat{t}\_3 = \Delta (\hat{t}\_3 + p\_x^A) \le \Delta^z (t\_3 + p\_x^A) = \Delta^z t\_3', \\\\ \overline{W} \le \Delta \hat{W} = \Delta (\hat{W} + w\_x^A) \le \Delta^z (W + w\_x^A) = \Delta^z W', \\\\ \overline{k} = k = k', \\\\ \overline{\mathcal{C}} \le \Delta \hat{\mathcal{C}} = \Delta (\hat{\mathcal{C}} + w\_x^A (\hat{\mathcal{C}} + p\_x^A)) \le \Delta^z (\mathcal{C} + w\_x^A (t\_3 + p\_x^A)) = \Delta^z \mathcal{C}', \\\\ \overline{Y} \le \Delta \hat{Y} = \Delta \hat{Y} \le \Delta^z \mathcal{Y} = \Delta^z \mathcal{Y}'. \end{cases} \tag{10}$$

**Case 3.** *π* is obtained from *π* by scheduling *J<sup>B</sup> <sup>y</sup>* directly after schedule *π*2. Note that in this case, the condition *<sup>t</sup>*<sup>2</sup> <sup>&</sup>lt; *<sup>d</sup><sup>B</sup>* must be satisfied. Then (*t*1, *<sup>t</sup>*2, *<sup>t</sup>*3, *<sup>W</sup>*, *<sup>k</sup>*, *<sup>C</sup>*,*Y*) <sup>∈</sup> <sup>Γ</sup>(*x*, *<sup>y</sup>* <sup>−</sup> <sup>1</sup>), and the operation to get *π*˜ is feasible since *t* <sup>2</sup> <sup>≤</sup> *<sup>t</sup>*<sup>2</sup> <sup>&</sup>lt; *<sup>d</sup>B*. Then we have ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>W</sup>*˜ , ˜ *k*, *C*˜,*Y*˜)=(*t* 1, *t* <sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , *t* <sup>3</sup> <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* , *W* , *y*, *C* + *W p <sup>B</sup> <sup>y</sup>* ,*Y* + *<sup>w</sup><sup>B</sup> <sup>y</sup>* max{*t* <sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* <sup>−</sup> *<sup>d</sup>B*, 0}). Combining with the fact that (*<sup>t</sup>* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* )=(*t*1, *t*<sup>2</sup> + *p<sup>B</sup> <sup>y</sup>* , *t*<sup>3</sup> + *pB <sup>y</sup>* , *W*, *y*, *C* + *W p<sup>B</sup> <sup>y</sup>* ,*Y* + *w<sup>B</sup> <sup>y</sup>* max{*t*<sup>2</sup> <sup>+</sup> *<sup>p</sup><sup>B</sup> <sup>y</sup>* <sup>−</sup> *<sup>d</sup>B*, 0}), we have

$$\begin{cases} \overline{t\_1} \le \Delta \overline{t\_1} = \Delta \overline{t\_1} \le \Delta^z t\_1 = \Delta^z t\_1', \\\\ \overline{t\_2} \le \widehat{t\_2} = \widehat{t\_2} + p\_y^B \le t\_2 + p\_y^B = t\_2', \\\\ \overline{t\_3} \le \Delta \widehat{t\_3} = \Delta (\widehat{t\_3} + p\_y^B) \le \Delta^z (t\_3 + p\_y^B) = \Delta^z t\_3', \\\\ \overline{W} \le \Delta \widehat{W} = \Delta \widehat{W} \le \Delta^z W = \Delta^z W', \\\\ \overline{k} = y = k', \\\\ \overline{C} \le \Delta \overline{C} = \Delta (\widehat{C} + \widehat{\Psi} p\_y^B) \le \Delta^z (\mathbb{C} + \mathcal{W} p\_y^B) = \Delta^z \mathcal{C}', \\\\ \overline{Y} \le \Delta \widehat{Y} = \Delta (\widehat{Y} + w\_y^B \max\{\widehat{t} + p\_y^B - d^B, 0\}) \le \Delta^z (Y + w\_y^B \max\{t\_2 + p\_y^B - d^B, 0\}) = \Delta^z Y'. \end{cases} (11)$$

**Case 4.** *π* is obtained from *π* by scheduling *J<sup>B</sup> <sup>y</sup>* directly after schedule *π*4. Then (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) ∈ <sup>Γ</sup>(*x*, *<sup>y</sup>* <sup>−</sup> <sup>1</sup>), and *<sup>π</sup>*˜ is clearly a feasible schedule. Then we have ( ˜*t*1, ˜*t*2, ˜*t*3, *<sup>W</sup>*˜ , ˜ *k*, *C*˜,*Y*˜)=(*t* 1, *t* 2, *t* 3, *W* , *k*, *C*,*Y* + *w<sup>B</sup> <sup>y</sup> p<sup>B</sup> <sup>y</sup>* ). Combining with the fact that (*t* 1, *t* 2, *t* <sup>3</sup>, *W* , *k* , *C* ,*Y* )=(*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y* + *w<sup>B</sup> <sup>y</sup> p<sup>B</sup> <sup>y</sup>* ), we have

$$\begin{cases} \overline{t\_1} \le \Delta \hat{t}\_1 = \Delta \hat{t}\_1 \le \Delta^z t\_1 = \Delta^z t\_{1'}' \\\\ \overline{t\_2} \le \hat{t}\_2 = \hat{t}\_2 \le t\_2 = t\_{2'}' \\\\ \overline{t\_3} \le \Delta \hat{t}\_3 = \Delta \hat{t}\_3' \le \Delta^z t\_3 = \Delta^z t\_{3'}' \\\\ \overline{W} \le \Delta \hat{W} = \Delta \hat{W} \le \Delta^z W = \Delta^z W', \\\\ \overline{k} = k = k', \\\\ \overline{\mathcal{C}} \le \Delta \hat{\mathcal{C}} = \Delta \hat{\mathcal{C}} \le \Delta^z \mathcal{C} = \Delta^z \mathcal{C}', \\\\ \overline{Y} \le \Delta \hat{Y} = \Delta (\hat{Y} + w\_y^B p\_y^B) \le \Delta^z (Y + w\_y^B p\_y^B) = \Delta^z Y'. \end{cases} \tag{12}$$

Thus, for each state (*C* ,*Y* ) in **Q**˜ 2, there is a state (*C*,*Y*) in **<sup>Q</sup>**<sup>3</sup> such that *<sup>C</sup>* <sup>≤</sup> <sup>Δ</sup>*nC* <sup>≤</sup> (<sup>1</sup> <sup>+</sup> )*C* and *<sup>Y</sup>* <sup>≤</sup> <sup>Δ</sup>*nY* <sup>≤</sup> (<sup>1</sup> <sup>+</sup> )*Y* .

Next we analyze its time complexity. The initialization step takes *O*(*nAnB*) time, which is dominated by the final time complexity of Algorithm 3. In the implementation of Algorithm 3, we guarantee that <sup>Γ</sup>(*x*, *<sup>y</sup>*) = <sup>Γ</sup>(*x*, *<sup>y</sup>*). Note that there are *<sup>O</sup>*(*L*1*L*3*L<sup>W</sup> <sup>L</sup>ALB*) distinct boxes and 0 <sup>≤</sup> *<sup>k</sup>* <sup>≤</sup> *nB*, then there are at most *O*(*nBL*<sup>1</sup>*L*3*L<sup>W</sup> LALB*) different states (*t*1, *t*2, *t*3, *W*, *k*, *C*,*Y*) in Γ(*x*, *y*). Moreover, Γ(*x*, *y*) is obtained by performing at most two (constant) operations on the states in Γ(*x* − 1, *y*) <sup>Γ</sup>(*x*, *<sup>y</sup>* − <sup>1</sup>) for *<sup>x</sup>* = 0, 1, ... , *nA*, *y* = 0, 1, . . . , *nB*. Thus, the overall running time of Algorithm 3 is *O*(*nAn*<sup>2</sup> *<sup>B</sup>L*1*L*3*L<sup>W</sup> <sup>L</sup>ALB*).

#### **5. Numerical Results**

In this section some numerical results are provided to show the efficiency of our proposed algorithms. For running our optimization algorithms, we need to input the following parameters relative with the job instances: the numbers of *A*-jobs and *B*-jobs, the processing times and weights of all the jobs, and the common due date of *B*-jobs. By running Algorithms 1 and 2, we get the Pareto frontier. To use Algorithm 3, we need to choose the value of (>0) to get a (1 + )-approximate Pareto frontier. Note that for the same instance, the Pareto frontiers obtained by Algorithms 1 and 2 are the same, except that the running time of Algorithm 1 is theoretically faster than that of Algorithm 2. The closer the (1 + )-approximate Pareto frontier obtained by Algorithm 3 is to the curve obtained by Algorithms 1 and 2, the closer it is to the optimal solution.

We randomly generate some job instances, in which the numbers of the jobs are set to be *n* = 4 (*nA* = *nB* = 2), *n* = 6 (*nA* = *nB* = 3), and *n* = 10 (*nA* = *nB* = 5). The processing times and the weights of the jobs are randomly generated between 1 and 2. The common due date of *B*-jobs is set to be 5. What is more, we set = 1. We ran our algorithms on these instances in a Matlab R2016b environment on an Intel(R) Core(TM) CPU, 2.50 GHz, 4 GB of RAM computer. In fact, when the number of the jobs is small, the Pareto frontier or the approximate Pareto frontier can be found relatively quickly, but when the number of the jobs increases, the running time will increase hugely. The following three Figures 1–3 present the Pareto frontier and (1 + )-approximate Pareto frontier generated by Algorithms 1–3. As can be seen from the three figures, the results obtained by Algorithms 1 and 2 are exactly the same. The results of Algorithm 3 are consistent with those of Algorithms 1 and 2, which may be due to the coincidence caused by the small size of the instance we chose and the few choices in the sizes of the jobs. In fact, considering that the problem we studied is NP-hard, our algorithm can only reach pseudo-polynomial-time theoretically. Therefore, our algorithm is theoretically more suitable for small-scale instances, where the sizes of the jobs are relatively uniform, which fits with the nature of such problems in real life, such as in logistics distribution centers where we use boxes of fixed sizes.

**Figure 1.** The black stars are the points generated by Algorithms 1 and 2, the red circles are points generated by Algorithm 3.

**Figure 2.** The black stars are the points generated by Algorithms 1 and 2, the red circles are points generated by Algorithm 3.

**Figure 3.** The black stars are the points generated by Algorithms 1 and 2, the red circles are points generated by Algorithm 3.

#### **6. Conclusions**

In this paper we investigated a Pareto-optimal problem of scheduling two agents' jobs on a single machine to minimize one agent's total weighted completion time and the other's total weighted late work. For this problem, we devised two dynamic programming algorithms to obtain the Pareto frontier, and an FPTAS to generate an approximate Pareto frontier. Some numerical results were also provided. Compared with the two problems 1|*p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> j* | #(Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> <sup>j</sup>* ) and 1|*p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> <sup>j</sup>* , *<sup>d</sup><sup>B</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>B</sup> j* | #(Σ*w<sup>A</sup> <sup>j</sup> <sup>C</sup><sup>A</sup> <sup>j</sup>* , <sup>Σ</sup>*w<sup>B</sup> <sup>j</sup> <sup>Y</sup><sup>B</sup> j* ) studied in Zhang et al. [20], the constraint *p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> <sup>j</sup>* was removed from the problem considered in this paper and we turned to the optimization problem under the condition that *B*-jobs had a common due date. Table 1 lists the computational complexity of the above three problems. As we can see from Table 1, the condition *p<sup>A</sup> <sup>j</sup>* ↑↓ *<sup>w</sup><sup>A</sup> <sup>j</sup>* seems to have a greater impact on the complexity result of the problem. In future research, we can try to devise more efficient approximation algorithms for our considered problem with a constant performance-ratio, and we can also study two-agent problems with other combinations of objective functions.

**Table 1.** Complexity of three problems.


**Author Contributions:** Supervision, J.Y.; writing–original draft, Y.Z.; writing–review and editing, Z.G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported in part by the NSFC under grant numbers 12071442, 11671368 and 11771406.

**Conflicts of Interest:** The authors declare no conflicts of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **References**



**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## *Article* **A Hybrid Metaheuristic for the Unrelated Parallel Machine Scheduling Problem**

**Dung-Ying Lin \* and Tzu-Yun Huang**

Department of Industrial Engineering and Engineering Management, National Tsing Hua University, Hsinchu 30013, Taiwan; zxcv6564@gmail.com

**\*** Correspondence: dylin@ie.nthu.edu.tw; Tel.: +886-(03)-574-2694

**Abstract:** The unrelated parallel machine scheduling problem aims to assign jobs to independent machines with sequence-dependent setup times so that the makespan is minimized. When many practical considerations are introduced, solving the resulting problem is challenging, especially when problems of realistic sizes are of interest. In this study, in addition to the conventional objective of minimizing the makespan, we further consider the burn-in (B/I) procedure that is required in practice; we need to ensure that the scheduling results satisfy the B/I ratio constrained by the equipment. To solve the resulting complicated problem, we propose a population-based simulated annealing algorithm embedded with a variable neighborhood descent technique. Empirical results show that the proposed solution strategy outperforms a commonly used commercial optimization package; it can obtain schedules that are better than the schedules used in practice, and it does so in a more efficient manner.

**Keywords:** unrelated parallel machine scheduling; simulated annealing; variable neighborhood descent; metaheuristic; production scheduling

#### **1. Introduction**

The unrelated parallel machine scheduling problem aims to assign a set of jobs to a set of unrelated machines that can process the jobs in parallel without affecting each other. Unrelated parallel machine scheduling problems are of significant practical relevance, and they arise in many applications (i.e., the electronic assembly industry investigated in this study). However, many constraints and additional considerations need to be addressed in practice. For instance, jobs completed at machines need to go through a burn-in (B/I) process prior to being placed in service. The B/I process forces certain manufacturing failures to occur under supervised conditions so that the quality of the product can be examined and ensured. However, as B/I equipment is expensive, many companies have only a limited amount of this kind of equipment, and this becomes the bottleneck of this type of scheduling problem. In this study, we investigate the unrelated parallel machine scheduling problem that aims to minimize the makespan and maximize B/I equipment utilization. As each job has its own suitable B/I equipment, the maximization of B/I equipment utilization can be achieved by making the ratio of completed jobs match the number of B/I equipment available. Other than this additional consideration, the conventional constraints (i.e., sequence-dependent setup times) are also accommodated in the study. As the unrelated parallel machine scheduling problem possesses non-deterministic polynomial-time (NP)-hard complexity [1], solving problem instances with practical sizes is a challenging task, especially when many practical constraints need to be considered. To address this type of problem, we propose a population-based simulated annealing (PBSA) method embedded with a variable neighborhood descent (VND) heuristic to solve it. The proposed solution strategy is empirically applied to real-world problem instances. A comparison with a commercial optimization package demonstrates that the devised approach can determine the optimal schedules in small problem instances. When the problem size

**Citation:** Lin, D.-Y.; Huang, T.-Y. A Hybrid Metaheuristic for the Unrelated Parallel Machine Scheduling Problem. *Mathematics* **2021**, *9*, 768. https://doi.org/ 10.3390/math9070768

Academic Editor: Chin-Chia Wu

Received: 24 February 2021 Accepted: 29 March 2021 Published: 1 April 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

increases, we show that the designed approach can determine schedules that are better than the schedules used in practice, and it does so in a much more efficient manner than the commercial optimization package, which fails to obtain solutions.

The remainder of this paper is structured as follows. Section 2 critically overviews the related work regarding production schedules. Section 3 presents the mathematical formulation for the unrelated parallel machine scheduling problem considering various practical constraints. The solution strategy tailored for solving the resulting program is presented in Section 4. Empirical studies are summarized in Section 5 to demonstrate the efficiency and effectiveness of the proposed solution strategies. The final section offers conclusions and provides suggestions for future research.

#### **2. Literature Review**

In this section, we broadly categorize the production scheduling problem into single and multiple operation problems according to the production process. In a single operation problem, a job only needs to be processed/assembled once in a single and suitable machine to complete its production procedure. In a multiple operation problem, a job needs to go through various production/assembly steps. Each production/assembly step can only be performed in a specific machine. Only when a job goes through all the required steps is its production procedure completed in a multiple operation problem. Single operation problems can be further classified into single and parallel machine problems. Multiple operation problems can be further divided into flow shop, job shop and open shop problems.

#### *2.1. Single Operation*

In single operation production, the problem is considered as a single machine scheduling problem if all the jobs are completed by a single machine.

#### 2.1.1. Single Machine Scheduling

Different research streams analyze single machine scheduling problems while considering various objective functions and constraints. Ref. [2] studied the single machine scheduling problem that aims to minimize both energy consumption and maximum tardiness, and they proposed a mixed-integer linear programming model to formulate it. A ε-constraint method that integrated local search, preprocessing, valid inequalities and solution space reduction techniques was developed to determine the Pareto optimal solution of the two obtained compromised objective functions. Ref. [3] considered the minimization of maximum costs, considering uncertain processing times. Various cost functions were analyzed, and polynomial algorithms were devised to solve the resulting problem. Ref. [4] investigated a single machine scheduling problem that takes release dates and inventory constraints into consideration. With the predetermined processing time of each job and each job's known impact on the inventory level, the work aimed to determine the optimal sequence of jobs such that the makespan was minimized. It was shown that the problem is strongly NP-hard, and a series of algorithms were proposed to tackle it.

#### 2.1.2. Parallel Machine Scheduling

When there are multiple machines with similar functionalities and these machines can work simultaneously without affecting each other, the problem is considered a parallel machine scheduling problem. Based on the features of the employed machines, parallel machine scheduling can be further classified into identical and unrelated parallel machine scheduling problems. The machines considered in identical parallel machine scheduling problems are homogeneous, and the processing time of a job at any machine is identical. The processing times of a job at the different machines considered in the unrelated parallel machine scheduling problem, however, can be different, and the processing times at different machines are not relevant.

Identical Parallel Machines

Ref. [5] presented a mathematical model for an identical parallel machine scheduling problem in which job splitting and sequence-dependent setup times were considered. Simulated annealing and genetic algorithm metaheuristic-based approaches were proposed with various encoding and decoding methods. The encoding effectively represented the solutions compactly, while the decoding heuristically split jobs in a different manner. The numerical results showed that the proposed approaches could determine solutions of good quality. Ref. [6] investigated the parallel machine scheduling problem that takes job tooling requirements and job-dependent setup times into consideration. A biased random-key genetic algorithm integrated with a variable neighborhood descent-based local search was proposed to solve the resulting NP-hard problem. Numerical results showed that the proposed solution approach outperformed benchmark methods.

One variant of the identical parallel machine problem is the uniform parallel scheduling problem. The processing times of a job at different machines considered in the uniform parallel scheduling problem can vary. However, the processing times are proportional to each other and are at a fixed rate. Ref. [7] examined a uniform parallel-machine scheduling problem with the objective of minimizing the total resource consumption subject to a bounded makespan. They developed a metaheuristic and showed that it could outperform the particle swarm optimization heuristic and approximate the theoretical lower bound.

#### Unrelated Parallel Machines

For the unrelated parallel machine scheduling problem, the genetic algorithm (GA) proposed by [8] is a popular solution method that has been employed in many past studies. Compared to the situation with the conventional GA, many researchers have attempted to incorporate various enhancements to solve unrelated parallel machine scheduling problems. For instance, ref. [9] added a fast local search and local search-enhanced crossover operator for the GA. Ref. [10] proposed a hybrid GA that integrates dispatching rules (i.e., processing time-based, completion time-based and sequence-based rules) into the overall solution framework. Ref. [11] studied the unrelated parallel machine scheduling problem and derived a strategy to dynamically allocate jobs to dedicated machines so that the total earliness and tardiness times could be minimized. A modified GA with a distributed release time control mechanism was proposed and was shown to perform well. Ref. [12] introduced new decoding methods developed for the total tardiness objective within a GA solution framework, and they were able to improve the performance of the GA.

Based on simulated annealing (SA), ref. [13] introduced a sine cosine algorithm as a local search method to improve algorithmic convergence when solving unrelated parallel machine scheduling problems with sequence-dependent and machine-dependent setup times. Ref. [14] evaluated the performances of four stochastic local search methods, namely, simulated annealing, iterated local search, late acceptance hill-climbing, and step counting hill-climbing, in solving unrelated parallel machine scheduling problems with sequencedependent setup times. These methods were compared together with the GA proposed by [9] and the heuristic devised by [15]. Empirical results showed that SA performed best in solving large problem instances. Ref. [16] targeted the unrelated parallel machine scheduling problem with a random rework and presented two mixed-integer programs. As the problem is strongly NP-hard, a genetic algorithm and a simulated annealing algorithm that utilize aggregate task estimation techniques were proposed and were shown to be effective in solving the problem. Additionally, it was reported that the simulated annealing algorithm performed better than the genetic algorithm.

In the literature, local search (LS) has also been widely used or integrated with other solution techniques in tackling production scheduling problems. The variable neighborhood descent (VND) approach is the extension of LS. The VND method explores several neighborhood structures sequentially (say, 1 to n structures) from an incumbent solution. If an improved solution is identified, the search restarts from the first structure and explores neighborhood solutions with these structures again until a prespecified stopping criterion

is met [17]. Ref. [18] combined VND with mathematical programming techniques and proposed a multi-start VND method for solving unrelated parallel machine problems. The core concept was to decompose the given problem into job assignment and job sequencing subproblems. Numerical results showed that the proposed algorithm performed well. Ref. [19] integrated variable neighborhood search and SA and proposed a two-stage hybrid metaheuristic to solve the unrelated parallel machine scheduling problem. The first stage determines an initial solution with the "earlier release date first" (ERD) rules, while the second stage explores the neighborhood with various structures. It was shown in the conducted numerical experiments that the proposed solution strategy outperforms a commercial optimization package. Ref. [20] substituted local search with VND in the iterated greedy search, artificial bee colony and genetic algorithms to evaluate whether the substitution could improve the performances of these metaheuristics for solving unrelated parallel machine scheduling problems. The Taguchi robust method was used to calibrate the parameters used in the framework. Empirical results showed that replacing local search with VND indeed increases the performance of all tested metaheuristics.

Aside from the above methods, many researchers have attempted various approaches to address unrelated parallel machine scheduling problems. For instance, ref. [21] considered various practical resources in such problems and tried to solve the resulting problem with the GA and an artificial immune system (AIS). After calibrating the parameters with the Taguchi method, the AIS was shown to outperform the GA in solving large problem instances. Ref. [22] addressed machine load minimization in the unrelated parallel machine scheduling problem. A hybrid particle swarm optimization (PSO) technique and a GA were proposed, and the Taguchi method was used to calibrate the parameters. The results showed that the hybrid approach performed better than the GA, PSO algorithm or PSO algorithm with local search. Ref. [23] developed a two-stage heuristic to solve unrelated parallel machine scheduling problems with more than two machines. In the first stage, a mixed-integer linear programming model was solved to estimate the lower bound. In the second stage, a constraint programming model was employed to schedule jobs on machines.

Some past studies discussed B/I related issues (i.e., [24–28]). One of the most relevant study is [27] which considered the B/I machines as the batch processing machines. In that study, the aims were to minimize the maximum tardiness or to minimize the number of tardy jobs while considering the processing time, due date and release time constraints. Dynamic programming-based algorithms were developed to solve the resulting problems. Similarly, ref. [28] proposed a mixed-integer linear programming model that formulates the B/I requirement as a batch processing problem. Two solution heuristics, delay windowtime parallel saving algorithm (DWPSA) and delay window-time generalized saving algorithm (DWGSA), were proposed to solve the proposed formulation.

#### *2.2. Multiple Operation*

There are three major types of problems in multiple production scheduling, namely, flow shop, job shop and open shop problems. In a typical flow shop scheduling problem, all jobs are required to complete an identical production process that can be processed at different machines. Conventional job shop scheduling is similar to flow shop scheduling, except that each job should complete the procedure in a specific order. In the open shop scheduling problem, jobs can be completed in random order.

#### 2.2.1. Flow Shop scheduling Problem

Ref. [29] developed a greedy algorithm to solve the flow shop scheduling problem in two phases. The first phase, destruction, eliminates some jobs from the incumbent solution, while the second phase, construction, heuristically reinserts the eliminated jobs from the first phase into the sequence. It was shown that the greedy algorithm is easy to implement and can outperform many benchmarks. Ref. [30] studied the flow shop scheduling problem. First-in-first-out batch dispatching rules were designed to determine the initial solution, followed by mixed-integer program reoptimization techniques and local search heuristics to improve the solution quality. Ref. [31] adopted artificial immune system-based methods for solving a two-stage hybrid flow shop scheduling problem and showed that the proposed methods outperformed the existing lower bounds. Ref. [32] proposed a hybrid metaheuristic that integrated the GA and random sampling to solve the sequence-dependent flow-shop scheduling problem. Ref. [33] solved the distributed blocking flow shop scheduling problem with three hybrid iterative greedy algorithms.

#### 2.2.2. Job Shop Scheduling Problem

Ref. [34] investigated the job shop scheduling problem to address the dynamic events that are inevitable in production environments. A GA embedded with various heuristic dispatching rules was devised to solve the problem. Ref. [35] studied the flexible job shop scheduling problem (FJSP) that allows a job to be processed at any machine from a given set. An algorithm that combines the advantages of the GA and tabu search was proposed to tackle the FJSP and was demonstrated to be effective in solving it. Ref. [36] improved the coding and decoding procedures in PSO and showed that the improvement was suitable for practical job shop scheduling. Ref. [37] utilized the GA and decentralization scheme to minimize the makespan in production scheduling. The proposed solution framework was compared with a shortest processing time rule-based approach (SPT) and was shown to outperform the SPT.

#### 2.2.3. Open Shop Scheduling Problem

In solving the flexible open shop scheduling problem, ref. [38] proved the asymptotic optimality of the general dense scheduling (GDS) algorithm and showed that the proposed GDS-based heuristic could converge to good solutions in large problem instances. When using the minimization of the total flow time as the objective function in the open shop scheduling problem, ref. [39] adopted a GA and an ant colony optimization (ACO) method to solve the problem. For cases when the minimization of the makespan is the objective function, ref. [40] proposed using the GA to solve it.

#### *2.3. Summary*

In this work, the focus is on the unrelated parallel production scheduling problem. We summarize the studies we have discussed above in Table 1 to highlight the contribution of our work.

The obvious difference between the objective function in our work and those in past studies is the B/I procedure considered in our formulation. The differences in constraints can also be seen in the table. In terms of the solution approach, as suggested by [16], SA is an ideal choice for solving this problem. However, as the problem investigated in this work contains complicated constraints and objective functions, it is not rare to have different solutions with identical objective values (or multiple optimal solutions). As a standard SA needs the objective value to find the descent direction, having multiple solutions with identical objective values makes it difficult to identify the direction based on these values since they are all the same. To explore the neighborhood solutions in an efficient manner, we decide to adopt the population-based simulated annealing (PBSA) algorithm. Furthermore, as indicated by [20], replacing the local search process with VND can potentially increase the performances of various metaheuristics. Therefore, we further embed a VND procedure in the PBSA algorithm.

One of the most relevant studies in terms of the solution approach of our work is that of [19], which integrated SA and VNS in solving unrelated parallel machine scheduling problems. The primary difference between VNS and VND is that VNS introduces a shaking procedure into the solution framework. However, as the constraints considered in our work are rather complicated, so introducing a random shaking procedure can easily generate an infeasible solution. From our preliminary experiments, we believe that VND is more appropriate than VNS for solving our problem.


**Table 1.** Literature comparison.

#### **3. Mathematical Formulation**

In this section, we formally define the problem under study, followed by the utilized notations, resulting in a mathematical and detailed explanation.

In each planning horizon, as illustrated in Figure 1, the master production schedule (MPS) outputs the jobs that need to be completed within the predefined time horizon. The jobs completed in the production lines are then sent to B/I equipment to finalize the manufacturing process. During the process, the daily production scheduling problem (DPS) aims to assign jobs to appropriate production lines so that the makespan can be minimized while meeting the B/I requirement as well as possible.

**Figure 1.** Illustration of the production process considered in this study.

The current study focuses on the DPS. To focus on the core issues of the problem, the following assumptions are imposed.

1. Each job contains only one kind of product. The products that need to be assembled in each job are provided by MPS.


#### **Notations**

Based on the abovementioned statements and assumptions, the problem studied corresponds to an unrelated parallel machine scheduling problem. The mathematical formulation is revised from [9] with some modifications of the constraints to meet the requirements imposed in practice.

#### **Sets**


#### **Parameters**


#### **Decision Variables**


#### **Mathematical Formulation**

$$\underset{t}{\text{Min}} \sum\_{t} (\alpha \mathbb{C}\_{\text{max},t} + \beta l I\_t) \tag{1}$$

Subject to

∑

$$\sum\_{\substack{t \in T \ i \in M}} \sum\_{\substack{\sum}} \quad \sum\_{\substack{X\_{ijkl} = 1 \\ j \neq k}} X\_{ijkl} = 1 \tag{2} \\ j \neq k$$

$$\sum\_{\substack{t \in T \ i \in M \\ k}} \sum\_{\substack{\sum}} \quad X\_{ijkt} \le 1 \\ \qquad j \ne k$$

$$\sum\_{k \in N} X\_{i0kt} \le 1 \tag{4}$$

$$\begin{array}{ll} \sum & X\_{iljt} \ge X\_{ijkt} \\ h \in \mathcal{O} \cup \mathcal{N} \\ h \ne k, h \ne j \end{array} \tag{5}$$

$$\mathbf{C}\_{\mathrm{i}\mathbf{k}\mathbf{t}} \ge \mathbf{C}\_{\mathrm{i}\mathbf{j}\mathbf{t}} + \mathbf{S}\_{\mathrm{i}\mathbf{j}\mathbf{k}} + P\_{\mathrm{i}\mathbf{k}} + \mathbf{Q} \cdot \left(\mathbf{X}\_{\mathrm{i}\mathbf{j}\mathbf{k}\mathbf{t}} - \mathbf{1}\right) \qquad \forall j, k \in \mathcal{N}, j \ne k; \ \forall \mathbf{i} \in M; \forall \mathbf{t} \in T \tag{6}$$

$$F\_{it} \ge \mathbb{C}\_{ijt} \tag{7} \\ \qquad \qquad \forall j \in \mathcal{N}; \forall i \in \mathcal{M}; \forall t \in T \tag{7}$$

$$F\_{it} \le cap\_{it} \tag{8}$$

$$\forall i \in \mathcal{M}; \forall t \in T \tag{8}$$

$$\mathbb{C}\_{\text{max},t} \ge F\_{\text{it}} \tag{9}$$

$$\forall i \in \mathcal{M}; \forall t \in T \tag{9}$$

$$F\_{it} \le TP\_t \tag{10}$$

$$\sum\_{t \in T} \sum\_{b \in BI} B\_{kbt} \le 1 \tag{11}$$

$$\sum\_{\substack{kb \in BI \\ b \in BI}} B\_{kbt} = \sum\_{i \in M} \sum\_{j \in \{0\} \cup \{N\}} X\_{ijkt} \tag{12}$$

$$\begin{aligned} \left| \sum\_{k \in N} B\_{k1t} \cdot MN\_k - \frac{BI\_1}{Bl\_3} \sum\_{k \in N} B\_{k3t} \cdot MN\_k \right| \\ + \left| \sum\_{k \in N} B\_{k2t} \cdot MN\_k - \frac{BI\_2}{Bl\_3} \sum\_{k \in N} B\_{k3t} \cdot MN\_k \right| \\ + \left| \sum\_{k \in N} B\_{k1t} \cdot MN\_k - \frac{BI\_1}{Bl\_2} \sum\_{k \in N} B\_{k2t} \cdot MN\_k \right| \\ = \mathcal{U}\_t \end{aligned} \tag{13}$$
 
$$X\_{ijkt} \in \{0, 1\} \tag{14} \qquad \forall j, k \in N, j \neq k; \ \forall i \in M; \forall t \in T \tag{15}$$

$$B\_{jbt} \in \{0, 1\} \tag{10.1} \tag{10.2} \qquad \qquad \forall j \in N; \forall b \in BI; \forall t \in T \tag{15}$$

The objective function (1) aims to minimize the makespan (*Cmax*,*t*) and the B/I level violations (*Ut*). Parameters *α* and *β* are the weights of the corresponding terms, and these will be calibrated in the numerical experiments.

Equation (2) ensures that each job is assigned to a production line *i* and that each job *k* on this machine has only one preceding job *j*. Equation (3) is the constraint that each job *j* has at most one succeeding job *k*. Each production line is assigned at most a dummy job 0 at the beginning that represents the first job of this production line. The design is described in Equation (4). Equation (5) defines the job order. If job *j* is assigned to production line *i*, there must be a preceding job *h* on this production line. If job *j* is the first job on this production line, then *h* must be a dummy job. However, job *j* may not have a succeeding job *k*.

Equation (6) defines the completion time *Cikt* of the jobs. As job *k* should be processed after job *j* on production line *i*, the completion time of job *k* (*Cikt*) must be greater than the completion time of job *j* (*Cijt*) plus the corresponding setup time *Sijk* and the processing time of job *k* (*Pik*). If *Xijkt* = 0, which means that job *k* cannot be processed immediately after job *j* on production line *i*, this constraint becomes a redundant constraint. Equation (7) ensures that the completion time of each production line (*Fit*) is greater than or equal to the completion time of any job in that production line (*Cijt* ). *Fit* will be used to calculate the objective value later.

Equation (8) sets the maximum number of processing hours *capit* for each production line on each day *t*. Equation (9) calculates the maximum completion time *Cmax*,*t* according to the statuses of all the jobs in all production lines. Equation (10) constrains the maximum number of processing hours for all the production lines considered together.

The limitation that any job can be assigned to a B/I level is enforced in Equation (11). Equation (12) establishes the relationship between a machine and the B/I level. Only if a job is assigned (i.e., any *Xijkt* = 1) can a B/I level be assigned. The B/I ratio penalty *Ut* is calculated based on Equation (13). Let us use the first term ∑ *k*∈*N Bk*<sup>1</sup>*t*·*MNk* <sup>−</sup> *BI*<sup>1</sup> *BI*<sup>3</sup> ∑ *k*∈*N Bk*<sup>3</sup>*t*·*MNk* in that equation as an example to illustrate the proposed design. This term is designed as the absolute value of the number of products that need to be assembled in jobs that are assigned to B/I level 1 ( ∑ *k*∈*N Bk*<sup>1</sup>*t*·*MNk*) minus the ratio *BI*<sup>1</sup> *BI*<sup>3</sup> of the number of products that need to be assembled in jobs that are assigned to B/I level 3 ( ∑ *k*∈*N Bk*<sup>3</sup>*t*·*MNk*). If the result of the first term is zero, then the ratio of the jobs assigned to levels 1 and 3 exactly matches the prespecified ratio *BI*<sup>1</sup> *BI*<sup>3</sup> . Otherwise, ∑ *k*∈*N Bk*<sup>1</sup>*t*·*MNk* <sup>−</sup> *BI*<sup>1</sup> *BI*<sup>3</sup> ∑ *k*∈*N Bk*<sup>3</sup>*t*·*MNk* can serve as the measure of how far away the assignment is from the desired value *BI*<sup>1</sup> *BI*<sup>3</sup> and can be used as a penalty in the objective function to drive the assignment to match the desired value as closely as possible. The second and third terms can be interpreted in a similar manner. Finally, Equations (14) and (15) state that the decision variable considered in the formulation is of binary value.

As shown in [1], the unrelated parallel machine scheduling problem is an NP-hard problem. The mathematical formulation presented in this section is a parallel machine scheduling problem with additional side constraints. Therefore, it is at least of NP-hard complexity. Solving such problems of practical sizes can be a challenging task. To address this issue, we propose a metaheuristic-based solution approach in the following section.

#### **4. Solution Approach**

In this study, we propose population-based simulated annealing (PBSA), which is an extension of SA [41,42]. SA is the search heuristic analogous to the process of solid physical annealing. During the annealing process, a solid is heated and cooled down slowly until it achieves the most likely crystal lattice configuration so that the resulting solid has superior structural integrity. Similar to this process, SA compares the current solution with its neighborhood solution and accepts an improved solution in each iteration. Inferior solutions can also be accepted with a limited probability so that the search process can escape from local optima and finally approximate the global optimum. The probability of accepting inferior solutions depends on a nonincreasing temperature parameter with each iteration of the SA algorithm. In PBSA, instead of a single neighborhood solution, a population of neighborhood solutions are generated during each iteration, and only the best solution among them is used as the incumbent solution in the next iteration. With this improvement, the search for a neighborhood solution can be highly effective. To further enhance the performance of this approach, the traditional LS method employed in SA is replaced by VND in the proposed PBSA method. We next detail our critical algorithmic steps.

#### *4.1. Initial Solution*

The initialization step first sorts the jobs in descending order according to multiple attributes, namely, the earliest starting time, the number of allowable production lines and the total processing time. Then, the jobs are assigned according to the first-in-first-out (FIFO) rule to different production lines while satisfying all the assignment rules. Some of the jobs may be left unassigned after this procedure. However, the assigned and unassigned jobs together form an initial feasible solution. Note that the initial solution is designed to be the initial point for the following search procedure. The PBSA presented later can always converge to a good final solution regardless of the initial solution.

#### *4.2. Algorithm Steps*

There are four primary steps in the proposed PBSA algorithm, namely, initialization, neighborhood search, incumbent solution updating and termination.

#### 4.2.1. Initialization

For ease of explanation, we introduce additional notations. We denote *TH*, *T* and *TL* as the highest possible, current and lowest possible temperatures, respectively. We first initialize the current temperature *T* as *TH* and reduce *T* over iterations to simulate the "cooling down" process of solid physical annealing. The initial and incumbent solutions are both initialized as ∞ in the beginning. Starting from the initial solution found in the previous section, the PBSA algorithm enters the search procedure.

#### 4.2.2. Neighborhood Search

In VND, three neighborhood search approaches/structures are employed in our solution framework. The first is single job switching (Figure 2), which switches one randomly selected job between two production lines (*j*<sup>1</sup> and *j*<sup>4</sup> in this illustrative example). The second is moving jobs from one production line to another (illustrated in Figure 3). A job (*j*<sup>2</sup> in this example) from one production line is randomly selected and inserted at the beginning of another production line. The final approach is one-to-two job switching (illustrated in Figure 4), which switches one job in a production line with two consecutive jobs in another production line. To reduce the number of setups, we sort the jobs so that jobs with the same job type can be grouped together after any of the above changes occur in any production line. Note that all the changes only take place when the scheduling rules are not violated. In other words, we explore the neighborhood solutions within the feasible region. As reported in the literature, there exist various alternative neighborhood search procedures. However, from our preliminary experiments, these three procedures yield the best performance and are incorporated in our solution framework.

**Figure 4.** One-to-two job switching.

In VND, we examine these three neighborhood structures sequentially. As we use the PBSA framework, we generate 5 neighborhood solutions by examining each neighborhood structure during each neighborhood search, and only the best solution is selected as a candidate. If a solution that is better than the incumbent solution is identified, we restart from the first structure and explore the neighborhood solutions with these structures again until a stopping criterion is met.

Specifically, we first define a maximum number of neighborhood structures that can be examined *RLn*. When the neighborhood search begins, we examine each neighborhood structure sequentially, and a counter *Rn* is used to keep track of the number of times a neighborhood structure is examined. If a superior solution is identified, we set *Rn* = 0 and restart from the first neighborhood structure. If *Rn* = *RLn* when examining a neighborhood structure, we examine the next neighborhood structure. If all the neighborhood structures are examined, we continue to the next iteration of the PBSA algorithm.

Over the PBSA iterations, the probability of accepting inferior solutions decreases due to the lowering temperature. Therefore, we increase *RLn* gradually to increase the possibility of exploring a larger solution space. On the other hand, VND increases the chance of finding a superior solution during each neighborhood search. Based on our empirical experiment, the design balances the search procedure and is effective in solving the overall problem.

#### 4.2.3. Incumbent Solution Updating

When a neighborhood solution is superior to the incumbent solution, we update the incumbent solution. To further improve the solution quality, after this update, we search the unassigned jobs and examine whether the insertion of additional jobs into the solution is possible. If yes, we insert the jobs and use the updated solution as the incumbent solution. If insertion is not possible, the superior solution is used as the incumbent solution directly.

Other than the above updating process, there is a limited probability (denoted as *P* in this study) of allowing the search procedure to accept inferior solutions. This probability is calculated based on the following modified Boltzmann function [41]:

$$P = \min\left\{1, e^{-\frac{A}{T}}\right\}$$

In the function, Δ = *C*(*x* ) − *C*(*x*) is the difference between the objective value of the current solution (*C*(*x* )) and that of the incumbent solution (*C*(*x*)). *T* denotes the current temperature. If a randomly generated real number *γ* is greater than *P*, the current inferior solution is accepted and becomes the incumbent solution in the next iteration. In this study, we reduce the temperature *T* when the number of the searches for each neighborhood structure reaches the prespecified limit. The reduction of *T* is controlled by:

$$T = T \times T\_{scale}$$

where *Tscale* is the rate at which the temperature decreases. The value of *Tscale* is set between 0 and 1, and this causes the value of *T* to decrease over multiple iterations. PBSA can converge effectively with the above cooling mechanism.

#### 4.2.4. Termination

As many companies need solutions periodically so that they can adjust their scheduling results based on the current dynamic manufacturing environment, we terminate the search procedure and report the incumbent solution when the maximum allowed computational time is reached.

#### *4.3. Summary*

Overall, the proposed PBSA can be summarized as in Figure 5. With the generated initial solution and parameter settings, the search procedure examines the neighborhood solution with VND, and controls the PBSA framework based on the obtained results until the stopping criterion is met. Note that as VND is employed in the neighborhood search procedure, the iteration counter *Rn* is reset to 0 only when the search procedure identifies a solution that is superior to the incumbent solution or when each neighborhood structure reaches the number of pre-specified limit. In other cases, *Rn* = *Rn* + 1.

**Figure 5.** Algorithmic steps of the population-based simulated annealing (PBSA) approach.

#### **5. Solution Approach**

To validate the effectiveness of the proposed solution framework and evaluate its performance, PBSA is empirically applied to problem instances of different sizes. In the experiments, the solutions from a commercial optimization package Gurobi 9.1.0 are used as the benchmark. Furthermore, we conduct a sensitivity analysis on the weights imposed in the objective function to capture the impact of these parameters. The proposed PBSA heuristic is implemented in the ANSI C++ programming language. The numerical experiments for both Gurobi and our solution method are conducted on a Windows-based machine with an Intel i7-8700 CPU at 3.20 GHz and 8 GB of memory. Note that the solutions reported for the proposed PBSA algorithm are averaged over 10 runs as the search process involves randomness.

#### *5.1. Parameter Calibration*

We first perturb the parameters *α* and *β* to evaluate their impacts on the objective value. The problem instance used contains 6 machines, 5 days for the planning horizon and 150 jobs. The results are summarized in Table 2 and Figure 6.


**Table 2.** The impacts of α and β on the objective value.

**Figure 6.** The tradeoff between Cmax and the burn-in (B/I) penalty.

As expected, given a fixed *α*, the result tends to improve the B/I penalty and worsen Cmax simultaneously when *β* increases. We can see the apparent tradeoff between Cmax and the B/I penalty in Figure 6. However, as *α*: *β* goes beyond 1:0.01, the improvement in the B/I penalty is only marginal and almost ignorable. Therefore, we use *α* = 1 and *β* = 0.01 in the rest of the experiments. Furthermore, we conduct preliminary experiments with various parameter combinations of *TH*, *TL*, *Tscale* and *RLn* using datasets obtained in practice and identify the parameter combination that performs best. The optimal values are *TH* = 25, *TL* = 1, *Tscale* = 0.98 and *RLn* = 500. Note that the Taguchi-based method may be used to calibrate the parameters [20–22]. However, we observe that no significant improvement can be obtained by that method for our cases. Therefore, we adopt the above parameters. For practical purposes, the maximum allowed computational time is limited to 1200 s. These parameters are used throughout the remaining experiments.

#### *5.2. Validation*

For validation purposes, we compare our solutions with the Gurobi solutions, which can be considered the optimal solutions. Note that Gurobi is used to solve the formulation presented in Section 3 with the default settings. The comparison is summarized in Table 3. As shown in the table, the proposed PBSA algorithm can determine the same optimal solutions as those obtained by Gurobi, demonstrating the efficacy of the proposed solution

method. When the problem size increases, Gurobi fails to obtain feasible solutions for problem instances with more than 15 jobs. However, the proposed PBSA method can still determine solutions, thereby demonstrating its scalability. Furthermore, it is noted that PBSA with the two neighborhood structures explained in Figures 2 and 3 (PBSA with 2VND) has a higher probability of finding improved solutions than PBSA with all three structures (PBSA with 3VND). It is suspected that the neighborhood structure depicted in Figure 4 makes it difficult for the search process to converge to an improved solution within the limited CPU time allowed. Let us depict the convergence of the proposed algorithm using the case with L/T/N = 6/3/100 as an example in Figure 7 to further discuss the results.


**Table 3.** Validation of the proposed PBSA algorithm.

<sup>1</sup> L: number of production lines; T: number of scheduling days in a week; N: number of jobs. <sup>2</sup> CPU: computational time. 3\*: fails to determine solutions within 8 h. <sup>4</sup> 3VND: all three neighborhood structures explained in Figures 2–4. <sup>5</sup> 2VND: the neighborhood structures explained in Figures 2 and 3.

**Figure 7.** Convergence of the algorithm.

As the computational time of each iteration required for PBSA with 3VND increases, the number of iterations that can be performed within the limited CPU time decreases, resulting in poor convergence when compared with that of PBSA with 2VND. Although PBSA can potentially explore large solution spaces, we still recommend PBSA with 2VND for practical purposes. As the actual production environment is rather dynamic, faster convergence to an ideal solution seems to be the most attractive option for most of the companies we encounter.

We next evaluate the impact of the numbers of production lines and scheduling days on the performance of the proposed algorithm. As Gurobi failed to determine feasible solutions in most of the cases, we only summarize our solutions in Figure 8.

Nevertheless, PBSA with 2VND outperforms PBSA with 3VND in most cases. Note that, contrary to the mathematical formulation that assumes all jobs should be assigned, the proposed PBSA algorithm has the flexibility to allow for unscheduled jobs if some jobs cannot be inserted into the production schedule. For this reason, the objective values do not increase/decrease monotonically with increases in the numbers of production lines and scheduling days.

#### *5.3. Practical Application Scenarios*

Using the proposed PBSA algorithm with 2VND, we experiment with three application scenarios, namely, scenarios with various B/I ratios (summarized in Table 4), additional constraints (summarized in Table 5) and superhot runs.

From Table 4, we can see that the B/I ratio of 5:5:0 dominates 5:4:1 and 6:3:1 in terms of the objective values and number of scheduled jobs (NSJ) yielded. In the case where L/T/N = 6/3/100, the B/I penalty can reach zero, indicating that the ratio perfectly matches 5:5:0. In other words, it is possible to fully utilize the expensive B/I equipment, should we adjust the ratio properly.

In real-world applications, many supervisors may ask for additional constraints based on their past experiences, as they believe that the additional constraints can improve the scheduling performance of the algorithm. In Table 5, we introduce the additional constraint to fully utilize long production lines as much as possible, as many supervisors may think continuous processing without interruption can reduce the setup times and can improve the overall performance. However, the effect of this additional constraint drastically reduces the number of jobs that can be scheduled with the same setup and contradicts their intuition. Therefore, it is suggested to consider only the necessary constraints for practical purposes.


**Table 4.** The impacts of various B/I ratios.

<sup>1</sup> NSJ: number of scheduled jobs.

**Table 5.** Impacts of additional constraints.


To manufacture products with a sudden surge in demand, customers may place urgent orders. For products such as this, the manufacturer may initiate a superhot run and charge a higher price for manufacturing the product. For such urgent orders, we believe that the proposed solution framework offers a possible pricing mechanism by charging based on the impact of the order on the original schedule. We illustrate this concept by inserting three urgent orders in the cases summarized in Table 6.



<sup>1</sup> NSJ: number of scheduled jobs.

As seen from the cases, there are 4 and 5 jobs that cannot be completed within this planning horizon due to the superhot runs. The impacts of the superhot runs on the rest of the jobs are 2.5% and 2.7%, respectively, so this provides an ideal guide for pricing based on superhot runs.

#### **6. Concluding Remarks**

In this study, we developed a PBSA algorithm for the unrelated parallel machine scheduling problem considering B/I constraints. The proposed PBSA algorithm integrates the advantages of SA and VND and was implemented for practical applications. Numerical results have shown that the proposed PBSA approach can solve the abovementioned problem optimally for small problem instances and is scalable to solve problem instances of realistic sizes. In practice, there are many industries that encounter the unrelated parallel machine scheduling problem (i.e., the electronic assembly industry investigated in the current study). For the unrelated parallel machine scheduling problem, we found that the PBSA and VND can solve problems of various practical sizes efficiently.

Although encouraging results are obtained, this research can be extended in several directions. First, it is apparent that this research can be extended to investigate the multi-objective optimization problem since there are two objective functions considered. Some practical techniques can be employed to approximate the Pareto-optimal solution set (i.e., [43]). Second, as each job can be split into smaller jobs, we can find the optimal splitting strategy for the jobs such that the overall scheduling performance can be improved. Third, as the production environment is highly uncertain and stochastic, processing time uncertainty can be incorporated in future research. Fourth, instead of minimizing the deviation from the desired burn-in levels, future research can consider the optimal assignment of jobs to the exact grids in burn-in machines, which may potentially improve the scheduling results further. Finally, as the production environment changes rapidly, developing a system that can rapidly respond to the dynamic and changing environment with the basis of this study can be another useful and interesting extension.

**Author Contributions:** Data curation, T.-Y.H.; Investigation, D.-Y.L.; Methodology, D.-Y.L. and T.- Y.H.; Software, T.-Y.H.; Validation, D.-Y.L.; Writing—original draft, D.-Y.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was partially funded by the Ministry of Science and Technology, Taiwan, ROC grant number MOST 108-2410-H-007-097 -MY4.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data sharing not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest

#### **Abbreviations**


#### **References**


## *Article* **No-Idle Flowshop Scheduling for Energy-Efficient Production: An Improved Optimization Framework**

**Chen-Yang Cheng 1,†, Shih-Wei Lin 2,3,4,†, Pourya Pourhejazy 1,†, Kuo-Ching Ying 1,\*,† and Yu-Zhe Lin 1,5**


**Abstract:** Production environment in modern industries, like integrated circuits manufacturing, fiberglass processing, steelmaking, and ceramic frit, is characterized by zero idle-time between inbound and outbound jobs on every machine; this technical requirement improves energy efficiency, hence, has implications for cleaner production in other production situations. An exhaustive review of literature is first conducted to shed light on the development of no-idle flowshops. Considering the intractable nature of the problem, this research also develops an extended solution method for optimizing the Bi-objective No-Idle Permutation Flowshop Scheduling Problem (BNIPFSP). Extensive numerical tests and statistical analysis are conducted to evaluate the developed method, comparing it with the best-performing algorithm developed to solve the BNIPFSP. Overall, the proposed extension outperforms in terms of solution quality at the expense of a longer computational time. This research is concluded by providing suggestions for the future development of this understudied scheduling extension.

**Keywords:** production management; energy-efficiency; scheduling; no-idle flowshop; metaheuristics

#### **1. Introduction**

Ecological restoration and reduced carbon emission have become major global priorities [1]. Local governments have put forward regulatory measures and policies to enforce energy-saving initiatives. These measures are predominantly formed around emission taxation and trading of emission credits, which help bring the overall emissions below the target baseline [2]. The Australian carbon reduction policy, the so-called safeguard mechanism, and the EU Emission Trading System are prime examples of reducing the negative impacts of business activities from electricity generation and mining to transportation, construction, and manufacturing.

The manufacturing sector is one of the primary energy consumers and the largest polluter with its share being more than 31 percent of the overall energy consumption and 36 percent of carbon dioxide emissions [3]. To address this issue, supply chain sustainability, in particular, the green process design practices, has been mainly focused on reducing energy consumption in logistics [4], production, and consumption phases as well as the use of renewable energies [5]. Providing on-site energy production, like solar panels and biogas fuel cells, reducing facilities' carbon footprint by replacing lighting and energy control systems, applying energy efficiency standards in the construction of new buildings, and

**Citation:** Cheng, C.-Y.; Lin, S.-W.; Pourhejazy, P.; Ying, K.-C.; Lin, Y.-Z. No-Idle Flowshop Scheduling for Energy-Efficient Production: An Improved Optimization Framework. *Mathematics* **2021**, *9*, 1335. https:// doi.org/10.3390/math9121335

Academic Editors: Chin-Chia Wu and Win-Chin Lin

Received: 4 May 2021 Accepted: 7 June 2021 Published: 9 June 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

the installation of modern supplements for the use of sustainable resources is the primary green practices reported in the literature [6].

Minimizing the costs associated with the machines' energy consumption and the resulting pollutants have been at the center of the green manufacturing studies. Considering non-processing and processing energy consumption in the production facilities [7], energy-efficiency has been explored from the operational management perspective, i.e., how to cluster jobs to minimize non-value-adding operations [8] and when to turn on/off to reduce machines idle-time, which speed level to operate, and how to plan peak and off-peak production process to save energy [9]; Production scheduling as an operational strategic tool is complex and requires additional measures to account for less tangible operational aspects.

The operations-related performance measures, more particularly those pertinent to processing energy consumption, have been the subject of many scheduling studies to account for sustainability in the production management context. Piroozfard et al. [10] introduced a multi-objective flexible job-shop scheduling problem, minimizing carbon footprint and the total late work criterion. Minimizing the makespan and total carbon emission in production environments with unrelated parallel machines was examined by Zheng and Wang [11]. Safarzadeh and Niaki [12] addressed the total green cost and the makespan finding the Pareto optimal solutions in uniform parallel machine environments. The trade-off between makespan and energy consumption in two-machine flowshop [13], hybrid flowshop [14], and unrelated parallel machine [15], and job-shop scheduling environments [16] are among the other notable contributions at the intersection of energy-efficiency and production schedule. These studies aimed to improve energy efficiency through a soft optimization approach focusing on minimizing processing costs and energy consumption. That is, a trade-off enables the decision-makers to choose between cost-effectiveness or responsiveness and energy efficiency. Although such a flexible approach is suitable in the current regulatory situation, plausibly more restricted regulations in the future urge optimization approaches that minimize non-processing energy consumption considering operational strategic measures and energy cost strategies [17]. Li et al. [18] suggested defining a limitation on the energy consumption of each machine while minimizing the makespan and the total completion time. Scheduling problems with the no-idle time between the in-coming and out-going jobs on the machines is an alternative solution to effectively reduce energy wastage in the production sector. On the other hand, the technical characteristics of modern industries, like steelmaking [19], integrated circuits manufacturing, fiberglass processing, and ceramic frit [20] require a no-idle situation. Given flowshop production as the most common process model in the manufacturing sector [21] and the significance of energy costs in the flowshops, no-idle flowshop scheduling has received recent recognition among production management scholars.

The successful implementation of policy-driven mechanisms for mandating carbon emissions depends on the effective consideration of the corporate priorities, like costeffectiveness and responsiveness, to ensure the firms' competitiveness [22]. This situation is of high significance to address conflicting operational objectives within the no-idle production scheduling agenda that enforces maximal energy efficiency. To the best of the author's knowledge, no published journal papers have addressed the bi-objective optimization of no-idle flowshops. This study extends the energy-efficient production scheduling literature by a two-fold contribution. First, an exhaustive review of the noidle flowshop scheduling literature is conducted to explore the developments and gaps in modern industry scheduling. Second, a Hybrid Iterated Greedy (HIG) algorithm is developed to effectively solve the bi-objective variant of no-idle flowshops while ensuring the robustness of the outcomes. The three-field *α*| *β*|*γ* notation of Graham et al. [23] is used for referring to the Bi-objective No-Idle Permutation Flowshop Scheduling Problem (BNIPFSP) as *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* in the remainder of this article. In this notation system, *Fm* shows the flowshop production environment with the set of given jobs being processed by a set of available machines in the same order. In the second part of

the notation, *prmu* determines the permutation setting to show that the sequence of jobs is the same on all machines, and specifies that there is no idle time between inbound and outbound jobs on every machine. Finally, *α* · *C*max + *β* · ∑ *Fj* determines the weighted sum of makespan and total flowtime criteria.

The rest of this manuscript is organized into four sections. A comprehensive review of the literature is provided in Section 2. The methodology, including the extended mathematical formulation and the solution algorithm, is elaborated in Section 3. The numerical analysis comes next, in Section 4, to analyze the effectiveness of the developed solution approach. Finally, concluding remarks and directions for future research on no-idle scheduling close this research work in Section 5.

#### **2. Literature Review**

Considering the recent surge in the number of articles, a comprehensive review on no-idle flowshop scheduling and its solution methods is timely. This section reviews the published works indexed in Google Scholar. For this purpose, searching the keywords "no-idle" and "Flowshop" resulted in a total of 33 articles among which, 25 were perceived as relevant; of the relevant items, five conference papers [24–28] and two theses [29,30] were found. The journal articles are then analyzed considering the number of machines, the studied performance indicator, and the proposed solution approach suggested by Ribas et al. [31] and Neufeld et al. [32].

Computers and Operations Research and Expert Systems with Applications contributed the most to this extension of scheduling problems with two published works. With five contributions, Tasgetiren is the most prominent author, followed by Rossi with three published works. Notably, half of the contributions in no-idle flowshop scheduling are published in or after 2019, all of which are explored in the production context. A summary of the published works is provided in Appendix A with the detailed review elaborated below.

No-idle scheduling was the first time introduced by Cepek et al. [33,34] to minimize total completion time in a two-machine flowshop production environment. This seminal scheduling problem inspired more than 20 research contributions thus far, contributing to solution algorithms and/or new mathematical extensions to No-Idle Permutation Flowshop Scheduling Problem (NIPFSP). Narain and Bagga [35] developed a Branch and Bound solution method to minimize the average flowtime in a two-machine flowshop environment. Wang et al. [36] incorporated no-wait job-related constraints into the no-idle flexible flowshops. Later studies were focused on flowshop settings with m machines. Tasgetiren et al. [37] and [38] developed Differential Evolution and Discrete Artificial Bee Colony algorithms, respectively, to minimize total tardiness in NIPFSP. Tabu Search algorithm was later adopted by Ren et al. [39] to minimize the maximum completion time (makespan). Tasgetiren et al. [40] proposed a hybrid Differential Evolution and variable local search, which improved the makespan values obtained by the earlier studies.

More recent studies are rather focused on proposing novel methods and variants in the scheduling procedure. Lu [41] explored the time-dependent learning effect and deteriorating jobs in NIPFSP, minimizing the makespan criterion. Pagnozzi and Stützle [42] developed an automatic algorithm configuration approach for solving single-objective permutation flowshops. The mixed-no-idle flowshop variant was introduced by Pan and Ruiz [43] to minimize makespan using a basic Iterated Greedy (IG) algorithm. Rossi and Nagano [44,45] explored the mixed-no-idle and sequence-dependent setup time settings and minimized total flowtime using Beam Search algorithms. The same authors developed a constructive heuristic for mixed-NIPFSP with sequence-dependent setup times [46]. In a similar contribution, Nagano et al. [47] developed a constructive heuristic to solve the basic NIPFSP considering total flowtime. Zhao et al. [48] and Riahi et al. [49] developed Discrete Water Wave Optimization (DWWO) and IG, respectively, for minimizing total tardiness in NIPFSP. Benders decomposition was also tested to solve mixed-no-idle flowshops considering the makespan criterion [20]. Most recently, Zhao et al. [50] proposed a new variant to the DWWO algorithm to solve distributed assembly no-idle flowshop scheduling problems considering maximum assembly completion time. Despite its usefulness, no published journal papers are found that addresses the bi-objective variant of NIPFSPs. Motivated by this gap, we propose a new formulation and solution algorithm to contribute to energy-efficient production scheduling using bi-objective no-idle flowshops.

#### **3. Methods**

*3.1. Mathematical Formulation*

This study extends the Mixed-Integer Programming (MIP) formulation developed by Ruiz and Stützle [51] to account for two conflicting optimization objectives, i.e., maximum completion time (makespan) and total flowtime. The former is a measure to enhance resource utilization, while the latter measure minimizes work-in-process inventory. The indices, parameters, and decision variables listed in Table 1 are used to model the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* scheduling problem.


We now elaborate on the MIP formulation of the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* problem. The objective function in

$$\text{Minimize } z = \alpha \cdot \mathbb{C}\_{\text{max}} + \beta \cdot \sum\_{j=0}^{n} F\_j \tag{1}$$

minimizes the weighted sum of the makespan and total flowtime values, which are commensurable. The former part of the objective function, *C*max, will be calculated using the no-idle calculation mechanism presented in the following sub-section, and the latter part, ∑*n <sup>j</sup>*=<sup>0</sup> *Fj*, is determined through the constraint calculations. The objective function is subject to the constraints below. Binary decision variables are used in:

$$\sum\_{k=1}^{n} X\_{j,k} = 1, \forall j \in \{1, \ 2, \dots, n\} \tag{2}$$

where index *k* represents *π*[*j*] for the sake of readability. This constraint is defined to restrict the jobs from being assigned to more than one machine. Besides, each job should occupy one and only one position in the job sequence, as demonstrated in:

$$\sum\_{j=1}^{n} X\_{j,k} = 1, \forall k \in \{1, \ 2, \dots, n\} \tag{3}$$

The completion time of the job in position *k* on the machine *i* must be greater than or equal to the completion time of the job on the previous machine, i.e., *i* − 1, plus the processing time of the same job on the machine *i*. These are modeled in:

$$C\_{k,1} \ge \sum\_{j=1}^{n} X\_{j,k} \cdot P\_{j,1}, \forall k \in \{1, \ 2, \dots, n\} \tag{4}$$

$$\mathcal{C}\_{k,i} \ge \mathcal{C}\_{k,i-1} + \sum\_{j=1}^{n} X\_{j,k} \cdot P\_{j,i}, \forall k \in \{1, \ 2, \dots, n\}, \ i \in \{2, \dots, m\} \tag{5}$$

where the former equation refers to the first machine, and the latter equation is defined for the rest of the machinery. Similarly, the completion time of a job should correspond to that of the earlier job on the same machine in:

$$\mathbb{C}\_{k,i} \ge \mathbb{C}\_{l,i} + \sum\_{j=1}^{n} X\_{j,k} \cdot P\_{j,i}; i \in \{1, 2, \dots, m\}, \ \forall k \in \{2, \dots, n\}, \ \forall l \in \{1, \dots, k-1\} \tag{6}$$

where the time of the job placed at the position *k* of the job sequence vector on machine *i* corresponds to that of its immediate earlier job at the position *k* − 1 on machine *i.* On this basis, the completion time of the job processed on the last machine considering its flowtime is defined in: *<sup>n</sup>*

$$\sum\_{k=1}^{n} \mathbb{C}\_{k,i} \cdot X\_{j,k} = F\_{\mathbf{j},\prime} \,\forall i = m,\,\forall j \in \{1, \ 2, \dots, n\} \tag{7}$$

where the flowtime value in the objective function is defined. Finally, the variable types are demonstrated in:

$$\begin{array}{c} \mathcal{X}\_{j,k} \in \{0, 1\}, \forall j, k \in \{1, 2, \dots, n\} \\ \mathcal{C}\_{k,i} \ge 0, \forall k \in \{1, 2, \dots, n\}, \ i \in \{1, 2, \dots, m\} \\ F\_{\vec{j}} \ge 0, \forall j \in \{1, 2, \dots, n\} \end{array} \tag{8}$$

where the completion and total flowtime variables cannot accept negative values, and the job position variable only accepts binary values.

#### *3.2. No-Idle Calculation Mechanism*

To ensure that there is zero idle time throughout the production process, one should regulate each machine's first job's commencement. For this purpose, each machine's start time, *Si*, is defined in:

$$S\_i = S\_{i-1} + \max\_{h=1:n} \left( \sum\_{j=1}^h P\_{\pi[j], i-1} - \sum\_{k=1}^{h-1} P\_{\pi[j], i} \right), \ i \in \{1, \dots, m\}, \ S\_1 = 0 \tag{9}$$

where *Pπ*[*j*],*<sup>i</sup>* represents the processing time of the job assigned to the position *j* of the sequence vector *π* on machine *i*. *Si*−<sup>1</sup> determines the start time on the previous machine. Once the start time of every machine is known, the completion time of the first job on the machine *i* can be calculated using:

$$C\_{\pi[1],i} = S\_i + P\_{\pi[1],i\prime} \; i \in \{1, \ldots, m\} \tag{10}$$

where it equals the summation of the corresponding start time of the machine *i* and the processing time of the first job in the job sequence vector, *Pπ*[1],*i*. Next, the completion time of the job assigned to the position *j* of the sequence vector *π*, which is processed on the machine *i*, is defined in:

$$\mathcal{C}\_{\pi[j],i} = \mathcal{C}\_{\pi[j-1],i} + P\_{\pi[j],i'} \; j \in \{2, \dots, n\}, \; i \in \{1, \dots, m\} \tag{11}$$

where *Cπ*[*j*],*<sup>i</sup>* is equal to the completion time of job position in *j* − 1 of job sequence vector *π* on machine *i*, *Cπ*[*j*−1],*i*, plus the processing time of the job positioned in *j*, *Pπ*[*j*],*i*. Finally, the makespan value is calculated using:

$$\mathcal{C}\_{\text{max}} = \mathcal{C}\_{\pi[n], \mathcal{m}} \tag{12}$$

where *Cπ*[*n*],*<sup>m</sup>* represents the completion time of the last job in sequence vector *π*, which is processed on the last machine. Therefore, *C*max = *Sm* + ∑*<sup>n</sup> <sup>k</sup>*=<sup>1</sup> *Pk*,*m*. An illustrative example


is provided in Figure 1 to clarify the computational steps of calculating the completion time in the no-idle flowshop.

**Figure 1.** Illustrative example on the calculation of the completion time in no-idle flowshops.

#### *3.3. Solution Algorithm*

The IG algorithm was introduced by Ruiz and Stützle [52] to solve permutation flowshops. The computational procedure of IG is inspired by human behavior when wanting a lot more of something in a greedy manner. The successful track record of the IG algorithms in solving flowshop problems inspired us to extend it for solving the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* problem. The pseudocode of the HIG algorithm is provided in Figure 2, followed by the details on the major computational elements. It is worthwhile mentioning that the proposed modifications are adjustable and can be effectively adapted for other application areas.

#### 3.3.1. Solution Initialization and Decoding

Solutions are decoded as a permutation of *n* numbers, each of which represent a job, with the processing sequence being similar on *m* machines. Taking the job sequence 3 − 6 − 2 − 4 − 5 − 1 as an example, the solution is symbolized by a vector, (362451), where six jobs should be processed following the specified order on every machine. To generate the initial solution, the well-known constructive heuristic algorithm introduced by Nawaz, Enscore, Ham (NEH; [53]), which is known as one of the best constructive heuristics for solution initialization of the flowshop problems, is preferred to random solution generation to ensure a better initial approximation. The NEH considers average processing time as a priority rule for arranging the jobs. The destruction and construction module presented in the next sub-section uses the outcomes of NEH to improve the solution quality.


**Figure 2.** Pseudocode of the Hybrid Iterated Greedy.

3.3.2. Destruction and Construction Methods

This study applies a random destruction method with no limits to facilitate a greater level of disturbance in the search procedure. The randomly extracted jobs, which equals the destruction count (*d*), will then be saved in a separate array to be considered in the construction procedure. A customized construction method for sorting and inserting the removed jobs is developed to improve the effectiveness of the search procedure while ensuring the feasibility of the resulting new solution. This approach is explained below with an illustrative example of this procedure provided in Figure 3.

Step 1. Remove the last job from Π and name it *a*.

Step 2. Insert *a* into Π before the last job. Name the jobs before and after *a* as *a* − *k* and *a* + *k*, respectively.

Step 3. Remove job *a* − *k* and rename it to *b*.

Step 4. Insert *b* next to the first job in *a* and name the jobs before and after *b* as *b* − *k* and *b* + *k*, respectively.

Step 5. Insert *b* − *k* right before *a*.

Step 6. Select *b* + *k* and move it to the position before *a* − *k*.

Step 7. Select *a* + *k* and move it to the position after *b*.

**Figure 3.** The customized construction method for no-idle permutation flowshops considering *k* = 1.

#### 3.3.3. Local Search Method

After a new solution has resulted from the iterative and greedy construction procedure, a local search mechanism should be applied to search for further improvements. For this purpose, a pre-determined number of non-repetitive random job extraction and insertion, named as the local search count (*γ*), is used to find fitter solutions. If there is an improvement as a result of applying the local search procedure, the procedure will be continued; otherwise, it will be terminated. The pseudocode of the local search procedure is provided in Figure 4.

#### 3.3.4. Acceptance and Stopping Conditions

Once the current best solution (Π*best*) and the new solution (Π*new*) are known, the search algorithm should determine if there is an improvement in the fitness value. If the new solution is of better quality than the current best solution, i.e., a smaller weighted sum of the total flowtime and makespan values *fitness*(Π*new*) < *fitness*(Π*best*) has resulted, the new solution becomes the current-best solution, Π*best* = Π*new*. Otherwise, a mechanism is required to decide whether or not to accept a new solution that is worse or similar to the current best solution.

Inspired by the Simulated Annealing algorithm [54], the cooling mechanism is used to regulate the acceptance condition. In the approach suggested by Ruiz and Stützle [52], the fitness values associated with the current and best solutions are considered to calculate the relative change in the solution quality, i.e., <sup>Δ</sup> <sup>=</sup> *fitness*(Π*new*) <sup>−</sup> *fitness*(Π*best*). Given Δ and the initial temperature, *T*0, as the algorithm parameter, the current temperature *T* decreases proportionately to the cooling coefficient, i.e., *T* ← *δ* × *T* , where 0 < *δ* < 1 is the cooling rate. Finally, the acceptance probability, calculated using *P* = exp(−Δ*E*/*T*), should be compared with a random number to determine whether to accept a poor-performing solution. This mechanism is particularly useful to avoid premature convergence and

getting trapped in the local optima. Unchanged fitness value, i.e., Δ = 0, for a certain number of iterations, signals the termination of the algorithm. The algorithm terminates when the current best solution remains do not improve for a certain number of iterations.


**Figure 4.** Pseudocode of the local search procedure.

#### **4. Results**

This section begins with an elaboration on the configuration of the test bank and the algorithm calibration experiment. Numerical results and statistical analysis are then provided to compare the HIG performance with Hybrid Tabu Search (HTS; [25]). It consists of short- and long-term phases, with the short-term phase focusing on a local search and the long-term phase improving concentration and diversification and help escape the local best solutions. HTS applies the NEH [53] for solution initialization, and the 'swap' and 'insert' moves as the disturbance mechanism. Besides, three other variants of IG, denoted by the IG1, IG2, and IG3 algorithms, are included to enrich the numerical experiments and provide insights into the impact of various computational elements in solving the problem. It helps explore what element of the proposed extension contributes most to the possible breakthrough. IG1 and IG2 apply the basic construction method, while IG3 uses the customized construction method developed in our study. On the other hand, IG1 and IG3 do not have a local search mechanism, while IG2 applies a perturbation mechanism similar to HIG. All the algorithms are coded and compiled using a personal computer with the following specs; Intel (R) Core (TM) i7 CPU 3.4 GHz, 8 GB RAM, and Windows 7 operating system.

The widely-used scheduling dataset developed by Tillard [55] is used to benchmark HIG against the best-performing algorithms in the literature developed to solve the *Fm prmu*, *no* <sup>−</sup> *idle α*.*C*max + *β*.∑ *Fj* problem. This dataset consists of 12 job/machine combinations considering three configuration groups: (1) *n* ∈ {20, 50, 100} jobs and *m* ∈ {5, 10, 20} machines; (2) *n* = 200 jobs and *m* ∈ {10, 20} machines; (3) *n* = 500 jobs and *m* = 20 machines. Ten distinct instances for each combination make a total of 120 instances for the final experiments.

The calibration experiment is conducted in two phases using random test instances. First, the best configuration is determined considering a limited set of alternatives. Next, the set of parameters adjacent to the selected configuration in the first phase will be explored to check if a better combination of parameters can be found. For this purpose, the Relative Percentage Deviation (RPD) shown in Equation (13) is considered to compare the

resulting fitness values where smaller values are preferred, and RPD = 0 demonstrates the best solution. In this equation, *Fitness*∗ refers to the fitness value obtained by each of the solution algorithms and *Fitnessbest* is the best result.

$$\text{RPD} = \frac{Fitness\_{\text{best}} - Fitness^\*}{Fitness^\*} \times 100\tag{13}$$

Random instances are used to determine the parameters of the IG1, IG2, IG3, and HIG algorithms. The calibration test results are summarized in Table 2 for these algorithms. On this basis, the algorithm parameters are set to *d* = 2, *γ* = 20, and *δ* = 0.9 to conduct the final experiments. To ensure a fair comparison, a termination condition similar to that of the HTS algorithm, which is applied by Ren et al. [25], is considered. That is, the algorithm terminates when the current best solution remains unchanged for 100 consecutive iterations.

**Table 2.** Calibration results analysis (best in **bold**).


Considering the calibrated parameter values and an equal importance weight (*α* = *β* = 0.5) within a priori performance articulation scheme, the best-found solutions of the instances solved using HTS [25] are compared to those of the HTS, IG1, IG2, and IG1 algorithms. The results are summarized in Tables 3 and 4. Except for the instance with 20 machines and 10 jobs (20 × 10), where HTS performs slightly better than HIG, the rest of the best solutions are yielded by HIG.

We first analyze the results considering various workloads and operating scales. Considering different numbers of jobs in the first set of instances, Table 3 shows that HIG performs better than HTS. The difference in performance becomes more significant with an increase in the workload. The IG2 algorithm is also superior to the HTS, considering the first set of test instances, showing that integrating the local search mechanism contributes significantly to the success of the developed algorithm. The solutions obtained by the IG1, IG2, IG3, and HIG algorithms across all test instances are then compared separately in Table 4, considering all test instances where HIG yields the best results in all cases.


**Table 3.** Best-found solutions considering the first set of test instances (best in **bold**).

**Table 4.** Best-found solutions across all test instances (updates in **bold**).


In an overall analysis, Tables 5 and 6 provide the Average Relative Percentage Deviation (ARPD) values for different workloads and machines, respectively. The RPD analysis shows the overall impact of the number of machinery and workload on the performance of the algorithm. It is evident that HIG obtains meaningfully better solutions than the HTS, IG1, IG2, and IG3 algorithms when solving the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* problem across different operational situations. Given the RPD analysis, it is expected that HIG's superiority to the current-best-performing algorithm, HTS, will be even more significant for industry-scale applications.

A statistical test is conducted to check whether the resulting improvement in the best-found solutions is significant. The null hypothesis is that the HIG algorithm does not outperform the HTS algorithm when solving the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* problem. The *t*-test results are summarized in Table 7. Considering 120 test instances, the *p*-value is supportive of rejecting the null hypothesis. That is, with 95 percent of confidence, we can claim that HIG is superior to the current-best-performing algorithm in the literature of BNIPFSP, i.e., the HTS algorithm. It is also observed that the proposed extension shows a significant improvement in the performance of the algorithm when compared to all three variants of the IGs.


**Table 5.** The Relative Performance Deviation considering various workloads (best in **bold**).

**Table 6.** Average Relative Performance Deviation considering operating scale (best in **bold**).




StD: Standard Deviation, S.E.: Standard Error of the Mean, DoF: Degree of Freedom.

As a final step to the numerical analysis, the best-found solutions to all 120 test instances are recorded in Appendix B. The updated values are highlighted in bold font. Notably, 119 out of 120 best-found solutions are yielded by the HIG algorithm. The resulting values can be used in future studies to benchmark the prospect solution algorithms for solving the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* problem.

#### **5. Conclusions**

Energy efficiency in the production sector requires well-informed operations management decisions in addition to the use of modern equipment, smart lighting and control systems, and the standard construction of facilities. Production scheduling is a prime example of planning tools that facilitate the successful implementation of green initiatives for reducing the carbon footprint. This study contributes to the energy-efficient production scheduling literature developing a mathematical model and a solution algorithm to address the gap identified in the comprehensive literature review. Extensive numerical analysis using a well-known dataset showed that almost all of the best-found solutions are yielded by the HIG algorithm. The statistical test of significance confirmed that HIG performs significantly better than the benchmark algorithm when solving the *Fm prmu*, *no* <sup>−</sup> *idle α* · *C*max + *β* · ∑ *Fj* problem.

Despite its effectiveness in solving the BNIPFSPs, the proposed solution algorithm is limited in that it applies a priori preference articulation approach for reconciliation of the makespan and total flowtime. To address this limitation, the following directions can be pursued. First, one can extend the Iterated Greedy algorithm to work with the Pareto Front approach to provide a comprehensive set of optimum solutions and trade-offs. Second, other multi-objective optimization algorithms can be adapted to solve this intractable scheduling extension. The third suggestion for future research includes adopting the Concept of Stratification and Incremental Enlargement to solve the problem's dynamic variant. In doing so, one can also account for operational parameter uncertainties and the possibility of rejecting a job or partially accepting a batch of jobs. Finally, the noidle setting needs more attention in other production settings to contribute to energy efficiency literature.

**Author Contributions:** C.-Y.C.: Conceptualization, Methodology, Software. S.-W.L.: Conceptualization, Methodology, Software, Funding acquisition. P.P.: Investigation, Writing—Original draft, Writing—Revision. K.-C.Y.: Supervision, Conceptualization, Methodology. Y.-Z.L.: Formal analysis. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was partially supported by the Ministry of Science and Technology, Taiwan, under Grant MOST 109-2221-E-027-073/Most-109-2410-H-182-009-MY3, and in part by the Linkou Chang Gung Memorial Hospital under Grant BMRPA19.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Appendix A**

**Table A1.** Summary of the No-Idle Flowshop Scheduling Literature.



**Table A1.** *Cont.*


**Table A1.** *Cont.*

#### **Appendix B**


**Table A2.** Best-Found Solutions (BFS) across All Test Instances (Updates in **Bold**).

#### **References**


## *Article* **Improving the Return Loading Rate Problem in Northwest China Based on the Theory of Constraints**

**Wen-Tso Huang 1, Cheng-Chang Lu <sup>2</sup> and Jr-Fong Dang 3,\***


**Abstract:** This paper introduces how to improve the return loading rate problem by integrating the Sub-Tour reversal approach with the method of the Theory of Constraints (TOC). The proposed model generates the initial solution derived by the Sub-Tour reversal approach in phase 1 and then applies TOC to obtain the optimal solution, meeting the goal of improving the return loading rate to more than 50% and then lowering the total transportation distance in phase 2. To see our model capability, this study establishes an original distribution layout to compare the performance of the Sub-Tour reversal approach with our model, based on the simulation data generated by the Monte Carlo simulation. We also conduct the pair *t*-test to verify our model performance. The results show that our proposed model outperforms the Sub-Tour reversal approach in a significant manner. By utilizing the available data, our model can be easily implemented in the real world and efficiently seeks the optimal solutions.

**Keywords:** TOC; return loading rate; logistics; total transport distance; northwest China

#### **1. Introduction**

Northwest China is fruitful, and its agriculture is productive. Northwest China includes the Shaanxi, Gansu, Qinghai, Ningxia, and Xinjiang provincial administrative regions. According to the vast distances of these five provinces and the actual situation regarding the demand for logistics and transport infrastructure, most companies face a return loading rate problem. The problem results from the logistics constructions and cold chain logistics lagging behind needs, restricting the development of agriculture in the region. Most companies schedule the forward loading rate of transport vehicles approximating to 99% from supplier to customer to gain operational efficiency and corporate profits. However, in reality, those companies cannot well schedule the backward loading rate of the transport vehicles, due to the lack of needs from the customer returning to supplier (Subulan et al. [1]; Soysal et al. [2]; Kim and Lee [3]; Konstantakopoulos et al. [4]). This encouraged us to study the transport routes assisting enterprises in reducing logistics costs, improving operational efficiency and ultimately maximizing corporate profits, especially logistics costs, accounting for a large proportion of a company's total expenses. The establishment of improving the backward loading rate of transport vehicles can benefit industries and the northwest region. Thus, in this paper, we focus primarily on two factors: the total transport distance and the return loading rate, both of which are determinants in the design of transport routes. The total transport distance problem plays an important role in transport optimization since the minimization of the total transportation distance contributes to transport efficiency. In addition, the definition of return loading rate refers to the proportion of unused load capacity to the total load rate. In reality, there are many

**Citation:** Huang, W.-T.; Lu, C.-C.; Dang, J.-F. Improving the Return Loading Rate Problem in Northwest China Based on the Theory of Constraints. *Mathematics* **2021**, *9*, 1397. https://doi.org/10.3390/ math9121397

Academic Editor: Armin Fügenschuh

Received: 3 May 2021 Accepted: 13 June 2021 Published: 16 June 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

logistics operators whose side-pursuit is to shorten the delivery time; thus, the time for transport vehicles to design return routes is limited, which causes vehicles to return with no other goods, and leads to poor operational efficiency.

To solve the problem, we propose a two-phase solution procedure to derive the optimal solution. In phase 1, we apply the Sub-Tour reversal approach to obtain the initial solution based on Hillier and Lieberman [5]. By the available results, we further utilize the method of the Theory of Constraints (TOC) in phase 2 to quickly and accurately find the crux of the impact of the total transport distance and the return loading rate. To improve the return loading rate, we relax the total transportation distance adjustment to achieve optimization. The resulting outcome shows that the return loading rate is more than 50%, which results from the actual needs of northern China. Furthermore, this paper utilizes the simulation data to validate our model and adopts the Monte Carlo simulation method to test the deriving solutions. The reason why we apply Monte Carlo simulation is because Moroko and Caflisch [6] stated that numerically simulated stochastic processes can be done well by discretizing the process into small time steps and applying pseudo-random sequences to simulate the randomness. Huang et al. [7] indicated its efficiency and wide scope of applicability. This encouraged us to apply the Monte Carlo simulation to derive all simulation data throughout this paper. Based on the resulting outcomes, we know that the TOC effectively obtains the best routes design, and the standard return loading rate optimization objectives provide evidence of the superiority of the TOC method.

The remainder of this paper is organized as follows. In Section 2, a review of the literature related to the Sub-Tour reversal method, the TOC method and their operational performance measures is presented. Section 3 describes the Sub-Tour reversal model and the TOC method applied in this study. Section 4 presents the return loading rate problem in Northwest China and the simulation results. Finally, Section 5 concludes and points out the directions for future research.

#### **2. Literature Review**

With respect to the subject of logistics, numerous related issues and areas have been studied, such as route optimization, distribution center network layout and vehicle return issues. Efficient logistics management can be achieved if there is an understanding of the pros and cons of the concept. We systematically review the previous studies so as to capture the academic perspectives. Among them, distance is a primary concern of logistics. Daganzo [8] developed a simple formula to predict the distance traveled by fleets of vehicles with respect to physical distribution problems involving a depot and its area of influence. However, taking other factors into consideration, reverse logistics efficiency perhaps provides a better solution. Subulan et al. [1] claimed that reverse logistics and product recovery options, such as recycling, remanufacturing and reusing, are important issues due to the environmental and economic issues as well as the legal regulations. Kim and Lee [3] considered network design, capacity planning and vehicle routing for collection systems in reverse logistics. Dobos [9] stated that the aim of a reverse logistics system is to find optimal inventory policies with special structures, as they assumed that demand is a known continuous function in a given planning horizon and that the return rate of used items is a given function. Accordingly, they found that there is a constant delay between use and return processes. Ljungberg and Gebresenbet [10] mapped out city-center goods distribution in Uppsala and Sweden to see the possibility of reducing cost, congestion, and environmental impact by coordinating good distribution. Qualitative and quantitative data were collected via questionnaires, interviews and measurements at loading and unloading zones of retail shops. Soysal et al. [2] developed a multi-objective linear programming model for a generic beef logistics network problem. The objectives of the model are to minimize the total logistics costs and the total amount of greenhouse gas emissions due to transportation operations. Guo et al. [11] applied the Genetic Algorithm (GA) to solve the route design problem of China. As we can see, there are lots of studies invested into the logistics problems. One can refer to Konstantakopoulos et al. [4] for a detailed

literature review in this field. In addition, Wang et al. [12] stated that the importance of logistics and supply chain has been amplified due to COVID-19. They proposed a hybrid multi-criteria model to evaluate third-party logistics (3PL). Duan et al. [13] claimed that agriculture decision support systems (DSSs) play an important role in improving agribusiness productivity. Thus, they presented a multicriteria analysis approach for evaluating and selecting the most appropriate agriculture DSS for sustainable agribusiness. Jiang and Zhou [14] established a supply chain utility model and discussed three different situations of supply chain members since the reasonable distribution can be a vital part in the supply chain. Paksoy et al. [15] developed a closed-loop supply chain model, describing the trade-offs between various costs considering emissions and transportations. They constructed the model in the form of linear programming formulations. Fahimnia et al. [16] studied the cost implications and carbon reduction potentials of the carbon-pricing scheme in Australia. A non-linear optimization model was constructed to depict the trade-off between transportation costs and the costs of carbon emission and fuel consumption. Özceylan et al. [17] integrated both strategic and tactical decisions among the closed-loop supply chain. The strategic level decisions consider the amounts of goods flowing in the supply chain, and tactical decisions concern balancing disassembly lines in the reverse supply chain. Özceylan et al. [18] mentioned that the increasing worldwide environmental and social concerns motivate manufacturers and consumers to implement recycling strategies. They proposed a linear programming to solve for the reverse material flows and further integrated results to forward the supply chain. Çil et al. [19] developed a mixedmodel assembly line balancing (MMALB) problem with the collaboration between human workers and robots. They formulated the problem as a mixed-integer linear programming (MILP) model and further implemented the bee algorithm (BA) and artificial bee colony (ABC) algorithm to derive the solutions to a large-scale problem. Miraç and Özceylan [20] stated that the United Nations Humanitarian Response Depot UNHRD enables humanitarian actors to pre-position and stockpile relief items and support equipment for swift delivery in emergency situations. There are two different mathematical models to solve the minimization distance and maximization of the users covered. We find that the pro of these papers can be the optimal solution derived in an efficient manner, due to the single objective. The con of these papers can be the lack of taking other factors into consideration simultaneously. Therefore, the examination of previous studies indicates that there is a need to develop a model investigating not only the costs, but also the loading rate to solve the problem as mentioned earlier.

To define the result of the optimization, we introduce the loading rate of the vehicle factor. Based on the duality of the distribution costs, profits of logistics and reverse logistics to improve results, Ryu and Hyun [21] put forward an optimal modeling system that uses the push system and grouping method of effective logistics cost. We note that the TOC method can be utilized to solve the problem as mentioned, due to its efficiency. Lee et al. [22] presented an alternative method that enhances the system performance by the method of TOC. With the enhancement, they expected that the TOC methodology can be adopted by more companies, especially those that have the same characteristics. Chang and Huang [23] proposed an enhanced TOC for application in a re-entrant flow shop in which job processing times are generated from a discrete uniform distribution in which machine breakdowns are subject to an exponential distribution. As we can see, the TOC is a proven, useful approach for problems related to logistics. In this study, we consider two essential logistics factors, namely, the total transportation distance and the loading rates of transport vehicles. This paper utilizes these factors to show that the TOC further optimizes the results of the Sub-Tour reversal method and to determine the degree of improvement resulted from TOC.

#### **3. Methodology**

This paper integrates the Sub-Tour reversal and the TOC methods to optimize the logistics in improving the return loading rate problem. In phase 1, according to Hillier

and Lieberman's [5] research, the Sub-Tour reversal algorithm is a useful algorithm for finding the shortest distance. The Sub-Tour reversal algorithm selects the order of some distribution centers of nodes, then reverses the visit orders and adjusts the visit orders when visiting the cities. Then, it selects the maximum reduced distance and the smallest value as the optimal solution for the ranking among the data. This Sub-Tour reversal algorithm may consist of as few as two cities. In phase 2, the TOC is utilized to optimize the return loading rate problem. The transportation performance assessment is then composed of two major factors as the total transportation distance and the loading rates of transport vehicles when returning to the initial distribution center. The TOC procedure applies only the lowest return loading rate to select the capacity-constrained resource city with the lowest return loading rate then replaces the non-capacity-constrained resource city with the highest return loading rate as the optimal solution. The Sub-Tour reversal algorithm is a common method for finding the shortest path because it can accurately and scientifically find the shortest path of the total transportation distance between established demand points. As such, it is an appropriate model for north China to apply to solve general logistics network design issues in northwest China. The TOC, in phase 2, is a research method based on bottleneck orientation. In the following, this study introduces the concept of a capacity-constrained resource (CCR) oriented in the TOC and then further optimizes the Sub-Tour reversal model results. Unlike the Sub-Tour reversal model, to find the shortest path of the total transportation distance, the TOC considers the key effect of the CCR orientation. It should be noted that it not only reduces the total transportation distance, but also improves the return transport vehicle loading rate to more than 50% for the actual goal of northern China.

#### *3.1. Establishment of a Mathematical Model*

The notations used in this paper are given as follows:


We first established a mathematical model to describe the return loading rate problem as the following equation.

$$M\_{1,\mathcal{U}} = \sum\_{1}^{n} a\_{\mathcal{U}} \tag{1}$$

where *M*1*,n* denotes the total forward path demands of demand points from *a*<sup>1</sup> to an, located between the starting distribution center and transit distribution center.

$$M\_{2, \mathcal{U}} = \sum\_{1}^{n} b\_{\mathcal{U}} \tag{2}$$

where *M*2*,n* denotes the total return path demands of demand points from *b*<sup>1</sup> to *bn* located between the transit distribution center and destination.

$$NV\_m = \frac{M\_{1,n}}{\mathbb{C}}\tag{3}$$

The total numbers of vehicles on route *m* can be obtained from the total forward path demands divided by the standard transport capacity per vehicle.

$$NV\_{\rm mf} = \lceil NV\_{\rm m} \rceil \tag{4}$$

If the number of vehicles on route *n* is not an integer number, we use the ceiling function maps *NVm* to the least integer greater than or equal to *NVm*.

$$RLR\_m = \left(1 - \frac{\left(\,^N N V\_m \cdot \mathbb{C} - M\_{2,n}\right)}{\left(N V\_m \cdot \mathbb{C}\right)}\right) \cdot 100\% \tag{5}$$

The *RLRm* of refrigerated trucks are the numbers of vehicles multiplied by the standard transport capacity per vehicle minus the total return path demands and then divided by the total capacity of vehicles.

#### *3.2. Sub-Tour Reversal Model*

The idea of the Sub-Tour reversal algorithm is to select the sub-sequence of some visiting cities, then simply reverse the visit sub-sequence of the cities and adjust the total visit sequence when lowering the total transportation distance of the visiting cities [5]. In this paper, there are two phases involved in optimizing logistics routes. Phase 1 utilizes the Sub-Tour reversal algorithm to find the shortest distance and then to calculate the corresponding loading rate. Suppose that if the return loading rate of more than 50% is not achieved, phase 2 applies the TOC to reach the optimal level.

After the initial mathematical model is obtained, we perform the following Sub-Tour reversal algorithm to find the shortest path of the total transportation distance. The concepts of the Sub-Tour reversal algorithm are as follows:

**Step 1. Initialization:** Select any feasible route as an initial solution. This initial solution does not need to pass through all of the cities but must pass through at least *N*/2 demand cities.

**Step 2. Repeated:** For the present solution, consider all possible sub-path reverse journeys that can be performed (except reversing the entire path) and then select the maximum reduced distance as a new solution (in case of a tie, make an arbitrary decision). Each execution is performed no more than three times, including initialization, repeated 1 and repeated 2.

**Step 3. Stop rule:** When there is no path to reverse to improve the current solution, stop and accept the best answer. Stop after three executions and select the smallest value as the optimal solution. Repeat up to three times. Choose the shortest route from the three repeated executions as the current optimal solution.

#### *3.3. TOC Model*

Suppose that the resulting sub-sequencing outcomes derived in phase 1 cannot meet the return loading rate by more than 50%. We perform the following TOC model to optimize the return loading rate problem. The principle of the TOC is to find out the CCR city embedded in the optimal transport route, and then the delivery vehicles substitute the CCR city to pass through non-CCRs cities to optimize the return transport vehicle loading rate. The CCR city in this study refers to the lowest return loading rate city among all of the transport points, whereas the non-CCRs cities are those with higher return loading rates. Accordingly, the non-CCRs cities can effectively replace a CCR city to optimize the results. The ideal of the TOC is to remove the CCR city and to replace it with the higher loading rate of the non-CCR cities. By doing so, we can quickly locate the CCR (i.e., lowest loading rate) city and accurately find the limitations of the route. After some iteration via replacing, the average loading rates of all cities can be balanced, achieving a return loading rate of more than 50%. The specific steps of the TOC are as follows:

**Step 1.** Find the CCR city. In Equation (6), the *Ln* represents the single loading rate of each demand city. The *Ln* of a single demand city can be obtained by 1 minus the standard transport capacity per vehicle minus its demand for return path, *bn*, divided by the vehicle's capacity. The CCR city is the demand city with the lowest single return loading rate and calculate by equation (7). The TOC intends to select the lowest return loading rate of the demand cities from 1 to *n* and is assigned a CCR city.

$$L\_n = \left[1 - \frac{\left(^{\circ}\text{C} - b\_n\right)}{\text{C}}\right] \cdot 100\% \tag{6}$$

$$\pi\_{\vec{j}} = \text{Min}\{L\_1, L\_2, L\_3, \dots, L\_n\}, \forall \vec{j} \tag{7}$$

**Step 2.** Avoid the CCR city by deleting the demand city with the lowest single return loading rate in the current optimal solution.

**Step 3.** Successively replace CCRs cities having the lowest single return loading rate with non-CCRs cities and assess to determine a feasible solution that leads to the highest return loading rate and shortest route possible; substitute the CCR city with non-CCR cities if necessary.

**Step 4.** Stop if the return loading rate is more than 50%. Otherwise, go to step 1.

#### **4. Results and Discussions**

#### *4.1. Problem Description*

As mentioned earlier, northwest China is fruitful, and its agriculture is productive. Northwest China includes the Shaanxi, Gansu, Qinghai, Ningxia, Xinjiang provincial administrative regions. In Table 1, because of the cold chain logistics costs, we assume that one can operate the routes as shown in Figure 1, where distribution of the distance of five provinces in northwest China is on a scale of 1:80 km. In addition, the actual distance data for cold chain logistics between 15 cities are measured from the Google map. We determine three cities, 1, 7, and 13, as our distribution centers, marked as red circles in Figure 1. Distribution centers 1 and 7 are located in the western region, and distribution center 13 is closer to the eastern region. It is necessary to consider the proximity of three distribution centers to other demands, and we mark the distribution centers with red circles in Figure 1. Connections between any two of the distribution centers indicate that it is feasible for these two distribution centers to connect to each other. Contrastingly, if there is no connection, it means that it is not feasible for these two distribution centers to connect. Digitals on the lines represent the distances between any two adjacent cities. To simplify the calculation, the real distances are divided by 80, and the unit of measurement is kilometers (km). In this study, we apply the Monte Carlo simulation to generate the demands of forward and return for cold chain logistics, following the uniform distribution as shown in Table 2. We further investigate the return loading rate problem in two manners, Long-Route and Short-Route. Table 3 lists the Long-Route parameter setup derived by Table 2, and we denote *An* as 10 demanding cities: 1, 4, 5, 6, 7, 8, 9, 10, 11, 13. The *an* and *bn* represent the demands of the forward and return cities such that *an* represents the demand to unload at this demand city; *bn* represents the demands to be returned to the starting distribution center (node 1) and may also pass the interim distribution center (node 7). *Ln* represents the single point loading rate of each demand city calculated by Equation (7).

**Figure 1.** The northwest regional distribution centers and cities' distance (Km = 1:80).

#### *4.2. Mathematical Modeling*

In this section, we utilize two scenarios to illustrate our proposed model. The first one is the Long-Route scenario, starting from city Wu-lu-mu-qi (city 1) to city Xi-an (end city 13) and returning to city Wu-lu-mu-qi. The second one is the Short-Route scenario, starting from city Lan-zhou (city 7) to city Xi-an (end city 13) and returning to city Lan-zhou.

#### 4.2.1. The Illustrative Example of the Long-Route Scenario

Based on Equations (1)–(5), an initial mathematical model of return loading rate problem can be obtained by using entries of columns (1) to (5) in Table 4. According to the initialization in Figure 1, the initial solution is 1-6-4-7-8-13-10-11-9-1 in the Long-Route scenario. In Table 4, due to the initial, random Long-Route pass through 10 cities, we measure *M*1,10 = city 6 + city 4 + city 8 = 11 + 20 + 15 = 46, *M*2,10 = city 10 + city 11 + city 9 = 6 + 10 + 5 = 21, *NV*<sup>10</sup> = 46/20 = 2.3 and maps *NV*<sup>10</sup> to the least integer = 3. Finally, *RLR*<sup>1</sup> = [1 − (3 · 20 − 21)/(3 · 20)] · 100% = 35%. The initial distance from city 1 = 19 + 6 + 3 + 3 + 4 + 8 + 4 + 6 + 20 = 73 km and iteration 1 is completed.

Finally, we execute the step of the repeat and stop rule from the Sub-Tour reversal algorithm until iteration 6 is completed to find the optimal solution. When there is no path to reverse to improve the current solution in iteration 6 as 1-6-4-7-8-13-11-10-9-1, stopping and accepting the best answer of the distance is 70 km, and *RLR*<sup>1</sup> is 35% as the current optimal solution. We detail all the iterations in Table 4. The current optimal Long-Route in phase 1 is obtained; however, the return loading rate is not in excess of 50%. Then, we perform the following TOC model to optimize the return loading rate problem. The TOC finds the CCR city through the current, optimal Long-Route, where the demand city with the lowest single return loading rate is. According to Equation (6), *Ln* can be calculated in column 4 of Table 3. We get the following result:

$$\tau\_{10} = \text{Min}\left\{ \text{-, } 30\%, \ 45\%, \ -, \ 40\%, \ -, \ 50\%, \ 30\%, \ 25\%, \ - \right\} = 25\% = \text{city 9.}$$

In order to substitute CCR city, we use non-CCRs cities 4 and 5 successively to replace CCR city 9 in iteration 6. Then, we obtain iteration 7 as 1-6-5-7-8-13-11-10-4-1. The solution of the total transport distance is 72 km and the current best *RLR*<sup>7</sup> is 60%, more than 50%. Thus, we obtain the optimize solution as 1-6-5-7-8-13-11-10-4-1 from the initial solution as shown in Figure 2.


**Table 1.** Distances distribution of five provinces in northwest China (km = 1:80).

Note (1): The 15 cities are (1) Wu-lu-mu-qi, (2) Ka-shi, (3) I-li, (4) Xi-ning, (5) Hai-nan, (6) Hai-xi,(7) Lan-zhou, (8) Tian-shui, (9) Wu-wei, (10) Yin-chuan, (11) Gu-yuan, (12) Zhong-wei, (13) Xi-an, (14) Bao-ji, (15) Yan-an. Note (2): Nodes 1, 7, and 13 as our distribution centers.

> **Table 2.** The demands of the forward and return cities of the uniform distribution in the Monte Carlo simulation.


**Table 3.** The demands of the forward and return cities of the Long-Route example in the Monte Carlo simulation.


Note: Exclusive of nodes 1, 7, and 13 as our distribution centers.

**Figure 2.** The optimizing solution of Long-Route scenario in TOC (Km = 1:80).


**Table 4.** The illustrative example of the Long-Route in TOC model.

4.2.2. The Illustrative Example of the Short-Route Scenario

To introduce our proposed solution procedure, we demonstrate the Short-Route in Table 5, where we denote *An* as 8 demanding cities: 4, 7, 9, 10, 11, 12, 13, 15. Now, suppose that the initial solution is 7-9-10-15-12-11-13-7 in the Short-Route scenario. In Table 6, due to the initial, random Short-Route pass through 8 cities, we measured *M*1,8 = city 9 + city 10 + city 15 + city 12 + city 11 = 80, *M*2,10 = city 7 = 0, *NV*<sup>8</sup> = 80/20 = 4, and maps *NV*<sup>8</sup> to the least integer 4. Finally, *RLR*<sup>1</sup> = [1 − (4 · 20 − 0)/(4 · 20)] · 100% = 0%. The initial distance from city 7 is 37 km, and iteration 1 is complete. Finally, we perform the Sub-Tour reversal algorithm until iteration 5 is done to find the optimal solution. When there is no path to reverse to improve the current solution in iteration 5 as 7-9-10-12-15-13-11-7, stopping and accepting the best answer of the distance is 32 km, and *RLR*<sup>1</sup> is 23.75% as the current optimal solution. We present all the iterations in Table 6. The current optimal Short-Route in phase 1 is obtained; however, the return loading rate of more than 50% is not met. We perform the TOC model to optimize the return loading rate problem. The TOC finds the CCR city through the current optimal Short-Route, where the demand city is with the lowest single return loading rate in Table 5. Then, we get the following:

$$\pi\_8 = \text{Min}\left\{ \text{-, } 15\%, \text{ 25\%, 30\%, 35\%, -, 35\%, -} \right\} = 15\% = \text{city 9.}$$

In order to avoid CCR cities, we use non-CCR city 4 to replace CCR city 9 in iteration 6. We obtain iteration 6 as 7-4-10-13-15-12-11-7. The solution of the total transport distance is 36 km and the current best *RLR*<sup>6</sup> is 47.5%, somehow less than 50%. Thus, we obtain the optimal solution as 7-4-10-13-15-12-11-7 from the initial solution as shown in Figure 3.

**Table 5.** The demands of the forward and return cities of the Short-Route example in the Monte Carlo simulation.



**Table 6.** The illustrative example of the Short-Route in the TOC model.

**Figure 3.** The optimizing solution of Short-Route scenario in TOC (km = 1:80).

#### 4.2.3. Discussion

To solve the return loading rate problem, this study further investigates the Long-Route and Short-Route scenarios. In the Long-Route scenario, Table 3 shows the demands of the forward and return cities, adopting the Monte Carlo simulation. To substitute CCR city 9, we use non-CCR city 4 with a loading rate of 50%, successively, to replace CCR city 9 with a loading rate of 25% and then determine a feasible solution that leads to the highest return loading rate of 60%. In Table 4, after iteration 6 of the Long-Route, the current best distance is 70 km, which is less than 73 km in the initial solution. This can be achieved by using the Sub-Tour reversal model and indicates a 4.1% reduction from the initial solution. However, the current best return loading rate (*RLR*6) remains the same as in the initial solution, i.e., 35%. The expected goal of a return loading rate of more than 50% is not achieved by using the Sub-Tour reversal model. Therefore, we introduce the TOC model to optimize the return loading rate. By using the TOC model, we remove CCR city 9 and replace it with the higher return loading rate, i.e., non-CCR city 4. The final results indicate that as we consider the CCR city, the distance and its return loading rate are higher than the initial solution and outperform the Sub-Tour reversal model. In Figure 2, we obtain the optimal Long-Route, starting from Wu-lu-mu-qi (city 1) to Hai-xi (city 6), Hai-nan (city 5), Lan-zhou (city 7), Tian-shui (city 8), Xi-an (city 13), Gu-yuan (city 11), Yin-chuan (city 10), Xi-ning (city 4) and returning to Wu-lu-mu-qi (city 1). The optimal Long-Route derives the total transport distance of 72 km with the best return loading rate of 60%. In the Short-Route scenario, Table 5 shows the demands of the forward and return cities by applying the Monte Carlo simulation. To substitute CCR city 9, we use non-CCR city 4 with a loading rate of 45%, successively, to replace the CCR city 9 with a loading rate of

15% and then determine a feasible solution that leads to the highest return loading rate of 47.5%.

In Table 6, after iteration 1 of the Short-Route, the current best distance decreases from the initial solution of 37 km to 32 km. The current best return loading rate increases from the initial solution of 0% to 23.75%, for a 23.75% improvement via the Sub-Tour reversal model. With the goal of improving the return loading rate to more than 50%, this study achieves the goal by using the TOC model because of the final loading rate being 47.5%. The former route can be derived by the Sub-Tour reversal model but fails to meet expectations according to the results of a distance of 32 km and a return loading rate of 23.75%. Accordingly, this study achieves its goal by using the TOC model such that the final results can be a distance equal to 36 km and a return loading rate equal to 47.5%. In Figure 3, we obtain the optimal Short-Route starting from Lan-zhou (city 7) to Xi-ning (city 4), Yin-chuan (city 10), Xi-an (city 13), Yan-an (city 15), Zhong-wei (city 12), Gu-yuan (city 11) and returning to Lan-zhou (city 7). The optimal Short-Route gets the total transport distance of 36 km with the best return loading rate of 47.5%.

To see our model capability, this paper utilizes the simulation data to validate the TOC model and adopts the Monte Carlo simulation method to test the deriving solutions. Based on the resulting outcomes in Tables 7–9, the TOC model effectively obtains the best routes design. Later, we discuss the simulation and its statistics in detail.

#### 4.2.4. The Simulation and Its Statistics

Furthermore, this paper utilizes the simulation data to validate our model and adopts the Monte Carlo simulation method, following the uniform distribution in Table 2 to test the deriving solutions. It simulates 30 replications of datasets for certain demand cities (*An*) 10 and 8, forward (*an*) with a range between 10 and 20 tons and a return (*bn*) with a range between 1 and 10 tons in Table 2. By our proposed model, we summarize our results as shown in Tables 7 and 8.

We know that the average return loading rate derived by the Sub-Tour reversal model is 24.07% and by TOC model, it is 67.33%, based on northwest China's Long-Route scenario shown in Table 7. This study further employs the pair t-test to see whether the mean difference is significant or not. Based on the data, the t statistic is 18.3190 and the p value is less than 0.05. It means that there exists a significant difference among the two models, and our model leads to an improvement of 43.26% compared to that obtained by the Sub-Tour reversal model. Following the same procedure, the TOC model results in an improvement of 44.02%, comparing to that obtained by the Sub-Tour reversal model from the Short-Route scenario in Table 8. The t statistic is 11.0204 and the p value is less than 0.05. Obviously, our proposed solution procedure can be applied to solve the return loading rate problem in an efficient manner. The resulting outcomes are arranged in Table 9. By the resulting outcomes, our proposed solution procedure successfully integrates the Sub-Tour reversal model and TOC. The results show the superiority of the TOC model in solving issues in logistics and answering the question mentioned by previous studies (see Schragenheim and Dettmer [24]; Lee et al. [13]; Chang and Huang [14]; Benavides and Landeghem [25]; Chakravorty and Hales [26]). The TOC model achieves the logistics goal for increasing the return loading rate by increasing by more than 50%. Logistics companies would benefit substantially from the application of the TOC model.


**Table 7.** The 30 replications simulation results of the Long-Route scenario in the Monte Carlo simulation.

**Table 8.** The 30 replications simulation results of the Short-Route scenario in the Monte Carlo simulation.



**Table 8.** *Cont.*

**Table 9.** The pair t-test result.


#### **5. Conclusions**

This study intends to propose a solution procedure to reduce the total transportation distance and to improve the return transportation vehicle loading rate by more than 50% in northern China. Our research contributes to developing the model considering two factors: the total transportation distance and the return loading rates of transport vehicles, which are different from previous studies mainly focusing on minimizing total logistics costs. The TOC model further optimizes the results of the Sub-Tour reversal method to determine the degree of improvement resulted from the TOC model. Based on bottleneck orientation, this paper broadens the view of the existing research field. We integrated the Sub-Tour reversal model and the TOC methodology, as the two-phase solution procedure solves the problem of the return loading rate. Usually, the Sub-Tour reversal model is applied to solve the minimization transportation distance problem. Our model adopts the deriving results of the Sub-Tour reversal model as the initial solution. Next, we applied the TOC model, employing the CCR concept to further optimize the current solution since the TOC model can quickly locate the CCR city (i.e., lowest return loading rate) and accurately find the limitations of the route. It should be noted that to find the optimal solution by maximizing the utility of the CCR in this study means replacing the CCR city with a non-CCR. In order to demonstrate our model capability, we further utilized two scenarios and employed the Monte Carlo simulation. In the northwest logistics network design, as presented in

Tables 7 and 8, the return loading rate is significantly improved by our proposed solution procedure, and this shows that our proposed model outperforms the conventional Sub-Tour reversal method. Note that our solution procedure can be implemented in real-world situations in a simple manner. The limitations of the study are calculating the total logistics costs of the optimized transportation distance. For future work, we suggest a number of issues for future researchers. (1) Our research investigated the deterministic manner. For future investigations, we may take uncertainty factors into account. (2) Our future model would further consider other factors, such as environmental protection, carbon pricing or emission. (3) In this research, we integrated the Sub-Tour reversal model with TOC. We can employ other approaches in future research.

**Author Contributions:** W.-T.H. contributed to manuscript preparation, experiment planning, and experiment measurements. C.-C.L. contributed to literature review and reviewer comments review. J.-F.D. contributed to data analysis, review and editing. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Ministry of Science and Technology of Taiwan under Grant 109-2222-E-035 -007-.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


## *Article* **A Kronecker Algebra Formulation for Markov Activity Networks with Phase-Type Distributions**

**Alessio Angius 1, András Horváth 2,\* and Marcello Urgo <sup>3</sup>**


**Abstract:** The application of theoretical scheduling approaches to the real world quite often crashes into the need to cope with uncertain events and incomplete information. Stochastic scheduling approaches exploiting Markov models have been proposed for this class of problems with the limitation to exponential durations. Phase-type approximations provide a tool to overcome this limitation. This paper proposes a general approach for using phase-type distributions to model the execution of a network of activities with generally distributed durations through a Markov chain. An analytical representation of the infinitesimal generator of the Markov chain in terms of Kronecker algebra is proposed, providing a general formulation for this class of problems and supporting more efficient computation methods. This entails the capability to address stochastic scheduling in terms of the estimation of the distribution of common objective functions (i.e., makespan, lateness), enabling the use of risk measures to address robustness.

**Keywords:** stochastic makespan; markov activity network; phase-type distribution

#### **1. Introduction**

In the application of scheduling to real planning problems, such as industrial production, research and development, or software development, uncertainty or incomplete information are inevitably present. Deviations from what was planned can be due to a wide range of possible disturbances, both internal and external, affecting the execution of the scheduled activities. Among the most common source of disturbances are activities taking more or less than originally estimated, machine breakdowns, worker absenteeism, delayed supplies of materials and/or components, and so forth. A disrupted schedule quite often entails a cost due to missed due dates, resource idleness, a higher work-in-process inventory, or scarce utilization of the available resources.

Scheduling approaches should be able to cope with this uncertainty, such as exploiting stochastic models [1]. A specific class of approaches aims at providing a robust schedule, such as a schedule incorporating a protection, at least to a certain extent, against the possible occurrence of uncertain events. Robust scheduling approaches are based on a stochastic model for the objective function to optimize, and quite often require the calculation of the associated stochastic distribution. Nevertheless, this is a difficult problem to solve; hence, many approaches have been proposed to provide exact estimations, approximations, bounds or heuristic methods to cope with this problem. In this paper, grounded on the results in [2], we exploit a Markov chain to model the execution of a stochastic program evaluation and review technique (PERT) network; moreover, exploiting the approximation of phase-type (PH) distributions, we extend this model to generally distributed durations of the activity and general phase-type forms, thus generalizing the preliminary formalization described in [3] through the Kronecker algebra. This formal approach allows significant

**Citation:** Angius, A.; Horváth, A.; Urgo, M. A Kronecker Algebra Formulation for Markov Activity Networks with Phase-Type Distributions. *Mathematics* **2021**, *9*, 1404. https://doi.org/10.3390/ math9121404

Academic Editors: Chin-Chia Wu and Win-Chin Lin

Received: 1 June 2021 Accepted: 12 June 2021 Published: 17 June 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

benefits in comparison with the existing approaches in the literature exploiting phasetype approximations [3–6]. In fact, it allows the embedding of PH distributions that are able to reach high/low coefficients of variations and higher-moment-matching with a number of phases that are smaller, compared to other phase-type subclasses. In addition, it provides a compact expression of the infinitesimal generator of the resulting continuous time Markov chain (CTMC), exploiting Kronecker algebra, without the need of explicitly enumerating all the possible states. Thank to this, it is possible to tackle the problem avoiding an uncontrollable increase of the dimension of the state space governing the Markov chain, which is typical when phase-type distributions are used to model multiple activities executed in parallel. Moreover, this also supports the definition of efficient and modular calculation strategies to solve the Markov chain and, hence, estimate the distribution of its time to absorption, that is, the makespan of the PERT network [7–9]. A test of the proposed approach and calculation method is provided, to assess the possibility to use phase-type distributions to approximate generally distributed stochastic durations with a reasonable number of phases.

The paper is organized as follows: Section 2 addresses the related literature, Section 3 describes Markov activity networks, while Sections 4 and 5 address phase-type distributions and their embedding in Markov activity networks, respectively. Section 6 shows how to deal with phase-type distributions in Markov activity networks using Kronecker algebra, and in Section 7 we report on several numerical experiments with the proposed approach. The paper is concluded in Section 8.

#### **2. State of the Art**

The literature related to stochastic scheduling mostly addresses scheduling problems where the duration of the jobs are modeled as random variables. A first class of approaches focuses on analytical approaches, with the aim of developing proper scheduling policies. To this aim, different classes of policies have been investigated together with their performance in the stochastic version of the considered scheduling problem. With the aim not to constrain the analysis to specific scheduling problems, we will address the project scheduling approaches as a generalization of any schedule problem. A network of activities with stochastic durations is often referred to as a stochastic PERT network. In this field, *preselective* policies have been proposed in [10,11] and further developed in [12]. Based on these theoretical results, specific dominance rules have been proposed by [12,13] and exploited by [13] in branch-and-bound algorithms for the optimization of the expected makespan.

Although being a reasonable objective function, the expected value of the makespan, as well as any other objective function addressed in terms of its expected value, does not entirely model the stochastic nature of the problem. In fact, minimizing the expected makespan aims at ensuring an average good performance, but does not protect against the worst case scenario if their probability is low [14–17]. A balanced compromise between values and the impact of rare but unfavourable events typically requires knowledge of the distribution of the objective function under study.

However, this problem has been demonstrated to be hard to solve in general [18]; hence, numerous approaches have been proposed to provide proper bounds to the distribution function [19,20]. For this reason, heuristics approaches for this class of problems have been proposed by many authors, where some examples are [21,22].

Under the hypothesis that the durations are independent and exponentially distributed, ref. [2] developed an exact approach for the calculation of the distribution of the makespan using a continuous-time Markov chain (CTMC) model. This approach has been a starting point for the work of many authors [23,24] exploiting the exponential distribution to support the analysis of the execution of the activities in the network in terms of net present value (NPV).

A different approach is to include in the model phase-type (PH) distributions which allow to approximate the behavior of general distributions by preserving the Markov property. Their use to provide an approximation to generic distributed activity durations

in terms of a mixture of exponential distributions have been addressed by [25] and further developed in [3], where a preliminary analytical formulation of the problem has been provided for a generic network of activities. A further step to develop a framework based on PH distributions was taken in [26], which is the starting point of this article. Similar concepts have been used in [5,6] including resource constraints. Nevertheless, the author limits the analysis to phase-type subclasses (i.e., Cox and Erlang). Although these subclasses are capable of approximating a wide range of distributions, they cannot cope with high/low coefficients of variations and higher-moment-matching with a limited number of phases.

The use of PH distributions is interesting, since they allow the fitting of non-Markov distributions by means of Markov chains. Hence, PH distributions can be used as building blocks for the construction of Markov processes that embed generally distributed transitions instead of exponential only. Since PH distributions are fully described by a Markov chain, they preserve the Markov property, although the model dynamics are not memoryless anymore. As a consequence, the resulting model is able to match more realistic cases, but can still be modeled and solved using numerical methods designed for Markov chains whose performances are good from a computational point of view.

The class of PH distributions is dense in the field of distributions with a positive domain, that is, any distribution in this class can be approximated by PH distributions with any given accuracy, provided that a suitable number of phases is used. This fact, however, does not directly provide a practical method to fit distributions by PH distributions. Several authors proposed fitting methods, and most of these fall into two categories: maximum likelihood (ML)-based estimation of the parameters and moment-matching techniques.

One of the first works on ML estimation considered acyclic PH distributions [27], while an approach for the whole family, based on the expectation-maximization method, is proposed in [28]. Since these early papers, many new methods and improvements have been suggested for the whole PH family and for its sub-classes.

For what concerns moment-matching, for low-order (≤3) PH distributions, moment bounds and moment-matching formulas are either known in an explicit form, or there exist iterative numerical methods to check if given moments can be captured [29,30]. For higherorder ones, there exist matching algorithms, but these often result in improper density functions and the validity check is a non-trivial problem.

In [31], a simple method is provided that constructs a minimal-order acyclic PH distribution given three moments. Tool support is available for the construction of PH and ME distributions. Specifically, ML-based fitting is implemented in the software package PhFit [32], and a set of moment-matching functions is provided in the software package BuTools [33].

Although promising and useful in modeling general distributions for activity durations, the approximation through phase-types also has drawbacks. The main one is the considerable increase in terms of number of phases and, consequently, in terms of the states of the comprehensive Markov chain and the associated computational time. To cope with this issue, the use of Kronecker algebra to formalize the Markov model allows the exploitation of numerical methods able to operate the computation of the models without the need to explicitly build the whole infinitesimal generator [7–9].

#### **3. Markov Activity Networks**

The presented formulation of the scheduling problem grounds on the the formalization proposed in [2] to define a Markov activity network (MAN), that is, a Markov model describing the execution of a set of different activities whose durations follow an exponential distribution and are linked by precedence relations. Given that (i) the durations of the activities are mutually independent and (ii) exponentially distributed, the execution of the activity network can be represented through a CTMC.

The model is conveniently described by means of an Activity-on-Arc (AoA) network (V, E) where V is a set of vertices describing the precedences and E is a set of edges corresponding to the activities. The number of vertices is denoted with *N*, whereas *K* refers to the number of edges. Since each edge corresponds to an activity, the total number of activities composing the task is equal to *<sup>K</sup>* as well. Given a vertex *<sup>v</sup>*, <sup>A</sup><sup>+</sup> *<sup>v</sup>* and A<sup>−</sup> *<sup>v</sup>* indicate the set of incoming and outgoing edges, respectively.

The graph also contains one root vertex without ingoing arcs (A<sup>+</sup> *<sup>v</sup>*<sup>1</sup> = ∅) and one termination vertex without outgoing arcs (A<sup>−</sup> *vN* = ∅). These two vertices are connected by at least one path, while no cycle can exist in the whole network to guarantee the network to be acyclic. In the following, the root vertex will be referred to as *v*<sup>1</sup> and the termination vertex as *vN*. The semantic of the model is such that:


To provide an example, let us consider the activity network in Figure 1 with four vertices and five arcs, that is, modelling the processing of five activities. The execution of the network starts with the parallel processing of activities 1 and 2, since they belong to A<sup>−</sup> *v*1 . As activity 1 is completed, activities 3 and 4 can start since vertex <sup>A</sup><sup>+</sup> *<sup>v</sup>*<sup>2</sup> only contains activity 1. Activity 5 can start only if both 2 and 3 have been completed, because <sup>A</sup><sup>+</sup> *<sup>v</sup>*<sup>3</sup> contains 2 and 3. Finally, when activities 4 and 5 are completed, the entire network is also completed because vertex *v*<sup>4</sup> does not have any outgoing arc.

**Figure 1.** An activity network.

Because of the assumptions described above, the dynamics of an activity network can be described by a discrete-state stochastic process whose state corresponds to a vector **s** = |*s*1, ... ,*sK*| where each entry *si*, 1 ≤ *i* ≤ *K* refers to an activity and can assume the values *Pending* (*P*), *Running* (*R*), and *Terminated* (*T*). Entry *si* is equal to *P* if activity *i* is waiting for its predecessors to complete and be allowed to start; it is equal to *R* if activity *i* is being executed; finally, it is equal to *T* if activity *i* has been completed.

The execution of the activities in the network can be modeled through a sequence of states whose transitions are triggered by the completion of a single activity and the number of transitions that departs from a state **s** is always equal to the number of activities that are running in **s**. Let *f*(**s**, **s** , *i*) be an indicator function that is equal to one when a transition between a state **s** and a state **s** is possible by means of the termination of the *i*th activity. Then, we have:

$$f(\mathbf{s}, \mathbf{s}', i) = \begin{cases} 1 & (\mathbf{s}\_i = R \wedge s\_i' = T) \wedge\_{\mathbf{j} \neq i} \left[ (\mathbf{s}\_j = s\_j') \vee (\mathbf{s}\_j = P \wedge s\_j' = R \wedge d(\mathbf{s}, j) = \{i\}) \right] \\\ 0 & otherwise; \end{cases} \tag{1}$$

where *d*(**s**, *j*) is a function that returns the set of activities that have to be completed to start activity *j* but are not yet finished in state **s**. The condition in Equation (1) consists of two terms. The first term, (*si* = *R* ∧ *s <sup>i</sup>* = *T*), refers to the activity that causes the transition, therefore activity *i* must be running in **s** and it must be finished in state **s** . The second term refers to all the other activities defining two possible compatible scenarios. The first one, (*sj* = *s j* ), refers to activities not changing their status moving from **s** to **s** , that is, running activities keep running while completed activities remain completed. Nevertheless, the start of some activities could be triggered by the completion of activity *i*, hence, (*sj* = *P* ∧ *s <sup>j</sup>* = *R*) ∧ *d*(**s**, *j*) = {*i*} states that there could be an activity *j* moving from state *P* to *R*, but this is possible only if activity *i* was the only one blocking the start of activity *j*.

The state transition graph of the stochastic process can be generated based on the conditions in (1). Specifically, starting from an initial state where all the activities are pending but those in <sup>A</sup><sup>+</sup> *v*1 , all the possible states can be generated enumerating the completion of each of the running activities, one at time. As all the states have been generated, the procedure necessarily reaches the ending state where all activities are terminated and stop.

Figure 2 provides an example of the state transition graph for the network in Figure 1. Within each node, the status of the system is defined, for example, the node on the right is the starting node where activities 1 and 2 are running, while the others are pending, that is, |*R*, *R*, *P*, *P*, *P*|. The labels on the arcs indicate the activity, hence, the arc labeled with 1 connects the state with the one representing the state of the system when activity 1 has been completed; that is, activity 4 and 5 can start and the new state is labeled as |*T*, *R*, *R*, *R*, *P*|. The last state on the right is the absorbing one, where all the activities are completed, |*T*, *T*, *T*, *T*, *T*|.

The state transition graph in Figure 2 has some properties: (i) it contains all the possible paths between the initial state and an absorbing one where all the activities are completed; (ii) the length of these paths is constant and equal to *K* because each of these paths represent a different ordering for the completion of the activities in the network; (iii) the graph does not contain cycles and all its states are transient, except for the absorbing one |*T*, *T*, ... , *T*|.

**Figure 2.** State transition graph of the stochastic process for the network of activities in Figure 1.

As claimed at the beginning of the paragraph, under the assumption that the durations of the activities are modelled with exponential distributions, that is, X*<sup>i</sup>* ∼ *exp*(*λi*), 1 ≤ *i* ≤ *K*, where 1/*λ<sup>i</sup>* is the average time of the activity and the activity network is a MAN. The state transition graph in Figure 2 is the support for the definition of a CTMC whose dynamics are described by a set of ordinary differential equations with cardinality equal to the number of states composing the process.

Assuming *π*(**s**, *t*) to be the probability to find the process in state **s** at time *t*, each equation has the following structure:

$$\frac{d\pi(\mathbf{s},t)}{dt} = -\sum\_{\forall i:\ s\_i=\mathcal{R}} \pi(\mathbf{s},t)\lambda\_i + \sum\_{\forall \mathbf{s'},i:\ f(\mathbf{s},\mathbf{s'},i)=1} \pi(\mathbf{s'},t)\lambda\_i. \tag{2}$$

Assuming that all the state probabilities *π*(**s**, *t*) are collected in a vector *π*(*t*) and all the transitions are grouped in an infinitesimal generator matrix *Q*, the solution of the ODE system described in Equation (2) is given by *π*(*t*) = *π*(0) exp(*tQ*) and the entry of *π*(*t*) that corresponds to *π*(|*T*, *T*, ... , *T*|, *t*) contains the cumulative distribution of the time to absorption of the CTMC, that is, the distribution of the makespan of the network of activities. The term *π*(0) is the initial probability vector whose entries are all equal to zero, but the one referring to the initial state whose probability is 1.0. The function exp(•) is the matrix exponential, whose computation is a common problem whose solution can take advantage of a wide range of efficient and numerically safe methods (e.g., [34]).

As an example, Table 1 reports the infinitesimal generator for the model in Figure 1. The infinitesimal generator is a matrix describing the state transition graph in Figure 2. For each possible transition from a state to another, the infinitesimal generator contains the rate of the activity causing the transition. The values on the diagonal, on the contrary, correspond to the sum of all the rates going out from the state called intensity. The initial activities are 1 and 2, thus, the initial state is |*R*, *R*, *P*, *P*, *P*|, with *π*(|*R*, *R*, *P*, *P*, *P*|, 0) = 1, since it is the only nonzero entry of *π*(0).

**Table 1.** Infinitesimal generator of the CTMC describing the execution of the activity network in Figure 1. Due to space constraints, row labels have not been included (the order of the rows is the same as that of the columns). For the same reason, commas have not been used to separate the entries of each state.


Although it provides a considerable advantage in terms of computation, the restriction to exponentially distributed activity durations represents a limiting hypothesis, specifically in the application to real industrial processes and, hence, to scheduling.

In the following, we present an extension of a classical MAN taking advantage of methods available for CTMCs by using a class of distributions able to approximate general distributions with arbitrary accuracy.

#### **4. Phase-Type Distributions**

In the field of Markov models, phase-type (PH) distributions are widely used to provide an approximation of a general distribution. Basically, a set of inter-related exponential delays are put together to approximate a general distribution. Formally, a continuous-time PH distribution is the distribution of the time to absorption of a CTMC, and its order is given by the number of the contained transient states. Consequently, the PH distribution is defined through a vector *β*, providing the initial probabilities of the transient states and a matrix *T* containing the intensities of the transitions among the transient states.

The cumulative distribution function is given by

$$F(\mathbf{x}) = P\{X \le \mathbf{x}\} = 1 - \beta e^{T\mathbf{x}} \mathbf{1} \tag{3}$$

whereas the probability density function corresponds to

$$f(\mathbf{x}) = \beta e^{\mathbf{1}^{\mathbf{x}}}(-T)\mathbf{1}.\tag{4}$$

The *i*-th moment of a PH distribution is equal to

$$m\_i = i! \beta (-T)^{-i} \mathbb{1},\tag{5}$$

where 1I denotes a column vector of ones of the same dimension of the *T*.

PH distributions provide a way to fit a general distribution with a certain degree of accuracy. It must be noted that a MAN can be seen as a PH distribution; in fact, the time to absorption in a MAN, usually not exponentially distributed, is represented through a structure of exponential delays (the execution of each activity) with mutual interactions (precedence relations among the activities).

As an example, let us consider the CTMC in Figure 3 with four states, three transient and one absorbing, whose initial probabilities and infinitesimal generator are:


The entries of *α* must sum up to one, while the sum of the elements in a row of *Q* must be equal to zero. Thus, the representation (*α*, *Q*) for this PH distribution is redundant. A non-redundant representation can be obtained by considering the transient states only, resulting in:

$$\beta = \begin{vmatrix} 0.5 & 0.2 & 0.3 \end{vmatrix}, T = \begin{vmatrix} -0.7 & 0.2 & 0.5 \\ 1.2 & -2.95 & 1.5 \\ 2 & 1 & -3.5 \end{vmatrix} \tag{6}$$

The structure of the generator *T* determines the class of the PH distribution and its capability to catch the moments of the distribution to approximate [35,36]. An exhaustive description of the possible classes of PH distributions is beyond the scope of this paper. Nevertheless, it is important to point out that the method presented in the next section supports the use of any class PH distribution without limitations.

**Figure 3.** Graphical representation of an order of three PH distributions (**left**) and its probability density function (**right**).

#### **5. Markov Activity Networks Enhanced with PH Distributions**

In this section, we extend the formalism of MAN to embed the use of PH distributions and cope with non-exponential durations of the activities, while keeping the advantages provided by a CTMC model. We assume that the processing time of an activity *i* is distributed according to a PH distribution with representation (*βi*, *Ti*), 1 ≤ *i* ≤ *K*. Additionally, in this case we assume that durations of the activities are mutually independent.

Due to this hypothesis, the structure of the CTMC modeling the execution of the activities is more complicated, because every state of the original model has to be expanded to consider the sub-states related to the PH model, that is, the aging of the activities in process. Thus, the execution of the activities progresses according to two levels: a macro level characterized by the completion of the activities, triggering the start of the execution of new ones; and the progress among the phases of the PH distribution of each activity during its execution.

The dynamics of the process modeling the execution of the MAN is still governed by an ODE system, but the probability of a single state evolves over time, according to the following differential equation:

$$\frac{d\pi(\mathbf{s},t)}{dt} = \pi(\mathbf{s},t)D(\mathbf{s}) + \sum\_{\forall \mathbf{s'},i:\ f(\mathbf{s},\mathbf{s'},i)=1} \pi(\mathbf{s'},t)O(\mathbf{s'},\mathbf{s},i). \tag{7}$$

where *D*(•) and *O*(•, •, •) are matrices describing the transitions within a single state and between two states, respectively. In particular, *D*(**s**) describes the aging of the PH distributions within state **s**, that is, the parallel execution of activities that are being processed in **s**. In more detail:

$$D(\mathbf{s}) = \bigoplus\_{\forall i: s\_i = R} T\_i$$

where is the Kronecker sum operator. On the contrary, matrix *O*(**s** , **s**, *i*) describes the dynamics triggered by the completion of an activity *i* and the consequent transition from state **s** to state **s**. Thus, the matrix embeds the dynamics related to:


In formulas, this corresponds to:

$$O(\mathbf{s}', \mathbf{s}, i) = \bigotimes\_{\forall j \in \mathcal{V}} R\_j \text{ with } R\_j = \begin{cases} \mathfrak{t}\_j & \text{if } j = i \\ \beta\_j & \text{if } j \neq i \wedge s'\_j = P \wedge s\_j = R \\\ I\_j & \text{if } j \neq i \wedge s'\_j = R \wedge s\_j = R \\\ 1 & \text{otherwise} \end{cases} \tag{8}$$

In Equation (8), denotes the Kronecker product operator iterated over all the activities in V, and *Ij* is an identity matrix whose size is equal to the order of the PH distribution associated with activity *j*, and *tj* = −*Tj*1I.

The value of *Rj* in Equation (8) is different according to the status of the considered activity *j* in **s** and **s**. If *j* = *i*, then activity *j* is the one that has been completed, and *Rj* = *tj* is a vector that contains the "finishing" intensities of the PH distribution associated to activity *j*.

If activity *j* is starting later due to the completion of activity *i*, then *Rj* coincides with the initial vector of the PH distribution (*βj*).

If activity *j* is running in both **s** and **s**, *Rj* is equal to the identity matrix *Ij*.

Finally, if activity *j* is not active in both **s** and **s**, *Rj* is equal to 1 and has no impact in the Kronecker product.

The initial probability vector of the ODE system requires some reformulations. In fact, it is now composed of multiple blocks corresponding to phases of the PH distributions, and it must take into consideration the fact that each of them has its own initial vector.

Let us assume that **s**<sup>∗</sup> is the initial state; then *π*(**s**∗, 0) is equal to *j*:*s*∗ *<sup>j</sup>* <sup>=</sup>*<sup>R</sup> β<sup>j</sup>* and coincides with the nonzero entries of the initial vector *π*(0).

The infinitesimal generator for the network in Figure 1, where PH distributions are used for all the activities, is reported in Table 2. The structure of the matrix is the same as the exponential case (Table 1). However, the matrix contains sub-matrices instead of scalar values. Matrices *D* are placed on the diagonal, since they describe the dynamics within a given state, where one or more activities are in progress. Matrices *O* are placed out of the diagonal, describing the dynamics of the transitions between states.

If we consider state |*R*, *R*, *P*, *P*, *P*|, *D*(|*R*, *R*, *P*, *P*, *P*|) = *T*1⊕*T*2, modeling the superposition of the PH distributions active in that state, that is, the ones associated to activities 1 and 2. Additionally, if we consider the transition between state |*R*, *R*, *P*, *P*, *P*| and |*T*, *R*, *R*, *R*, *P*|, this is caused by the completion of activity 1, but it must also keep the memory of the PH distribution of activity 2 (the associated sub-states remain the same during the transition). Moreover, the completion of activity *i* also triggers the start of activities 3 and 4. Thus, *O*(|*R*, *R*, *P*, *P*, *P*|, |*T*, *R*, *R*, *R*, *P*|, 1) = *t*<sup>1</sup> ⊗ *I*2⊗*β*3⊗*β*4, with *t*<sup>1</sup> containing the rates characterizing the completion of activity 1, *I*<sup>2</sup> keeps the memory of activity 2; *β*<sup>3</sup> and *β*<sup>4</sup> initialize the PH distributions of activities 3 and 4. The initial activities for the whole network are 1 and 2, thus, *π*(|*R*, *R*, *P*, *P*, *P*|, 0) = *β*<sup>1</sup> ⊗ *β*2. Finally, it is important to point out that the Kronecker sum and the Kronecker product do not have the commutative property, hence, the order of the operations must be preserved.

**Table 2.** Infinitesimal generator of the CTMC enhanced with PH distributions describing the model in Figure 1.


#### **6. A Kroncker Algebra Approach for a Markov Activity Network with PH Distributions**

There are several reasons supporting the use of a structured approach based on Kronecker algebra for the formal description of a Markov activity network enhanced through PH distributions. The first one, as stated in [37] with respect to matrix-geometric solutions for stochastic models, is to ensure that the models are in the best and most natural form for numerical computation. For this reason, although unstructured approaches have been proposed to expand the state space of a CTMC with additional states to mimic the behaviour of PH distributions [4,5], these are practicable only for a subset of PH distributions having a simple structure, such as the Coxian, the Erlang, or the Hyper-Exponential.

These approaches also quickly become unfeasible for certain classes of acyclic phasetypes as, for instance, the Hyper-Erlang, which corresponds to a mixture of Erlang distributions having a different number of phases. Due to their structure, the Hyper-Erlang is

extremely sparse and the tracking of each chain of states is not straightforward, already with a small number of phases. Despite this, their use is fundamental for the fitting of empirical data which are often characterized by irregular shapes and multi-modalities. These situations are often troublesome for the approaches based on moment-matching, because: (i) the moments might not satisfy the bounds of the PH class; (ii) a proper characterization of the shape of the distribution might be preferable to an exact estimation of the first *N* moments (see [38] for a detailed description of these cases).

Although such cases may seem pure theoretical speculations, their relevance in the modeling of real industrial cases is rather common. An example is manually executed activities, whose duration, as long as the execution goes smoothly, can be easily modeled through simple distributions. On the contrary, the occurrence of possible problems in their execution causes the duration to increase, and the probability distribution fitting the processing times is likely to be multi-modal. In such cases, simply fitting the first two (or three) moments does not provide a reasonable approximation, and different classes of PH distributions could be needed.

Figure 4 provides a graphical example of a case where moment-based approaches exploiting an acyclic PH are outperformed by a different fitting approach, namely a Hyper-Erlang distribution obtained through Hyper-\* [39], a tool that couples clustering approaches with methods for the fitting of phase-type distributions. Figure 4 shows how the momentbased approaches fail in representing the bi-modality of the distribution, whereas the Hyper-Erlang is able to approximate the original distribution with good accuracy. Momentbased methods perform slightly better on the tail of the distribution where they are able to outperform the Hyper-Erlang between 10 and 12. The matching of three moments generates much smaller phase-types than the one provided by Hyper-\* (in the case presented, 2 against 29 phases), but does not provide an adequate approximation. Specifically, the phases of the Hyper-Erlang are organized in three Erlang distributions: the first is made up of three phases, with *λ* = 2.301 and a probability to be chosen equal to ≈45%; the second with a single phase, *λ* = 1.44 and probability ≈0.44%; and the last one composed of 25 phases, with *λ* = 0.10 and probability ≈10%. Since with this class of fitting methods (e.g., [39]) the structure of the Hyper-Erlang (in terms of number of branches and length of each path) cannot be foreseen, it is not straightforward to enhance the Markov activity network with these classes of PH distributions by simply expanding the state space of the CTMC through unstructured approaches.

**Figure 4.** Comparison between an empirical distribution fitted by using both moment-based approaches and cluster-based fitting: cdf (**left**) and tail of the cdf (**right**).

Time

In addition, unstructured approaches become even more impractical when coping with cyclic distributions, that is, creating loops within the states of the CTMC. The use of cyclic PH distributions in practical scheduling problems is justified by concrete requirements. The first one is that, although the class of acyclic phase types is able to represent any cyclic phase-type, there is no guarantee on the finiteness of the number of phases. Hence, a cyclic phase-type might be able to approximate a distribution in a more compact way. This applies for specific classes of distributions, for example, mixtures of monocyclic phase-

Time

types (see [40]). Algorithms for the fitting of cyclic phase-types exist and are currently being used; for example, the Butools library provides a method for the transformation of a matrix exponential distribution in a monocyclic phase-type [33].

Another notable reason is that cyclic phase-types are massively used in the context of fault tolerance systems, where mechanisms for restarting, rejuvenation, and check pointing are implemented to model the execution of specific classes of processes often restarted by a controller, when their duration exceeds a certain threshold, or when a risk of stalling [41] arises. These models also allow the use of Kronecker algebra to combine two or more simple dynamics to represent a more complex phenomenon, for example, the failure modes of a machine tool in isolation together with the degradation of a machine tool during the execution of a machining process [42].

Finally, the last argument supporting a structured approach based on Kronecker algebra is that it decouples the exploration of the state space from the PH distribution of each activity. Therefore, the selection of a proper PH approximation for certain activities does not require the redefinition of the whole state space, but only involves those states where the modifications have an impact.

In conclusion, the use of a structured approach to embed PH distributions into activity networks is preferable to unstructured approaches imposing limitations on the class of approximating distributions, as well as failing to provide support for efficient calculation.

#### **7. Testing**

This section provides a set of experiments to test the model described in Section 3, as well as an assessment of the degree of approximation entailed by the use of PH distributions with a limited number of phases. The goal is to demonstrate the accuracy achievable in the estimation of the distribution of the makespan with generally distributed durations of the activities modeled with PH distributions. In addition, results related to the required computation time are reported.

The testing phase is organized in three parts. The first one focuses on the evaluation of the impact of a single PH distribution in the activity network in Figure 1, by assessing the accuracy of the fitting for a small activity network. The second one takes into consideration a more general case, where all the activities are non-exponential and, thus, approximated through PH distributions. The aim is to show how the errors associated to each activity have an impact on the estimation of the makespan. Finally, the third part reports the results obtained by using the proposed approach on a set of 150 networks, randomly selected from the PSPLIB set of instances [43]. This part also reports a more detailed analysis of the performance of the approach in terms of computational effort, with respect to the number of states composing the underlying Markov chain. All the experiments have been carried out using a JAVA code implementing both the numerical methods for the analysis of the activity networks using PH approximations and a Monte Carlo simulator to provide an exact estimation of the makespan distribution. The fitting of PH distributions has been operated using the software packages *Butools 2.0* [33] and Mathematica 11.0 (other commercial tools like Matlab, and free software like Octave or Python could also be easily used to develop the approach).

#### *7.1. Activity Network with a Single PH Distributed Activity Duration*

To analyze the impact of a single PH distribution in a network, we consider the one in Figure 1. Three experiments have been carried out with different classes of distributions. Each experiment is organized in two steps:


The first step takes advantage of two fitting methods, although any fitting method able to generate a PH distribution can be used. The first one, described in [36], is based on MLE and takes as input a set of data-points and the desired number of phases. The data-points are fitted into a PH distribution corresponding to a hyper-Erlang distribution having the specified number of phases. The second method, described in ([31]), is based on momentmatching. It considers up to three moments and returns a PH distribution with an arbitrary number of phases matching the moments. Both the methods are available in the *Butools* library. Alternative tools for the fitting of PH distributions are implemented in the software packages *PH-fit* [32] and *G-Fit* [36].

The second step addresses the activity network in Figure 1, assuming that all the activities but 3 are distributed according to the Erlang-5 distribution. Since this distribution belongs to the family of PH distributions, its PH representation is exact. On the contrary, the duration of activity 3 is assumed to be generally distributed and approximated through the fitting of a PH distribution according to what is described for the first step. Hence, the durations of activity 1, 2, 4 and 5 are modeled exactly, while an approximation can exist for activity 3. This approximation is the only source of error.

The decision to perform the testing on activity 3 is aimed at stressing the accuracy of the model. In fact, activity 3 connects the two paths 1–4 and 2–5 (1). To make the impact of the activities on the makespan uniform, their mean duration was set to 5.

The experiments have been carried out considering three different classes of distributions for activity 3:


Figure 5 provides a graphical representation of the differences between the distributions used in the three scenarios with each plot showing 1000 data-points. It is possible to notice that points related to a normal distribution are centered around 5 and their frequency decades with the distance from the average. On the contrary, points drawn from the log-normal are sparser and can be found at high values, whereas those drawn from the uniform distribution are equally distributed all along the interval.

**Figure 5.** Scatter plots of the data-points used for the fitting of the Normal distribution (**left**), Log-Normal distribution (**center**), and Uniform distribution (**right**).

For this set of experiments, both the Monte Carlo simulations and the CTMC calculations required less than a second to be performed. Confidence intervals are not provided because more than 100,000 runs have been computed for the Monte Carlo approach; hence, the intervals are tight enough not to be visualized.

#### 7.1.1. PH Approximation for a Normally Distributed Activity

The first set of experiments addresses the use of PH to fit a normal distribution, with a mean equal to 5 and a coefficient of variation equal to 0.2. A very small coefficient of variation has been used to mimic an industrial scenario where activities have a high level of formalization and, thus, are usually characterized by a small variation. This choice also guarantees the absence of negative values, impossible for a time span, during the fitting phase. Five different fitting approaches have been performed: the first three using the MLE method with a number of phases equal to 5, 10, and 15, respectively; the fourth and the fifth using the moment-based approach by matching the first two and the first three moments. The PHs generated through the moment-based approach had orders equal to 25 and 28, respectively.

Figure 6 reports the comparison between the original normal distribution and the fitted PH ones. It is possible to notice that only the distributions fitted using the momentmatching method have a Gaussian-like shape, whereas the other PH distributions underestimate the peak and are far from being symmetric. This is a consequence of the small coefficient of variation used, requiring a high number of phases to be fitted. Despite this, observing the right tail of the distribution, it is possible to notice that the absolute error for the 95th and 99th percentile, obtained using the PH approximation with 15 phases, is rather small, that is, about 1 time unit.

**Figure 6.** Comparison between the normal distribution with mean 5 and coefficient of variation equal to 0.2 and its fitting by means of PH distributions: pdf (**left**), cdf (**center**), and tail of the cdf (**right**).

Figure 7 reports the exact and PH-approximated distributions of the makespan for the network of activities in Figure 1. It can be observed that all the approximated makespans are able to provide a reasonable approximation. This is particularly evident by observing the right tail of the distribution, where the absolute error remains below 3% in all the cases.

**Figure 7.** Makespan of the example activity network with the duration of activity 3 following a normal distribution with mean 5 and coefficient of variation equal to 0.2; full (**left**), only the tail (**center**), and the tail approximation error (**right**).

#### 7.1.2. PH Approximation for a Log-Normal-Distributed Activity

The second set of experiments considers a log-normal distribution with parameters *a* = −0.804 and *b* = 1.268. This corresponds to a mean equal to 5 and coefficient of variation of 2. The same fitting approaches of the previous case have been used and, in this case, the moment-based approach was able to match the first three moments by using only two phases.

Figure 8 reports the result of the fitting. It is possible to notice that the worst approximation is provided by the PH distribution that matches three moments. This result is counter-intuitive because, at least in principle, the distribution matching the first three

moments should provide a better approximation than the distribution that matches only the first two.

However, this phenomenon might occur when using a fitting method that only considers moment-matching, because it does not guarantee any accuracy with respect to the shape of the distribution. Therefore, for heavy-tailed distributions, matching additional moments is not likely to improve the accuracy of the fitting, particularly for small quantiles. In fact, the fitting matching three moments in this case provides an accurate approximation for extremely high values of the quantiles only.

**Figure 8.** Comparison between the log-normal distribution with parameters *a* = −0.804 and *b* = 1.268 and its fitting by means of PH distributions: pdf (**left**), cdf (**center**), and tail of the cdf (**right**).

Figure 9 reports the exact and PH-approximated distributions of the makespan for the network of activities in Figure 1. The plots confirm the errors highlighted in Figure 8 for the fitting. Specifically, referring to the tail of the distribution of the makespan, this was partly expected. The Erlang-5, the PH distributions obtained using five phases, has a low coefficient of variation in comparison with the log-normal, therefore, the propagation of the error significantly affects the accuracy in the estimation of the distribution of the makespan. Despite this, the absolute error for all the approximated distributions of the makespans stays below 2.5%, with respect to the tail of the distribution (Figure 8, right).

**Figure 9.** Makespan of the example activity network with the duration of activity 3 following a log-normal distribution with parameters *a* = −0.804 and *b* = 1.268; full (**left**), only the tail (**center**), and the tail approximation error (**right**).

#### 7.1.3. PH Approximation for a Uniform Distribution

The third set of experiments considers a uniform distribution in the interval [2, 8]. In this case, there is no chance for a finite number of phases to be able to represent the finite support of the uniform distribution. The moment-based approach requires nine phases to match the first two moments and 12 to match the first three. The impact of this limitation for PH distributions is clear by observing Figure 10 reporting the result of the fitting. It is possible to notice that the pdf of the approximating PH distributions tends to be bell-shaped and trespasses the limited domain of the uniform distribution both in the right and left tails. Additionally, the shape of the tail is overestimated by all the approximating PH distributions (Figure 10, right).

**Figure 10.** Comparison between the uniform distribution in the interval [2, 8] and its fitting by means of PH distributions: pdf (**left**), cdf (**center**), and tail of the cdf (**right**).

Figure 11 shows the comparison between the exact and approximated distribution of the makespan of the activity network in Figure 1 showing that the overall error reduces in comparison with the one related to activity 3 only. In particular, while the PH distribution of order 5 demonstrates an error greater than 4% in the tail of the distribution, the other approximating distributions have an error that stays below 2% and becomes almost zero near the 99th percentile.

**Figure 11.** Makespan of the example activity network with the duration of activity 3 following a uniform distribution in the interval [2, 8]; full (**left**), only the tail (**center**), and the tail approximation error (**right**).

#### *7.2. PH Approximation for All the Activities in the Network*

In this section, we hypothesize a general distribution for all the activities in the network, with the aim to show that the accuracy in the estimation of the makespan is reasonable even with a large number of approximated distributions. For this test, we used a 30-job instance from the PSPLIB set of instances [43]. Since the repository only contains activity networks with deterministic durations, a distribution and a coefficient of variation have been randomly sampled for each activity, whereas the mean value has been set equal to the original deterministic duration. Two classes of distributions have been considered: log-normal and half-normal, with each activity having the same probability to be distributed as one or the other. The coefficients of variation have been assigned in a similar way, by sampling among three possible values: 0.5, 1, and 1.5.

The 32 activities in the network, together with their distributions, have been fitted by matching the first two moments. All the fittings required, at most, four phases to match the moments. Then, three sub-models have been considered in order to analyze the approximation error as the number of approximated distributions increases. Specifically, within the same network, subsets containing the first 5, 10, and 20 activities have been considered.

The structure of the network and its distributions are reported in Table 3. Horizontal lines delimit the considered subsets.


**Table 3.** Activities in the network with the associated distributions. Horizontal lines indicate the subsets that have been incrementally taken into consideration.

The four networks with an increasing number of activities have also been analyzed using a Monte Carlo simulation, to provide a reference distribution to be considered as the real one. Table 4 summarizes the experiments, showing that the state space of the CTMC grows very fast and the number of transitions increases even faster. Despite this, for a network consisting of up to 20 activities, the numerical solution requires less time than performing 100,000 samples for the Monte Carlo simulation.

**Table 4.** Summary of the experiments.


Figures 12–15 report the results of the calculation of the makespan for the four models considered. All the comparisons show good accuracy and an error on the percentiles that rarely exceeds 1%. Specifically, it is relevant to notice that the error does not increase with the number of activities. Although there is no guarantee for these results to represent a gen-

eral behavior, it is important to point out that all the fittings have been done automatically, without any specific selection or tuning of the fitting method.

**Figure 12.** Makespan of the five-activity subset within the network; full makespan (**left**), tail (**center**), and approximation error on the tail (**right**).

**Figure 13.** Makespan of the 10-activity subset within the network; full makespan (**left**), tail (**center**), and approximation error on the tail (**right**).

**Figure 14.** Makespan of the 20-activity subset within the network; full makespan (**left**), tail (**center**), and approximation error on the tail (**right**).

**Figure 15.** Makespan of the full 32-activity network; full makespan (**left**), tail (**center**), and approximation error on the tail (**right**).

#### *7.3. Test on a Set of Activity Networks*

The described approach has been tested on multiple networks of activities obtained by randomly selecting a set of 150 from the instances in the PSPLIB [43]. The structure of the networks has been considered as given, while the randomness in the duration of the activities has been introduced using the same approach described in Table 3. Hence, a PH distribution has been fitted for each activity in the network by matching the first two moments. The fitting of the activity distributions has been done in negligible time. In fact each activity required 0.017 s, on average, to find the approximating PH type.

Figure 16 provides a quick glimpse of the heterogeneity of the networks considered in the experiment, by showing a clear direct correlation between the overall number of transitions and the number of states for each network.

**Figure 16.** Scatter plot of the number of states against the number of transitions composing the CTMC of the networks.

However, the higher the number of states composing the CTMC, the more variable the number of transitions in the model. This is due to the fact that the number of transitions heavily depends on the level of concurrency in the network, that is, the number of activities that are in execution in each state. A network having many activities and, consequently, many states, has a higher probability of having multiple activities in execution at the same time. If this number is high, the number of transitions is high as well. As a consequence, the number of PH distributions enabled at the same time in the states, and the consequent number of transitions, is less variable among the different instances. A summary of the networks used for the experiments is reported in Table 5, providing information in terms of the number of states composing the CTMC and the number of transitions. It is possible to observe that the average number of states is equal to 2763.73, with a minimum of 779 states and a maximum of 11,858. On the contrary, the average number of transitions is equal to 207,343.59, with a maximum of 935,440 and a minimum of 17,298.

**Table 5.** Summary of the networks under investigation.


In order to quantify the error introduced by the approximation using PH distributions, we consider the average Kullback–Leibler divergence (*KL*) of the network, also called average entropy, defined as

$$\overline{KL} = \frac{\sum\_{i=1}^{K} \int\_{0}^{\infty} p\_i(\mathbf{x}) \log \left( \frac{p\_i(\mathbf{x})}{q\_i(\mathbf{x})} \right) d\mathbf{x}}{K},\tag{9}$$

where *pi*(*x*) is the probability density function (pdf) of the exact distribution for activity *i*, *qi*(*x*) is the pdf of the approximated PH distribution, and *K* is the total number of activities

in the network and the integral is operated on the duration of each activity. If the durations of the activities in the network are well-approximated by the PH distributions, *KL* is close to zero.

Table 5 also reports the value of the average entropy corresponding to 0.0359. Being the value rather close to zero, we can conclude that the PH distributions approximate the general distributions with good accuracy, despite the fact that only the first two moments are matched.

Table 6 compares the time required to compute the 99% quantile of the distribution of the time to absorption of the CTMC with PH distributions, that is, the distribution of the makespan for the network of activities. This performance is compared with the one obtained executing a Monte Carlo simulation with one million samples from the original distributions.

**Table 6.** Computation time for the 99% quantile of the distribution of the makespan for the experiments.


It is possible to observe that the Monte Carlo simulation is, on average, faster than the numerical solution. The good performance of Monte Carlo simulation is due to:


To provide a clearer picture of the overall performance of the approach, Figure 17 shows the computation times for all the experiments in relation to the number of states of the CTMC and the number of transitions. It is clear that the computation time increases exponentially with the size of the problem. Indeed, the Monte Carlo simulation does not suffer from this problem, since the overall complexity is bounded by (*K* × *R*), where *R* is the number of simulation runs. Nevertheless, it is important to point out that:


**Figure 17.** Time required to solve the networks with PH distributions as a function of the number of states (**left**) and the number of transitions (**right**).

Finally, Table 7 reports the error in the estimation of the distribution of the makespan using PH distributions for different percentiles. It is possible to notice that the error increases with the considered percentile. At the 90th percentile, the error is, on average 1%, and the confidence interval is (1.47, 1.96), with a minimum of 0.017% and a maximum of 3.46%, whereas at the 99th percentile, the error is, on average, 2.72% with a confidence interval equal to (2.28, 3.15), a minimum of 0.04% and a maximum of 9.6%.


**Table 7.** Accuracy of the estimation of the makespan distribution for different percentiles.

#### **8. Conclusions**

In this paper, a general approach has been proposed to exploit Markov chains and phase-type distributions to model the execution of a stochastic PERT network with general distributed processing times. A general and concise formulation has been proposed, based on Kronecker algebra, to support the application without any constraint on the class of phase-type distributions allowed.

The motivation for the approach stems from the need to fit real data and use this information in the planning and scheduling of manufacturing operations, overcoming the limitation of a large portion of the literature related to stochastic scheduling, requiring strong hypotheses on the underlying distributions. Coping with real data, characterized by asymmetry, multi-modality, and so forth, PH distributions are a very effective approximation approach also entailing the capability of using Markov activity networks and the associated corpus of approaches.

The proposed formulation also allows to easily change and/or refine the fitting according to the accuracy requirements to keep the computation time in line with the specific needs and without the need of recomputing the whole model from zero.

An analytical description has been provided, as well as experiments on a wide range of test instances. The testing demonstrated good performance both in terms of computation time and accuracy of the approximation, although the computational effort rapidly increases with the dimension of the network and the number of phases used.

Moreover, the algebraic formulation also allows the use of more advanced numerical methods able to evaluate the Markov activity network without the need to explicitly build the whole infinitesimal generator, thus paving the way to more efficient calculation approaches.

Hence, modeling the execution of an activity network through a Markov process and phase-type distributions provides a promising path towards embedding the proposed estimation approach in scheduling algorithms to optimize a function of the makespan distribution, such as an associated risk measure.

Further developments will address advanced calculation methods to speed up the computation time, as well as the exploitation of this method to support stochastic scheduling approaches.

**Author Contributions:** Conceptualization, M.U.; methodology, A.A., A.H. and M.U.; software, A.A.; writing, A.A., A.H. and M.U. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


## *Article* **Relocation Scheduling in a Two-Machine Flow Shop with Resource Recycling Operations**

**Ting-Chun Lo and Bertrand M. T. Lin \***

Institute of Information Management, National Yang Ming Chiao Tung University, Hsinchu 300, Taiwan; chunchun.mg08@nycu.edu.tw

**\*** Correspondence: bmtlin@mail.nctu.edu.tw

**Abstract:** This paper considers a variant of the relocation problem, which is formulated from an urban renewal project. There is a set of jobs to be processed in a two-machine flow shop subject to a given initial resource level. Each job consumes some units of the resource to start its processing on machine 1 and will return some amount of the resource when it is completed on machine 2. The amount of resource released by a job is not necessarily equal to the amount of resource acquired by the job for starting the process. Subject to the resource constraint, the problem is to find a feasible schedule whose makespan is minimum. In this paper, we first prove the NP-hardness of two special cases. Two heuristic algorithms with different processing characteristics, permutation and non-permutation, are designed to construct feasible schedules. Ant colony optimization (ACO) algorithms are also proposed to produce approximate solutions. We design and conduct computational experiments to appraise the performances of the proposed algorithms.

**Keywords:** resource-constrained scheduling; relocation problem; flow shop; resource recycling; heuristic algorithms; ant colony optimization

#### **1. Introduction**

Scheduling is a decision-making process that allocates limited resources to tasks in a given time period to optimize certain objectives in manufacturing as well as service industries [1]. Usually, resources are considered as machines that process the assigned tasks in manufacturing industries. In some scheduling contexts, there could be different extra resources, like capital, crews and technicians, storage space, energy, computer memory, and so on, that are required to support the execution of the tasks. Such scheduling problems are known as resource-constrained scheduling. Resource-constrained project scheduling problems (RCPSP) have received considerable attention for decades. Please refer to Brucker, Drexl, Möhring, Neumann, and Pesch [2], Habibi, Barzinpour, and Sadjadi [3] Herroelen, De Reyck, and Demeulemeester [4], Issa and Tu [5] for comprehensive reviews on RCPSP. The resource constraint featured in the relocation problem is different traditional ones in the sense that the amount of resource released by an activity is not necessarily the same as that acquired for commencing the activity. This study investigates the relocation problem in a two-machine flow shop with the specific feature of a resource recycling mechanism.

The construction industry have various optimization decisions to address in the project course [6,7]. The relocation problem originated from the public house redevelopment project in Boston [8,9]. The project had a set of buildings to be torn down and erected for redevelopment. During the redevelopment process, current tenants of the buildings under reconstruction needed to be relocated to temporary housing units. They could be assigned to new housing units. It was not mandatory for tenants to reside at the same place they lived before. Therefore, the authority had to determine a minimum budget of temporary housing units such that all tenants could be successfully relocated. Kaplan [8] first formulated the relocation problem of determining a feasible redevelopment sequence of the buildings with the initial budget. In the view of optimization, this problem can also be described as finding

**Citation:** Lo, T.-C.; Lin, B.M.T. Relocation Scheduling in a Two-Machine Flow Shop with Resource Recycling Operations. *Mathematics* **2021**, *9*, 1527. https:// doi.org/10.3390/math9131527

Academic Editors: Chin-Chia Wu and Win-Chin Lin

Received: 23 May 2021 Accepted: 23 June 2021 Published: 29 June 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

a feasible sequence of the redevelopment buildings that reflects the minimum initial budget. Kaplan and Amir [10] showed that the relocation problem is mathematically equivalent to the two-machine flow shop scheduling problem for minimizing makespan, implying that the basic relocation problem can be solved by the classical Johnson's algorithm [11].

Lin and Huang [12] first introduced the recycling operations for yielding the resource into the study on the relocation problem. In previous studies on the relocation problem, the resource is consumed when a job starts to process and returns immediately when it is completed. However, the concept of the resource recycling is assumed that we need to have a mechanism or procedure to recycle the resource before the resource can be used for later jobs. Therefore, a job is divided into two separate parts on two dedicated machines: one processed on machine 1 and the other for recycling the resource on machine 2. The operations on machine 1 should have sufficient resource so that they can commence the processing, and the operations on machine 2 should wait for the completion of its corresponding counterpart operations jobs on machine 1. However, the job sequences on the two machines are not necessarily the same. Cheng, Lin and Huang [13] presented an integer linear program formulation for the permutation case, in which the job sequences on all machines are the same. They also investigated the non-permutation case. We continue to study this relocation problem and discuss more theoretical proofs. Then, we present heuristic algorithms and ant colony optimization (ACO) algorithms for both permutation and non-permutation sequences to find feasible schedules with resource constraints for minimum makespan.

The rest of this paper is organised as follows. In Section 2, we present problem statements and give a numerical example followed by a literature review. The complexity results of two special cases are discussed in Section 3. In Sections 4 and 5, we present heuristic algorithms and ant colony optimization algorithms for constructing approximate schedules. Computational experiments and performance statics of the algorithms are given in Section 6. We conclude this search and suggest research directions for future study in Section 7.

#### **2. Problem Definition**

In this section, we first introduce the notation that will be used throughout our research. Then, a formal problem formulation follows. An integer programming model is also proposed. The notations are listed below:

Notation:


We formally state the problem as follows: From time zero onwards, a set of jobs N = {1, 2, ... , *n*} is available to be processed in a two-stage flow shop consisting of machine 1 and machine 2. Initially, the common resource pool contains *v*<sup>0</sup> units of a single type of resource. Job *j* ∈ N can start processing only if machine 1 is not occupied and the resource level is larger than or equal to *αj*. When job *j* starts processing, it immediately consumes *α<sup>j</sup>* units of the resource and takes *p*1*<sup>j</sup>* units of time on machine 1. After the operation on machine 1 is completed, *p*2*<sup>j</sup>* units of time are required to complete its resource

recycling operation on machine 2. When job *j* completes on machine 2, it produces and returns *β<sup>j</sup>* units of the resource back to the resource pool. No preemption on either machine is permitted. Note that there is no strict relation between *α<sup>j</sup>* and *βj*. That is, *β<sup>j</sup>* could be smaller than, equal to, or larger than *αj*. The goal is to minimize the makespan. In other words, we want to find a feasible schedule that completes all jobs in the shortest time.

To illustrate the problem definition, we consider an instance of four jobs with an initial resource level *v*<sup>0</sup> = 6. The parameters are shown below in Table 1. We construct two example schedules.

**Table 1.** An example of four jobs.


Figure 1 shows an optimal permutation solution with *C*max = 22, and Figure 2 shows an optimal non-permutation solution with *C*max = 19. Both of them are feasible. In this example, it is clear that the non-permutation solution can attain a better makespan than the permutation one.

**Figure 1.** Permutation solution

**Figure 2.** Non-permutation solution

#### *Literature Review*

To describe our problem, we denote use the standard three-field notation *F*2|*rp*|*C*max, proposed by Graham et al. [14]. The first field indicates the machine environment of a two-machine flow shop, where the first machine is the operation of the building being torn down and the second machine is about re-constructing buildings corresponding to resource recycling operations. The second field indicates that the specific conditions for the job characteristics, i.e., the relocation problem. The last field specifies the objective function of makespan.

The study on the relocation problem was inaugurated by Kaplan [8] in 1986. The fundamental purpose of the basic relocation problem is to minimize the initial budget required for guaranteeing project feasibility. In Kaplan's study, multiple working crews were considered that if resources were sufficient, i.e., a number of buildings could be simultaneously developed. Kaplan and Amir [10] formulated the application of relocation problem as an integer program. They also noted the relationship between the minimum budget in relocation feasibility and the minimum makespan of two-machine flow shop scheduling, which is solvable in *O*(*n* log *n*) time [11]. To reflect real situations of the housing redevelopment project in East Boston, Kaplan, and Berman [15] refined the integer programming model and scheduling heuristics. Applications like the financial constraints on single machine scheduling problems [16] which can be reduced to the two-machine flow shop scheduling problem as a special case of the relocation problem. The relocation problem is also related to the memory management issue in database system in practical term [17]. Amir and Kaplan [17] showed that minimizing the makespan on parallel machines is NP-hard. Kononov and Lin [18] proved that parallel-machine setting is strongly NP-hard even if there are only two working crews and all jobs have the same processing time. They also designed approximation algorithms with performance ratio analysis for two special cases.

Cheng and Lin [19] presented more proofs and proposed the concept of composite jobs that can reduce the computational time for handling the relocation problem. Cheng and Lin [20] also demonstrated the concept of relocation scheduling to give an economic interpretation of Johnson's algorithm. The concept can also simplify proofs and reduce time complexity in some two-machine flow shop scheduling problems. There are other extensions from the relocation problem. Lin and Tseng [21] considered the problem with processing times and deadline constraints. Furthermore, they provided a complexity result and two polynomial algorithms to solve the restricted problems. Lin and Tseng [22] proposed a branch-and-bound algorithm to maximize the resource level under a specified due date and considered the precedence constraints [23] that is NP-hard even if the precedence constraints are specified by a bi-partite graph. Lin and Cheng [24] showed two relocation problems of minimizing the maximum tardiness is strongly NP-hard and of minimizing the number of tardy jobs under a due date is NP-hard even when all the jobs have an equal tardy weight and resource requirement. Based on the generalized due dates proposed by Hall [25], Lin and Liu [26] extended the scheduling problem and designed a branch-and-bound algorithm to reduce the computational time required. Sevastyanov, Lin and Huang [27] considered the relocation problem with arbitrary release dates. They developed a multi-parametric dynamic programming algorithm to solve the case with a fixed number if distinct due release dates and analyzed complexity of different problem settings. Kononov and Lin [28] considered minimizing the total weighted completion time and proved four special cases are strong NP-hardness. They established the equivalence between the UET (unit-execution-time) case and the unit-weighted case and presented a 2-approximation algorithm for the restricted special cases.

As per the feature of resource recycling in the relocation problem, there are some existing works. Lin and Huang [12] first introduced the concept of resource recycling. This operation can be processed on a secondary recycling machine that the whole procession can be described as a two-machine flow shop scheduling problem. In this paper, they showed that it is NP-hard and designed three heuristic algorithms to compose approximate schedules. Problem formulation and some complexity results were discussed in Cheng, Lin and Huang [13]. They presented integer linear programming models for finding the feasible permutation sequence and non-permutation sequence with minimum makespan. Lin [29] considered the setting where processing and recycling are carried out on the same single machine. The problem is a generalization of the knapsack problem. He designed a pseudo-polynomial time dynamic programming algorithm and formulated an integer program to solve this recycling problem that operations are processed on the same single machine.

#### **3. Complexity Analysis**

This section is dedicated to discussion of the complexity results of the problem of several special cases. First, let instance I contain *n* jobs with *p*1,*j*, *p*2,*j*, *αj*, and *β<sup>j</sup>* given for each job *<sup>j</sup>* and an initial resource level *<sup>v</sup>*0. We create another instance <sup>I</sup>¯ having *<sup>n</sup>* jobs with *p*1,*<sup>j</sup>* = *p*2,*j*, *p*2,*<sup>j</sup>* = *p*1,*j*, *α<sup>j</sup>* = *βj*, *and β<sup>j</sup>* = *α<sup>j</sup>* that is symmetric to the instance I. Set the initial resource level *<sup>v</sup>*<sup>0</sup> <sup>=</sup> *<sup>v</sup>*<sup>0</sup> <sup>−</sup> <sup>∑</sup>4*q*+<sup>1</sup> *<sup>j</sup>*=<sup>1</sup> (*β<sup>j</sup>* − *αj*). We claim that the two instances have the optimal makespan. The concept follows the results of Kononov and Lin [28].

**Theorem 1.** *(Mirror Property) Instance* <sup>I</sup> *and instance* <sup>I</sup>¯ *have the optimal makespan.*

**Proof.** Let *σ* = (*σ*(1), *σ*(2), ... , *σ*(*n*)) be a feasible permutation of jobs in the given instance <sup>I</sup> case. We show that *<sup>σ</sup>* = (*σ*(*n*), *<sup>σ</sup>*(*<sup>n</sup>* <sup>−</sup> <sup>1</sup>), ... , *<sup>σ</sup>*(1)) is feasible for <sup>I</sup>¯ we created in the above. Assume *Vk* is the resource level after the jobs *σ*(*n*), ... , *σ*(*k* + 1) in *σ* complete. We have *Vk* <sup>−</sup> *ασ*(*k*) <sup>=</sup> *<sup>v</sup>*<sup>0</sup> <sup>+</sup> <sup>∑</sup>*<sup>n</sup> <sup>j</sup>*=*k*+1(*βσ*(*j*) <sup>−</sup> *ασ*(*j*)) <sup>−</sup> *ασ*(*k*) <sup>=</sup> *<sup>v</sup>*<sup>0</sup> <sup>+</sup> <sup>∑</sup>*<sup>k</sup> <sup>j</sup>*=1(*βσ*(*j*) − *ασ*(*j*)) − *βσ*(*k*) = *v*<sup>0</sup> + ∑*k*−<sup>1</sup> *<sup>j</sup>*=<sup>1</sup> (*βσ*(*j*) − *ασ*(*j*)) − *ασ*(*k*) ≥ 0. The last inequality is feasible with the schedule *σ*. Therefore, we can get *Vk* ≥ *ασ*(*k*), which shows the schedule *σ* is feasible. As we know the schedule *σ* and *σ* are two-stage flow shop, if their sequences are reversed, they have same processing time. Therefore, we can construct another optimal schedule if we get an optimal one.

For *n* jobs, there are (*n*!) possible sequences when the permutation schedules are considered. If we consider the non-permutation variant, the number of schedules will become *O*(*n*! × *n*!) because the permutations on the two machines could be different. For technical constraints or dispatching fairness, say first comes first served, the processing sequence could be given and fixed [30,31]. In view of implementations, if an optimal schedule can be efficiently obtained from a given job sequence on either machine, we can then reduce the decision tree size from *O*(*n*! × *n*!) to *O*(*n*!). This section will explore the complexity status of the setting with a fixed job sequence.

First, we prove the problems that when the sequence of the jobs on machine 2 is given and fixed, finding the optimal schedule is strongly NP-hard, even if all jobs have the same processing time on machine 2. On the other hand, if the given and fixed sequence of the jobs is on machine 1, we can get the same result that finding optimal schedules is also strongly NP-hard. The proof is given in the following:

3-Partition: Given an integer *B* and a set *A* of 3*q* elements {1, 2, ... , 3*q*}, each *j* ∈ *A* has a size *xj*, *<sup>B</sup>*/4 <sup>&</sup>lt; *xj* <sup>&</sup>lt; *<sup>B</sup>*/2, such that <sup>∑</sup>3*<sup>q</sup> <sup>j</sup>*=<sup>1</sup> *xj* = *qB*, is there a partition *A*1, *A*2, ... , *Aq* of the set *<sup>A</sup>* such that <sup>∑</sup>*xj*∈*Al xj* = *<sup>B</sup>*, 1 ≤ *<sup>l</sup>* ≤ *<sup>q</sup>*?

**Theorem 2.** *If a sequence of the jobs on machine 2 is given and fixed, then finding an optimal schedule is strongly NP-hard, even if all jobs have the same processing time on machine 2.*

**Proof.** Given an instance of 3-Partition, we create a corresponding set of 4*q* + 1 jobs as follows:

Enforcer jobs: *p*1,*<sup>j</sup>* = 0, *p*2,*<sup>j</sup>* = *B*, *α<sup>j</sup>* = 2*B*, *and β<sup>j</sup>* = 3*B*, 1 ≤ *j* ≤ *q*; Ordinary jobs: *p*1,*<sup>j</sup>* = *xi*, *p*2,*<sup>j</sup>* = *B*, *α<sup>j</sup>* = *xi*, *and β<sup>j</sup>* = 0, *q* + 1 ≤ *j* ≤ 4*q*; Final job: *p*1,*<sup>j</sup>* = 3*qB*, *p*2,*<sup>j</sup>* = *B*, *α<sup>j</sup>* = 0, *and β<sup>j</sup>* = 0, *j* = 4*q* + 1.

The the initial resource level *v*<sup>0</sup> = 3*B*. The jobs on machine 2 are sequenced in increasing order of their indices. We claim that there is a 3-Partition if there is a feasible schedule whose makespan is no greater than (4*q* + 1)*B*.

Assume that there exists a desired partition *A*1, *A*2, ... , *Aq* of 3-Partition. Because the total actual processing length on machine 2 is (4*q* + 1)*B*, we know that no idle time on machine 2 is permitted. Then, we schedule the enforcer job 1 on machine one first followed by the the ordinary jobs corresponding to the three elements of *A*<sup>1</sup> and the resource level is brought back to 3*B*. Repeat the dispatching pattern and then schedule the last job. It is to see that the schedule is feasible and the makespan is exactly (4*q* + 1)*B*.

Assume that there is a feasible schedule whose makespan is no larger than (4*q* + 1)*B*. The total actual processing length on machine 2 of all jobs is (4*q* + 1)*B*. There is no idle time on machine 2. On the other hand, the total actual processing length on machine 1 is 4*qB*. Considering the subsequent operations on machine 2, no idle time is allowed on machine 1. In other words, machine 1 and machine 2 cannot have any idle time in order to attain the makespan (4*q* + 1)*B*. As given, machine 2 processes the enforcer jobs 1, 2, ... , *q* as in their indices. Since all enforcer jobs have the same parameter values, without loss of generality we assume that the enforcer jobs also follow the same processing order on machine 1.

We first note that job 1 should start first on machine 1 for otherwise non-zero idle time will be incurred on machine 2. After completing job 1 on machine 1, the resource level drops from 3*B* to *B*. To start the next enforcer job 2, machine 1 wait for the previous enforcer job 1 to be completed to accumulate sufficient resources. To avoid the idle time between the first and second enforcer jobs on machine 1, we assign ordinary jobs to fill up the idle period. Let *<sup>A</sup>*<sup>1</sup> be the set of elements defining these ordinary jobs. If <sup>∑</sup>*xj*∈*A*<sup>1</sup> *xj* < *<sup>B</sup>*, then there is an idle time before job 2 on machine 1. On the other hand, if <sup>∑</sup>*xj*∈*A*<sup>1</sup> *xj* > *<sup>B</sup>*, then the resource is insufficient and the completion time of some ordinary jobs are later than the second enforcer job, leading to the idle time on machine two. As the result, <sup>∑</sup>*xj*∈*A*<sup>1</sup> *xj* = *<sup>B</sup>* must hold. Continuing this process, we can find subsets *<sup>A</sup>*2, ... , *An* with <sup>∑</sup>*xj*∈*Al xj* = *<sup>B</sup>*, 2 ≤ *l* ≤ *q*, satisfied for the 3-Partition problem. Figure 3 shows the sequence of the optimal schedule: the purple blocks are enforcer jobs, the red ones are ordinary jobs, and the blue ones are final job.

**Figure 3.** Given and fixed sequence on machine 2.

Theorems 1 and 2 together imply the following result.

**Theorem 3.** *If a sequence of the jobs on machine 1 is given and fixed, then finding an optimal schedule is strongly NP-hard, even if all jobs have the same processing time on machine 2.*

**Proof.** Owing to Theorems 1 and 2, we can get the feasibility of a given and fixed sequence of the jobs on machine 1 whose optimal schedule is strongly NP-hard. On the other hand, the idle time before job 1 on machine 2 is inevitable and the total actual processing length is (4*q* + 1)*B*. Furthermore, the sequence of Theorem 2 whose jobs on machine 2 is given and fixed, if we reverse this two-stage flow shop sequence, we can get the given and fixed sequence of the jobs on machine 1 which is equivalent to Theorem 3. It can seen that Figure 4 is derived form Figure 3 by reversing the Gantt chart from the right. As a result, the sequences of Theorem 2 and Theorem 3 have same total processing time. Then, we get the optimal schedule.

**Figure 4.** Given and fixed sequence on machine 1.

**Theorem 4.** *If sequences of the jobs on machine 1 and machine 2 are given and fixed, then the optimal schedule can be found in polynomial time.*

**Proof.** Assume that there is a feasible schedule whose sequences of the jobs on machine 1 and machine 2 are given and fixed. We schedule the first job on machine 1 followed by the first job on machine 2. If the resource of second job on machine 1 is insufficient, it should wait for previous job which on machine 2 to return the resource. Otherwise, it can be processed immediately when the previous job finished. Then, the job on machine 2 starts when the job on machine 1 completed. Continuing this process, we can schedule all the jobs and the makespan is minimum. On the other hand, if the job on machine 2 return resource is not enough for the next job to be processed, we can know that this sequence is

not feasible. As a result, we can get an optimal schedule if sequences of the jobs on machine 1 and machine 2 are given and fixed.

To simplify the problem, we consider the special case where processing sequences on both machines are given. By problem definition, the two sequences are not necessarily the same. For simplicity in presentation, we re-index the jobs to follow the natural sequence *π*<sup>1</sup> = (*π*1,1, *π*1,2, ... , *π*1,*n*) on machine 1. Let *π*<sup>2</sup> = (*π*2,1, *π*2,2, ... , *π*2,*n*) denote the sequence on machine 2 and *v*(*t*) the resource level at a specific time point *t*. Notations *t*<sup>1</sup> and *t*<sup>2</sup> represent the current time points on machines 1 and 2. Note that if an operation whichever finished on machine 1 or machine 2 and another operation starts on next machine simultaneously at time *t*, we define *v*(*t*) as the resource level after the finished operation on one machine and before the starting operation on the other machine. We will use this method, outlined in Algorithm 1, to calculate makespan for the problem.

#### **Algorithm 1:** Two Sequences

 Let *π*<sup>1</sup> = (*π*1,1, *π*1,2,..., *π*1,*n*) and *π*<sup>2</sup> = (*π*2,1, *π*2,2,..., *π*2,*n*) be the given processing sequences; *t*1,*π*1,1 = *p*1,*π*1,1 ; *t*<sup>1</sup> = *t*1,*π*1,1 ; *v*(*t*1) = *v*<sup>0</sup> − *απ*1,1 ; *t*<sup>2</sup> = 0; *i* = 2; *j* = 1; **while** *i* ≤ *n and j* ≤ *n* **do if** *v*(*t*1) ≥ *απ*1,*<sup>i</sup>* **then** *t*1,*π*1,*<sup>i</sup>* = max{*t*1, *t*2} + *p*1,*π*1,*<sup>i</sup>* ; *t*<sup>1</sup> = *t*1,*π*1,*<sup>i</sup>* ; *v*(*t*1) = *v*(*t*1) − *απ*1,*<sup>i</sup>* ; *i* = *i* + 1; **<sup>11</sup> else if** *job π*1,*<sup>j</sup> is not yet scheduled on machine 1* **then** Report "No feasible solution!"; **<sup>14</sup> else** *t*<sup>2</sup> = max{*t*1,*π*1,*<sup>j</sup>* , *t*2} + *p*2,*π*2,*<sup>j</sup>* ; **if** *t*<sup>2</sup> ≥ *t*<sup>1</sup> **then <sup>17</sup>** *t*<sup>1</sup> = *t*2; *v*(*t*1) = *v*(*t*1) + *βπ*2,*<sup>j</sup>* ; *j* = *j* + 1; **while** *j* ≤ *n* **do** *t*<sup>2</sup> = max{*t*1,*π*2,*<sup>j</sup>* , *t*2} + *p*2,*j*; *j* = *j* + 1; **return** *t*2.

In Algorithm 1, the first job of the sequence on machine 1 is processed first and there should be sufficient resource for it to start. Therefore, the first time point *t*1,1 is the processing time of job 1 on machine 1, which is also *t*1, and *v*(*t*1) is the resource level when job 1 finishes. In Line 6 we check the resource if we can process the job *i* on machine 1 or not. If resource is insufficient for job *i* on machine 1, we execute Line 11 to Line 19 for processing some job *j* on machine 2 to collect more resource. In Line 12, we need to check if job *π*1,*<sup>j</sup>* is scheduled first on machine 1 or not. Because we start to process jobs on machine 2 when the resource is not enough for machine 1, there may be several candidate jobs that can be processed on machine 2. Therefore, sometimes, *t*<sup>2</sup> is less than *t*<sup>1</sup> when the resource level is sufficient for the next job. In Lines 16 to 17, if *t*<sup>2</sup> is larger than *t*1, we need to set *t*<sup>1</sup> equal to *t*2, i.e., the next job on machine 1 should wait for the job on machine 2 to recycle its resource. When all the jobs on machine 1 finish, there are still some jobs on machine 2 not yet processed. As a result, we process the remaining jobs on machine 2 in the While loop of Line 20 to Line 22.

#### **4. Heuristic Algorithms**

Since the *F*2|*rp*|*C*max problem is computationally hard, it is hard to find optimal solutions when the problem size is large. We therefore design heuristic algorithms to produce approximate solutions in an acceptable time.

#### *4.1. Permutation*

We design two heuristic algorithms, using different sequences to construct feasible schedules for *F*2|*rp*|*C*max problem. If the job of the sequence does not violate the resource constraint, it must satisfy two conditions that the current resource level is sufficient for it, and that after its processing the resource level is sufficient for all remaining jobs. We denote the job sequence as *σ* and the remaining jobs sequenced by Johnson's rule using resource parameters *α* and *β* as *σJR*. Recall that *v*<sup>0</sup> is the initial resource requirement using Johnson's rule, and *Vneeded* denotes the minimum resource requirement for the remaining jobs that the sequence is the same as *σJR* excluding job *j*. If the job violates the constraints, we will remove it. Then, we can get a set of feasible jobs which are the candidates to be processed next. Algorithm 2 examines each of the remaining jobs to determine if they are feasible candidates for the next position.

**Algorithm 2:** Check Resource


The first heuristic algorithm, JR-time Permutation Heuristic, is outlined in Algorithm 3. We define *σtime* as the remaining jobs sequenced by Johnson's rule using *p*1,*<sup>i</sup>* and *p*2,*<sup>i</sup>* and *σJR* using *α<sup>i</sup>* and *βi*. Before a job is processed, we need to run CheckResource function for checking whether the job can be processed or not. Then, we append the job to the partial schedule *σ*. Repeat the same step until all the jobs are processed.

```
Algorithm 3: JR-time Permutation Heuristic
```

```
1 σ =[], v(ti) = v0;
2 i = 0;
3 while i ≤ n do
4 σ¯ = CheckResource(v(ti+1), σtime, σJR);
5 v(ti+1) = v(ti) − σ¯(α1) + σ¯(β1);
6 σ.append(σ¯(1));
7 σJR.remove(σ¯(1));
8 σ¯.remove(σ¯(1));
9 Stop.
```
The second heuristic, JR-resource Permutation Heuristic, is the same as the previous one except that the job sequence is ordered by Johnson's rule using *α<sup>i</sup>* and *βi*.

#### *4.2. Non-Permutation*

We design two heuristic algorithms that construct non-permutation schedules for *F*2|*rp*|*C*max. Let *σ*<sup>1</sup> be the sequence of the jobs processed on machine 1, and *σ*<sup>2</sup> the job sequence on machine 2. Let *σ*ˆ2 contain the jobs eligible for processing on machine 2. Algorithm 4 processes the jobs on machine 1 first. If a job satisfies the two constraints, it will be appended to the schedule. Since we want to construct a non-permutation schedule, we create *σ*ˆ2 to collect the jobs which are finished on machine 1 but not yet on machine 2. When the resource level is insufficient for the candidate job, we need to process the jobs on machine 2 for acquiring more resource. Therefore, we choose the job that has the largest *β* in *σ*ˆ2 to be processed first. However, this strategy may lead to an idle time when we only process the selected job. To avoid this situation, we first find the arrival time of the selected job that can be processed and we call it *LargeBetaArrivalTime* here. Then, check if the completion time of any other job is earlier than *LargeBetaArrivalTime*. Furthermore, we change the *f raction* such that 1 − *f raction* is the acceptable time range that exceeds *LargeBetaArrivalTime*.

In Line 14, if the acceptable completion time is earlier than *LargeBetaArrivalTime*, then it is appended to *σ*<sup>2</sup> and removed form *σ*ˆ2. This process iterates until all the jobs of *σ*ˆ2 are checked. After that, the job having the largest *β* is appended to *σ*<sup>2</sup> and removed form *σ*ˆ2. We repeat the above steps until all the jobs be processed and then we get a feasible non-permutation schedule.

The second heuristic, JR-time Non-Permutation Heuristic, is similar to the first one except for using *p*1,*<sup>i</sup>* and *p*2,*<sup>i</sup>* to arrange the job sequence.

#### **Algorithm 4:** JR-resource Non-Permutation Heuristic **<sup>1</sup>** Order the jobs by Johnson's rule using *α<sup>i</sup>* and *βi*.; **<sup>2</sup>** *σ*<sup>1</sup> =[], *σ*<sup>2</sup> =[], *σ*ˆ2 = ∅; **<sup>3</sup>** *i* = 0, *j* = 0, *k* = 0; **<sup>4</sup>** *v*(*t*1,*i*) = *v*0; **<sup>5</sup> while** *i* ≤ *n* **do <sup>6</sup>** *σ*¯ = CheckResource(*v*(*t*1,*i*), *σori*, *σJR*); **<sup>7</sup> if** *v*(*t*1,*i*) ≥ *σ*¯(*α*1) **then <sup>8</sup>** *v*(*t*1,*i*) = *v*(*t*1,*i*) − *σ*¯(*α*1); **<sup>9</sup>** *σ*1.append(*σ*¯(1)); **<sup>10</sup>** *σ*ˆ2.append(*σ*¯(1)); **<sup>11</sup>** *i* = *i* + 1; **<sup>12</sup> else <sup>13</sup> forall** *job k* ∈ *σ*ˆ2 **do <sup>14</sup> if** *LargeBetaArrivalTime* ≥ *f raction* ∗ *t*2,*<sup>k</sup>* **then <sup>15</sup>** *σ*2.append(*job k*); **<sup>16</sup>** *v*(*t*2,*j*) = *v*(*t*2,*j*) + *βk*; **<sup>17</sup>** *σ*ˆ2.remove(*job k*); **<sup>18</sup>** *j* = *j* + 1; **<sup>19</sup>** *v*(*t*2,*j*) = *v*(*t*2,*j*) + *βLargeBeta*; **<sup>20</sup>** *σ*2.append(*J*2,*LargeBeta*); **<sup>21</sup>** *σ*ˆ2.remove(*J*2,*LargeBeta*); **<sup>22</sup>** *j* = *j* + 1; **<sup>23</sup> while** *len*(*σ*ˆ2) ≤ *n* **do <sup>24</sup>** *v*(*t*2,*j*) = *v*(*t*2,*j*) + *βj*; **<sup>25</sup>** *σ*2.append(*job*2,*j*); **<sup>26</sup>** *σ*ˆ2.remove(*job*2,*j*); **<sup>27</sup>** *j* = *j* + 1; **<sup>28</sup>** Stop.

#### **5. Ant Colony Optimization**

In this section, we design an ACO algorithm to solve our problem. We will explain the framework and strategies of the algorithm for producing the approximate sequence.

State transition rule: In the ACO search process, each ant selects the next node to visit by calculating the preference for each path according to the pheromone intensity and heuristic visibility. In the proposed ACO algorithm, the preference *Pij* of an ant, positioned at node *i*, for selecting node *j* is defined as:

$$P\_{ij} = \begin{cases} \frac{\tau\_{ij}^{\mu\_r} \eta\_{ij}^{\mu\_\eta}}{\sum\_{j \in I} \tau\_{ij}^{\mu\_r} \eta\_{ij}^{\eta\_\eta}}, & \text{if } j \in I; \\ 0, & \text{otherwise}, \end{cases} \tag{1}$$

where *τij* is the pheromone intensity on the link from node *i* to node *j*, and *ηij* the visibility value from node *i* to node *j*, and *I* the set of remaining admissible jobs to be processed. Parameters *w<sup>τ</sup>* and *w<sup>η</sup>* control the relative importance of *τij* and *ηij*. The greater a parameter is, the more influence of it to the preference value. In our design, the visibility value *ηij* is based on a greedy strategy. We prefer less processing times on both machines, less resource requirement, and larger amount of the resource returned by job for priority selection. Visibility value is defined as:

$$
\eta\_{ij} = \frac{\beta\_j}{a\_j + p\_{1j} + p\_{2j}}.\tag{2}
$$

We use preference values *Pij* for our exploration strategy. This method is just like the roulette wheel that every node, i.e., every job has their transition probability, based on which we select the next job randomly. Every node has a chance to be selected, even the probability is low.

Pheromone updating rule: After all the jobs are processed, we update the pheromone tails so that the ants can select their future paths according to previous experience. The trail intensity on link (*i*, *j*) is updated as below:

$$
\pi\_{i\dot{j}} = (1 - \rho) \times \pi\_{i\dot{j}} + \Delta \pi\_{i\dot{j}}.\tag{3}
$$

where *ρ* represents the pheromone evaporation rate, and Δ*τij* the incremental pheromone between nodes *i* and *j* given as:

$$
\Delta \pi\_{ij} = \begin{cases}
\begin{array}{c}
\frac{Q}{C\_k}, & \text{if } j \in \mathcal{I}; \\
0, & \text{otherwise}.
\end{array}
\end{cases}
\tag{4}
$$

In the above definition, *Q* is an adjustable parameter and *Ck* the completion time of the last job on machine 2. This strategy is based on policy that the less *Ck* is, the more pheromone on the path enhanced.

Stopping criterion: The proposed ACO algorithm assigns a colony of ants to probe their own sequences and set a maximum number of iterations. When all the ants complete their routes in one iteration, we select the minimum makespan, i.e., the elite, to be our current best solution. Then, we iterate the process until reaching the maximum number of iterations. If there is a better solution in iterations, this new solution will replace the current best one.

Permutation: To take into account the resource constraints on two machines, we only choose the job that would return the sufficient resource for the remaining jobs to be successfully processed. Therefore, we use the function CheckResource before ants select the next job and then enter the ACO algorithm to get the permutation sequence. This method is similar to JR Permutation Heuristic except that we use ACO to choose the job sequence.

Non-Permutation: For non-permutation sequences, we divide the algorithm into two parts. In the first part, we use the ACO algorithm to obtain the sequence on machine 1,

similar as in Permutation. In second part, the difference form Permutation is when the resource is insufficient for the next job, we use the same method *LargeBetaArrivalTime* in JR-resource Non-Permutation Heuristic to select jobs to process on machine 2. Then, we can get a complete sequence and we use it to update the ACO algorithm. As a result, we can get the non-permutation sequence by ACO combined with the heuristic method on machine 2.

#### **6. Computational Experiments**

In this section, we present computational experiments on the proposed methods through test data to compare and analyze the performance of these algorithms. The programs were coded in Python and executed on a personal computer with an Intel(R) Core(TM) i7-8700K CPU running at 3.70 GHz with 32.0 GB RAM. The operating system is Windows 10. We will describe how the test data sets were generated. Then, we present the related parameter settings and discuss the experimental results.

**Data generation schemes:** In our experiments, all parameters are integer. Processing times *p*1,*<sup>j</sup>* and *p*2,*<sup>j</sup>* of jobs on different machines were generated from the uniform distribution, [1, 10]. Resource parameters *α<sup>j</sup>* and *β<sup>j</sup>* were generated from the uniform distribution [1, 20]. The initial resource level was considered based on 1.1 and 1.4 times the minimum resource requirement that is at least how much the resource is needed for all the jobs of each data set. Test data sets are categorized into 8 different job numbers *n* ∈ {10, 20, 30, ... , 80}. For each job number, 5 independent sets were generated. Each set also has different uniform distributions for processing times *p*1,*<sup>j</sup>* and *p*2,*j*, the resource parameters *α<sup>j</sup>* and *βj*, and the initial resource requirement. That means that we have 40 different data sets in all. On each data set, say 10 jobs, heuristic algorithms were run only once since they are deterministic. For a specific setting, the values were averaged over 5 independent sets of the same setting. The ACO algorithm, due to its randomness nature, was exercised 5 runs on each data set to get its average performance.

#### *6.1. Results of Heuristic Algorithms*

In this experiment, we apply the four heuristic algorithms on different data sets. We compare permutation solutions with non-permutation ones in two different methods, namely JR-resource and JR-time. The initial resource level in all experiment results set by multiplying the minimum resource requirement by 1.1. For each problem size, the average objective value of derived solution (minimum makespan) are reported. Since the elapsed execution times of four heuristic algorithms are almost negligible, we do not show the execution time in the following tables. All detail experiment results of different data sets are shown in Appendix A.

In Table 2, the makespan of permutation sequence of perm and non-permutation is max*β*. It can be seen that the JR-resource algorithm can get better makespan than the JR-time algorithm. Since the constraint is considered by resource, it is obviously that when the jobs sequenced by processing time, the resource would insufficient and the jobs should wait for the resource returned which lead to idle time. In most of the data sets, the makespans of permutation heuristics are less than non-permutation ones (max*β* in Table 2). However, sometimes, non-permutation can get a better solution that reported in JR-resource with 10 jobs. We speculate that some jobs on machine 2 can fill up the idle time and thus decrease the waiting time on machine 1.

In the experiment, there are different fractions of the bearable exceeding time, which is the acceptable time length that exceeds *LargeBetaArrivalTime*, used in JR-resource and JR-time Non-Permutation Heuristics. The fraction ranges from 5/10 to 10/10. Table 3 is for JR-time Non-Permutation Heuristics focused on processing times, and Table 4 for the heuristics focused on *α<sup>i</sup>* and *βi*. If we do not consider the bearable exceeding time, the makespan would be more than others that bear the exceed time because there is longer idle time in the sequences. It is clear that with the 10/10 fraction we get a longer makespan. In most cases, the makespan is the same regardless of the fraction. However, sometimes

it is shown that if we bear too much exceeded time, we may get worse makespan with a 5/10 fraction of 20 jobs in JR-time and 5/10 to 6/10 fractions of 10 jobs in JR-resource. The results of fractions are not better than permutation ones, so we do not have further test for different fractions with 1.4 times the initial resource level.

**Table 2.** JR-resource and JR-time heuristics.


**Table 3.** Different fractions in JR-time Non-Permutation Heuristics.


#### *6.2. Results of ACO Algorithms*

We discuss the results of ACO algorithms with permutation and non-permutation options. We tuned several parameter values in preliminary tests to determine the setting for further experiments. We observed differences in the results, although not significant. The parameter values leading to better results were adopted as the base setting for the final computational tests. We set the two parameters *w<sup>τ</sup>* = 2 and *w<sup>η</sup>* = 3 that could get better makespan in the experiment we tested before. The pheromone evaporation *ρ* is 0.95 to avoid early convergence. Parameter *Q* is defined as the number of jobs divided by 10 and multiplied by 50. Setting 100 epochs for a solution with the colony size the same as the number of jobs. Then, we have each data set run this process 5 times to get an average makespan and an average elapsed execution time. The time unit here is second and "-" means that no feasible solution was found. All complete experiment results are shown in Appendix A.


**Table 4.** Different fraction in JR-resource Non-Permutation Heuristics.

In Table 5, perm indicates the permutation method, and max*β* the non-permutation method presented in Section 5. M2-enum is also non-permutation sequence that is different from the method we used in max*β*. The difference between them is that when the resource is insufficient on machine 1, M2-enum will enumerate all the possible sequences of candidate jobs on machine 2 to find the minimum makespan and return resource. This procedure is time-consuming because the number of possible sequences we need to compare is a factorial of the number of candidate jobs on machine 2. Therefore, when the job number is larger than 30, we cannot get a solution in 3600 s. We also experiment on the integer programming method (IP) proposed by Cheng et al. [13] to solve the problem. The IP can get the optimal solutions for data sets. However, when the number of jobs is over 10, it cannot find any feasible solution in 3600 s for most data sets. Therefore, it is regarded as no solution found. With the initial resource is multiplied by 1.1, it is clear that perm can obtain a better makespan and the required run time of perm is also less than max*β*.


**Table 5.** Results of ACO algorithms and IP with 1.1 × initial resource levels.

Table 6 indicates that with more initial resource a better makespan can be achieved, as comapred with those in Table 5. Similarly, M2-enum and IP cannot get any solution when job numbers are over 30 and 10, respectively, in 3600 s. It is also shown that when the initial resource level is larger, for like 30 jobs, M2-enum will waste more time so that it cannot find better solutions in 3600 s (Displayed in Table A18). Then, the permutation method can find an approximate solution with less time. However, results of 1.1 and 1.4 times are within spitting distance when the quantity of jobs increases. It is reckoned that the processing times of the subsequent jobs on machine 2 are larger and the resource is sufficient for them, so their starting times are later than their completion times on machine 1 and they keep processing continuous without idle time. Therefore, the makespan of larger data sets are not quite different when the initial resource increases.


**Table 6.** Results of ACO algorithms and IP with 1.4 × initial resource levels.

Table 7 shows that different fractions of the bearable exceeding time used in ACO Non-Permutation algorithms with different times of the initial resource. In most cases, it would get less makespan with considering the bearable exceeding time. The makespan resulted from fractions between 5/10 and 9/10 are not quite different. It is clearly shown that the makespan of 10/10 fraction is longer than others. As a result, setting the bearable exceeding time can achieve a better performance.

**Table 7.** Results of different fraction in max*β* of ACO with different initial resource levels.




*6.3. Comparison between Heuristics and ACO Algorithms*

We discuss the experiment results of the heuristic and the ACO algorithms with special focus on permutation results of JR-time and JR-resource because the makespan of permutation cases are less than other non-permutation heuristic algorithms. ACO-10/10 is the 10/10 fraction of exceeding time bearable in the non-permutation ACO algorithm. We also choose the 5/10 fraction (ACO-5/10) and the permutaion of ACO (ACO-perm) as the control groups.

In Figures 5 and 6, both heuristic algorithms produced larger makespan no matter if the initial resource is multiplied by 1.1 or 1.4, especially for the JR-time. However, there is still some deviations in the ACO algorithms owing to the randomness nature. Except for the above situation, 1.4 times are still better than 1.1 times in most cases with permutation and non-permutation methods, especially JR-time. We reckon that with a higher initial resource level, more jobs on machine 1 can keep continuous processing, thus reducing the idle time waiting for resource return. Concerning the ACO algorithm, it is clear that that the 5/10 fraction is better than the 10/10 case.

**Figure 5.** Bar chart of comparison with 1.1 × initial resource levels.

**Figure 6.** Bar chart of comparison with 1.4 × initial resource levels.

#### **7. Conclusions and Future Works**

In this paper, we considered the relocation problem in a two-machine flow shop scheduling problem with the second machine introduced for recycling the resource returned by jobs completed on the first machine. For this problem, we proved that given a sequence of jobs on whichever machine, the problem is still strongly NP-hard. The case with two fixed sequences of jobs on both machines can be solved in polynomial time. For the computationally hard problem, we proposed two heuristic algorithms to construct feasible schedules with permutation and non-permutation sequences. ACO algorithms were designed to find processing sequences on the two machines. Computational experiments indicates that JR-resource produced better makespan than JR-time, and both of their permutation algorithms are better than the non-permutation ones. This result is similar as in ACO algorithm that the makespan of permutation solutions are better. However, when we considered the bearable exceeding time, non-permutation sequences can get better solutions. Between heuristics and ACO algorithms, it is shown that ACO algorithms yielded schedules with less makespan.

For further studies, there is room for further improvements of our proposed solution methods by developing effective methods to arrange the job sequence on machine 2 to mitigate the incurred idle time. Furthermore, we can also combine processing time and resources as a control factor in the heuristic algorithms. It would be also interesting to deploy machine learning and reinforcement learning approaches for finding better parameter settings and updating strategies. We also note that to optimally solve the problem is still limited to small-scale instances. For larger instances, we need tighter lower bounds to facilitate the development of exact methods and provide a tight comparison base for approximation methods. Another direction is identifying application contexts in which the unique type of resource constraints, the amount of consumed resource and the amount of returned resource could be different, is applicable.

**Author Contributions:** Conceptualization, T.-C.L. and B.M.T.L.; methodology, T.-C.L. and B.M.T.L.; software, T.-C.L.; formal analysis, T.-C.L. and B.M.T.L.; writing—Original draft preparation, T.-C.L. and B.M.T.L.; writing, T.-C.L. and B.M.T.L.; supervision, T.-C.L. and B.M.T.L.; project administration, B.M.T.L.; funding acquisition, B.M.T.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** Lo and Lin were partially supported by the Ministry of Science and Technology of Taiwan under the grant MOST-109-2410-H-009-029.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Datasets analyzed in this study can be found at http://cpanel-199-19 .nctu.edu.tw/~bmtlin/F2RP.zip (accessed on 29 June 2021).

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Appendix A. Detail Experiment Results**

All of the experiment results mentioned in Section 6 are summarized from the detail information shown below. We show the makespan (*C*max) and execution time for each data set followed by the average over five data sets in different job numbers. In the tables, "perm" means permutation method, and "max*β*" non-permutation with a 10/10 fraction. We also set the execution time to stop the program if it exceeds 3600 s. Therefore, if we cannot obtain any solution in 3600 s, we indicate the situation by an "-" entry. In ACO, owing to its randomness property, we run each data sets for five times which is "Run." in the tables. In Tables A18 and A19, when the numbers of jobs are over 30 and 10, we cannot obtain solutions for most cases so that we do not experiment on the cases with more jobs. It is clear that most results are associated with an "-", indicating that no solutions were found within 3600 s.


**Table A1.** JR-resource with 1.1 × initial resource levels.


**Table A1.** *Cont*.

**Table A2.** JR-time with 1.1 × initial resource levels.



**Table A2.** *Cont*.


**Table A3.** JR-resource and JR-time with 1.4 × initial resource levels.


**Table A3.** *Cont*.

**Table A4.** ACO Permutation with 1.1 × initial resource levels.


**Table A4.** *Cont*. **Run Sets of Job 12345 1 2 3 4 5** *C***max Time***C***max Time***C***max Time***C***max Time***C***max Time***C***max Time** *C***max Time** *C***max Time** *C***max Time** *C***max Time 40 80 1** 234 22.94 226 22.26 237 22.21 244 21.88 255 21.37 493 262.88 459 272.06 474 280.10 429 286.30 426 290.69 **2** 234 22.34 225 22.15 237 22.17 244 22.18 255 21.70 494 264.76 457 268.81 476 301.40 429 282.64 426 279.41 **3** 234 22.39 225 22.12 237 22.22 244 21.97 255 21.79 491 269.19 459 274.39 476 289.93 429 286.31 427 279.23 **4** 234 22.23 226 22.42 237 23.49 244 21.46 255 21.92 491 267.44 459 274.37 476 290.52 429 286.06 426 283.96 **5** 234 22.20 226 22.37 237 21.27 244 21.66 255 21.58 491 261.35 460 274.82 476 287.02 429 292.30 428 288.61 **Avg.** 234 22.42 226 22.26 237 22.27 244 21.83 255 21.67 492 265.12 459 272.89 476 289.80 429 286.72 427 284.38

**Table A5.** 10/10 fraction in max*β* of ACO with 1.1 × initial resource levels.




**Table A7.** 8/10 fraction in max*β* of ACO with 1.1 × initial resource levels.



**Table A7.** *Cont*.

**Table A8.** 7/10 fraction in max*β* of ACO with 1.1 × initial resource levels.



**Table A8.** *Cont*.



**Table A9.** *Cont*. **Run Sets of Job 12345 1 2 3 4 5** *C***max Time***C***max Time***C***max Time***C***max Time***C***max Time***C***max Time** *C***max Time** *C***max Time** *C***max Time** *C***max Time 40 80 1** 234 40.62 226 39.70 237 42.47 244 42.91 254 43.84 491 345.15 459 363.19 476 405.04 429 371.25 427 395.82 **2** 234 40.83 226 40.25 237 41.81 244 43.00 255 42.47 491 349.86 459 362.35 476 401.10 429 408.69 427 400.23 **3** 235 40.70 224 40.67 237 42.36 244 42.46 253 43.08 491 363.31 459 380.68 476 406.06 429 396.13 427 398.01 **4** 234 40.81 226 40.62 237 42.19 244 42.81 254 41.81 491 355.77 459 410.13 476 407.89 429 399.04 426 400.03 **5** 234 40.64 226 41.40 237 42.97 245 43.13 254 39.00 491 353.87 460 400.75 476 409.60 429 396.60 426 396.07 **Avg.** 234 40.72 226 40.53 237 42.36 244 42.86 254 42.04 491 353.59 459 383.42 476 405.94 429 394.34 427 398.03

**Table A10.** 5/10 fraction in max*β* of ACO with 1.1 × initial resource levels.



**Table A11.** ACO Permutation with 1.4 × initial resource levels.




**Table A12.** *Cont*.

**Table A13.** 9/10 fraction in max*β* of ACO with 1.4 × initial resource levels.



**Table A13.** *Cont*.


**Table A14.** 8/10 fraction in max*β* of ACO with 1.4 × initial resource levels.

**Table A14.** *Cont*. **Run Sets of Job 12345 1 2 3 4 5** *C***max Time***C***max Time***C***max Time***C***max Time***C***max Time***C***max Time** *C***max Time** *C***max Time** *C***max Time** *C***max Time 40 80 1** 234 33.74 226 32.75 237 34.00 244 34.79 252 35.40 491 372.89 459 371.61 476 378.11 429 431.14 427 367.77 **2** 234 35.39 226 33.79 237 34.33 244 34.56 252 35.25 491 385.00 457 376.62 476 386.75 429 437.42 425 355.19 **3** 234 34.76 226 32.94 237 33.78 244 35.11 252 35.64 491 367.65 459 379.97 476 380.16 429 433.80 425 366.88 **4** 234 34.00 226 32.51 237 33.50 244 35.07 252 35.27 491 369.67 459 371.16 474 378.50 429 375.88 424 375.39 **5** 234 34.47 226 32.77 237 33.62 244 35.29 252 34.29 491 366.16 458 369.34 476 373.08 429 365.21 425 364.34 **Avg.** 234 34.47 226 32.95 237 33.85 244 34.96 252 35.17 491 372.27 458 373.74 476 379.32 429 408.69 425 365.92

**Table A15.** 7/10 fraction in max*β* of ACO with 1.4 × initial resource levels.



**Avg.** 234 34.11 226 32.57 237 33.70 244 34.42 252 34.43 491 355.61 459 364.48 475 370.42 429 345.34 425 361.56



**Avg.** 234 34.50 226 31.99 237 33.08 244 33.99 252 34.21 491 360.70 459 359.90 476 370.17 429 345.73 425 361.33



#### *Mathematics* **2021** , *9*, 1527

**Table A18.**

Experiment

 results of ACO M2-enum.


**Table A19.** Experiment results of IP.

#### **References**


## *Article* **An Imitation and Heuristic Method for Scheduling with Subcontracted Resources**

**Anna Antonova \*, Konstantin Aksyonov and Olga Aksyonova**

Faculty of Information Technology and Automatics, Ural Federal University, 620002 Ekaterinburg, Russia; k.a.aksyonov@urfu.ru (K.A.); wiper99@mail.ru (O.A.)

**\*** Correspondence: a.s.antonova@urfu.ru

**Abstract:** A scheduling problem with subcontracted resources is widely spread and is associated with the distribution of limited renewable and non-renewable resources, both own and subcontracted ones based on the work's due dates and the earliest start time. Scheduling's goal is to reduce the cost of the subcontracted resources. In the paper, application of a few scheduling methods based on scheduling theory and the optimization algorithm is considered; limitations of these methods' application are highlighted. It is shown that the use of simulation modeling with heuristic rules for allocation of the renewable resources makes it possible to overcome the identified limitations. A new imitation and heuristic method for solving the assigned scheduling problem is proposed. The comparison of the new method with existing ones in terms of the quality of the found solution and performance of the methods is carried out. A case study is presented that allowed a four-fold reduction of the overall subcontracted resources cost in a real project portfolio.

**Keywords:** scheduling theory; operations research; subcontracted resources; scheduling on parallel machines; renewable and non-renewable resources; heuristic methods

#### **1. Introduction**

The problem of business processes and project works scheduling is one of the key problems of organizational system control. Organizational systems are widely spread: examples are enterprises of various industries, multiservice communication networks, and project organizations.

To date, some methods to solve the scheduling problem with resource constraints have been developed depending on the problem statement, restrictions, and objective function. These are scheduling theory and network methods [1–5], simulation and multi-agent modelling methods [6,7], heuristic methods [8,9], and methods based on the application of commercially available solvers [10–14].

According to the machine environment, scheduling problems can be divided into the main following types with the type notation in brackets [15]: identical parallel machines (*Pm*) where work can be performed at any of the machines [1–5,8,9,12,14]; Job shop (*Jm*) where each work has to be processed on each of the machines and all works have different routes [6,7,11,13]; Open shop (*Om*) where each work has to be processed on each of the machines and some of this processing time may be zero [10].

According to the processing restrictions, there are several main constraints specified: release dates (*rj*), where work *j* cannot start its processing before its release date [3–5]; precedence constraints (*prec*), where one or more works have to be completed before execution of a certain consequent work is allowed [1–9,12–14]; batch processing (*batch*(*b*)), where a machine may be able to process a number of *b* works simultaneously [11,12]; and breakdowns (*brkdwn*), where a machine may not be permanently available [3,5].

The main objective functions of the scheduling problem are: Makespan minimization (*Cmax*) is a minimization of the last work's completion time to leave the system [1–4,6–9];

**Citation:** Antonova, A.; Aksyonov, K.; Aksyonova, O. An Imitation and Heuristic Method for Scheduling with Subcontracted Resources. *Mathematics* **2021**, *9*, 2098. https:// doi.org/10.3390/math9172098

Academic Editors: Chin-Chia Wu and Frank Werner

Received: 26 July 2021 Accepted: 27 August 2021 Published: 30 August 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

and the weighted number of tardy jobs minimization (∑ *ωjUj*) [5,11–14], throughput maximization [10].

In general, the scheduling problem is a problem of work's sequence definition satisfying the given restrictions and minimizing makespan. A schedule, or calendar plan, is a set of work start dates. Commonly, researchers have investigated the renewable restricted resources that are occupied while a work is being performed and released when the work is over, as in [1,2,4–6,8–12,14]. Examples of the renewable resources are personnel, aggregates, vehicles, and other. At the same time, there is an urgent problem to consider non-renewable resources' distribution, as in [3,7,13]. The non-renewable resources are consumed at the work input and produced at the work output. Examples are raw materials, fuel, finance, and goods.

We consider the scheduling problem on parallel machines in the presence of the orders' earliest start times and due dates. We have extended the problem by using subcontracted resources' cost optimization and accounting for restricted non-renewable resources. The optimization of subcontracted resources is relevant either for enterprises with a relatively small set of their own resources, or for enterprises with resources of constrained competence. These enterprises flexibly respond to demand fluctuations in products manufactured or services provided and attract subcontracted resources when it is necessary. Examples are construction companies and project organizations. They need to reduce the engaged subcontractors' cost while keeping with existing time restrictions to reduce the company's waste.

The rest of the paper is organized as follows. In Section 2, a literature overview is presented. Notations used are presented in Section 3. In Section 4, a scheduling problem is formulated considering own and subcontracted renewable and non-renewable resources. Application of the scheduling methods to the trial problem and their shortcomings are given in Section 5. In Section 6, we propose an imitation and heuristic method for the problem considered. In Sections 7 and 8, a case study is presented providing a comparison of the application results of the methods considered. We conclude this research and propose directions for the further work in Section 9.

#### **2. Literature Overview**

Network methods for the scheduling problem are introduced in [1,2]. They are intended to determine a critical path and backup time for a work. A PERT method [1] is used when works have a probabilistic duration with due dates. A GERT method [2] extends the PERT method by considering the probabilities of individual works' implementation. The methods are very useful in the case of precedence relation occurrence. Network methods do not support non-renewable resources' implementation and restrictions on the works' earliest start time.

An approximate algorithm proposed in [3] is intended to solve the scheduling problem with restricted renewable and non-renewable resources in the presence of a deadline and restrictions on the earliest start time for a work. The algorithm has two stages. At the first stage, a feasible schedule is calculated based on an assumption that all resources are non-renewable. At the second stage, the renewable resources' constraints are added to the schedule found and then works are packed to satisfy all resource constraints and minimize the execution time. A disadvantage of the algorithm is that the arrangement solution is excluded from consideration if contradictions arise between the resource constraints and work deadlines. For example, excess availability of the own renewable resources for works on the critical path can exist. In this case, companies can use subcontracted renewable resources, the cost of which needs to be optimized.

For a scheduling optimization problem in a parallel system with identical nonrenewable resources and orders' earliest start dates, two algorithms of the scheduling theory are presented in [4,5]. The algorithms are discussed in detail in Section 5.

A decentralized scheduling approach applied to a job-shop scheduling problem via agent-based simulation is presented in [6,7]. Multi-agent simulation is a popular technique

intended to represent decision makers as a community of interacting agents [16]. In this case, each renewable resource and each single work is represented by an agent. The agents interact with each other and allocate the resources to the works by mean of negotiations. In [6], a new control algorithm based on dispatching rules is described. This algorithm is used to assign a score to each agent-resource proposal to agent-work, then the agent-work chooses the highest scored one. The resource score depends on the work's minimum processing time provided by the current resource compared to all the available alternatives, and the average cycle time of the system. An advantage of the algorithm is simultaneous multi-objective optimization of the system's throughput and cycle time, with weighted linear convolution of the two into a single objective function. In [7], the schedule is built via self-organization of software agents forming two networks of demands and resources, competing and cooperating on a virtual market. Agents of the basic types are the agents of orders (works), tasks (operations), resources (renewable resources), products (nonrenewable resources), as well as the scene agent. Each agent has its own objective function named the satisfaction function, which is a weighted sum of components that meet various criteria. The value of the system's objective function is refined through the normalized sum of the agents' objective functions. The scheduling algorithm given in [7] includes a negotiation stage used by agents to build a set of conflicting orders for the resources and a conflict resolution stage, which recursively search for placement options taking into account existing limitations. The main advantages of the agent-based scheduling approach proposed in [7] are the agent's knowledge base of preferences when assigning resources to operations and the ability to reschedule in real time if the list of available resources or works has changed.

Heuristic scheduling algorithms based on a genetic algorithm are presented in [8,9]. The genetic algorithm (GA) is a popular optimization technique applicable to various application fields proposed by Goldberg [17]. In [8,9], a sequence of works is encoded into a chromosome, a population of the chromosomes is formed to represent a project, and then the population is transformed via genetic operators. Each of the investigations proposes a fitness function of the total project duration that is to be minimized. In [8], the authors introduce a dense gene concept, which is a fixed chromosome section that encodes a sequence of works that uses the available renewable resources in the most optimal way, providing the smallest remainder of free resources. The scarcity of the renewable resource is determined by solving the simplified scheduling problem with assumption that all the resources are non-renewable and calculating the remaining free resources. In [9], a scheduling problem of prefabricated buildings is considered. The authors consider both renewable resources and prefabricated blocks, or non-renewable resources, and their supplies. The GA consists of two stages: first, a schedule is formed with the assumption that the non-renewable resources are in shortage; second, the non-renewable resource supply's time constraints are added to the schedule and a new search is performed. The advantage of the algorithm presented in [9] is the use of heuristics to generate an initial population that allows a reduction in the number of unfeasible solutions produced by GA.

Commercial solvers were applied to the scheduling problem in [10–14].

OptQuest optimizer is a software that incorporates a combination of metaheuristics, such as scatter search, tabu search, and neural networks [18]. As a part of the AnyLogic modeling system [19], OptQuest is used to solve the multi-objective scheduling problem in [10,11]. A simulation model is used as an objective function for the optimization, which in return determines an optimal configuration of input parameters for the simulation model. Two algorithms of the renewable resources' allocation based on dispatching rules or on agent negotiation are compared using the OptQuest optimizer in [10]. Controlled variables are the assignment of resources to works, and the objective function is a multi-object function that estimates the total delay of the works and the total consumption of the renewable resources. The authors concluded that the use of the multi-agent approach decreases the resource waiting time for works but does not increase the throughput. The advantage of the study [11] is that energy consumption is considered as a part of the objective function. The

author searches for an effective batch size using OptQuest optimizer and then improves the resources' utilization within the obtained schedule. It is concluded that batch size has a greater impact on the total delay rather than on the energy consumption.

A GA-based solver is embedded into the Tecnomatix Plant Simulation software package [20]. An application of this solver to the scheduling problem is presented in [12,13]. In [12], a flow shop problem is considered with a multi-objective function minimizing the mean flow time and total setup time. The solver optimizes the batch size and sequence of the product batches entering the system. In [13], a real-time job shop scheduling problem is considered with restricted renewable and non-renewable resources and works' due dates. A simulation model is used to assess the idling of processing equipment and the efficiency of the workshop in terms of throughput. The GA solver is used to allocate the renewable and non-renewable resources to the works. Advantages of the study are consideration of both types of resources and the integration of the scheduling phase into a cloud manufacturing system.

Subcontracted renewable resources are considered in [14]. The authors optimize the schedule cost by allocation of own and subcontracted resources taking into account a time-cost contradiction. The method is discussed in detail in Section 5.

We consider the scheduling problem optimizing not only own renewable resources but also subcontracted ones. The problem's objective function is cost minimization of the engaged subcontracted resources. The problem restrictions include the time frame of the earliest and latest work start date and a limited amount of the non-renewable resources available.

The goal of the present paper is to develop and assess an imitation and heuristic (IH) method for the scheduling problem with subcontracted resources. We considered two scheduling theory methods of scheduling on parallel machines by V. S. Tanaev and Y. A. Mezentsev to be most suitable for solving the given problem. We also considered application of a commercial solver to the given problem. Use of simulation and heuristics together allows us to overcome the revealed disadvantages of the considered methods. The developed IH method was applied for schedule search in a project company.

#### **3. Notations**

#### *3.1. Indices*

We consider the following indices:


#### *3.2. Sets*

We consider the following sets:

• *<sup>e</sup>*<sup>1</sup> <sup>&</sup>lt; *<sup>e</sup>*<sup>2</sup> <sup>&</sup>lt; ... <sup>&</sup>lt; *ek*<sup>+</sup><sup>1</sup> is a set of the variables <sup>τ</sup><sup>0</sup> *<sup>i</sup>* and *dli* values in the V.C. Tanaev method;


We identified the following parameters:

	- subcontracted, required to process orders in the V.C. Tanaev method, *n*(*k*) ≤ *M*;

#### *3.4. Decision Variables*

The decision variables may vary regarding the different scheduling problem statements. We identify the following decision variables connected with the problem:


executed by the machine *g*; otherwise, it equals 0. In Section 5.3, we assume that the machine *g* can be an own or subcontracted one;

• *εi*,*<sup>j</sup>* are binary variables for the scheduling problem given in Section 5.3. The variable indicates orders that cannot be executed at the same time because they are to be processed by a single machine *g*. The variable *εi*,*<sup>j</sup>* equals 1 if the order *i* is to be completed before the order *j*; otherwise, it equals 0; (*i*, *j*) ∈ *Prp*.

#### **4. Scheduling Problem Statement**

The scheduling problem statement is given by the authors in [21]. Below are the key points. The notations are presented in Section 3.

We assume that a set of operations in each project *p* appears in order of increasing of the operation's cost *srp*,*i*,*r*; *srp*,*i*,*<sup>r</sup>* = 0 if the subcontracted resource *r* is not required by the operation *i* of the project *p*.

We denote the set of indices for the operations performed at the time *t* ≥ *τ* utilizing the renewable resource *r* as follows:

$$Z(t,r) = \left\{ i \in \left[1, N\_p\right] \ge\_{p,i} \le t < \mathbf{x}\_{p,i} + d\_{p,i} \text{ & } q\_{p,i,r} \ne 0 \text{ & } p \in \left[1, P\right] \right\} \tag{1}$$

We denote the set of indices for the operations performed at the time *t* ≥ *τ* utilizing the non-renewable resource *v* as follows:

$$Z(t, v) = \left\{ i \in \left[1, N\_p\right] \ge\_{p, i} \le t < \mathbf{x}\_{p, i} + d\_{p, i} \text{ & } q\_{p, i, v}^- \ne 0 \text{ & } p \in \left[1, P\right] \right\}.\tag{2}$$

We denote the set of indices for the operations performed at the time *t* ≥ *τ* utilizing the own renewable resource *r* within the available amount *Qr*:

$$\Theta(t, r) = \{ i \in Z(t, r) \: \sum\_{p \in [1, P]} \sum\_i q\_{p, i, r} \le Q\_r \}. \tag{3}$$

The set of indices for the operations performed at the time *t* ≥ *τ* utilizing the subcontract resource *r* is defined as follows:

$$\mathcal{Y}(t,r) = \mathcal{Z}(t,r) \backslash \Theta(t,r) = \left\{ i \in \left[1, N\_p\right] i \in \mathcal{Z}(t,r) \: \&\, i \notin \Theta(t,r) \right\}.\tag{4}$$

The percentage utilization of the resource *r* engaged in the project *p* at the time *t* is defined as follows:

$$\mathcal{U}\_{p,t,r} = \begin{cases} \begin{array}{c} \left(\sum\_{i \in \Theta(t,r)} q\_{p,i,r} / Q\_r \right) \cdot 100\%, \ i \in \Theta(t,r), \\ 100\%, \ i \in \Upsilon(t,r). \end{array} \tag{5}$$

The cost of the subcontract resource of an allocated competence *r* involved in the project *p* at the time *t* is defined by the formula:

$$SC\_{p,t,r} = \sum\_{i \in \mathcal{Y}(t,r)} sr\_{p,i,r} \cdot q\_{p,i,r} \,. \tag{6}$$

The current volume of the non-renewable resource *v* at the time *t* is defined as:

$$Q\_{l, \mathcal{P}} = Q\_{\tau, \mathcal{P}} + \sum\_{a = \tau}^{t} \sum\_{p = 1}^{p} \sum\_{\substack{p = 1 \\ i \in \mathcal{P} \\ \land a = \ge p, j}} q\_{p, l, \mathcal{P}}^{-} + \sum\_{a = \tau}^{t} \sum\_{p = 1}^{p} \sum\_{\substack{p = 1 \\ i \in \mathcal{P} \\ \land a = \ge p, j \in \mathcal{P}}} q\_{p, j, \mathcal{P}}^{+} \tag{7}$$

The scheduling problem can be formalized as follows:

$$Ft = \sum\_{p=1}^{P} \sum\_{t=\tau}^{T} \sum\_{r=1}^{R} SC\_{p,t,r} \to \min\_{\prime} \tag{8}$$

$$\sum\_{p=1}^{P} \sum\_{i \in \mathcal{I}} i \in \mathcal{Z}(t, \upsilon) \quad \left| q\_{p, i, \upsilon}^{-} \right| \le Q\_{t, \upsilon \prime} \,\forall \, t = \overline{\mathfrak{r}\_{\prime} \mathcal{T}\_{\prime}} \,\forall \, \upsilon = \overline{\mathfrak{l}\_{\prime} \mathcal{V}\_{\prime}} \tag{9}$$

$$
\tau\_{p,i}^0 \le x\_{p,i} \le \tau\_{p,i}^1 \; \forall \; p = \overline{1, P}, \; \forall \; i = \overline{1, N\_p}. \tag{10}
$$

The objective function (8) minimizes the total cost of the subcontracted resources in the case of exceeding the availability of the own ones. The constraint (9) ensures availability of the required amount of non-renewable resources at the time of the operation start. The constraint (10) imposes a time frame on the start dates of the operations.

#### **5. Scheduling Methods Application**

We consider the schedule optimization problem for the parallel system having identical machines in the presence of delays processing the orders. The problem is one of the closest problems studied by the scheduling theory. According to [15], the problem is formalized as follows: *Pm*/*rj*/*Cmax*. For the problem, a parametric algorithm of dynamic programming with an alternative dropout option was proposed by Y. A. Mezentsev et al. [4].

Another closest problem studied by the scheduling theory is a parallel system schedule optimization using identical machines in the presence of orders' due dates. The problem is formalized as follows: *Pm*/*brkdwn*,*rj*/ ∑ *ωjUj*. As a solution to the problem, a schedule construction algorithm using the given due dates is proposed by V. S. Tanaev et al. [5].

We also considered Lingo commercial solver's application to the scheduling problem according to the scheme given in [14]. Here, the problem is modelled as a mixed binary linear program that minimizes the project cost, including subcontracted and own resources cost.

We applied the considered algorithms to solve a trial small-scale scheduling problem using two own renewable resources *Q*<sup>1</sup> = 2 of the same competence *R* = 1, and one project *P* = 1 with the number of the operations *N*<sup>1</sup> = 7. Seven orders, or operations, are fed at a different time into a parallel system with two identical machines, or renewable resources. Table 1 contains the initial information about the operation's duration and time frame between order processing's earliest possible start and latest finish. We assume the operations are ordered by the earliest start time.


**Table 1.** Initial information of the trial scheduling problem.

The progress of solving the problem is given below.

#### *5.1. Method Developed by Y. A. Mezentsev*

We applied a parametric dynamic programming algorithm with the optional exclusion of the found alternatives to the considered scheduling problem. The notations are given in Section 3. The decision variables are Boolean variables *yg*,*<sup>i</sup>* allocating the order *i* to the machine *g*.

The dynamic algorithm variables can be calculated as given in the study [4]:

$$f\_{\mathcal{S}, \text{st}} \left( \pi\_{\text{st}}^{0}, d\_{\text{st}}, y\_{\mathcal{S}, \text{st}} \right) = \max \left\{ 0, \left[ \pi\_{\text{st}}^{0} y\_{\mathcal{S}, \text{st}} - \eta\_{\mathcal{S}, \text{st}-1} \left( \pi\_{\text{st}-1}^{0}, d\_{i}, y\_{\mathcal{S}, \text{t}} \right) \right] \right\} + d\_{\text{st}} y\_{\mathcal{S}, \text{st}} \tag{11}$$

$$\boldsymbol{\varrho}\_{\mathcal{S},\text{st}}\left(\boldsymbol{\tau}\_{i}^{0},\boldsymbol{d}\_{i},\boldsymbol{y}\_{\mathcal{S},i}\right) = \left\{f\_{\mathcal{S},\text{st}}\left(\boldsymbol{\tau}\_{\text{st}}^{0},\boldsymbol{d}\_{\text{st}},\boldsymbol{y}\_{\mathcal{S},\text{st}}\right) + \boldsymbol{\varrho}\_{\mathcal{S},\text{st}-1}\left(\boldsymbol{\tau}\_{i}^{0},\boldsymbol{d}\_{i},\boldsymbol{y}\_{\mathcal{S},i}\right)\right\},\; i = \overline{1,\text{st}-1},\tag{12}$$

$$\varphi\_{\rm st}\left(\pi\_{i}^{0},d\_{i},y\_{\rm g.i}\right) = \max\_{\mathcal{S}}\left\{\varphi\_{\rm g.st}\left(\pi\_{\rm st}^{0},d\_{i},y\_{\rm g.i}\right)\right\}, i = \overline{1,\rm st}.\tag{13}$$

The parametric algorithm includes the following stages:


We consider application of the parametric algorithm to the trial scheduling problem given in Table 1. Examples of the calculated algorithm characteristics are given in Tables 2 and 3 for the first and last algorithm stages. We set *H* = 2, *K* = 2<sup>2</sup> = 4.


**Table 2.** Results of the first algorithm stage completion.

Table 3 contains the dark filled cells connected to the schedules providing the minimum local makespan on the given stage.

Table 4 contains the four schedules identified as the solutions of the given small-scale scheduling problem.

Since the machines are identical, schedule 1 is equal to schedule 4 and schedule 2 is equal to schedule 3. Schedules 1 and 2 differ by two last orders allocated to the opposite machines. All of the schedules reveal deadline violation on orders 6 and 7.

The obtained schedules are shown in Figure 1 in the form of a Gantt chart.



#### *Mathematics* **2021**, *9*, 2098

**Table 4.** Schedules with minimal makespan.

**Figure 1.** Schedules received by the Y. A. Mezentsev method with the minimum makespan.

As we can see, the schedules found by the Y. A. Mezentsev method for a parallel system with identical machines and orders' earliest start time do not support the orders' due date. Subcontracted resources are not considered by the method. Thus, *Ft* = 0 for the schedule found by Y. A. Mezentsev.

#### *5.2. Method Developed by V. C. Tanaev*

We considered an algorithm implemented by V. C. Tanaev. The notations used are given in Section 3.

The decision variables are schedules *Sk*,*g*(*t*) for each resource *g* at each time interval *Ek*. These are integer type variables.

Two cases can occur: (1) *M* ≤ *Qr* if the existing machines are enough to process all the orders within time intervals *Ek*; (2) *M* > *Qr* if the existing machines are not enough to process all the orders at the *Ek* time intervals and it is necessary to attract an amount *M* ≤ (*M* − *Qr*) of subcontracted machines.

An algorithm is given in [5] and contains the following stages. We modified the algorithm by adding the stages 4 to 7 to reduce the number of interruptions:

	- a. If (*<sup>k</sup>* = <sup>1</sup>) OR (*<sup>k</sup>* = 1 AND the order *ik*,*<sup>L</sup>* at the previous time interval *Ek*−<sup>1</sup> has not been assigned to the machine *g* = *g*) OR (*k* = 1 AND the order *ik*,*<sup>L</sup>* at the previous time interval *Ek*−<sup>1</sup> has been assigned to the machine *<sup>g</sup>* = *<sup>g</sup>*, *<sup>g</sup>* > *Qr* AND *n*(*k*) ≤ *Qr*), then assign the machine *g* to the order *ik*,*L*:
		- i. *di* = *di* − Δ*k*, *Sk*,*g*(*t*) = *ik*,*L*, where *t* = (*ek*; *ek*<sup>+</sup>1];
		- ii. Eliminate the order *ik*,*<sup>L</sup>* from the set *Nk*. Go to Point 5;
	- b. If (*<sup>k</sup>* = 1 AND the order *ik*,*<sup>L</sup>* at the previous time interval *Ek*−<sup>1</sup> has been assigned to the machine *g* = *g*, *g* ≤ *Qr*) OR (*k* = 1 AND the order *ik*,*<sup>L</sup>* at the previous time interval *Ek*−<sup>1</sup> has been assigned to the machine *<sup>g</sup>* = *<sup>g</sup>* and *<sup>g</sup>* > *Qr* AND *n*(*k*) > *Qr*), then go to Point 6;

assign the *Nk* set orders having *di* durations to the set *M* machines for the *Ek* time interval. At this stage, we consider the following statements are true: *di* ≤ Δ*k*, *i* ∈ *Nk* and ∑*i*∈*Nk di* ≤ *M*Δ*k*:


We used the algorithm to solve the scheduling problem given in Table 1. We sorted the set *Np* orders according to the information given in Table 1.

We allocated time marks *eβ*+<sup>1</sup> , *β* + 1 = 9 to form a set of time intervals {*Ek*}, where *k* = 1, 8 (Figure 2).

**Figure 2.** Time intervals of orders' processing for the trial problem.

Results of the method's execution upon the trial problem are given in Table 5.

Since max*<sup>k</sup> <sup>n</sup>*(*k*) = 4, the number of machines is defined as four. However, the maximum

number of the machines used simultaneously turned out to be three as two orders were assigned to the machine *r*<sup>1</sup> at the time interval *E*<sup>6</sup> during schedule searching. Hence, we set *M* = 3, *Qr* = 2, and *M* = 1.

The schedule formed by the V. S. Tanaev method is shown in Figure 3.


**Figure 3.** Schedule provided by the V. S. Tanaev method.

We introduce a function *μg*(*t*) for subcontracted resources *g* = *Qr*, *M* and define it as follows: *μg*(*t*) = 1, *if Sk*,*<sup>g</sup>* <sup>=</sup> 0, *<sup>t</sup>* <sup>∈</sup> *Ek* 0, *else* . We calculate the subcontracted resources cost according to the formula:

$$Ft = \omega \sum\_{t=1}^{c\_{\beta+1}} \sum\_{\mathcal{S} = Q\_r}^{M} \mu\_{\mathcal{S}}(t) \tag{14}$$

For the schedule found by the V. S. Tanaev method, the cost of the subcontracted resources is *Ft* = 4*ω*.

The schedule found is not optimal according to the objective function (8). An example of a more effective schedule satisfying all the requirements (9)–(10) is shown in Figure 4; the subcontracted resources cost is *Ft* = 2*ω*.

**Figure 4.** Schedule with the most effective resource allocation.

Without loss of generality, let us identify *ω* = 100. Then, *Ft* = 400 for the schedule found by the V. C. Tanaev method.

#### *5.3. Method Based on the Commercial Solver Application*

We applied a method based on a Lingo solver [22] to the trial scheduling problem. We reduced our mathematical model into a model suitable for linear programming [14].

The decision variables are the following:


The mathematical model of this problem applied to a project is described as follows:

$$Kres = \sum\_{\substack{\mathcal{S} \in Rown \cup Rsc}} \sum\_{i \in Pr\_{\mathcal{P}}} \lambda\_{\mathcal{S},i} \cdot y\_{\mathcal{S},i} \to \min\_{\prime} \tag{15}$$

$$\sum\_{\chi \in Rown \cup R\_{\varkappa}} y\_{\mathcal{G},i} = 1, \forall \ i \in Pr\_{p\_{\prime}} \tag{16}$$

*xi* + *di* ≤ *xj* + *ML* · 1 − *εi*,*<sup>j</sup>* + *ML* · 2 − *yg*,*<sup>i</sup>* − *yg*,*<sup>j</sup>* , ∀(*i*, *j*) ∈ *Prp*, ∀*g* ∈ *Rown*∪ *Rsc*, (17)

$$\mathbf{x}\_{\rangle} + d\_{\rangle} \le \mathbf{x}\_{i} + ML \cdot \boldsymbol{\varepsilon}\_{i,j} + ML \cdot \left(2 - y\_{\mathcal{G}i} - y\_{\mathcal{G}j}\right), \forall (i,j) \in Pr\_{p\prime}, \forall \mathbf{g} \in Rown \cup Rsc,\tag{18}$$

*xN p* + *dN p* ≤ *Tdl*, (19)

$$Ft = \sum\_{\emptyset \in \operatorname{Rsc} i} \sum\_{i \in Pr\_p} \lambda\_{\emptyset, i} \cdot y\_{\emptyset, i} \le \operatorname{Ksc} \epsilon,\tag{20}$$

$$\mathbf{x}\_i \ge \mathbf{r}\_\prime \; \forall i \in \mathcal{P}r\_{p\prime} \tag{21}$$

$$y\_{\mathcal{g},i} \in \{0, 1\}, \; \forall \mathcal{g} \in \text{Rown} \cup \text{Rsc}, \; \forall \; i \in \text{Pr}\_{\mathcal{p}\prime} \tag{22}$$

$$
\varepsilon\_{i,j} \in \{0, 1\}, \; \forall (i, j) \in Pr\_p. \tag{23}
$$

For the problem given in Table 1, the following variable values are set:


It is defined for this problem that limited non-renewable resources are not considered while they are being introduced in the Formulation (8)–(10).

As a result of Lingo execution upon the linear programming problem (15)–(23), a set of alternative optimal schedules was formed providing the same minimum total used resources cost *Kres* = 7. Two optimal schedules are presented in Figure 5.

**Figure 5.** Two optimal schedules provided by the commercial solver.

As we can see, the commercial solver was able to reach subcontracting cost *Ft* = 0 for the schedules found, but there are violations of the deadline and the orders' earliest start time.

Thus, application of the commercial solver method leads to violation of the restrictions (9) and (10) of the problem considered.

#### **6. Imitation and Heuristic Method**

A key concept of the imitation and heuristic algorithm is integration of processes' imitation and some heuristic rules to improve the initial schedule. The IH method algorithm is based on an application of a multi-agent resource conversion process (MRCP) model [23]. The MRCP model is intended to describe discrete processes converting input non-renewable resources into output ones using renewable resources, or machines, throughout a given time interval.

An agent of the MRCP model is a decision maker model having formalized knowledge about resources' allocation using production rules. The MRCP model also includes a logistics agent. The logistics agent controls the current value and lifetime of the nonrenewable resources and ensures fulfillment of the restriction (9) by launching the purchase or production process of the non-renewable resource required in case its current volume is decreased to a critical value or the resource's lifetime is exceeded.

The IH algorithm is a cycle with alternating stages of imitation and application of heuristic rules to improve the schedule. During the imitation stage, the schedule is fed to the MRCP model input, and the model evaluates the subcontracted resources cost according to the Formula (8). During the heuristic stage, the algorithm shifts the start days for the operations, where the subcontracted resources cost exceeds the given threshold. During shifting, the restriction (10) is ensured. The algorithm stops either in the absence of exceeding the threshold of the subcontracted resources cost, or in case a certain number of cycles is reached.

Let us consider the algorithm of the IH method used the MRCP model. The notations are given in Section 3.

The algorithm variables are calculated using the following formulas:


$$\mathcal{U}\_{p,i,r}^{-}(\eta) = \sum\_{t=a-(\eta+1)\cdot c\_{p,i,r}}^{a-\eta\cdot c\_{p,i,r}} \mathcal{U}\_{p,t,r}/c\_{p,i,r};\tag{24}$$


$$\mathcal{U}\_{p,i,r}^{+}(\eta) = \sum\_{t=b+\eta \cdot c(p,i,r)}^{b+(\eta+1)\cdot c(p,i,r)} \mathcal{U}\_{p,t,r} / \mathcal{c}\_{p,i,r}.\tag{25}$$

The algorithm of the IH method includes the following stages:


*xp*,*<sup>i</sup>* = *xp*,*<sup>i</sup>* − *cp*,*i*,*r*·(*η* + 1)–and go to Point 1; otherwise, go to Point 5;


*xp*,*<sup>i</sup>* = *xp*,*<sup>i</sup>* + *cp*,*i*,*r*·(*η* + 1)–and go to Point 1; otherwise, go to Point 5;


We assess the number of iterations of the IH algorithm.

The number Ψ of search steps is a parameter of the algorithm. For each step, the algorithm sequentially bypasses all operations of the project portfolio to identify bottlenecks and eliminate them.

The number of operations of the project portfolio is calculated as follows: *N* = ∑*<sup>P</sup> <sup>p</sup>*=<sup>1</sup> *Np*. Thus, the complexity of the proposed IH algorithm linearly depends on the number of operations in the project portfolio according to the formula: Ψ·*N*. The quality of the schedule found is defined based on the value of the function (8) when restrictions (9)–(10) are fulfilled.

#### **7. Case Study Results**

The modified IH scheduling method was implemented in the BPsim software package including the BPsim simulation system and BPsim decision support system [24] with a common database.

The BPsim simulation system is used to develop and simulate the MRCP model of the processes under investigation. The system supports graphical MRCP notation, where a user can identify the types of nodes, i.e., operations and agents, logical links between them, and list the available non-renewable and renewable resources.

The following parameters can be assigned to each operation: the duration, start condition, amount of non-renewable and renewable resources required to complete the operation, and amount of produced non-renewable resources. To each agent, the behavior rules can be described in a form of if-then rules and assigned. The agents can affect the amount of resources and operations' start conditions.

The BPsim decision support system includes decision search diagrams based on the same resources used to build the simulation model. Development of the diagrams is based on the UML sequence diagrams [25] and Transact-SQL database management language [26]. The decision search diagrams are used to provide a visual comparison for multiple alternative decisions utilizing implemented user rules. The diagrams were applied to implement the algorithm of the IH scheduling method.

A case study was used to assess the subcontracted resources cost depending on the current schedule of 10 projects with 35 operations in a project company. The company has its own renewable resources, i.e., a staff of eight people with different skills (competencies). The following competencies of the staff were defined: documentation design (three people), carrying out an installation work (four people), and material supply (one person). The nonrenewable resources of the company are the construction objects. The operation duration varied from 6 days to 90 days depending on the type of operation. The scheduling time interval was 430 days.

Following the proposed IH scheduling method, a simulation model was developed in the BPsim simulation system. The model's inputs are the labor costs and the agreed start dates for each operation, as well as the schedule. Assessment of the subcontracted resources cost was produced by the model.

For the initial schedule, the model outcome is presented in Figure 6a. For the schedule provided by the IH method, the model outcome is presented in Figure 6b.

The figures contain the percentage utilization of the three own resources with different competence marked with the red, blue, and green lines. When the blue and red resources utilization reaches the 100% level, it means the subcontracted resources with the matched competence are used during this time. The green resource utilization does not exceed 30% in both figures, so subcontracted resources with the same competence are not required.

**Figure 6.** Percentage utilization U of own resources iRes performing the project's portfolio depending on time: (**a**) Initial schedule; (**b**) Schedule provided by the IH method. Here, iRes2 is a resource with the documentation design competence, iRes3 is a resource with the competence to carry out installation works, and iRes4 is a resource with material supply competence.

The initial and the final schedules coincide up to 110 days due to the low resource utilization at the initial schedule during these days. Therefore, the IH algorithm has not shifted the operations' start day during the first 110 days in the final schedule.

Table 6 contains allocation of the subcontracted resources' cost in rubles and man per day (m/d) on the project's operations for the initial schedule.



For the initial schedule, the subcontracted resources are required for the projects 1, 3, 4, 5, and 9. The IH method allowed us to highlight several operations with a subcontracted resources cost exceeding the critical value equal to 60,000 rubles. The ones are installation works for projects 3 and 9 (95,990 and 70,953 rubles accordingly), and all operations for project 4 (65,998 rubles).

Table 7 contains allocation of the subcontracted resources' cost in rubles and m/d on the project's operations for the schedule provided by the IH method.

The IH method is proposed resource allocation and shifting of the operations' start date within a given timeframe. Although, the makespan of the found schedule was increased compared with the initial schedule, all operations and project deadlines were met.

It should be noted that the objective function considered is related to minimization of the subcontracted resources' cost while meeting restrictions. As a result, the subcontracted resources' cost of the schedule found was reduced compared with the initial schedule in terms of man per day from 42 m/d to 9 m/d and in terms of rubles from 249,936 rubles to 53,453 rubles for half a year, i.e., more than four times for both outcomes.


**Table 7.** Subcontracted resources' cost allocation for the schedule provided by the IH method.

#### **8. Discussions**

The results of the scheduling methods' comparison are shown in Table 8.


**Table 8.** The results of the scheduling method comparison.

As we can see from Table 8, all the methods have disadvantages when solving the project scheduling problem considered. The problem has the following features: search for a solution with the minimum subcontracted resources cost, large dimension of the search space, presence of the operations start time interval, and allocation of renewable and non-renewable resources with a restricted non-renewable resources lifetime. These features restrain the application of the scheduling theory methods considered. The Y. A. Mezentsev and V. S. Tanaev methods solve the scheduling problem while minimizing the makespan by tight packing of operations in compliance with part of the restrictions. However, the issues of attracting and optimizing the subcontracted resources cost are not given due attention. The Lingo-based method deals with subcontracting cost optimization, but the schedule found does not satisfy any constraint. The agent-based method lacks subcontracted resource optimization but considers all the restrictions, including the nonrenewable resources one. The GA-based method and the commercial solver-based methods, OptQuest and GA of the Plant Simulation, do not consider the subcontracted resources and orders' earliest start times while the GA-based method accounts for restricted nonrenewable resources.

Application of simulation multi-agent modeling with heuristic rules of the resource's allocation allows us to consider all features of the scheduling problem except multi-objective optimization. The HI method optimizes the subcontracted resources cost taking into account restricted renewable and non-renewable resources and orders' earliest start times. At the same time, a project duration may increase wherein the orders deadlines are met.

For the scheduling problem with 35 operations, eight renewable resources and one type of non-renewable resource, the running time of the HI algorithm is estimated at 6 min. This time is comparable to the running time of the methods based on agents, OptQuest, and Plant Simulation application. The HI algorithm running time is much more than the one of the methods proposed by Y. A. Mezentsev and V. S. Tanaev as well as the Lingo- and GA-based ones, estimated at tens of seconds. It should be noted that the search time for the simulation-based methods is always more than the search time for the methods based on the optimization algorithms. When simulating, a time for conducting one experiment varies from a few seconds to several minutes depending on the model dimension and simulation tool used. In case of solving the optimization problem, it is necessary to search for solutions in a search space while the alternative solution is estimated by conducting an experiment with the model; therefore, the total search time increases to tens or even hundreds of minutes. Nevertheless, simulation-based methods have the advantage of being able to determine the objective function and the constraints required without a reduction to a specific mathematical model used in optimization algorithms.

We also applied the HI algorithm to the scheduling problem with a large data set. A construction holding was considered with 302 building operations, 119 renewable resources or construction machinery, and 161 types of non-renewable resources or construction material. The detailed holding description is given in [27]. For the problem with a large data set, the running time of the HI algorithm is estimated at one hour and 38 min. The given duration of the algorithm operation is rather long compared to the obtained one for the small dimension problem but is acceptable for decision making that is not in real time.

#### **9. Conclusions**

The scheduling problem was formulated with the objective function of minimization of the subcontracted resources cost, presence of restrictions on non-renewable resources, and operations' earliest start time and due dates. Analysis of the different scheduling methods based on the scheduling theory, optimization algorithms, and agent-based simulation was conducted. The analysis revealed factors preventing application of the methods to the problem under consideration. The factors include lack of a search for the optimal allocation of renewable resources on operations in terms of minimizing the subcontracted resources' cost and lack of accounting for limited non-renewable resources. The given factors indicate the relevance of the development of the hybrid scheduling method based on integration of simulation and heuristic modeling.

The IH method algorithm was developed based on the multi-agent simulation model of the resource's allocation with operations performing and heuristic rules of the operations start days shifting. The IH method is used to search the schedule that meets the time and resources restrictions and has a minimum subcontracted resources cost.

A case study was conducted to assess the subcontracted resources cost for the real scheduling problem of a project company. Application of the IH method allowed us to compose a schedule that reduced the company's waste on subcontracted resources by more than four-fold for half a year compared with the schedule provided by decision makers based on their knowledge and experience.

Comparison of the IH method and the other scheduling heuristic methods was performed. The conditions were identified, under which the new IH method is more effective than the other ones. The conditions include a focus on optimizing the project portfolio cost with a fixed portfolio duration. In future, the authors plan to refine the IH method for solving the multicriteria problem of finding a schedule that is optimal in terms of the makespan and the renewable resources cost.

**Author Contributions:** Conceptualization, A.A. and K.A.; Methodology, A.A.; Software, K.A. and O.A.; Validation, O.A.; Formal Analysis, K.A.; Investigation, A.A. and O.A.; Writing—Original Draft Preparation, A.A.; Writing—Review and Editing, A.A.; Visualization, O.A.; Supervision, K.A.; Project Administration, O.A.; Funding Acquisition, K.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by Act 211 Government of the Russian Federation, contract no. 02.A03.21.0006.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


## *Article* **Non-Sequential Linear Construction Project Scheduling Model for Minimizing Idle Equipment Using Constraint Programming (CP)**

**Shu-Shun Liu 1,\*, Agung Budiwirawan 2,3 and Muhammad Faizal Ardhiansyah Arifin 2,3**


**Abstract:** Over the last several decades, the scheduling of linear construction projects (LCPs) has been explored extensively by experts. The linear scheduling method (LSM), which focuses on work rate and work continuity, has the advantage of tackling LCPs' scheduling problems. The traditional LSM uses work continuity to monitor resource allocation continuity on the premise that activities with the same type of work use the same crew. However, some LCPs require a combination of different types of equipment to comprise the crew. Sometimes, parts of different crews require the same types of equipment, and sometimes, the same crew requires different equipment configurations. This causes the pattern of work continuity to be different from the pattern of resource allocation continuity. Therefore, we propose an optimization model of the LSM to minimize idle equipment on a non-sequential linear construction project—i.e., a road network maintenance project. This model is intended to minimize the number of idle equipment and their idle time to achieve more efficient scheduling for linear construction projects. This model offers novel details of resource allocation continuity assessment by taking into account equipment combination and configuration (ECC). Therefore, the scheduling concept used by the proposed model is named the linear scheduling model with ECC (LSM–ECC). The model was developed using constraint programming (CP), as CP has good performance and robustness in the optimization field. The model was implemented to a representation of a road network maintenance project and has satisfactory results.

**Keywords:** linear project; linear scheduling method; equipment idleness; constraint programming; equipment combination and configuration

#### **1. Introduction**

#### *1.1. Background*

A construction project consists of a set of activities related to each other to achieve the project's objectives [1]. Achieving the project's objectives in the life cycle of the construction project often faces many management problems. One of the prevalent problems is resource availability. Resources are often limited and expensive. Thus, resource management plays an essential factor in project scheduling [2]. Managing resources—equipment, materials, and crews—efficiently in satisfying all project activities becomes an inevitable aspect for construction managers in controlling the project schedule to achieve the project's goals.

The efficiency of resource management is not only just ensuring resources in satisfying all the activities, but also optimizing the resource usages. Meanwhile, ensuring the project running on schedule with limited resources makes resource management more difficult. Therefore, a detailed and thorough resource scheduling that aligns with the activity schedule is a crucial necessity in construction project scheduling [3,4].

Arifin, M.F.A. Non-Sequential Linear Construction Project Scheduling Model for Minimizing Idle Equipment Using Constraint Programming (CP). *Mathematics* **2021**, *9*, 2492. https://doi.org/10.3390/ math9192492

**Citation:** Liu, S.-S.; Budiwirawan, A.;

Academic Editors: Frank Werner and Armin Fügenschuh

Received: 18 August 2021 Accepted: 28 September 2021 Published: 5 October 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

A linear construction project (LCP) is a challenge for a project manager to schedule efficiently. This type of project shares the resources in different spaces either in a sequential or parallel manner. The manager needs to allocate enough resources for maintaining work continuity in various locations of a project, minimizing idle resources, and finishing the project within contract duration [5,6]. Sometimes a conflict of resource usage occurs during the execution of LCPs because the movement of activities' resources is not well planned upon limited shared space [3,7]. Consequently, the schedule developed for LCPs not only accounts for precedence constraints of activities but also considers the space and time constraints of the movement of the activity resource [8]. The critical path method (CPM) emphasizes scheduling based on precedence relationships between activities [9] and is less able to provide monitoring of work continuity for LCPs. On the other hand, the linear scheduling method (LSM) can provide good monitoring of work continuity, so that the LSM is more suitable for scheduling linear construction projects.

One way to achieve the desired scheduling efficiency is to minimize idle resources. Idle resources are defined as resources that have been mobilized but not utilized. Idle resources are unproductive resources, but these idle resources still incur costs, e.g., maintenance costs, rent, and depreciation. By minimizing the amount and time of idle resources, it will minimize unproductive costs which ultimately results in more efficient scheduling.

A road network maintenance project consists of the same type of road maintenance being applied to several road sections. This characteristic includes the road network maintenance project as an LCP. Therefore, an LSM is suitable to be applied as a scheduling method. However, road network maintenance projects have different characteristics compared with regular LCPs to be handled by traditional LSM.

Traditional LSM uses crews as resources used to complete works. The efficiency of linear construction project scheduling is seen from the continuity of work by assuming that the same type of work uses the same crew, while different types of work use different crews. This cannot be applied to road network maintenance projects, which use a combination of heavy equipment as resources to complete their activities. Using the term crew from traditional LSM, the crew used to complete an activity is a set of equipment consisting of several types of equipment as sub-crew and divided into main equipment and supporting equipment. Sometimes, the supporting equipment needed to complete one type of activity is also needed as support equipment to complete another type of activity. Therefore, the profile of work continuity becomes different from the profile of equipment allocation continuity. Based on this condition, we propose a concept of resource allocation dividing the crew into smaller units—sub-crew—which is called equipment combination and configuration (ECC). A more in-depth explanation of ECC is in Section 3.1. Based on the linear scheduling method with ECC concept (LSM–ECC), the authors propose an optimization model for linear construction project scheduling by minimizing idle resources at the sub-crew level, i.e., equipment.

From the point of view of the execution sequence of the repetitive units, traditional LSM requires engineers to define the execution sequence of the repetitive units of an LCP. For sequential/serial linear construction projects, engineers do not have much trouble deciding which repetitive units to begin with. However, the sequence of maintenance work on each road segment of a road network maintenance project is flexible because usually, each road segment has almost the same accessibility. Therefore, engineers have to think about which road segment to work on first to achieve an efficient schedule. To solve this problem, an optimization model that can provide engineers with suggestions for the execution sequence of each road segment to obtain efficient scheduling is needed, even suggestions for non-sequential/parallel execution if possible.

#### *1.2. Objectives*

Based on the aforementioned conditions, the authors propose an optimization model to minimize idle equipment for non-sequential linear construction projects. This model is expected to monitor the continuity of resource allocation at the sub-crew level, i.e., equipment, and minimize the equipment idleness.

This study aims to develop an optimization model of a non-sequential linear construction project to minimize idle equipment using constraint programming (CP). This optimization model is expected to be able to: (1) monitor the mobilization and allocation of equipment; (2) minimize idle equipment in quantity and time; (3) provide the engineer with suggestions on the work sequence of the project's repetitive unit.

Constraint programming (CP) was used to build this model because CP has several advantages, namely: CP defines a model built using objective functions and a set of constraints without having to define procedures and calculation steps; and logical constraints in CP are easy to define with the help of an optimization programming language (OPL) compared to ordinary mathematical models.

#### *1.3. Paper Structure*

The remainder of this paper is structured as follows: Section 2 discusses some previous studies related to scheduling theory, non-sequential linear scheduling, as well as resource allocation and resource-leveling. Section 3 presents the material and method conducted in this study. Section 4 discusses the result of the proposed model applied in three different scenarios. Lastly, Section 5 presents the general conclusion and the opportunity for future research related to this study.

#### **2. Literature Review**

There are two main categories of construction projects, namely repetitive and nonrepetitive construction projects. A repetitive project consists of multiple repetitive units and requires timely movement of construction resources from one unit to the next unit to repeat the same activities [5]. Repetitive projects can also be classified as typical and non-typical. Activities in a typical repetitive project have the same crew productivity rates that are repeated on different repetitive units. Most of the real construction projects are adjacent to non-typical repetitive projects, which have different repeated productivity rates on different repetitive units [10]. Breaking the continuity of the same activities between repetitive units creates work gaps that cause idle resources and bring additional costs [11]. Hence, maintaining the work continuity in repetitive projects then will ensure constant usage of construction resources and minimizing equipment idle time [10].

Repetitive projects can be divided into linear and non-linear projects according to the linear geometric pattern [12]. In terms of linear projects, this type has repetitive units—a sequence of construction activities [13]. Linear construction projects include characteristics as a series of linear repetitive activities, such as railways, highways, pipelines, and tunnels, while high-rise buildings with typical floors and typical housing projects are considered non-linear repetitive projects [12].

One of the methods that is often used in scheduling is the network-based scheduling method. Critical path method (CPM) and project evaluation and review technique (PERT) are examples of network-based methods [14]. The network-based scheduling method focuses on scheduling based on the precedence relationship between activities. Because this method has a strong definition of the precedence relationship between activities, the schedule of activity—i.e., start time, finish time, etc.—could be calculated easily, and this method is suitable for automatic schedule calculation, such as using computer programs. However, this method does not show the work rate and work continuity of activities. The resource-driven scheduling method focuses on work performance and continuity. Line of balance (LOB) and the linear scheduling method (LSM) are examples of resource-driven scheduling methods.

In construction projects, resources are divided into two main categories, namely renewable resources and non-renewable resources. A renewable resource is a resource that can be repeatedly utilized without replenishment, and a non-renewable resource is a one-time consumable resource and the usage of this resource cannot be repeated [15]. This study is focused on managing renewable resources, especially construction equipment at a project level. Based on these resource management problems and the crucial resource management role, this study attempts to overcome these challenges from the perspective of the repetitive linear construction project.

The main reason this study utilized LSM is that the network-based scheduling method has great drawbacks in the application of linear construction projects since the network planning methods is difficult in ensuring the work continuity of a linear construction project and leads to a greater risk of idle time of the renewable resource [16]. In the network planning method, more repetitive activities will lead the network growth and make scheduling visualization intricate [17]. Additionally, network schedules are only able to provide a one-dimensional graph in terms of their informational content, which solely shows how sequentially connection activities occur upon a time [18].

LSM depicts the construction schedule of a linear construction project by a rectangular coordinate according to the characteristics of a linear construction project with the horizontal and vertical axes representing the spatial position and schedule of a project, respectively [19]. The two-dimensional coordinate system in LSM broadens the scope of information that can be communicated including the key elements inside the system, for instance, activities, rate of activities, and buffer between activities are employed for illustrating the project schedule then the LSM diagram will be formed [14].

According to the spatial location of the activity, a linear-type activity can be categorized into two types, namely full-span and partial-span linear activity [20]. The major characteristic of a linear type activity in LSM is a rate concept that denotes the spatial progress of the linear activity in unit time, and this concept becomes a differentiation feature compare to the critical path method (CPM) [21]. The slope of a linear-type activity in the LSM diagram indicates the rate of that activity. The slope of linear-type activity can be varied in proportion, depending on the resource usage of the activity. Thus, the accuracy in developing a linear schedule is extremely dependent on the capacity production of the activity resources [22].

The distance between two activities in the horizontal and vertical directions in the LSM diagram is, respectively, named as the distance and time buffer [23]. The buffer in the LSM concept depends on the technical constraints, managerial policy, or other conditions. Furthermore, the minimum/maximum time buffer is defined as the minimum/maximum time between two activities; similarly, the minimum/maximum distance buffer is defined as the minimum/maximum distance between two activities. Commonly the minimum buffer is easy to fulfill; however, in some cases, a maximum buffer needs to interrupt the activity or adjusting its productivity [14].

LSM has a similar concept for controlling activity path (CAP), such as a critical path in a network-based scheduling method. The float activities in the network scheduling method exist in the non-critical path after the critical path is calculated. A similar concept in LSM called the rate float for the float of non-controlling activities or non-controlling segments of activities in the schedule created by LSM appeared while the CAP has been established [2,24]. The number of possible changes in the production rate for a noncontrolling linear activity can be specified by the rate float before the non-controlling linear activity becomes a controlling activity. In other words, the rate float is also defined as "the difference between the planned production rate of an activity and the lowest possible production rate without interfering in the buffer" [24]. By shifting non-controlling activities on the available rate float, the LSM model can adjust resource allocation and minimize resource fluctuations to obtain the resource leveling model without changing the original duration schedule [19,25].

Among those aforementioned examples of linear construction projects and challenges of resource management in linear construction projects, this study is focused on scheduling equipment in road network maintenance projects. There are only a few studies that discuss road network maintenance at the project level with detailed renewable resource scheduling. Mizutani et al. [26] proposed an optimal solution for pavement repair that considers work zone policies at the highway network level. Huang and Lin [27] proposed an arc routing problem approach to solve construction machinery schedules for road maintenance. Aarabi and Batta [28] proposed scheduling for pothole repair using a vehicle routing problem without focusing on machine management scheduling. Research focused on using the linear scheduling method (LSM) for highway construction projects has been performed in prior studies [5,20,29–34]. However, none of those studies have discussed the detail of equipment scheduling, considering equipment idleness in the concept of equipment combination and configuration, as well as mobilization and demobilization of the machinery.

Two leading concepts are associated with how to manage project resources, namely resource allocation and resource leveling [2,35]. The concept of resource allocation is to reschedule the project activity to efficiently manage the limited resources by allowing to exceed project duration planning as minimum as possible [36]. While the concept of resource leveling is to make the resource usage curve during the construction project as flat as possible so it can assist in avoiding short-term peaks and troughs, reduce resource costs and management costs, as well as avert needless losses by keeping the original project duration [36–38]. Accordingly, both of these concepts deal with two dissimilar resource sub-problems that can solely be utilized to a project one after the other rather than simultaneously.

Refering to the basic concept of resource leveling, in smoothing the histogram of resource profile to be as flat as possible, it brings an exact deployment of resources within a project that can minimize renewable resource cost [39]. However, considering the complex mixture of activity relationships in the scheduling, the objective function on resource leveling can be nonlinear and makes the graph that represents the resource profiles become extremely discontinuous. Thus, a small change in resource consumption on activity may create a vast change in the resource profile. According to these advantages of the resource leveling concept and the challenge to solve resource leveling problems, some previous studies have applied various approaches to solving resource leveling problems on the network schedules or linear schedules. Using the definition of buffer and the concept of rate float in the LSM schedule, some previous studies have attempted to resolve the problem of resource leveling in construction projects. Lucko [39] utilized a singularity function in LSM to optimize the resource leveling profile while considering the resource rate changes. Tang et al. [38] present linear scheduling of a railway construction project to level the resource profile for optimum resource usage. Tang et al. [19], proposed a two-stage scheduling system model and algorithm for linear construction project resource leveling to automatically generate a linear schedule including the resource leveling; this study performs according to the example data of highway construction project conducted by Matilla and Abraham [24]. Su and Lucko [17] proposed a combination of LSM and LOB to optimize multiple crew scheduling within and between repetitive activities with singularity functions. By employing new constraints in LSM, namely total resource constraint, resource utilization constraint, and construction mileage constraints, Wang et al. [40] strove to maximize the space–time flexibility of construction activities and optimize the LCP's resource-leveling. Esfahan et al. [21] considered equipment congestion in road construction proposed a space–time float concept for optimizing the resource scheduling of an LCP. Damci et al. [2], in the framework of LOB, present multi-resource leveling optimization with the principle of optimum crew size and natural rhythm. Ipsilandis [11] adopted the resource leveling concept to minimize project duration or to minimize resource work breaks in linear repetitive projects.

Sometimes a resource allocation problem can be called a resource-constrained project scheduling problem (RCPSP), since the main concept of the resource allocation model is developed to solving resource conflicts by rescheduling activities while minimizing the additional project duration [41]. The main consideration of traditional RCPSP is how to deal with a set of n activities needed to schedule and to minimize a project's completion time and meet two main constraints: (1) the precedence constraint, and (2) the limited availability of resources [13]. RCPSP and its variants have been extensively investigated by researchers during the last several decades, since the pioneering work of experts [6–8] about mathematical programming formulations of scheduling problems.

Traditional RCPSP uses given and normally constant resource allocations throughout each activity. Different from the traditional RCPSP, Fündeling and Trautmann [42] proposed a model in which resource requirements and resource allocations must be determined. This resulted in a different "work profile", which was not limited to a rectangular shape as the traditional RCPSP has been, and "work content", which was defined as the total amount of resource required to finish an activity. For more general uses, "resource profile" and "resource requirement" are used instead of "work profile" and "work content", respectively, since resources are not restricted only to human resources.

Recent computer technology has opened many opportunities in solving large-scale and difficult mathematical models efficiently. Taking advantage of this condition, new mathematical models for RCPSP have been formulated and extensively compared by experts [25–27]. Naber and Kolisch [43] proposed four discrete-time model formulations of a resource-constrained project scheduling problem with flexible resource profiles (FRCPSP) and compared the model efficiency in terms of solution quality and computational time. These models used decision variables based on previous research [26,28–31] to achieve the shortest project completion time. Leu and Hwang [44] consider using resource sharing in repetitive precast production proposed optimization schedule based on the LOB method. Liu and Wang [45] proposed a resource allocation optimization model in an LCP by employed constraint programming (CP). Zhang et al. [46], in the framework of the line of balance (LOB) method, focus on the learning effect to minimize total resource usage while satisfied all of the demands of work continuity and the target deadline of every activity. Hyari and El-Rayes [5] simultaneously minimize project duration and maximize crew work continuity in bridge construction utilizing the LSM method by considering typical and non-typical repetitive activities. Kong and Dou [47] solve resource-constrained project scheduling problems under multiple time constraints that include a duration constraint of activity, temporal constraint, and resource calendar constraint.

By the nature of resource leveling characteristics, this type of resource management concept is more relevant to linear scheduling. Nevertheless, some previous research has already attempted to combine the resource-leveling concept and resource allocation concept in one single scheduling optimization model. For example, Hegazy employed a genetic algorithm (GA) technique [36], Jun and El-Rayes [41] developed a multi-objective optimization model based on a GA module, Koulinas and Anagnostopoulos utilized bi-objective models [35], Francis Siu et al. applied an integer linear programming technique [48], and Khanzadi et al. [49] utilized a colliding body optimization (CBO) algorithm and charged system search (CSS) technique. Tang et al. [50] solve scheduling optimization problems in transportation-type linear construction projects using a constraint programming (CP) technique.

Total project duration in this study after the optimization process should be the same as with the original duration or can be shorter than the original duration. Thus, this characteristic makes this study adopt the properties of resource-leveling concepts. Moreover, minimizing equipment idleness has a similar concept to make resource usage histogram as flat as possible. However, on the other side, the objective of minimizing equipment resource idleness must also consider the available number of the items of equipment, where this condition has similar properties with resource allocation concepts. Therefore, this study simultaneously utilized both the concept of resource leveling and resource allocation to solve equipment management problems on a road network maintenance project.

This study applied a combination of different types of equipment in one single work crew to serve several activities. Therefore, the resource allocation problem in this study will also adopt the resource sharing concept to maximize the available resource, because, in construction projects, the concept of resource sharing is suitable when meeting the

condition of resource shortage [51]. The concept of resource sharing means to work with greater efficiency or produce extra benefits by using finite resources [52].

Although those previous studies perform a combination concept of resource leveling and resource allocation, none of those previous studies consider the work zone safety during the highway network maintenance by minimizing the lag time between activities and utilizing flexible resource profile in the framework of non-sequential LSM to solve resource idleness problems. Furthermore, none of those studies were able to provide a single group crew (equipment fleet) that combine two different types of equipment, called main equipment and supporting equipment. The supporting equipment will be applied as resource sharing to serve two activities. These will be the key techniques of this study in solving management renewables resource problems on a highway maintenance project. Table 1 denotes the most relevant research prior to the proposed model.

**Table 1.** List of the most relevant researches prior to this proposed model.


LSM, work continuity, and resource allocation have been studied extensively by experts in recent decades. However, as far as the author knows, to obtain the efficiency of resource allocation as an objective function, previous studies have always used the concept of resource leveling, which minimizes the deviation of resource allocation from a certain reference line or minimizes daily resource allocation changes. In contrast, the proposed model does not use the traditional resource leveling concept. Alternatively, to achieve resource allocation efficiency, the proposed model minimizes the deviation of resource allocation with mobilized resources, as indicated in Figure 1. In addition, this model also introduces the concept of equipment combination and configuration (ECC), which, to some degree, is almost the same as the concept of shareable resources. The concept of ECC will be discussed in the ECC section.

**Figure 1.** Idle equipment definition.

#### **3. Materials and Methods**

#### *3.1. Model Concept*

The optimization model of linear scheduling for minimizing idle equipment was developed based on a road-network maintenance project, hereinafter referred to as the project. A representation of a road-network maintenance project—the object of this study consists of five repetitive units (road segments). Each road segment consists of asphalt stripping activity, asphalt resurfacing activity, and road marking activity (Figure 2).

**Figure 2.** Road-network maintenance project.

#### 3.1.1. Project Characteristics

A road-network maintenance project relies on heavy equipment to finish its activities. For example, an asphalt stripping activity uses an asphalt-milling machine (AM) to grind and strip the existing asphalt layer. Thus, in this optimization model, the schedule of activities is represented as the schedule of the main equipment used by related activity, and vice versa. Table 2 denotes the main equipment used by each activity type in the project.

**Table 2.** Main equipment used by activities.


#### 3.1.2. Equipment Combination and Configuration (ECC)

Traditional LSM uses the term 'crew' to describe the resources used to do work. Therefore, in traditional LSM, the continuity of resource allocation can be represented as a continuity of work, and vice versa. However, at the project site, the crew consists of several types of interdependent resources, hereinafter referred to as sub-crew, so that the

continuity of one type of work is not always the same as the allocation continuity of the related sub-crew.

In the road network maintenance project, a crew needed to finish a work consists of several sub-crews—i.e., equipment. The main equipment requires supporting equipment to work properly. Asphalt stripping activity requires AM as the main item of equipment to peel off the existing road surface. The material resulting from the peeling of the road surface must be disposed of using dump trucks (DT). Because the capacity and duty cycle between AM and DT are different, each unit of AM requires several units of DTs; in this case, for example, one unit of AM requires five units of DTs. Such an arrangement is proposed by this study as equipment combination and configuration (ECC). Table 3 denotes the ECC applied to this project.

**Table 3.** Equipment combination and configuration (ECC) for each crew.


ECC creates a different situation compared to traditional LSM, which uses work continuity to assess scheduling efficiency. Figures 3 and 4 depict the ECC schema and the resource allocation monitoring scheme, respectively.

Dump trucks serve as supporting equipment for Crew 1 for asphalt stripping activity and also as supporting equipment for Crew 2 for asphalt overlaying activity (Figure 3). From a traditional LSM perspective, asphalt stripping activity and asphalt overlaying activity use different resources, namely Crew 1 and Crew 2, so that the continuity of the allocation of Crew 1 and Crew 2 is in line with the continuity of asphalt stripping activity and asphalt overlaying activity, respectively. However, from the ECC perspective, dump trucks are allocated to asphalt stripping activity and asphalt overlaying activity, so that the continuity of dump truck allocation follows the scheduling of these two types of activities (Figure 4).

**Figure 3.** Equipment combination and configuration (ECC) schema.

**Figure 4.** Equipment allocation continuity schema.

#### 3.1.3. Model Features

This optimization model proposed two features to improve the practicality and efficiency of equipment allocation. Those features are (1) resource dependency between main equipment and supporting equipment, and (2) flexible resource profile.

Resource dependency in this model is defined as the dependency between main equipment and supporting equipment. The traditional linear scheduling method (LSM) applies the term crew as a resource of activities. One type of crew is allocated to a particular type of activity and shared among the same type of activities. The proposed model divides the crew into equipment. In this model, the crew consists of some main equipment and supporting equipment. Therefore, shared resources in the proposed model are not at the crew level but the equipment level instead. This opens possibilities of shared equipment between different types of work. Figure 5 shows crew allocation to activities in a traditional way and the addition of the resource dependency concept. Besides the main equipment used to finish an activity, this model also considers supporting equipment, which is important in maintaining the work performance of the main equipment. Asphalt stripping activity needs an asphalt milling machine (AM) as the main equipment. However, an asphalt milling machine needs dump trucks (DT) to take the product of the asphalt stripping process to the dumping area. The number of dump trucks supporting the asphalt milling machine is important to match both types of equipment's work rates. Besides the asphalt milling machine, the asphalt finisher machine—the main equipment of asphalt overlaying activity—also needs dump trucks to support its work. This model also tackles the condition where some main items of equipment of several activities need the support of one type of supporting equipment. This condition became a challenge especially when there is a shortage of resource availability.

**Figure 5.** Resource allocation in traditional LSM and proposed resource dependency concept.

Each road segment of this project consists of three serial activities, which are (1) asphalt stripping, (2) asphalt resurfacing, and (3) road marking. Asphalt stripping starts the works on every segment. Asphalt milling machines (AM) act as the main equipment for this activity. The asphalt milling machine is supported by dump trucks (DT) to collect and take the product of the asphalt milling machine to the dumping area. In this model, some dump trucks (DT) are assigned to one asphalt milling machine (AM) to match the work rate between the asphalt milling machine and the dump trucks to achieve the most efficient work rate. The unmatched work rate of either the main equipment or the supporting equipment would result in lower overall work performance. Asphalt resurfacing is the succeeding activity of the asphalt stripping activity. Asphalt finishers (AF), pneumatic rollers (PR), and dump trucks (DT) are used in this asphalt resurfacing activity. Asphalt finishers are the main equipment used to resurface the road segment supported by several pneumatic rollers and dump trucks. Pneumatic rollers compact the new pavement surface, and dump trucks supply hot-mixed asphalt from an asphalt mixing plant to the asphalt finisher. Several pneumatic rollers and dump trucks are assigned to one asphalt finisher to match the work rate among the equipment to achieve the most efficient work performance. Road marking is the last activity to execute on each road segment. Road marking is the succeeding activity of asphalt resurfacing activity. Road marking machines (ME) are assigned to this road marking work as the main equipment. Figure 3 shows the schema of main and supporting equipment allocation for this model.

Flexible resource profiles are the second feature of the proposed model as an addition to the linear scheduling method. In the traditional linear scheduling method, the resource allocation profile commonly has a constant rate; thus, it makes the shape of a bar. As mentioned above, for road safety reasons, this model omits time floating buffer, which causes a disadvantage in minimizing idle equipment. To deal with this problem, this model implements flexible shapes of resource allocation profiles to provide a different allocation of equipment during the transition between the same type of activities on different road segments. However, it is not an easy task to move equipment between activities or between repetitive units. Thus, this model limits the shape of the resource profile only as a bar or trapezoid shape.

#### 3.1.4. Model Objective

The objective of this model is to minimize equipment idleness caused by valleys of equipment allocation profile (Figure 1). Idle equipment is not calculated by the difference between maximum available equipment and allocated equipment at a time, but the difference between mobilized equipment and allocated equipment at a time. The proposed model achieves the objective by eliminating these valleys.

#### *3.2. Model Formulation*

The optimization model for minimizing idle equipment of road network maintenance project was developed following the model development workflow (Figure 6) and using constraint programming engine of IBM ILOG CPLEX Optimization Studio version 12.10 and OPL modeling language.

**Figure 6.** Optimization model development workflow.

This model binds activities to the allocation of their main equipment. Therefore, the proposed scheduling model schedules activities as the main equipment scheduling. The precedence relationships between activities are implemented as precedence relationships between main items of equipment.

This model consists of five parts, which are: (1) input data; (2) decision variable; (3) decision expression; (4) objective function; and (5) constraints.

#### 3.2.1. Input Data

Input data are parameters set before the optimization process started. These data are not changed during the optimization process. Input data are expressed by input variables and structured using indices. Tables 4 and 5 denote indices and input variables used by the proposed model, respectively.

**Table 4.** Indices used by variables of the proposed model.



**Table 5.** Input variables used by the proposed model.

#### 3.2.2. Decision Variables

Decision variables are the objects of the optimization process. The optimization algorithm searches the optimized values of the decision variables to achieve the objective function. The values of these variables are changed during the optimization process until they reach the considered optimum values based on the objective function.

*PEijk* is used as the decision variables of this model. *PEijk* is the number of allocated main items of equipment, *i*, on the road segment *j* on day *k*. *PE*<sup>123</sup> = 2 means 2 units of main equipment type 1 are allocated on road segment 2 on day 3.

#### 3.2.3. Decision Expressions

CPLEX constraint programming and OPL programming language allow the user to use decision expressions. Decision expressions are mathematical expressions for variables that are not the target of the optimization algorithm. For example, a mathematical expression *b* = *a* + 2, *a* is the decision variable; therefore, the value of *a* is based on the optimization algorithm. However, *b* is not the target of the optimization algorithm. The value of *b* only follows the value of *a*; thus, to define the value of *b*, a decision expression is used.

*Eijk* is the allocation of equipment *i* of road segment *j* on day *k*. Equipment allocation is the total allocation of the equipment as main equipment and supporting equipment; thus, it is the sum of the allocation number as main equipment and the allocation number of supported main equipment multiplied by the ratio of supporting equipment to main equipment (Equation (1)).

$$E\_{ijk} = ME\_{ijk} + \sum\_{m} SMratio\_{jim} \times ME\_{mjk} \tag{1}$$

*Ereqij* is the required allocation of equipment *i* on the road segment *j*. The required equipment allocation is the sum of the allocation as main equipment and as supporting equipment. This variable acts as a control variable whether the allocation of particular equipment has reached the required allocation or not (Equation (2)).

$$Error\_{lij} = MEreq\_{lij} + \sum\_{m} SMratio\_{jim} \times MEreq\_{mj} \tag{2}$$

Equation (3) defines variable *Edik* as the total allocation of equipment *i* on day *k* of all road segments. This variable is used in a constraint to limit the equipment allocation to the available equipment on one day.

$$Ed\_{ik} = \sum\_{j} E\_{ijk} \tag{3}$$

*Erij* is the total allocation of equipment *i* of road segment *j*. This expression (Equation (4)) defines this variable, which is used to track the total allocation of particular items of equipment on a road segment. Combined with variable *Ereqij*, this variable is used to check if the allocation of a particular item of equipment has met the requirement.

$$Err\_{ij} = \sum\_{k} E\_{ijk} \tag{4}$$

Equation (5) defines variable *Etotijk*, which tracks the total allocation of equipment *i* of road segment *j* from day 1 to day *k*. This variable is used to track whether an activity has finished or not.

$$MEtot\_{ijk} = \sum\_{n=1}^{k} ME\_{ijn} \tag{5}$$

Variable *Fijk*, defined by Equation (6), identifies whether equipment *i* of road segment *j* has finished on day *k*. It has the value of zero and one. The value of zero means the equipment *i* of road segment *j* has not been completely allocated on day *k*. The value of one means it has been allocated completely.

$$F\_{ijk} = \begin{cases} 1 & \Leftrightarrow MEtot\_{ij,k-1} = MEreq\_{ij} \\ 0 & \Leftrightarrow MEtot\_{ij,k-1} \neq MEreq\_{ij} \end{cases} \tag{6}$$

Equation (7) defines variable *precPassjimk*, which is the indicator if equipment m as the predecessor of equipment *i* of road segment *j* has finished on day *k*. If *precPassjimk* has the value of zero, it means equipment *m* of road segment *j* is not considered finished. Equipment *m* is considered finished if equipment *m* is not the predecessor of equipment *i,* or equipment *m* has been allocated as required.

$$\operatorname{prec\,Pas}\_{\operatorname{jimk}} = \left\{ \begin{array}{ll} 1 \Leftrightarrow & \left( \operatorname{prec\,c\_{jim}} = 0 \right) \vee \left( \operatorname{prec\,c\_{jim}} = 1 \wedge F\_{\operatorname{mjk}} = 1 \right) \\\ 0 \Leftrightarrow & \neg \left[ \left( \operatorname{prec\,c\_{jim}} = 0 \right) \vee \left( \operatorname{prec\,c\_{jim}} = 1 \wedge F\_{\operatorname{mjk}} = 1 \right) \right] \end{array} \tag{7}$$

Equations (8) and (9) define variables *Ebmaxik* and *Eamaxik*, which are the maximum daily allocation of equipment *i* from day 1 to day *k* and the maximum daily allocation of equipment *i* from day *k* to the last day, respectively. These variables are used as the benchmark for idle equipment calculation.

$$Ebmx\_{ik} = \max\_{m \in \{1..k\}} Ed\_{im} \tag{8}$$

$$Examplex\_{ik} = \max\_{m \in k.d} Ed\_{im} \tag{9}$$

Variables *ebik* and *eaik*, defined by Equations (10) and (11), are the number of idle items of equipment based on maximum daily allocation benchmark before day *k* and after day *k*, respectively. The value of these variables would be assessed by Equation (12) to determine the value of idle equipment. Variable *eik*, defined by Equation (12), is the number of idle items of equipment on day *k*.

$$
\epsilon b\_{ik} = \begin{cases}
\quad \triangle b \max\_{i,k-1} - Ed\_{ik} \Leftrightarrow Ed\_{ik} < Ed \max\_{i,k-1} \\
\quad 0 \Leftrightarrow Ed\_{ik} \ge Ed \max\_{i,k-1}
\end{cases}
\tag{10}
$$

$$
tau\_{ik} = \begin{cases}
 \
Example: -Ed\_{ik} \Leftrightarrow Ed\_{ik} < Exmax\_{i,k+1} \\
 0 \Leftrightarrow Ed\_{ik} \ge Exmax\_{i,k+1}
\end{cases}
\tag{11}
$$

$$\begin{array}{lcl}\varepsilon\_{ik} = \left\{ \begin{array}{l} \varepsilon b\_{ik} \Leftrightarrow \varepsilon b\_{ik} \leq \varepsilon a\_{ik} \wedge (\varepsilon b\_{ik} > 0 \wedge \varepsilon a\_{ik} > 0) \\\ \varepsilon a\_{ik} \Leftrightarrow \varepsilon b\_{ik} > \varepsilon a\_{ik} \wedge (\varepsilon b\_{ik} > 0 \wedge \varepsilon a\_{ik} > 0) \\\ 0 \Leftrightarrow \neg(\varepsilon b\_{ik} > 0 \text{ and } \varepsilon a\_{ik} > 0) \end{array} \right. \end{array} \tag{12}$$

Variables *ETik* and *Tik*, defined by Equations (13) and (14), are variables for identifying whether equipment *i* and any equipment is allocated on day *k*. Variable *Tk* is also used to count the duration of the project.

$$ET\_{ik} = \begin{cases} \ 1 \Leftrightarrow Ed\_{ik} > 0 \\ \ 0 \Leftrightarrow Ed\_{ik} \leq 0 \end{cases} \tag{13}$$

$$T\_k = \begin{cases} \ 1 \Leftrightarrow \sum\_i ET\_{ik} > 0\\ \ 0 \Leftrightarrow \sum\_i ET\_{ik} \leq 0 \end{cases} \tag{14}$$

#### 3.2.4. Objective Function

The objective of this optimization model is to minimize idle equipment of a roadnetwork maintenance project. Variable *eik*, which is defined by Equation (12), is used to define the objective function of this model. The objective function (Equation (15)) is the sum of variable *eik* for all items of equipment *i* and day *k*.

$$\sum\_{\mathbf{x}} \sum\_{k} e\_{ik} \tag{15}$$

#### 3.2.5. Constraints

Equations (16)–(24) are constraints regulating the precedence relationship between main items of equipment. These equations are expressed using the syntax OPL programming language used by IBM ILOG CPLEX CP engine. These constraints are defined using conditional assessment; thus, OPL implication syntax is used for these definitions.

Equations (16)–(19) regulate the precedence relationship for main equipment, which do not have other items of equipment as their predecessors. These constraints are started by a conditional assessment of whether a particular item of equipment has other items of equipment as its predecessor, shown by the expression of ∑ *m precjim* = 0. If the assessment results in a true value, it means equipment *i* does not have any predecessors. Equation (16) defines that, if equipment *i* of road segment j does not have any predecessors, then equipment *i* could be allocated on day *k*.

$$\sum\_{m} \operatorname{precc}\_{jim} = 0 \Rightarrow E\_{ijk} \ge 0 \tag{16}$$

Constraints defined by Equations (17) and (18) state that if equipment *i* of road segment *j* does not have any predecessors allocated on the previous days, and it has not reached the number required allocation, it needs to be allocated on day *k*.

$$\sum\_{m} \text{prec}\_{jim} = 0 \land E\_{i j, k-1} > 0 \land \text{Etot}\_{i j, k-1} < E \text{req}\_{i j} \Rightarrow E\_{i j k} \ge 0 \tag{17}$$

$$\begin{aligned} \sum\_{m} \text{prec}\_{jim} &= 0 \land E\_{ij,k-1} > 0 \land \text{Etot}\_{i\bar{j},k-1} < E \text{re}\_{i\bar{j}} \Rightarrow E\_{i\bar{j}k} \\ &\leq E \text{re}\_{i\bar{j}} - \text{Etot}\_{i\bar{j},k-1} \end{aligned} \tag{18}$$

Equation (19) defines that, if equipment *i* of road segment *j* has reached the number of required allocations, it is not allowed to be allocated anymore.

$$\sum\_{m} \operatorname{precc}\_{\text{jinu}} = 0 \land \operatorname{Etot}\_{\text{ij},k-1} = \operatorname{Ere} q\_{\text{ij}} \Rightarrow E\_{\text{ijk}} = 0 \tag{19}$$

Equations (20)–(24) regulate the precedence relationship for the main items of equipment, which have other items of equipment as their predecessors. These constraints are

started by a conditional assessment of whether particular items of equipment have other items of equipment as their predecessors, shown by the expression of ∑ *m precjim* > 0. If the assessment results in a true value, it means the items of equipment *i* have some predecessors. Equation (20) defines that, if equipment *i* of road segment j does not have any predecessors, then equipment *i* could be allocated on day *k*.

Equation (20) defines that, if the items of equipment *i* of road segment *j* have predecessors, they are not allowed to be allocated on day 1.

$$\sum\_{m} \operatorname{precc}\_{jim} > 0 \Rightarrow E\_{ij1} = 0 \tag{20}$$

If item of equipment *i* of road segment *j* on day *k* has not had all its predecessors considered finished, it is not allowed to be allocated. This condition is defined by Equation (21). The expression ∑ *m precPassjimk* < *u* shows that the number of items of equipment considered finished on day *k* is smaller than the registered equipment; thus, it means some of the predecessors are still not finished.

$$\sum\_{m} \operatorname{precc}\_{jim} > 0 \; \land \; \sum\_{m} \operatorname{precc}\_{jimk} < u \Rightarrow E\_{ijk} = 0 \tag{21}$$

The expression ∑ *m precPassjimk* = *u* of Equations (22) and (23) shows that all registered equipment is considered finished on day *k*; thus, it means all predecessors of equipment *i* have been finished. This condition allows for equipment *i* to be allocated on day *k*.

$$\sum\_{m} \text{prec}\_{\text{jim}} > 0 \; \wedge \; \sum\_{m} \text{prec}\_{\text{jimk}} = \mathfrak{u} \; \wedge \; \text{Etot}\_{\text{ij},k-1} < \text{Ere}\_{\text{li}} \Rightarrow E\_{\text{ijk}} > 0 \tag{22}$$

$$\begin{aligned} \sum\_{m} \operatorname{precc}\_{\text{jim}} > 0 &\land \sum\_{m} \operatorname{precc}\_{\text{jimk}} = u &\land \operatorname{Etot}\_{\text{ij},k-1} < \operatorname{Ereq}\_{\text{ij}} \Rightarrow E\_{\text{ij}}\\ &\leq \operatorname{Ereq}\_{\text{ij}} - \operatorname{Etot}\_{\text{ij},k-1} \end{aligned} \tag{23}$$

Equation (24) defines that, if item of equipment *i* of road segment *j* on day *k* − 1 has been allocated as required, equipment *i* is not allowed to be allocated anymore.

$$\sum\_{m} \operatorname{prec}\_{\vec{j}\text{im}} > 0 \; \wedge \sum\_{m} \operatorname{prec} \operatorname{Pass}\_{\vec{j}\text{im}\text{k}} = \mathfrak{u} \; \wedge \; \operatorname{Etot}\_{\vec{i}\text{jk}-1} = \operatorname{Ereq}\_{\vec{i}\text{j}} \Rightarrow E\_{\vec{i}\text{jk}} = 0 \tag{24}$$

Constraints expressed by Equations (25) and (26) limit the maximum daily allocation of each item of equipment to the number of available items of equipment and reach the required allocation on each road segment, respectively.

$$Ed\_{ik} \le Eavail\_i \tag{25}$$

$$Er\_{ij} = Ereq\_{ij} \tag{26}$$

The constraint defined by Equation (27) makes sure that the project is started on day 1.

$$T\_1 = 1\tag{27}$$

3.2.6. Model Implementation Scenario

The road-network maintenance project scheduling—termed as the scheduling problem for the rest of this paper—was solved by three scenarios. The first scenario solves the scheduling problem by traditional LSM. This scenario acts as a benchmark for comparison to other scenarios. The second scenario solves the scheduling problem using the proposed model with the limitation of rectangular resource profiles. The third scenario solves the scheduling problem using the proposed model utilizing flexible resource profiles. Table 6 shows the comparison of the scenarios.


**Table 6.** Comparison of scenarios.

The scheduling problem solved has similar data for each scenario, except precedence relationship between road segments and type of resource used by activities. Tables 5 and 6 show resource requirements and resource availability for the project scheduling problem, respectively. The precedence relationship of Scenario 1 is different from that of the other two scenarios. Since it has a predetermined execution sequence, Scenario 1 has an additional precedence relationship of asphalt milling machine allocation between road segments. It is set that road segment 1 is executed the first time and road segment 5 is executed the last. Figure 7 shows the precedence relationship used by Scenario 1. Scenario 1 also has a different type of resource. It does not have equipment dependency; thus, it uses the more traditional sharing, that is, 'crew' level resource sharing. In this scenario, the crew is the main equipment of the particular activity without dependency on supporting equipment—as shown in Figure 8. Scenarios 2 and 3 use precedence relationship and equipment allocation schema, as shown Figures 1 and 3, respectively.

**Figure 7.** Precedence relationship of scenario 1.

**Figure 8.** Equipment allocation schema for Scenario 1.

#### **4. Result and Discussion**

Road network maintenance project scheduling problem was solved in three scenarios. Scenario 1 used the traditional linear scheduling method (LSM) to solve the scheduling problem. Repetitive units—road segment works—were executed sequentially using a predetermined sequence. Scheduling began with the execution of road segment 1 and

ended with road segment 5. When an activity is completed on a road segment, the crew will carry out the same type of activity on the next road segment without having to wait for the entire sequence of activities on the previous road segment to complete. Rectangular or uniform resource profiles were applied in this scenario. This scenario served as a comparison reference for the other two scenarios, i.e., Scenario 2 and Scenario 3.

Scenario 2 and Scenario 3 applied the proposed model for minimizing idle equipment. Road segments' execution does not have to be sequential. In addition to sequential execution, road segments could be carried out in parallel as long as the required equipment is still available. If road segments are carried out sequentially, the order in which the work is undertaken is not predetermined. This optimization model would determine the sequence of road segments' execution to achieve the model's objectives. Scenario 2 and Scenario 3 utilized rectangular and flexible resource profiles to solve the scheduling model, respectively. These scenarios—Scenario 2 and Scenario 3—were compared to Scenario 1 to show the advantages offered by the proposed model. The result of Scenario 2 would also be further compared to the result of Scenario 3 to show the difference caused by flexible resource profiles.

The model was run on the Intel Xeon Silver 4112 platform with 16 GB of RAM. The time needed to complete one scenario was about 20 min.

#### *4.1. Scenario 1: Traditional LSM*

The traditional linear scheduling method (LSM) was used to solve the scheduling problem as Scenario 1. Tables 7 and 8 show resource requirements and resource availability of this scenario, respectively. The road segment execution had a predetermined sequence, starting from road segment 1 and ending by road segment 5—as shown by Figure 7, and followed by a serial execution order. Resource allocation for this scenario was limited to a rectangular resource profile and did not implement the relationship between main equipment and supporting equipment. The resource allocation schema used by this scenario is shown in Figure 8. While most of the characteristics of this scenario follow traditional LSM, this scenario limits the schedule not to have a lag time between activities in one road segment, and once an activity is started, it has to be continuously executed until the activity is finished.

**Table 7.** Resource requirements.


#### **Table 8.** Available resource.


The road segment execution follows a serial sequence. When asphalt stripping activity in one segment finished, it was followed by its succeeding activity—asphalt spreading activity. At the same time, asphalt stripping activity on the next road segment was allowed to start. Asphalt stripping activity of the next road segment could start when it met other constraints, such as to ensure that it could be followed by its succeeding activities without lag time. Schedule and equipment allocation is shown in Figure 9.

**Figure 9.** Schedule and equipment allocation of Scenario 1.

The schedule resulted in Scenario 1 having a project execution duration of 28 days and 87 units of idle equipment. Idle equipment resulted from this scenario is caused by the lack of resource availability and time buffer. The number of resources available in this scenario did not have enough amount to apply different work rates to the activities. Combined with the lack of time buffer, this scenario could not shorten or lengthen each activity's duration and it could not offset the activity's execution timing.

#### *4.2. Scenario 2: Proposed Model with the Rectangular Resource Profile*

Scenario 2 used the proposed model to solve the scheduling problem with a limitation of rectangular resource profile. This scenario has the same resource requirement and resource availability as Scenario 1—shown in Tables 7 and 8.

This scenario opens the possibilities of executing repetitive units by serial or parallel sequence. All supporting equipment availability are set to a high enough amount that these supporting items of equipment can support the main items of equipment that need them, even in parallel execution.

The result of the linear schedule of this scenario is shown in Figure 10. Asphalt stripping and asphalt spreading activities were executed in parallel at some span of duration, while road marking activities were executed in serial sequence. Figure 10 also shows the equipment allocation schedule. Some idle equipment happened at the total allocation of asphalt milling machine, road marking machine, and dump truck.

**Figure 10.** Schedule and equipment allocation of Scenario 2.

The optimization model results project execution duration of 29 days and nine units of idle equipment. The ability to execute activities in parallel applied in this scenario allowed the model to flatten the resource allocation profile and reduced a significant amount of idle equipment compared to the traditional LSM. However, this model is limited to a rectangular resource profile; thus, it could not apply a gradual increase in resource allocation at the beginning and a gradual decrease in resource allocation at the end of an activity's execution.

#### *4.3. Scenario 3: Proposed Model with the Flexible Resource Profile*

The proposed model with a flexible resource profile was applied to the scheduling problem as Scenario 3. This scenario opens the alternatives of executing repetitive units by serial or parallel sequence and allocating main equipment using flexible resource profiles to minimize idle equipment. Tables 7 and 8 show resource requirements and resource availability of this scenario, respectively. All supporting equipment availability is set to a high enough amount that these supporting items of equipment can support the main items of equipment that need them, even in parallel execution.

Figure 11 shows the schedule and equipment allocation of Scenario 3. Asphalt stripping and asphalt spreading activities were executed in parallel at some span of duration, while road marking activities were executed in serial sequence. Since this scenario allowed the implementation of flexible resource profiles, the main equipment allocations of each road segment were shaped into trapezoids. Thus, the model could apply a gradual increase and gradual decrease in resource allocation at the beginning and the end of the activity's execution duration.

The optimization model results project execution duration of 25 days and nine units of idle equipment. The ability to execute repetitive units—road segments—in fully or partially parallel execution and the implementation of flexible resource profile could decrease a significant amount of idle equipment compared to the traditional LSM and result in a shorter duration compared to the second scenario.

#### *4.4. Comparison*

This model was intended to minimize idle equipment in a non-sequential linear construction project, i.e., a road-network maintenance project. This model proposed several improvements compared to previous models, which are: (1) non-predetermined road segment execution sequence; (2) serial and parallel execution alternatives; (3) dependency between main equipment and supporting equipment; and (4) application of flexible resource profile. Thus, this model was implemented into three scenarios to prove that the model could handle the proposed improvements. The first scenario uses traditional LSM to solve the scheduling problem and acts as the basis for comparison to the other scenarios. The second scenario applies the proposed model with the limitation of rectangular resource profiles and has abundant supporting equipment availability. The third scenario implements the proposed model with flexible resource profiles. The second and third scenario was intended to show the advantage of the proposed model compared to the traditional LSM. Table 9 shows the comparison of the optimization results among implemented scenarios.

**Figure 11.** Schedule and equipment allocation of Scenario 3.





The proposed model proved to be able to implement the proposed improvement mentioned above. Scenario 1, implementing traditional LSM, assigned repetitive units—road segments—by serial predetermined execution order. The equipment allocation schedule (Figure 9) shows some idle equipment happened because there is not any possibility to float a particular activity to meet work continuity.

The result of Scenario 2 and Scenario 3 shows that the proposed model was able to implement parallel execution for the project's repetitive units as long as it met the constraint of resource availability. In addition to the ability of parallel execution, Scenario 3 also shows the advantage of flexible resource profile to rectangular resource profile. The flexible resource profile allowed the implementation of a gradual increase and gradual decrease in resource profile at the beginning and the end of an activity execution duration, respectively. Scenario 2 and Scenario 3 have nine unit-days of idle equipment compared to 87 unit-days of idle equipment in Scenario 1. In addition to the minimization of idle equipment, Scenario 3 also has 25 days of project duration, which is shorter than in other scenarios.

#### **5. Conclusions**

The proposed model has succeeded in achieving its objectives from several points of view, namely project characteristics, model features, and model objectives. From the point of view of project characteristics, this model successfully accommodates the characteristics of a road network maintenance project, which are: (1) non-predetermined sequence of repetitive unit's execution, (2) serial or parallel execution of repetitive units, (3) zero lag time between activities inside a repetitive unit, and (4) non-preemptive execution of each activity (shown by the Gantt charts of Figures 10 and 11).

The proposed model succeeded to implement the features offered by this model. Resource dependency between main equipment and supporting equipment opens a new sight of resource allocation continuity. The crew consists of main equipment and supporting equipment and the number of equipment assigned to the crew. Compared to traditional LSM, which considers resource sharing at the crew level, this model shares resources at the equipment level. Thus, resource allocation continuity is observed by the allocation of a particular type of equipment, whether that particular equipment is assigned to the same type or a different type of crew.

The next feature of the proposed model is the implementation of flexible resource profiles. This model proved to obtain shorter project duration by the implementation of flexible resource profiles compared to the more traditional resource profiles—rectangular resource profiles.

From an optimization objective point of view, the proposed model has succeeded to minimize idle equipment of a non-sequential linear construction project by using constraint programming. This model calculated idle equipment based on the difference between actual mobilized equipment and the actual allocated equipment at a particular time. This calculation is more realistic than the usage of maximum mobilized equipment or possible available equipment as the reference value of the idle equipment calculation.

From several points of view mentioned above, it could be concluded that compared to the traditional linear scheduling method, this model has achieved several advantages, which are: (1) this model could schedule linear construction project without predetermined execution order; (2) this model could execute repetitive units in a serial or parallel way; (3) this model included a dependency between main equipment and supporting equipment, compared to traditional LSM which consider this resource as crew; (4) this model

presented the alternative of using flexible resource profile; and (5) this model could minimize idle equipment, and thus this model could deliver equipment allocation continuity.

This model has several branches as future works. From the concept of resource allocation, this model applied the concept of dependency between main equipment and supporting equipment, which are renewable resources. This concept of dependency between renewable resources could be further explored to the concept of dependency between unrenewable resources and the procurement schedule of renewable and unrenewable redsources.

This research is applied to a case of a road network maintenance project. To further ensure that this resource allocation optimization model can be applied to general cases of road network maintenance projects, it is necessary to apply this model to other similar projects as further research.

**Author Contributions:** Conceptualization, S.-S.L., A.B. and M.F.A.A.; formal analysis, S.-S.L., A.B. and M.F.A.A.; investigation, S.-S.L., A.B. and M.F.A.A.; methodology, S.-S.L.; writing—original draft preparation, A.B. and M.F.A.A.; writing—review and editing, S.-S.L.; visualization, A.B. and M.F.A.A.; supervision, S.-S.L. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Mathematics* Editorial Office E-mail: mathematics@mdpi.com www.mdpi.com/journal/mathematics

MDPI St. Alban-Anlage 66 4052 Basel Switzerland

Tel: +41 61 683 77 34 Fax: +41 61 302 89 18

www.mdpi.com