#### Abstract

We propose an analytical scheduling model with subcontracting. Each job can be processed either on a single machine at a manufacturer or outsourced to a subcontractor, possibly at a higher cost. For a given set of jobs, the decisions the manufacturer needs to make include the selection of a subset of jobs to be outsourced and the schedule of all the jobs. The objective functions are to minimize the commonly used scheduling measures, subject to a constraint on the total production and subcontracting cost. We show the NP-hardiness for the problems with different objective functions and develop dynamic programming algorithms for solving them.

#### 1. Introduction and Problem Description

With widespread globalization, subcontracting is widespread in many industries. Subcontracting is the procurement of an item or service that a firm is normally capable of producing using its own facilities. Subcontracting can be used as a strategic tool to reduce operation cost and as a means to hedge against the capacity shortage when facing a large demand. When a firm subcontracts out some orders, this allows it to concentrate on its core competencies and improve its response to customer demand. Furthermore, subcontracting lowers investment requirements and the financial risk of the firm. However, in making subcontracting decisions, many factors need to be taken into account, such as production cost, subcontracting cost, customer demand, and delivery lead times. Obviously, analytical models and problem-solving tools are needed if a manufacturer is to optimize the tradeoffs from those factors.

In this paper, we propose an analytical scheduling model for a firm with an option of subcontracting. In our model, we assume that there is a single machine at the manufacturer’s plant and there is a subcontractor, who has a sufficient number of identical parallel machines, such that each of these machines will handle at most one job, possibly at a higher cost. Each job can be processed either at the manufacturer’s plant or outsourced to a subcontractor. The objective functions are to minimize the common scheduling measures, subject to a constraint on the total production and subcontracting cost. Given a set of orders, the manufacturer needs to determine which orders should be scheduled in-house and which should be outsourced. While controlling the production and subcontracting costs, the manufacturer needs to consider in-house scheduling and subcontracting simultaneously.

The study of subcontracting under machine scheduling models just started recently. Chung et al. [1] considered a job shop scheduling problem in which each job has a due date that must be satisfied, but operations of orders can be subcontracted at a certain cost. The objective is to minimize the total subcontracting cost. Bertrand and Sridharan [2] studied a make-to-order manufacturing environment where orders arrive over time randomly and can either be processed in-house on a single machine or outsourced. The objective is to maximize the utilization of in-house capacity while minimizing tardiness in fulfilling orders. Recently, Qi [3] studied the production scheduling problem for a two-stage flow shop where there are options of subcontracting some operations to subcontractors. He considered a minimum makespan objective and analyzed various models for different situations of subcontracting. Chen and Li [4] proposed an analytical scheduling model, where each job can be either processed by the manufacturer in-house or outsourced. The objective is to minimize the total production and subcontracting cost, subject to a constraint on the maximun completion time of the orders. Sotskov [5] considered the objective function with the different machine cost including production cost and subcontracting cost.

Beyond the research field of scheduling, some work has been conducted to study the joint decisions of in-house production and subcontracting under the context of inventory management, for example, van Mieghem [6], Atamtürk and Hochbaum [7], and Yang et al. [8]. In these models, products are supposed to be identical, customers are assumed equally important, and all demands are aggregated. The objective is to minimize certain cost which is a function of the production, subcontracting, inventory, and backlog orders. Different from these models, in our scheduling model the orders placed by the customer are differentiated based on their processing times and due dates, and we need to decide which jobs are processed by in-house machine and which are oursourced and need to schedule all jobs.

Now we describe our model in detail as follows. If job is processed at the manufacturer’s plant, a processing time and a production cost are required. If job is outsourced, a processing time and a subcontracting cost are needed. Given a schedule, we denote as the completion time of job . All jobs are available at the time zero, and preemption is not allowed. The objective functions in our model are to minimize two common scheduling measures, namely, the total completion time and the makespan , subject to a constraint on the total production and subcontracting cost. Using the notation introduced by Graham et al. [9], we denote the general form of our problems as , where “1” indicates the number of the available in-house machines, ” indicates that the subcontractor has unlimited capacity, , and denotes the whole sum of production cost and outsourcing cost. The main problem is then how to coordinate the in-house production and subcontracting in an efficient way, subject to the constraint that the total cost is no more than .

The rest of the paper is organized as follows. In Section 2, we give the complexity analysis for the first problem and present a dynamic programming algorithm for it. In Section 3, we show the complexity analysis for the second problem and solve it by a dynamic programming algorithm. We summarize our results in the last section.

#### 2. Problem

Now, we prove that the problem is NP-hard, as in Theorem 1.

Theorem 1. *The problem is binary NP-hard.*

*Proof. *The proof can be done in polynomial reduction from the knapsack problem [10], which is known to be NP-hard. In the knapsack problem, we are given a set of items , where each item has a value and a size . All sizes and values are positive integers. The knapsack has capacity , where is also a positive integer. The goal is to find a subset of items that maximizes the value of items in the knapsack subject to the constraint that the total size of these items is no more than the capacity; that is, . The decision version of the knapsack problem is stated as follows.*Knapsack Problem*. Given , is there a subset such that and ?

We construct the instance of the problem as follows.(i)Number of jobs: .(ii), , for .(iii), , for .(iv)Threshold value: , , where , .(v)The decision asks whether there is a schedule such that and .

It can be observed that the above construction can be done in polynomial time.

First, we assume that the knapsack problem has a solution, that is, for given , there exists a subset such that and .

We construct a schedule such that and by the following way: assign each job in to be scheduled on the in-house machine and outsourced all the other jobs. It is not hard to verify that

Now, suppose that there is a schedule whose objective function value is at most and ; we will show that there exists a solution to the knapsack problem.

Let be the set of jobs scheduled on the in-house machine; we obtain that

Using the fact that , we have .

Since
we obtain . Thus, the knapsack problem has a solution.

Next, we design a dynamic programming algorithm to solve problem , denoted as DP1. Before proceeding further, we need to introduce the following Lemma.

Lemma 2. *For problem , there exists an optimal solution in which jobs scheduled on the in-house machine are sequenced in the SPT order; that is, jobs are sequenced in the nondecreasing order of processing times on the in-house machine.*

*Proof. *It can be proved in interchange arguments.

Now assume that jobs are indexed as . Let be the optimal value of the objective function for partial jobs where (1) is the number of the jobs processed on the in-house machine and (2) is the current total cost. The recurrence relation is described as follows.

If job is scheduled on the in-house machine, its contribution to the total completion time of objective function depends on both the number of jobs scheduled after and the processing time , which is . We set

Similarly, if job is outsourced, its contribution to the total completion time of objective function is . Then set

Thus

The initial conditions is as follows:

The optimal value is where stands for the total cost for all the jobs. The running time of the algorithm DP1 is .

#### 3. Problem

In this section, using the knapsack problem for the reduction, we similarly prove that the problem is NP-hard.

Theorem 3. *The problem is binary NP-hard.*

*Proof. *The proof can also be done in polynomial reduction from the knapsack problem. Now, consider the following instance of the given problem .(i)Number of jobs: .(ii), , for .(iii), , for .(iv)Threshold value: , , where .(v)The decision asks whether there is a schedule such that and .

It can be observed that the above construction can be done in polynomial time.

First, we assume that the knapsack problem has a solution; that is, for given , there exists a subset such that and . Then consider the following schedule by subcontracting all jobs in and scheduling all the other jobs on the in-house machine in any sequence. It is not hard to show that

Now, we suppose that there is a schedule whose objective function value is at most and ; we will show that there exists a solution to the knapsack problem.

Let be the set of jobs outsourced; we have that

Using the fact that , we get . Since , for all ,

By , we obtain . Thus the knapsack problem has a solution.

For the problem , we design a dynamic programming algorithm, denoted as DP2. We do not reindex the jobs before scheduling, because any arbitrary job sequence leads to the same makespan on a single machine.

Define as a state variable describing a subschedule for jobs where (1) is the load of the in-house machine, that is, the sum of the processing times of the jobs scheduled on the in-house machine, (2) is the maximal processing time of the outsourced jobs, and (3) is the current total cost. Let be the optimal value of the objective function for the subschedule described by . The recurrence relation is described as follows.

If job is scheduled on the in-house machine, we set

If job is outsourced, we have

Furthermore

We give the initial conditions as follows:

The optimal value is , where , and , , respectively, stand for the sum of processing times and the total cost for all the jobs. The running time of the algorithm DP2 is . Obviously, the dynamic programming algorithm DP2 is pseduopolynomial dynamic programming algorithm.

#### 4. Conclusion

An analytical model for the coordination of in-house production and outsourcing has been studied. The objective functions are to minimize the common scheduling measures, subject to a constraint on the total production and subcontracting cost. We give their complexity analysis and solve them by dynamic programming algorithms. In the further, we will investigate the problems with other objective functions such as minimizing the number of tardy jobs and the maximum lateness. And we will discuss more complex models with multiple available subcontractors and batch processing.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This work was supported by the Scientific Research of Young Scholar of Qufu Normal University (no. XKJ201315) and the Project of Shandong Province Higher Educational Science and Technology Program (no. J13LI09).