Production Scheduling and Customer Orders Assignment in a Three-Level Supply Chain

In the classical production-distribution centers problem, only assignment of customers, distribution centers, and suppliers is determined. This paper extends the problem of production-distribution centers assignment by considering sequencing decisions in the supply network. Nowadays, meeting delivery time of products is a competitive benefit; therefore, the objective is to minimize total tardiness. This problem is mathematically formulated by a mixed integer programming model. Then, using the proposed model, small instances of the problem can be optimally solved by GAMS software. Moreover, two metaheuristics based on variable neighborhood search and simulated annealing are proposed to solve large instances of the problem. Finally, performance of the proposed metaheuristics is evaluated by two sets of balanced and unbalanced instances. The computational results show the superiority of the variable neighborhood search algorithm.


Introduction
In the supply chain, various organizations work together for converting raw materials to finished products and are connected with each other over far distances.The customer orders due date and the short life-cycle products need agile supply networks.To accelerate supply chain operations many activities such as keeping storage which are nonvalue added activities must be eliminated.It also should be stated that customer demands are generating the flow of supply network and they have to be specified or predicted in advance, but optimization of this flow through the network for minimizing the costs is an important purpose of the supply chain and, for optimizing, speed of the sources and capacity limitations are considered.Scheduling for order shipment to the customer destinations and using transportation means, in order to pick up the orders at the distribution centers (DCs) were done just by staff experiences.This will increase not only the waiting time of transportation means, but also accumulation of the orders and inventory costs.Ultimately delivery time of the orders will exceed the due date and cause penalty costs and dissatisfaction of the customers.
The model which is proposed in this paper presents a good solution for the above situation.It offers a good method for calculating the time of production or packing in the plants and distribution centers and the transportation between them to decrease the delivery time of the orders and define an optimal assignment and sequence for the customers according to the capacity of distribution centers and customer due dates.As regards the importance of scheduling and sequencing in the network of deteriorating jobs, it can be stated that the proposed model can be applied in different industries, such as food and drug supply chains and any products that little procrastination in delivery could cause large penalty and damage in their network.Some researchers dealt with the integration of production and transportation in supply chain for scheduling purposes.Meanwhile we can mention Zegordi and Beheshti Nia [1] works who presented a model for the integration of production and transportation scheduling with the purpose of minimizing total tardiness and total deviations of assigned workload of suppliers in which different sites were assumed for the sources.Later, they [2] proposed a model which is like the one that is stated above but with a single site for the suppliers and an integer programming model is formulated to minimize the makespan.Li et al. [3,4] studied the similar subject by considering the air transportations and integrated with the assembly in the electronic supply chain.In the proposed model, optimal allocation of orders to different flights and release time for each order to complete the assembly are determined.The purpose of the two subproblems is minimizing the total costs including transportation cost of normal flight and special flight and earliness and tardiness penalty.Then, Zandieh and Molla-Alizadeh-Zavardehi [5] developed their research and studied the problem on two different situations, one of them with presence of commercial flights and the other one with absence of them.In the first situation the delivery tardiness has to be considered, whereas in the second one it is not necessary.
Prior to the papers mentioned above, Naso et al. [6] studied this integration by applying it for the distribution of ready-mixed concrete.Chen and Lee [7] considered the concept of scheduling in supply chain by assuming different importance for batching jobs and the goal was minimization of the weighted delivery time and total transportation costs.
In the online environment of supply chain scheduling, Averbakh and Xue [8] discussed a new class of problems that concerns with supply chain scheduling in the situation where the future is unknown and there is no information on the number of jobs.The purpose of the problem is minimizing sum of the total flow time of the jobs and the total delivery costs.Also, some researchers have studied the minimization of setup costs in the supply chain such as the model which is presented by Mansouri [9].In this paper, the focus is on the sequencing of batches between two successive stages of a supply chain.Later, Liao et al. [10] followed his research and extended it by considering the problem in three stages and proposed a heuristic called LFFH (least flexibility first heuristic) for solving large sized problems.
According to the above review of research, it is obvious that many studies are done for scheduling and assignment problems in supply chain, but considering both of them in a model with the fulfillment of customer demands was paid less attention.Here in this paper we present a model which can bring all of these conditions together.
The remainder of this paper is organized as follows.In Section 2 the definition and formulation of the problem can be seen.The suggested algorithms and methods of generating new solutions are described in Section 3. Section 4 indicates the computational results and performance analysis and ultimately in Section 5 we conclude the study and give suggestions for future works.

Problem Definition and Formulation
The supply chain structure that this paper is concentrated on is shown in Figure 1.As it can be observed, it is a three-level structure including plants (resources), distribution centers, and customers (retailers).At the customer level, there are several batches of orders that part of the batches as a new set of orders or the total sets are processed in plants and transported to the distribution centers.After accumulation of the orders of customers, they are packed and delivered to the destinations (customers).The model attempts to minimize the completion time of each stage for the batch of orders by considering all of the supply chain restrictions and doing optimal assignment for satisfying the customer demands, in order to minimize the total tardiness.
There are some assumptions considered in this problem.First each of the plants and distribution centers has a specified order processing time.Plants, distribution centers, and customers are located in different sites.For the customers, their demands and due dates of their orders are available and their demands have to be fulfilled by only one of the distribution centers.Because we assumed that each of the customer orders as a batch has special attributes, so it must not synchronize with other customer orders for processing and packing.For presenting the model we use the following parameters and decision variables.
Constraint set (2) ensures the fulfillment of the customer demands with processed orders.The first stage completion time in plants is determined by constraint set (3). Constraint set (4) and constraint set (5) guarantee that orders of two customers could not be processed simultaneously as a batch and constraint set (6) excludes redundant variables from the model.The second stage completion time is presented by constraint set (7), in which the transportation time between plants and DCs is added to the first stage makespan.The completion time of the third stage consists of packing and loading the orders is denoted by constraint set (8).Similar to the assumption in the plant stage, orders of different customers could not be packed or loaded at the same time, and therefore constraints sets ( 9) and ( 10) present this assumption.Redundant variables are omitted by constraint set (11).
Constraint set (12) assures that number of orders which are delivered by a special distribution center must not exceed the capacity limitation.Constraint set (13) determines each customer orders makespan as a batch, which is the completion time of the last stage.Constraint sets ( 14) and (15) indicate that if variable  ,, takes value except zero, the assignment variable  ,, would take value 1 and if  ,, is equal to zero the assignment orders variable  ,, should be zero too.It means that if the orders of customer  are processed by plant  and delivered by DC , the assignment of the orders of customer  to plant  and DC  has taken place.In the same way constraint set (16) shows that if any assignment from customer  to DC  has taken place then at least with one plant,  ,, has to take value 1. Constraint set  20) indicates that each of the variables should take the specified range of values.Finally (1) is the objective function that shows that the model attempts to minimize the accumulation of customer orders tardiness.
For making the problem clear, it is illustrated with an example.Here an example of a supply chain with 2 manufacturers, 3 distribution centers, and 5 retailers is considered.Numbers of product units that each of the customers requires are 16, 47, 55, 26, and 20 for the first customer to the last one, respectively.Each customer has a specified due date for delivery of their demands that follows 10, 15, 9, 6, and 11 sequentially.As shown in Figure 2 each of the customers is served by a predetermined distribution center.
Some other parameters that are needed to be given for this example, like supplier and DCs processing time, time distances between the elements of the supply network, and capacity of the distribution centers for packing and loading of product units, are inserted in Tables 1 and 2. This example was solved by the GAMS software.Tables 3 and 4 show the assigned number of units and tardiness values.As it can be observed that the optimal sequence in the first plant is 5-3-4-2 and in the second one follows the order 3-4-1-2, and in the same way the optimal sequence of customers in the distribution centers can be determined.The Gant chart of the completion time of different stages for customer batches of order is shown in Figures 3, 4, and 5.The optimum objective value is 5.939 which was gained by the software.

Proposed Algorithms
Metaheuristic algorithms can provide a good solution for an optimization problem by searching over a large set of feasible solutions and they are applied for the problems with limited computation capacity and they can give a near optimal solution in a reasonable amount of time.
The model which is developed in this paper is an extended format of Zegordi's model which has two levels in the supply chain and he proved that his model belongs to NP-hard class problems; therefore the model proposed in this paper which consists of three levels in supply chain is NP-hard and here we suggested two metaheuristic algorithms for solving the large sized problems.Here in this section two metaheuristic algorithms known as variable neighborhood search and simulated annealing are selected according to the problem characteristics and we developed their features to generate the near optimal solutions.For the description of the process, first we should define a set of solution structures,   ( = 1, 2, . . .,  max ), and an initial solution should be generated randomly.In the th neighborhood of initial solution, some feasible solutions are generated.The algorithm explores the solution space and tries to find the best solution.This exploration is done by two functions called shaking and local search.Shaking function verifies the solution structures and the local search explores the space of the solution.Then the best solution of the local search is compared with the initial solution and, if it is better, replaces it and searching in the th neighborhood structure is continued until it becomes exhausted.Finally the whole process is terminated when the stopping condition is met.It should be stated that the stopping condition could be the maximum CPU time allowed or the maximum number of iterations.Also the order and choice of the structures are important for ultimate near optimal solutions.The pseudo code of the algorithm is shown in Algorithm 1 [11].

Simulated Annealing Approach.
The basic idea of simulate annealing (SA) algorithm is originated from the process of cooling and freezing metals into minimum energy which is called the annealing process.This algorithm was first developed to highly nonlinear problems.The procedure of this algorithm can be described as follows.First an initial solution has to be generated randomly, and then some new test solutions are produced through applying various methods.If the objective function of the test solution is better than the current solution, it is replaced by the new one.But if it is worse than the current solution it will be replaced in a probabilistic situation and the acceptance probability is calculated.

The Acceptance Probability.
In this paper the Metropolis criterion is used for the acceptance probability.It is calculated as follows: ΔE shows the distance between the worse solution and the current solution. is the distance between the objective function of the test solution and the current solution and  represents the objective function of the current solution.
is introduced as the Boltzmann constant which reflects the probability of accepting the test solution at the initial temperature or  1 .After each of the iterations the temperature is decreased and the above process will be carried out.The process will be terminated after a number of iterations or the maximum CPU time allowed is met or when the minimum temperature is reached.The pseudo code, shown in Algorithm 2 is an overview of the algorithm [9].

Generating New Neighborhood
Solutions.Since we assumed three levels for the supply chain concluding plants, distribution centers, and customers, the representation scheme is a matrix that has been designed in which rows are assigned to the plants and columns are assigned to the customers and distribution centers.In order to make it obvious, consider that there are two plants, two distribution centers, and three customers, and then the resulted matrix is like the one presented in Table 5.
As shown in Table 6, rows and columns are dedicated to plants and customers, respectively.The triple group of columns (customers) forms a distribution center.In this scheme each cell contains a number of orders processed by a special plant and assigned to a distinct distribution center that belonged to a specified customer.The last row presents sequence of customers in each distribution center and is specified by the system of ranking.It means that, for example, the customer who is first has a rank of one, and the second rank shows that it is the second customer whose orders have to be processed.For the orders of customers in each plant, a matrix structure is designed in which rows and columns are dedicated to the plants and customers, respectively, and the sequence of orders batch is determined by customer numbers.Table 5: Matrix structure excluding customer sequences in plants.
The ultimate structure is built by joining the matrix of customer sequences to the first structure which is shown in Table 7.
In this section various methods of generating new solutions are introduced and illustrated with some examples.

Verifying Assigned Distribution Centers
. By applying this method, a customer is randomly selected and entered a loop including the range of distribution centers and assigned to each of them sequentially.In this loop the assignment is accepted after checking two conditions.First the capacity limitation of the distribution center and the second condition is improvement of the objective function.As a simple example for this verification, assume that there are six customers and four distribution centers.The assignment of distribution centers to the customers follows the sequence 2,1,2,3,1,4.Then if we want to verify the first customer assignment we can use this procedure and new assignments would be 1,1,2,3,1,4 or 3,1,2,3,1,4 or 4,1,2,3,1,4.Therefore we can have 4 6 new assignments for all of the customers.

Verifying Number of Orders
Assigned to a Plant.The method that is presented in this section reduces the gap between optimal solution and the one which is generated by the algorithm in a large extent.The procedure is demonstrated and for more clarification, a set of steps for this method is presented in Algorithm 3.
For this method initially a distribution center is selected randomly.Then a random number in the range between 0 and 1 is generated and named as 1.Here, there are two loops:   the outer loop includes customers and the inner loop consists of plants.In the inner loop the number of orders which is assigned to a plant multiplying to 1 and the result subtracted from the mentioned plant and added to the dedicated orders of other plants for the customer that is already mentioned.If the objective function is improved the process continues for other plants, but if it does not reflect any improvement, the half of 1 is calculated and it is replaced with the resulting   amount.The procedure is carried out with the same plant, and again if any improvement has not been observed the operation should be continued since 1 takes value zero.

2-OPT Heuristic to Achieve Optimal Sequence.
In this section, we use a heuristic method called 2-OPT for creating optimal sequence of customer orders (customer batches) in plants or distribution centers; some researchers like Tavakkoli-Moghaddam et al. [12] applied this method, when using simulated annealing approach for optimizing a vehicle routing problem.2-OPT algorithm was first used to solve the traveling salesman problem.It is an improvement algorithm which systematically modifies the starting solution and evaluates the resulting modified solution.If it is better the modification is made permanent; if not, the systematic modification is continued until it is no longer possible to produce better solutions (Heragu).2-OPT algorithm considers pairwise exchanges of the customer positions.As an application of this method one distribution center (plant) is randomly selected and the positions of two customers in a sequence mutually exchange.This operation continues since all of the customer positions are tested or the OFV improved.For realization of the concept an example; is illustrated in Figure 6.

Customer Assignment Perturbation
. This heuristic has high quality and effectiveness for reducing the gap and it is illustrated completely with an example, this method was firstly used by some researchers such as Parthasarathy and Rajendran [13] who applied it for optimizing jobs sequence.Suppose that there are four distribution centers and five customers that their related assignment to the distribution centers is {2-3-1-2-4} for customer 1 up to customer 5, respectively.Hence the distribution center in the first position can be inserted at any position between 2 and  (here  = 5).
Then a random number generated between 2 and  is used to select the job position.Assume that the selected position is 3.The assignment found in this position is inserted to the third position and a new assignment for the customers is presented as {3-1-2-2-4}.Consider the assignment in the second position; it can be inserted to the positions between three and five on its left position and inserted to the first position on its right.The same process should be continued for all of the positions.After doing this procedure, any sequence of assignment is accepted that does not exceed the capacity of the distribution centers.Some examples for this method are shown in Figure 7.

Generating Initially Random Solutions.
A procedure is considered in this paper for generating initial random solutions.According to this process first we should decide about the assignment of customers to distribution centers.Hence a random sequence of customers is produced, and then by considering the time distances between the plants and DCs, the one which is the nearest distribution center to the first customer in the sequence is selected for assignment; after that for the second up to the end customers, this process is continued but the assignment occurs when the capacity limitation is not exceeded.For the second step after determining the customer assignment, the number of orders which is dedicated to a special plant for each customer should be determined.So to reach this goal, generate random numbers in the range between (0, 100) and this generation is done according to the number of plants.Then the produced numbers are normalized and multiplying to the specific customer demands and they are inserted in the right positions in the related matrix structure.Then the accumulation of the dedicated orders is subtracted from the customer demands and the result is randomly added to one of the plants orders for that specific customer.Finally sequences of customers in plants and distribution centers are absolutely generated randomly.This procedure repeats since the stopping number of iterations or the CPU time allowed is met and in each iteration the objective function improves.Then final solution in this section is considered as an initial solution for the metaheuristic approach.

Experimental Evaluation
In this section, we evaluate the performance of the proposed metaheuristic algorithms.For this purpose, two sets of experiments are conducted; first we evaluate the performance of each metaheuristic by comparing it with the optimal solution for small instances, and then the evaluation is done by comparing two metaheuristics in large sized problems.These algorithms are implemented in Visual C#.Net and run on a PC with 2.4 GHz Intel Core i3-370 M processor CPU and 4 GB of RAM memory.The performance measure used in this study is relative percentage deviation (RPD).It can be calculated as follows: where Alg sol is the objective function obtained by any of the algorithm.Min sol is the lowest objective function obtained for a given instance.

Test Problems.
For generating test problems a special feature of supply chain which is called balances is considered.A balanced problem is the one that similar parameters of different stages have equal scales [9].Here, one of these parameters is the distance between the supply chain elements.Therefore for generating this parameter we consider balanced and unbalanced cases.Some of the parameters such as processing time, distances between supply chain elements, customer orders and due dates, and capacity of the distribution centers are randomly generated from uniform distributions.Other parameters such as the number of plants and distribution centers and also number of customers are selected from discrete sets.For generating customer due dates we follow the uniform distribution [(1 − TF − RDD/2), (1 − TF + RDD/2)] that is first proposed by Potss and Van Wassenhove [8] for single machine scheduling problems.According to his research the due dates of jobs followed uniform distribution [∑  =1   (1 − TF − RDD/2), ∑  =1   (1 − TF + RDD/2)] in which TF is the due date tightness and RDD is the due date range.∑  =1   is the accumulation of processing time of all jobs considered as the delivery time of the jobs.The estimation of delivery time of each customer in the proposed model could be as follows: For generating distribution capacities, according to the customer demands the following uniform distribution is used: Focusing on the above descriptions for generating the test problems, 16 problems were generated and solved by the proposed algorithms and comparisons with the optimal solutions were done and 72 test problems in large size were produced in order to study and investigate the superior metaheuristic algorithm by doing comparisons on the performance parameter.
Figure 8 shows the CPU time usage by any of the algorithms and we can come to a conclusion that VNS algorithm solutions converge earlier than the SA algorithm solutions and the objective function value is nearer to the optimal solution.

Design of Experiments.
There are some parameters in SA algorithm whose values should be determined through some experiments.These parameters are Δ 1 , () 1 , CR,  1 .For finding an efficient set for these parameters, three levels were specified for each of them and by executing 81 experiments with 3 iterations on some test problems, the efficient set is determined and presented in Table 9.The test problems were generated in balanced case and for 10, 20, 50 number of customers.Number of plants and distribution centers were selected from the sets {2} and {4, 6}, respectively.

Performance Analysis.
Here the results of our computations and the comparisons between the performances of algorithms are presented.For generating large problems, number of customers selected from the set {40, 60, 80} and for each of the specified problem size three disparate examples have been generated.Each problem was solved 3 times and the result for each of them is the average of these three executions.Tables 10, 11, 12, and 13 show the results of balanced and unbalanced large problems and the interval plots of the results, shown in Figures 9 and 10, indicate that variable neighborhood search algorithm has better performance than the proposed simulated annealing.
Various examples were solved as small sized problems and the performance parameter confirmed the prominence of VNS.The basis for the size selection of the problems for comparison with optimal solutions was the execution time of the GAMS software which does not require time greater than 2 hours.
The results show that the relative parameter for the VNS algorithm in balanced and unbalanced problems has the mean of 7.866 and 5.6, respectively, and for the SA algorithm has the mean of 9.97 for balanced problems and 9.51 for unbalanced ones.According to the computational results, VNS shows better performance than SA in both balanced and unbalanced small instances.Also as shown in Figure 11 according to different number of jobs VNS algorithm has better performance than SA algorithm, but it should be stated that for middle sized problems two algorithms nearly have the same performance.

Conclusion and Future Research
Because of increasing the competitiveness, satisfaction of customers plays an important role for the survival of the markets.Different factors can have an effect on their satisfaction, and one of them is the delivery time of the products.In supply networks many operations should be done to convert the raw materials to finished products and deliver them to the customers; therefore scheduling these jobs and deciding about their sequence in the network help us to perform more effectively and do the best in this field.In this study we try to integrate different parts of the supply network and proposed a model in order to make proper decisions to accelerate the production and delivery process of the orders.Then two algorithms were suggested for solving the model and after presenting the computational results we introduced VNS approach as the superior algorithm for solving this model in large sized problems.
In this model, transportation means has not been considered, so for future research, using transportation means both in the first and the third stage could be a suggestion to extend the problem.Also in metaheuristic approach using hybrid approach might be more effective for solving the large instances.

Figure 1 :
Figure 1: Supply chain structure which is studied in this paper.

Figure 2 :
Figure 2: Supply chain structure of the example.

Figure 3 :
Figure 3: Completion time of the batches in the first stage.

Figure 4 :
Figure 4: Completion time of the batches in the second stage.

Figure 5 :
Figure 5: Completion time of the batches in the third stage.

Figure 8 :
Figure 8: CPU time usage and convergence diagram.

Figure 9 :
Figure 9: The average RPD intervals for balanced problems.

Table 1 :
Example parameters related to the plants.

Table 2 :
Example parameters related to the DCs.

Table 3 :
Assigned number of units.

Table 4 :
Last stage completion time and tardiness values.
3.1.VariableNeighborhood Search Algorithm.The variable neighborhood search algorithm is a metaheuristic algorithm for solving optimization problems whose basic idea is systematic change of neighborhood solutions in two phases.Firstly, descent to find a local optimum, finally a perturbation phase to escape from the corresponding valley.

Table 7 :
The whole representation scheme.

Table 8 :
Range of selection for test problems.

Table 9 :
Design of experiment results and the efficient set.

Table 10 :
Performance analysis of large sized balanced problems.

Table 11 :
Performance analysis of large sized unbalanced problems.
Table 8 presents the interval value of the test problems.

Table 12 :
Performance analysis of small sized balanced problems.

Table 13 :
Performance analysis of small sized unbalanced problems.