# Integrated Production and Distribution Scheduling Problems Related to Fixed Delivery Departure Dates and Weights of Late Orders

Authors: Shanlin Li; Maoqin Li
Journal: The Scientific World Journal
 (2015)

---

## Abstract

We consider an integrated production and distribution scheduling problem faced by a typical make-to-order manufacturer which relies on a third-party logistics (3PL) provider for finished product delivery to customers. In the beginning of a planning horizon, the manufacturer has received a set of orders to be processed on a single production line. Completed orders are delivered to customers by a finite number of vehicles provided by the 3PL company which follows a fixed daily or weekly shipping schedule such that the vehicles have fixed departure dates which are not part of the decisions. The problem is to find a feasible schedule that minimizes one of the following objective functions when processing times and weights are oppositely ordered: (1) the total weight of late orders and (2) the number of vehicles used subject to the condition that the total weight of late orders is minimum. We show that both problems are solvable in polynomial time.


---

## Body

## 1. Introduction

An increasing number of companies now adopt make-to-order business models in which products are custom-made and delivered to customers within a very short lead time directly from the factory. Consequently, there is little or no finished product inventory in the supply chain such that production and outbound distribution are intimately linked and must be scheduled jointly. A majority of the companies worldwide rely on the 3PL providers for their daily distribution and other logistics needs [1]. 3PL providers often follow a fixed daily or weekly schedule for serving their customers. For example, many package delivery service providers such as UPS and FedEx have daily fixed package pickup times; and most 3PL rail, ocean, and air freight service providers have a fixed weekly schedule for a specific origin-destination pair.In this paper, we study integrated production and outbound distribution scheduling decisions commonly faced by many manufacturers that operate in a make-to-order mode and rely on a 3PL provider for finished product delivery to customers where the 3PL provider follows a fixed delivery schedule. Examples of such manufacturers include most high-end custom-made consumer electronics product manufacturers based in Asia that rely on air flights (which have fixed departure times) to deliver finished products to the US and European markets. The production and distribution scheduling problem faced by such a manufacturer can be described as follows. At the beginning of a planning horizon, the manufacturer has received a setJ={J1,J2,…,Jn} of n independent orders from its customers to be processed on a single assembly line. Order Ji has a processing time pi, a weight wi and a desired due date di which is negotiated and agreed on by the manufacturer and the customer who placed the order. Finished orders are delivered by vehicles which have fixed departure times. In the planning horizon, there are z possible vehicle departure time instants T1,T2,…,Tz, whereby at time Tj, 1≤j≤z, there are vj vehicles available for delivery. In the air flight case, each vehicle represents an air freight container. Based on a contractual agreement between the manufacturer and the 3PL provider, the manufacturer can use a certain number (e.g., vj) of containers available on a given flight with departure time Tj. Usually the 3PL provider charges the manufacturer a fixed transportation cost for each air freight container used. Thus, the total transportation cost is represented by the total number of vehicles (i.e., total number of containers) used. Each order is packaged into a standard-size pallet for delivery convenience regardless of the order size. Each vehicle can deliver at most C orders (e.g., in the air flight case, each container can hold up to C pallets). The vj vehicles can only deliver orders that are completed by time Tj. A feasible schedule is one in which each order has completed processing and delivered by one of the available vehicles. Without loss of generality, we may assume that Tz≥∑i=1npi; otherwise, there is at least one order that cannot be delivered and hence there is no feasible schedule.In a given feasible schedule, if orderJi is delivered at time Tj and Tj>di, we define Ui to be 1; if order Ji is delivered at time Tj and Tj≤di, we define Ui to be 0. We say in a given feasible schedule an order Ji isearly if Ui=0 andlate if Ui=1. The minimum total weight of late orders ∑i=1nwiUi measures the delivery timeliness relative to the customers desired due dates and is one of the most commonly used measurements in practice. The problem of minimizing ∑i=1nwiUi is NP-hard as it contains the NP-hard classical single-machine total weight of late orders scheduling problem [2] as a special case when the delivery part is not considered. In this paper, we consider the special case of the problem in which processing times and weights are oppositely ordered; that is, if wi<wj, then pi≥pj for all Ji,Jj∈J. That processing times and weights are oppositely ordered is the case in many practical applications. For example, when production resources are comparative shortage, one would prefer the order with shorter processing time. Our problem is to find a feasible schedule that minimizes one of the following objective functions: (1)∑i=1nwiUi and (2) the number of vehicles used subject to the condition that ∑i=1n‍wiUi is minimum. We show that all two problems are solvable in polynomial time.Research on integrated production and outbound distribution scheduling problems is relatively recent but has attracted a rapidly growing interest in the last several years [3]. In most of the problems considered in the literature, vehicle departure times are not fixed and need to be determined along with other decisions. Only a handful of problems considered in the literature involve fixed vehicle departure times. Such problems can be classified into two types based on vehicle availability. One type assumes that there are infinite number of vehicles available at each departure time, whereas the other type assumes that there are a limited number of vehicles available at each departure time. Stecke and Zhao [4], Melo and Wolsey [5], and Zhong et al. [6] all consider similar problems with an infinite number of vehicles where each order has a deadline which has to be satisfied and the objective is to minimize the total transportation cost. Their problems differ slightly in the structure of the transportation cost. Since the focus of this paper is on problems with a finite number of vehicles, we do not review these papers in detail.Li et al. [7–9] and Zandieh and Molla-Alizadeh-Zavardehi [10] study several similar problems with a finite number of vehicles at each departure time which are all motivated by applications involving synchronizing assembly operations of consumer electronics products such as PCs and air transportation schedules. Orders may have different sizes and the capacity of a vehicle is measured by the total size (weight or volume) of orders that it can carry. There is an earliness or tardiness penalty if an order is delivered earlier or later than the due date. The objective is to minimize the total transportation cost and total weighted earliness and tardiness penalty. Li et al. [9] consider the case where all the orders are processed on a number of parallel production lines, whereas the other papers consider the case with a single production line. The problems are strongly NP-hard as they contain the strongly NP-hard classical single-machine total weighted tardiness scheduling problem [11] as a special case when the delivery part is not considered. These papers propose various heuristics for solving their problems. Wang et al. [12] study a problem with a finite number of vehicles which involves coordinating mail processing and distribution schedules at a mail processing and distribution center. The objective is to minimize the total unused vehicle capacity. The authors show that this problem is strongly NP-hard and propose dispatching rules and heuristics.Fu et al. [13] consider a problem where there is a limit on the total delivery capacity at each departure time. Each order has a delivery departure deadline, a production window, a size, and a profit. The problem is to select a subset of orders to accept so as to maximize the total profit of the accepted orders under the constraint that each accepted order is processed within its production window, the delivery of this order is departed by its delivery departure deadline, and the total size of the orders delivered at each departure time does not exceed the available vehicle capacity limit. The problem is strongly NP-hard as it contains the bin packing problem as its special case when only the delivery part is considered. The authors propose a polynomial time approximation scheme for the problem.Leung and Chen [14] discuss an integrated production and distribution scheduling problem. In the beginning of a planning horizon, the manufacturer has received a set of orders to be processed on a single production line. Completed orders are delivered to customers by a finite number of vehicles provided by the 3PL company which follows a fixed daily or weekly shipping schedule such that the vehicles have fixed departure dates. The problem is to find a feasible schedule that minimizes one of the following objective functions: (a) the maximum lateness of orders, (b) the number of vehicles used subject to the condition that the maximum lateness is minimum, and (c) the weighted sum of the maximum lateness and the number of vehicles used. They show that all three problems are solvable in polynomial time.The remainder of this paper is organized as follows. In Section2, we give a simple algorithm to check the feasibility of a given instance of the problem. In Sections 3 and 4, we give polynomial time algorithms to solve problems (1) and (2), respectively. We conclude the paper in Section 5.


## 2. Feasibility

Given an instance of the problem, we first need to determine whether there is any feasible schedule. The following Algorithm FD come from Leung and Chen [14] and are stated. The idea is to schedule the orders in Smallest-Processing-Time first (SPT) order. Let S be a SPT schedule. Let S(Ti,Tj) denote the set of orders completed in the interval (Ti,Tj] in S. Let Tz+1 be any integer greater than Tz. We then assign the orders to the vehicles by the following algorithm.Algorithm FDInput. An SPT schedule S. For each departure time Tj, for 1≤j≤z, there are vj vehicles available for delivery at Tj.Output. “Yes” if it is possible to deliver all the orders in the schedule S, “No” otherwise.Method
(1)
S
(
T
z
,
T
z
+
1
)
:
=
∅; T0:=0.
(2)
Forj=1 to z do the following:
(a)
assign the orders inS(Tj-1,Tj) to one of the vj vehicles available at time Tj;
after an order is assigned to a vehicle, it is removed fromS(Tj-1,Tj);
(b)
if all of thevj vehicles are full and there is still at least one unassigned order in S(Tj-1,Tj), then put all the unassigned orders into S(Tj,Tj+1);
(3)
ifS(Tz,Tz+1)=∅ then return “Yes,” else return “No.”If the algorithm returns “Yes,” then there is a feasible schedule; otherwise, there is no feasible schedule. The overall running time of the algorithm is O(nlog⁡⁡n) time.Let(S1,S2) be a SPT schedule of the instance of the problem. Clearly, there is no feasible schedule for the instance of the problem if S2=∑j=kzvjC and ∑Ji∈S1pi>Tk-1, where 1≤k≤z. In the remainder of this paper, we will assume that there is a feasible schedule for the given instance.


## 3. Total Weight of Late Orders

In this section we give a polynomial-time algorithm to solve the total weight of late orders problem. For each1≤i≤n, let di¯=max⁡{Tm∣Tm≤di,1≤m≤z} and for each 1≤j≤z, let N0,j={Ji∣di¯=Tj,1≤i≤n}. Clearly, an order Ji∈N0,j is early if and only if it is completed and delivered by time Tj for a given schedule. The following algorithm decides whether there is a feasible schedule that minimizes the total weight of late orders. To break ties when sequencing the orders in decreasing order of their weights, we employ the last-in first rule; that is, we arrange order Jj before order Ji if Jj is merged into a set of orders S and wj=wi, where Ji∈S.Algorithm WFInput. J and N0,1,…,N0,z.Output. A feasible schedule that minimizes the total weight of late orders.Method
(1)
P
=
∑
i
=
1
n
p
i; t:=0. T0:=0. N0,0:=∅.
(2)
Forj=z down to 1 do the following.
(2.1)
LetRt,j be all the orders in Nt,j, arranged in decreasing order of their weights.
(2.2)
IfvjC<Rt,j, then update Nt,j-1:=Nt,j-1∪Ft,j and Rt,j:=Rt,j∖Ft,j, where Ft,j are the first Rt,j-vjC orders from Rt,j.
(2.3)
p
:
=
∑
J
i
∈
R
t
,
j
‍
p
i.
(2.4)
Schedule the orders inRt,j from time P-p to P. These orders will be delivered by the vehicles available at time Tj.
(2.5)
P
:
=
P
-
p.
(2.6)
IfP>Tj-1, find Jlt∈Nt,jl such that wlt=min⁡{wi∣Ji∈⋃i=0j-1‍Nt,i}, where 0≤jl≤j-1. Update Nt,0:=Nt,0,Nt,1:=Nt,1,…,Nt,jl-1:=Nt,jl-1, Nt,jl:=Nt,jl∖{Jlt}, Nt,jl+1:=Nt,jl+1,…,Nt,j-1:=Nt,j-1, Nt,j:=Rt,j,…,Nt,z-1:=Rt,z-1, Nt,z:=Rt,z∪{Jlt}, and t:=t+1; return to (2).
(3)
Stop. The schedule(Rt,1,…,Rt,z) is an optimal feasible schedule, where the orders in Rt,j will be delivered by the vehicles available at time Tj and ∑i=0t-1‍wli=min⁡∑‍wjUj.Algorithm WF consists oft+1 iterations. For ease of presentation, we present the detailed output data obtained by the t+1 iterations as follows:
(1)R0,j0,…,R0,z,Jl0,wl0;…;Rt-1,jt-1,…,Rt-1,z,Jlt-1,wlt-1;Rt,1,…,Rt,z,
where for k=0,1,…,t-1, 1≤jk≤z, P-∑Ji∈⋃j=jkz‍Rk,jpi>Tjk-1, Jlk∈J∖⋃j=jkzRk,j, and wlk=min⁡{wi∣Ji∈J∖⋃j=jkzRk,j}.The following lemma describes some properties of the data obtained by Algorithm WF.Lemma 1.
Let the data in (1) be obtained by Algorithm WF. All of the following hold:(i)
j0≥j1≥⋯≥jt=1,(ii)
wl0≤wl1≤⋯≤wlt-1,(iii)
for each0≤k≤t-1 and k+1≤i≤t, Jlk∈⋃j=jkz‍Ri,j and is a late order if the orders in Ri,j are delivered at time Tj.Proof.
Let(R0,j0,…,R0,z), Jl0, and wl0 be the output data obtained by the first iteration of Algorithm WF. Then, we have that P-∑Ji∈⋃j=mz‍R0,j‍pi≤Tm-1, R0,m≤vmC for m=z,z-1,…,j0+1, and P-∑Ji∈⋃j=j0z‍R0,j‍pi>Tj0-1, R0,j0≤vj0C. We now run the second iteration on the data (N1,0,N1,1,…,N1,z). It follows from Steps (2.1) and (2.2) that R1,z=R0,z∪{Jl0} if R0,z<vzC and R1,z=R0,z∪{Jl0}∖{Jl} otherwise, where wl=max⁡{wi∣Ji∈R0,z∪{Jl0}}. Since order processing times and order weights are oppositely ordered, we have pl=min⁡{pi∣Ji∈R0,z∪{Jl0}}. In either case, ∑Ji∈R1,z‍pi≥∑Ji∈R0,z‍pi. This implies that P-∑Ji∈R1,z‍pi≤P-∑Ji∈R0,z‍pi≤Tz-1. Further, we have that for m=z-1,…,j0,
(2)⋃j=mz‍R1,j=⋃j=mz‍R0,j∪Jl0if∑j=mz‍R0,j<∑j=mz‍vjC,(3)⋃j=mz‍R1,j=⋃j=mz‍R0,j∪Jl0∖Jlif∑j=mz‍R0,j=∑j=mz‍vjC,
where pl=min⁡{pi∣Ji∈⋃j=mz‍R0,j∪{Jl0}}. This implies that for m=z-1,…,j0+1, P-∑Ji∈⋃j=mz‍R1,j‍pi≤P-∑Ji∈⋃j=mz‍R0,j‍pi≤Tm-1. Thus, j0≥j1 holds. The proof of the following inequalities in (i) is similar to that of the first inequality. We conclude that (i) holds.
By Algorithm WF, we have thatJl0∈J∖⋃j=j0z‍R0,j and Jl1∈J∖⋃j=j1z‍R1,j, where wl0=min⁡{wi∣Ji∈J∖⋃j=j0z‍R0,j} and wl1=min⁡{wi∣Ji∈J∖⋃j=j1z‍R1,j}. Due to (i), j0≥j1. By (2), ⋃j=j0z‍R1,j=⋃j=j0z‍R0,j∪{Jl0} if ∑j=j0z‍R0,j<∑j=j0z‍vjC. In the case, since J∖⋃j=j0z‍R0,j⊇J∖⋃j=j1z‍R1,j, we have that wl0≤wl1. By (3), ⋃j=j0z‍R1,j=⋃j=j0z‍R0,j∪{Jl0}∖{Jl} if ∑j=j0z‍R0,j=∑j=j0z‍vjC, where wl=max⁡{wi∣Ji∈⋃j=j0z‍R0,j∪{Jl0}}. In the case, since J∖⋃j=j0z‍R0,j⊇{Jl}∪J∖⋃j=j1z‍R1,j, along with wl≥wl0, we have that wl0≤wl1. Thus, the first inequality wl0≤wl1 in (ii) holds. The proof of the following inequalities in (ii) is similar to that of the first inequality. We conclude that (ii) holds.
For anyk∈{0,1,…,t-1}, suppose Jlk∈N0,k0. Clearly, Jlk is a late order if it is delivered at time Tj, where k0<j≤z. To show (iii), there are two cases to consider: (a) k0<jk and (b) k0≥jk.
(a) Considerk0<jk. Assume that Jlk∈⋃j=jkz‍Rk+1,j does not hold. It follows from the argument of (i) that ∑j=jkz‍Rk,j=∑j=jkz‍vjC, ⋃j=jkz‍Rk+1,j=⋃j=jkz‍Rk,j, and wlk=max⁡{wi∣Ji∈⋃j=jkz‍Rk,j∪{Jlk}}; that is, plk=min⁡{pi∣Ji∈⋃j=jkz‍Rk,j∪{Jlk}}. This, along with wlk=min⁡{wi∣Ji∈J∖⋃j=jkz‍Rk,j}, that is, plk=max⁡{pi∣Ji∈J∖⋃j=jkz‍Rk,j}, implies that, for any Ji1∈J∖⋃j=jkz‍Rk,j and Ji2∈⋃j=jkz‍Rk,j, pi1≤pi2. Thus, we have that there is a SPT schedule (S1,S2) such that S2=∑j=jkz‍vjC and ∑Ji∈S1‍pi>Tjk-1, where S1=J∖⋃j=jkz‍Rk,j and S2=⋃j=jkz‍Rk,j. This implies that there is no feasible schedule for the instance of the problem, which contradicts the assumption that there is a feasible schedule for the given instance. Thus, Jlk∈⋃j=jkz‍Rk+1,j and is a late order if the orders in Rk+1,j are delivered at time Tj. Further, it follows from the argument of (i) that ⋃j=jkz‍Rk+2,j=⋃j=jkz‍Rk+1,j∪{Jlk+1} if ∑j=jkz‍Rk+1,j<∑j=jkz‍vjC and  ⋃j=jkz‍Rk+2,j=⋃j=jkz‍Rk+1,j∪{Jlk+1}∖{Jl} if ∑j=jkz‍Rk+1,j=∑j=jkz‍vjC, where wl=max⁡{wi∣Ji∈⋃j=jkz‍Rk+1,j∪{Jlk+1}}. This, along with wlk≤wlk+1 and Jlk merged into ⋃j=jkz‍Rk+1,j before Jlk+1, implies that Jlk∈⋃j=jkz‍Rk+2,j and is a late order if the orders in Rk+2,j are delivered at time Tj. Similarly, we can show Jlk∈⋃j=jkz‍Ri,j and is a late order if the orders in Ri,j are delivered at time Tj for i=k+3,…,t.
(b) Considerk0≥jk. Note the fact that order Jlk is pushed by the iterations from N0,k0 into J∖⋃j=jkz‍Rk,j. By Steps (2.1) and (2.2), we have that Rk,j=vjC for j=jk,…,k0 and wlk=max⁡{wi∣Ji∈⋃j=jkk0‍Rk,j}. This implies Jlk∈⋃j=k0+1z‍Rk+1,j(⊆⋃j=jkz‍Rk+1,j). Otherwise, it follows from the argument of (i) that ∑j=k0+1z‍Rk,j=∑j=k0+1z‍vjC, ⋃j=k0+1z‍Rk+1,j=⋃j=k0+1z‍Rk,j, and wlk=max⁡{wi∣Ji∈⋃j=k0+1z‍Rk,j∪{Jlk}}, and then we have that ∑j=jkz‍Rk,j=∑j=jkz‍vjC, ⋃j=jkz‍Rk+1,j=⋃j=jkz‍Rk,j, and wlk=max⁡{wi∣Ji∈⋃j=jkz‍Rk,j∪{Jlk}}. Similar to the argument of case (a), we can derive a contradiction. Similarly, we can show Jlk∈⋃j=jkz‍Ri,j and is a late order if the orders in Ri,j are delivered at time Tj for i=k+2,…,t. This ends the proof for (iii).Theorem 2.
Algorithm WF correctly finds a feasible schedule that minimizes the total weight of late orders inO(zn2log⁡⁡n) time.Proof.
We first prove that⋃j=jkz‍Rk,j has not only exactly k late orders {Jl0,…,Jlk-1} but also the maximum total processing time and the minimum total weight ∑i=0k-1‍wli of late orders among all schedules for k=0,1,…,t-1, where {Jl0,…,Jlk-1}=∅ and ∑i=0k-1‍wli=0 if k=0. By the definition of N0,z and Steps (2.1) and (2.2) of Algorithm WF, we have that R0,z is a set of early orders delivered at time Tz with the maximum total processing time among all schedules. Similarly, we have that ⋃j=mz‍R0,j is a set of early orders with the maximum total processing time among all schedules for m=z-1,…,j0.
By (2) and (3), we have that ⋃j=j0z‍R1,j=⋃j=j0z‍R0,j∪{Jl0} if ∑j=j0z‍R0,j<∑j=j0z‍vjC and ⋃j=j0z‍R1,j=⋃j=j0z‍R0,j∪{Jl0}∖{Jl} if ∑j=j0z‍R0,j=∑j=j0z‍vjC where wl=max⁡{wi∣Ji∈⋃j=j0z‍R0,j∪{Jl0}}. This, along with (iii) of Lemma 1, wl0=min⁡{wi∣Ji∈J∖⋃j=j0z‍R0,j} and ⋃j=j0z‍R0,j being a set of early orders with the maximum total processing time among all schedules, implies that ⋃j=j0z‍R1,j has not only exactly a late order Jl0 but also the maximum total processing time and the minimum weight wl0 among all schedules. Further, by Steps (2.1) and (2.2) of Algorithm WF, we have that ⋃j=mz‍R1,j has not only exactly a late order Jl0 but also the maximum total processing time and the minimum weight wl0 among all schedules for m=j0-1,…,j1. Similarly, we can show the result for k=2,…,t-1.
We below prove that(Rt,1,…,Rt,z) is a feasible schedule minimizing the total weight of late orders. By Algorithm WF, the feasibility is obvious. For any feasible schedule S=(R1,…,Rz), where the orders in Rj are delivered at time Tj for j=1,…,z, we have that ⋃j=j0z‍Rj contains at least a late order. Otherwise, by ∑Ji∈⋃j=j0z‍Rj‍pi≤∑Ji∈⋃j=j0z‍R0,j‍pi, we have that ∑Ji∈S∖⋃j=j0z‍Rj‍pi≥P-∑Ji∈⋃j=j0z‍R0,j‍pi>Tj0-1. This contradicts the feasibility of S. Given that ⋃j=j0z‍Rj contains at least a late order, ⋃j=j1z‍Rj contains at least two late orders. Otherwise, ⋃j=j1z‍Rj contains a late order. By ∑Ji∈⋃j=j1z‍Rj‍pi≤∑Ji∈⋃j=j1z‍R1,j‍pi, we have that ∑Ji∈S∖⋃j=j1z‍Rj‍pi≥P-∑Ji∈⋃j=j1z‍R1,j‍pi>Tj1-1. This contradicts the feasibility of S. Similarly, we can show that ⋃j=jkz‍Rj contains k+1 late orders at least for k=2,…,t-1. Thus, (Rt,1,…,Rt,z) is a feasible schedule minimizing the number of late orders. This, along with ∑i=0t-1‍wli being the minimum total weight, implies that Algorithm WF correctly finds a feasible schedule that minimizes the total weight of late orders.
We now show that the algorithm can be implemented to run inO(zn2log⁡⁡n) time. The algorithm consists of n+1 iterations at most since there are n late orders at most. To calculate the complexity of the algorithm we first calculate in a preprocessing step the sets (d1¯,…,dn¯) and (N0,1,…,N0,z). The calculation of the set (d1¯,…,dn¯) takes O(nlog⁡⁡z). The calculation of the set (N0,1,…,N0,z) takes O(nlog⁡⁡z) also. Step (1) takes O(n) time. Step (2) is iterated z times. Within each iteration, the most time-consuming step is Step (2.1), sorting the orders in decreasing order of their weights, which takes O(nlog⁡⁡n) time. Hence Step (2) takes O(znlog⁡⁡n) time. Thus, the overall running time of the algorithm is O(zn2log⁡⁡n) time.


## 4. Number of Vehicles Used

In this section we show that the problem of minimizing the number of vehicles used subject to the constraint that the total weight of late orders is minimum can be solved in polynomial time. We assume that we have found the schedule that minimizes the total weight of late orders using the algorithm given in the previous section. The schedule(Rt,1,…,Rt,z) was obtained by Algorithm WF. By the fact that if Rt,j<vjC, then each order in ⋃i=1j-1‍Rt,i is an early order and will be a late order if we push the order to be delivered by vehicles at Tj. Thus, either there is no feasible schedule or the total weight of late orders will be increased if we push some order in Rt,i to be delivered by vehicles at Ti+1,…,Tz. By the optimality of ∑i=0t-1‍wli, we have that the total weight of late orders will not be decreased if we push some order in Rt,i to be delivered by vehicles at T1,…,Ti-1. The following algorithm finds a solution with a minimum number of vehicles used under the constraint that the total weight of late orders is minimum by pushing some orders to an earlier departure time for delivery.Algorithm MVInput. z sets of orders Rt,1,…,Rt,z given by Algorithm WF.Output. A vehicle assignment: V1,…,Vz, where the orders in Vj will be delivered by the vehicles available at time Tj, so that the number of vehicles used is minimum.Method
(1)
T
0
:
=
0. v0:=0.
(2)
Forj=z down to 1 do the following.
(a)
LetVj′ be all the orders in Rt,j, arranged in nondecreasing order of their processing times, and Vj′=kC+r, where k and r are nonnegative integers, and 0≤r<C and F is the set of the first r orders from Vj′.
(b)
If∑Ji∈∪m=1j-1Rt,m∪F‍pi>Tj-1, then update A:=∅ and Vj:=Vj′, and the orders in Vj will be delivered by the vehicles at time Tj and proceed to the next j.
(c)
LetA′ be the first k0C+r orders from Vj′, where k0 is the maximal nonnegative integer such that ∑Ji∈∪m=1j-1Rt,m∪A′‍pi≤Tj-1.
(d)
IfRt,j-1∪A′/C≤vj-1C, then update A:=A′, Rt,j-1:=Rt,j-1∪A, and Vj:=Vj′∖A and the orders in Vj will be delivered by the vehicles available at time Tj and proceed to the next j.
(e)
Call Subalgorithm CA to computerA. Then update Rt,j-1:=Rt,j-1∪A and Vj:=Vj′∖A, and the orders in Vj will be delivered by the vehicles at time Tj and proceed to the next j.Subalgorithm CA
(1)
A
′
:
= the first k0C+r orders from Vj, arranged in nondecreasing order of their processing times.
(2)
Sort the orders inRt,j-1∪A′ in ascending order of their processing times.
(3)
IfRt,j-1∪A′≤vj-1C, then stop and output A=A′.
(4)
Forh=1 to j-2, let Rt,h′:=Rt,h.
(5)
B
:
= the first Rt,j-1∪A′-vj-1C orders from Rt,j-1∪A′.
(6)
Forh=j-2 down to 1 do the following.
(a)
Sort the orders inRt,h′∪B in ascending order of their processing times.
(b)
If∑Ji∈∪m=1hRt,m′∪B‍pi>Th,
(b1)
ifA′<C, stop and output A=∅;
(b2)
updateA′:= the first A′-C orders from A′ and return (2).
(c)
IfRt,h′∪B≤vhC, then stop and output A=A′.
(d)
Ifh=1, stop and output A=∅ if A′<C and update A′:= the first A′-C orders from A′ and return (2) else.
(e)
UpdateB:= the first Rt,h′∪B-vhC orders from Rt,h′∪B and proceed to the next h.Theorem 3.
Algorithm MV finds an optimal solution with the minimum number of vehicles used under the constraint that the total weight of late orders is minimum inO(z2n2log⁡⁡n) time.Proof.
We first point out that the solution by Algorithm MV does not change the optimality of the total weight of late orders, since the solution is found by pushing some orders inRt,2,…,Rt,z to an earlier departure time for delivery.
LetVz and A be the output data obtained by the first iteration of Algorithm MV, where Vz=Vz′∖A and A is the set of the first A orders from Vz′ (the orders of Vz′=Rt,z have been arranged in nondecreasing order of their processing times). Step (2)(b) corresponds to the case where ∑Ji∈∪m=1z-1Rt,m∪F‍pi>Tz-1, where F the set of the first F orders from Vz′ and 0<F<C. In the case, It is impossible to deliver all orders in F by the vehicles at T1,…,Tz-1. This, along with F consisting of the first F orders from Vz′, means that the number of vehicles used at Tz cannot decrease by one. Thus, Vz′/C is the minimal number of vehicles used at Tz. However, we cannot push part of orders in F to be delivered by vehicles at Tz-1,…,T1, since, if we do that, it not only does not decrease the number of vehicles used at Tz but also increases the amount of orders delivered by vehicles at Tz-1,…,T1. In the case, the data Vz=Vz′ and A=∅ are optimal. Under the case of ∑Ji∈∪m=1z-1Rt,m∪F‍pi≤Tz-1, Step (2)(c) computes the set of orders A′ which made Vz′/C-A′/C the minimal number possibly of vehicles used at Tz, where A′ are the first k0C+r orders from Vz′. This is because k0 is the maximal nonnegative integer such that ∑Ji∈∪m=1z-1Rt,m∪A′‍pi≤Tz-1 and A′ consists of some small orders in Vz′. Step (2)(d) corresponds to the case where Rt,z-1∪A′/C≤vz-1C. This means that we can push all of orders in A′ to be delivered by vehicles at Tz-1. Thus, in the case, the output data A=A′ and Vz=Vz′∖A make Vz/C the minimal number of vehicles used at Tz. Under the case of Rt,z-1∪A′/C>vz-1C, Step (2)(e) calls Subalgorithm CA to decide a set of orders A such that Vz/C is the minimal number of vehicles used at Tz, where Vz=Vz′∖A. We show below that Subalgorithm CA can really do that.
Subalgorithm CA consists ofk0+1 main iterations for the first k0C+r orders, the first (k0-1)C+r orders, …, and the first r orders from Vz′, respectively. We now run the first main iteration for the first k0C+r orders A′ from Vz′. Due to the corresponding case by Step (2)(e), we have that A′≠∅ and Rt,z-1∪A′>vz-1C. We need to proceed through Step (4). Step (4) assigns the orders in Rt,h to a temporary set Rt,h′ for each h from 1 to j-2. This is necessary since Subalgorithm CA operates on Rt,h′ without changing the content of Rt,h. Step (5) assigns the first Rt,z-1∪A′-vz-1C orders from Rt,z-1∪A′ to a set B. If we want to push the orders in A′ to be delivered by vehicles at Tz-1,…,T1, all orders of B are the minimal increment undertaken by vehicles at Tz-2,…,T1 to deliver. Now we proceed through Step (6).
Step(6) consists of z-2 secondary iterations. We now run the first secondary iteration. If ∑Ji∈∪m=1z-2Rt,m′∪B‍pi>Tz-2, it is impossible to deliver all orders in B by the vehicles at T1,…,Tz-2. This means that the number of vehicles used at Tz should to be at least Vz′/C-A′/C+1. Step (6)(b1) corresponds to the case where A′<C and outputs A=∅. This, along with A′≠∅ and Vz=Vz′, implies that Vz/C is the minimal number of vehicles used at Tz. Step (6)(b2) corresponds to the case where A′≥C and starts the second main iteration for the first (k0-1)C+r orders A′ from Vz′ to check whether it is possible to push the orders in A′ to be delivered by vehicles at Tz-1,…,T1. On the other hand, ∑Ji∈∪m=1z-2Rt,m′∪B‍pi≤Tz-2. Step (6)(c) corresponds to the case where Rt,z-2′∪B≤vz-2C. This means that we can push all of orders in A′ to be delivered by vehicles at Tz-1 and Tz-2. Thus, the output data A=A′ by Step (6)(c) and Vz=Vz′∖A make Vz/C the minimal number of vehicles used at Tz. Otherwise, Step (6)(e) starts the second secondary iteration to check whether it is possible to push the orders in a set of the first Rt,z-2′∪B-vz-2C orders from Rt,z-2′∪B to be delivered by vehicles at Tz-3,…,T1. Similarly, we can show the result for the following secondary iterations. If needed, we proceed through the last secondary iteration. Suppose that B is a set of orders output by the (z-3)th secondary iteration. In the case of ∑Ji∈Rt,1′∪B‍pi>T1, Step (6)(b1) outputs A=∅ if A′<C and Step (6)(b2) starts the second main iteration for the first (k0-1)C+r orders A′ from Vz′ else. In the case of ∑Ji∈Rt,1′∪B‍pi≤T1, Step (6)(c) outputs data A=A′ if Rt,1′∪B≤v1C. Otherwise, Step (6)(d) outputs A=∅ if A′<C and starts the second main iteration for the first (k0-1)C+r orders A′ from Vz′ else, since it is impossible to deliver all orders in the set of the first Rt,1′∪B-v1C orders from Rt,1′∪B by the vehicles at T0=0. Similarly, we can show the result for the following main iterations in Subalgorithm CA, which can really decide a set orders A such that Vz/C is the minimal number of vehicles used at Tz, where Vz=Vz′∖A. For the following iterations in Algorithm MV, we can show the results similarly. At last, the algorithm must be able to find an optimal solution with the minimum number of vehicles used.
We now look at the time complexity of Algorithm MV. In the algorithm, Step(1) takes constant time. Step (2) is iterated z times. Inside the iteration loop, the most time-consuming steps are (2)(a) and (2)(e). Step (2)(a) calls for sorting the orders which takes O(nlog⁡⁡n) time. Step (2)(e) calls Subalgorithm CA which takes O(zn2log⁡⁡n) time. Thus, the overall time complexity of Algorithm MV is O(z2n2log⁡⁡n).


## 5. Conclusion

In this paper, we have given polynomial-time algorithms for minimizing:(1) the total weight of late orders and (2) the number of vehicles used subject to the condition that the total weight of late orders is minimum. An interesting open question is whether the problem related to release dates is NP-hard or not.



---

*Source: 804968-2015-02-16.xml*