Improved Harmony Search Algorithm for Truck Scheduling Problem in Multiple-Door Cross-Docking Systems

The key of realizing the cross docking is to design the joint of inbound trucks and outbound trucks, so a proper sequence of trucks will make the cross-docking system much more efficient and need less makespan. A cross-docking system is proposed with multiple receiving and shipping dock doors. The objective is to find the best door assignments and the sequences of trucks in the principle of products distribution tominimize the total makespan of cross docking. To solve the problem that is regarded as amixed integer linear programming (MILP) model, three metaheuristics, namely, harmony search (HS), improved harmony search (IHS), and genetic algorithm (GA), are proposed. Furthermore, the fixed parameters are optimized by Taguchi experiments to improve the accuracy of solutions further. Finally, several numerical examples are put forward to evaluate the performances of proposed algorithms.


Introduction
Cross docking is a process of logistics, of which the products are unloaded from the inbound trucks and then sorted and loaded into outbound trucks without warehousing.In a traditional distribution center, there are four major functions of warehousing that can be distinguished: receiving, storage, order picking, and shipping.Since the major costs of warehousing are operations of storage and order picking, and the cross docking can successfully eliminate them to considerably decrease distribution costs, cross docking is nowadays used by many companies, such as Wal Mart, Goodyear GB Ltd., Toyota, Eastman Kodak Co., and Dots and LLC [1].
There are several problems that researchers are passionate about, such as layout design, location, network, and vehicle routing problems.For example, Bartholdi III and Gue [2] introduced an efficient design of the cross-docking layout, whose objective was to minimize the transfer time, material handling, and congestion.Dondo and Cerdá [3] presented a new monolithic MILP formulation which integrated the pickup/delivery vehicle routing and scheduling with the assignment of dock doors.Nevertheless, two of the most important factors that affect the efficiency of cross docking are door assignment and truck scheduling.A proper sequence of trucks can significantly decrease the makespan and improve the efficiency.The problems of door assignment and truck scheduling are always considered together to optimize the procedure of the cross docking.
The layout of the cross-docking terminal is in many forms, such as the number of dock doors and whether there is a temporary storage.Yu and Egbelub [4] proposed a truck scheduling model with one inbound door and one outbound door.Boloori Arabani et al. [5] put forward metaheuristic algorithms to solve the same problem.Forouharfard and Zandieh [6] proposed an integer programming (IP) model to solve the problem of single receiving and shipping door.Besides, a genetic algorithm was applied to solve the model.In addition, Yu [7] dealt with truck scheduling problem with multiple dock doors to find the best sequence for trucks as well as assignments for trucks to doors and at the same time determine the unloading sequences, product routing, and routing sequences.Madani-Isfahani et al. [8] considered a truck scheduling model with multiple doors and then designed two metaheuristics, namely, simulated annealing and firefly algorithm to solve the offered model.Assadi and Bagheri [9] considered a cross-docking terminal with multiple doors and temporary storage, assuming the ready time of inbound trucks were uncertain.Assadi and Bagheri [10] proposed two algorithms, namely, differential evolution and population-based simulated annealing to solve the multiple-door cross-docking system.
The objective functions of truck scheduling are about time, number of products transferred to temporary storage, customer satisfaction, and so on.The makespan of cross docking as well as the total earliness and total tardiness of trucks is discussed more often.Wisittipanich and Hengmeechai [11] and Boloori Arabani et al. [12] proposed a truck scheduling model with objective of minimizing the total earliness and tardiness simultaneously.Lee et al. [13] established a mathematical model to maximize the number of products shipped in a given working horizon.Ladier and Alpan [14] proposed an objective of minimizing both total number of pallets put in storage and the dissatisfaction of transportation providers to evaluate the quality of crossdocking system.
The operation forms of cross docking may be different, the times of a truck moves in and out can be once or more.Vahdani et al. [15] presented a truck scheduling model with no temporary storage in the cross-docking terminal.Both inbound and outbound trucks can move in and out of the docks during their tasks repetitively.Two known metaheuristics named genetic algorithm and electromagnetismlike algorithm were applied to minimize the total flow time.Mohtashami [16] dealt with a model that the outbound trucks can repetitively move; however the inbound trucks can move in only once.
Truck scheduling problems could be divided into two categories, which are the scheduling of both inbound and outbound trucks as well as the scheduling of inbound trucks only.Boysen et al. [17] dealt with scheduling of inbound trucks only, assuming outbound trucks left at fixed sequence and then proposed decomposition procedures and simulated annealing to minimize total lost profit.Rahmanzadeh Tootkaleh et al. [18] proposed an inbound truck scheduling model based on fixed outbound trucks' departure times.
This paper proposes a truck scheduling model at a crossdocking system with multiple inbound and outbound doors to minimize the total makespan.The inbound and outbound trucks are all available at time zero, so it is necessary to schedule all the trucks and make proper door assignments as well as truck sequences.Furthermore, it is assumed that outbound trucks load products from temporary storages first and then from inbound trucks, in case that the temporary storages get filled up.An inbound truck enters the inbound platform when the predecessor leaves and leaves the inbound platform when none of the outbound trucks at the outbound platforms need its products.It is worth noting that its leaving time is no less than the start time plus the unloading time due to the waiting time existing.In addition, three metaheuristics are proposed, namely, HS, IHS, and GA, to solve the model in order to find the best sequence.
The remainder of this paper is organized as follows: The next section describes the assumptions, mixed integer programming model for the truck scheduling problem, and the process of the cross docking.Section 3 presents three metaheuristics: harmony search, improved harmony search, and genetic algorithm.In Section 4, the performances of the metaheuristic algorithms are evaluated over the tests about truck scheduling.Finally, conclusions are drawn and future work is shortly expressed.

Problem Description
The studied problem in this paper is a mathematical model based on mixed integer programming working on trucks scheduling problems in a cross-docking system with multiple doors.Figure 1 shows the layout of the cross-docking terminal; in the terminal, temporary storages are designed besides the inbound doors, which are extremely large but limited.The outbound trucks load products from temporary storages first and then from inbound trucks in the inbound doors to avoid filling up the temporary storages.The objective function is minimizing the total makespan in order to reduce the waiting time and improve the efficiency of cross-docking system.

Assumptions
(1) There are multiple receiving doors and shipping doors in cross-docking system.
(2) The shipping time is related to the distance.
(3) Every outbound truck leaves until satisfying its needs.
(4) Every inbound truck leaves until unloading its products.
(5) Every truck is available at time zero.(6) The quantities and categories the inbound trucks load are equal to the quantities and categories the outbound trucks need.
(7) There is no preemption of any truck.(8) The capacity of each truck is different, each inbound truck loads specific types of products, and outbound truck needs specific types of products.
(9) There is a temporary storage next to each receiving door which is with a large volume but limited.(10) The changeover time of trucks is equal.(11) The time of loading and unloading is in direct proportion to the quantity of products. ( The processes of sorting and labeling are not considered. (13) The outbound truck loads products from inbound trucks, when there are no more products that the outbound truck needs in the temporary storages. ( The order of loading and unloading of products is not considered. (15) The products can be exchanged; that is, the products on a certain inbound truck can be loaded into any outbound trucks, which need them.
(16) There is only one chance for each inbound and outbound truck to move in.The inbound truck unloads the rest of the products to the temporary storage and leaves when the inbound truck on the inbound platform cannot fill any outbound trucks on the outbound platforms.An outbound truck leaves when it fills all the products needed.
All variables ≥ 0. Constraint (3) guarantees that the makespan is greater than or equal to the time the last outbound truck leaves the outbound door.Constraints (4)-( 5) ensure every inbound truck or outbound truck is allowed to be assigned to one of the inbound doors or outbound doors.Constraint (6) ensures the total number of products of type  from inbound truck  to all outbound trucks is equal to the number of products of type  that unloaded from the inbound truck .Constraint (7) ensures the total number of products of type  from all inbound trucks to outbound truck  is equal to the number of products of type  that loaded to the outbound truck .Constraints ( 8)-( 9) guarantee the inbound truck or outbound truck occurs only once.Constraint (10) confirms the relationship between   and   ; similarly, the relationship between   and   is ensured by constraint (11).Constraint (12) ensures that the start time of the next inbound truck  is equal to the finished time of the former inbound truck  plus the delay time of truck change.Constraint (13) is the condition of the finished time of inbound truck, in the case that there is any outbound truck loading products directly from the inbound truck .Constraint ( 14) is the condition of the finished time of inbound truck , in the case that there is no outbound truck loading products directly from the inbound truck .Constraint (15) assures the time at which outbound truck  starts to load products from inbound truck .Constraint (16) assures the time at which outbound truck  starts to load products from temporary storages.Constraint (17) ensures that the start time of the next outbound truck  is equal to the finished time of the former outbound truck  plus the delay time of truck change.

The Process of Cross Docking.
The temporary storage is extremely large but not without a limit, so the outbound trucks on the outbound docks load products from temporary storages first and then load products from inbound trucks on the inbound docks, if the outbound trucks are still not full.The inbound trucks will stay at the inbound docks if there are any outbound trucks full and leaving the outbound dock; if not, leave the docks and unload the rest of the products to the temporary storages.The process of cross docking will be finished when all outbound trucks are full, and no truck remains.The specific flow diagram of the process of cross docking is shown in Figure 2.
There are multiple inbound doors and outbound doors in cross-docking system; more than two trucks operate at the same time at the inbound and outbound docks.Formulate the unloading and loading principles in order to assure that the cross-docking system moves smoothly and efficiently.Here are two principles as follows: (1) Which outbound truck at outbound docks is chosen by the inbound truck to transfer products to is decided by the distance between the docks.The products from one inbound truck are loaded to the outbound truck that are the nearest from the inbound truck.For the outbound truck, if the nearest inbound truck cannot satisfy it, the far inbound trucks at other inbound docks will be considered.
(2) If there are two inbound trucks constituting the products that the outbound truck needs and the two inbound trucks are equally far from the outbound truck, the outbound truck will choose one inbound truck first randomly and then the other.

Solution Methods
This paper proposes three algorithms, namely, harmony search, improved harmony search, and genetic algorithm.
It is necessary to design the representation scheme of the solution, which will be used in further work.The solution consists of two layers of arrays, the first layer expresses the codes of the inbound and outbound trucks, and the second layer represents the codes of the inbound and outbound doors.The length of a solution is decided by the total number of inbound and outbound trucks.As shown in Figure 3, it is a cross-docking terminal with two inbound doors and three outbound doors; besides there are five inbound trucks and six outbound trucks in it.The left five columns represent the inbound trucks as well as the dock doors they belong to; therefore, the right six columns represent the outbound trucks.Figure 4 demonstrates unloading and loading sequences of inbound and outbound trucks.For example, inbound truck 3 is the first truck to unload in inbound door 1.  [19]; it is a novel intelligent algorithm, which simulates the principle of the music play.

Improved Harmony
In the music performance, the musicians adjust the tones of their instruments repeatedly through the memory to achieve a beautiful harmony.PAR indicates the pitch adjusting rate.BW means bandwidth for each generation.In addition, the harmony memory (HM) is an array that contains all the solution vectors.

Initialize the Solution Set.
Generate HMS sets of solutions randomly in HM matrix; the format of the solution is the same as in Figure 3.A solution consists of two levels, the first level are the codes of trucks and the second level are the codes of the doors.The solution set HM consists of HMS sets of solutions, and the number of rows in the array is 2 * HMS.
The sum of the inbound trucks and outbound trucks is equal to the number of columns in the array.The left  columns of HM represent the codes of inbound trucks, and the right  columns of HM represent the codes of outbound trucks.
and  in formulas (18) represent all possible values of    and    , respectively, which are discrete variables determined by the number of inbound and outbound trucks and the number of inbound and outbound doors.
If the value of a variable is obtained by memory consideration, it should be determined whether to be pitch-adjusted with probability PAR.

Pitch adjusting decision for 𝑇
The value will be adjusted if the pitch adjusting decision is yes, and the adjusting formulas are as follows: Here, rand( ) is a random number between 0 and 1.The new solution may not meet the model requirements after the generating rules, so some corrections are needed.As shown in Figure 5, there are repeated 3 and repeated 5 in the inbound truck codes at the first level of the solution.It could not be real for the reasonable solution.The position of the second 3 should be replaced by the missing number 2 or 4 randomly, and the position of the second 5 should be replaced by the rest missing number.As for the outbound truck codes, the same approach should be applied to. Figure 6 represents a modified solution that may occur.

Update the Solution Set.
Considering the objective function value, replace the worst solution by the new solution, if the new solution is better than the worst in the HM; otherwise, remain the worst and generate a new solution again.

Check Stopping Criterion.
The maximum cycle time is defined; the loop will continue until it meets the stopping criterion.

Improved Harmony Search
Algorithm.The parameters of basic harmony search are fixed, but parameters perform differently in the every iteration.The algorithm that possesses small parameter of PAR with large parameter of BW performs worse and increases the iteration needed to find the optimum solution.Furthermore, large PAR and small BW will cause great improvement in final generations with algorithm converged to optimal solution vector.Considering the parameter of BW separately, small BW in final generations increase the fine-tuning of solution vectors, but large BW performs better in the early iterations and increases the diversity of solution vectors to search for the best solution.
To eliminate the drawbacks of HS algorithm with fixed values of PAR and BW and improve the performances of them, dynamic values of parameters will be applied to the basic HS algorithm.The formulas of dynamic parameters are defined as follows [20,21]: PAR(gn) and BW(gn) are the values of PAR and BW in each generation, PAR max and PAR min are the maximum and minimum pitch adjusting rate, BW max and BW min are the maximum and minimum bandwidth, gn represents the generation number, and  represents the solution vector generations.

Genetic Algorithm.
There are several steps in genetic algorithm, such as population initialization, selection, crossover, and mutation operation.The population initialization process is similar to the initialization of solution sets in harmony search, and the selection method is roulette.So here are some explanations for crossover and mutation operation.

Crossover Design of Chromosomes.
The chromosomes of this paper consist of two parts that are inbound trucks codes and outbound trucks codes; the crossover operations need to be done in two parts.As shown in Figure 7, two cross points are generated randomly as 2 and 3, which means the cross point of inbound trucks sequence is between the locations two and three; likewise, cross point of outbound trucks sequence is between the locations three and four.A solution is generated but does not meet the requirements.Therefore, some modified operations like red digits are applied following what HS does.

Mutation Design of Chromosomes.
In order to perform the mutation operations for inbound and outbound trucks, swap mutation is applied.As shown in Figure 8, for inbound trucks sequence, the value at mutation point 1 and mutation point 2 will be changed, and the outbound trucks sequence mutates likewise.

Parameters Setting
There are several parameters in each algorithm.Meanwhile, each factor varies from different levels.However, the value of each parameter could affect the performances of the algorithms.Hence, several methods should be carried out to find out the best combination of parameters in each algorithm.
Taguchi experiment is a kind of method to design experiments, which decreases the number of experiments but provides an efficient combination of variables.Each  factor can be compared independently with any other factors, which ensures a balanced comparison among all levels of any factors.For the above reasons, Taguchi experiments are widely used in engineering design to determine optimal experimental conditions.The performance of each algorithm is evaluated by the signal to noise (S/N) to search combination of factors with a small amount of variation.
In the Taguchi method, the measured values of searching for the optimal combination of the parameters will be transformed into S/N ratio.The objective of the function in this paper is the small-the-better type, and the formula is as follows: There are four parameters in HS, which are HMS, HMCR, PAR, and BW, each of whom has four levels.Table 1 displays different levels of the parameters, and the best combination is that the values of HMS, HMCR, PAR, and BW are 30, 0.95, 0.6, and 0.7, respectively, as shown in Figure 9.There are six parameters in IHS, which are HMS, HMCR, PAR min , PAR max , BW min , and BW max , each of whom has three levels.Table 2 displays different levels of the parameters, and the best combination is that the values of HMS, HMCR, PAR min , PAR max , BW min , and BW max are 30, 0.85, 0.05, 0.6, 0.05, and 0.9, respectively, as shown in Figure 10.
There are four parameters in GA, which are   ,   ,   , and POP, representing crossover probability, mutation probability, selection probability, and population size, respectively, each of whom has four levels.Table 3 suggests different levels of the parameters, and the best combination of values for   ,   ,   , and POP are 0.8, 0.2, 0.5, and 20, respectively, as shown in Figure 11.

Illustrative Examples.
The number of inbound doors and outbound doors in the docking system are 2 and 3, respectively.In order to illustrate the performance of each proposed algorithm, several cases have been proposed to be experimented.The problems are divided into nine cases, considering the number of trucks, products, and their types.The subproblems 1-3 are divided due to the number of the products and types, of which subproblem 1 represents the small size, subproblem 2 is on behalf of the medium size, and subproblem 3 represents the large size.In addition, each subproblem is divided further, due to the number of  It should be mentioned that the moving time of products from the inbound door to the outbound door is related to the distance, which means the moving time is 30, if doors are far apart, otherwise it is 15.And the changeover time of trucks is considered equal to 50 units; furthermore, the loading time is 1 unit, which is the equal to the unloading time; all data is processed by MATLAB 2016.

Comparison of Solution Procedures.
For the experiments, the percentage deviation of the solutions in each method from the optimal solution based on makespan and the computational time are used to evaluate the performances.Percentage deviation of a solution is calculated as follows: Percentage deviation (%) = (Evaluative factor for compared solution) − (Evaluative factor for best solution) (Evaluative factor for best solution) In order to evaluate performances of the three proposed methods in terms of the optimal value, worst value, average value, and the computational time, each case is tested 20 times and terminates at the iteration of 120.Table 5 shows makespan and computational time of nine tests by the three methods.As can be seen in Table 5, in the aspect of the optimal solution, there are 6 sets of optimal solutions searched by GA, 4 sets by IHS, and, nevertheless, 1 set by HS.In the aspect of the worst solution, IHS performs better, which gets 6 sets of best solutions among the worst solutions.As for average solution, the average values of nine cases calculated by GA are all showing best among the three methods.In terms of computational time, IHS performs best, while GA need much more time than the other methods.
As shown in Table 6, the percentage deviations of the optimal makespan searched by GA from the optimal makespan searched by three methods range from 0% to 6.18% for nine cases and range from 0% to 5.72% for IHS.The percentage deviations of the worst makespan searched by HS from the optimal makespan among the worst solutions searched by three methods range from 0% to 6.18% for nine cases and range from 0% to 11.1% for GA.GA performs best in average makespan; however, the percentage deviations of the average value calculated by HS from the best among the average values calculated by three methods range from 0.18% to 8.8% for nine cases.The percentage deviations of the computational time of GA from the shortest computational time among the three methods rage from 188.39% to 511.59% for nine cases,   which show GA performs worst in computational time and needs much more time than other methods.
To evaluate the performances of three algorithms under the same operation time, nine sets of experiments will be terminated at 20 s and 40 s using IHS, HS, and GA, respectively.To improve the accuracy of the results, each experiment will be run 10 times so as to get the average value.As shown in Table 7, for each method, the makespan get shorter, when the operation time is longer.IHS performs best among them for the same running time; however, GA performs worst.The percentage deviations (PD) of the values searched by GA from the best values get smaller when operation time is longer.However, the percentage deviations get larger for HS when operation time is longer.

Conclusions
This study has described a truck scheduling model in crossdocking system with multiple doors; furthermore, three algorithms are proposed, namely, HS, IHS, and GA to solve the problem.To evaluate the performances of the methods, these algorithms were applied for 9 sets of different problems divided by the number of products, categories, and trucks to minimize the total makespan of cross-docking procedure.During the analysis, it is proved that IHS performs better than HS in searching for optimal solutions, when dynamic values of parameters are applied.In addition, for the same iteration, both IHS and GA provide satisfactory results.However, GA performs better in providing optimal solutions, while IHS is far superior to GA in computational time.For the same operation time, HS performs best; however GA performs worst.For future studies, new hybrid metaheuristic algorithms will be applied to cross-docking system, instead of the basic algorithms, and the truck scheduling model could be perfect in uncertainty or fuzzy arrival time of trucks.

Figure 1 :
Figure 1: The layout of cross-docking terminal.

Figure 3 :
Figure 3: Scheme of a solution.

3. 1 . 2 .
Initialize the Problem and Parameters.The objective function of this paper is to minimize the total makespan of the cross-docking system.The parameters in harmony search are HMS, HMCR, PAR, and BW.HMS represents the number of solution vectors in the harmony memory.HMCR expresses the harmony memory considering rate.

Figure 5 :Figure 6 :
Figure 5: A new solution of HS.

Figure 9 :Figure 10 :
Figure 9: Main effects plot for S/N ratios of HS factors.

Figure 11 :
Figure 11: Main effects plot for S/N of GA factors.

𝑟 𝑖𝑘 : number of units of product type 𝑘 that is initially loaded in inbound truck 𝑖. 𝑠 𝑗𝑘 : number of units of product type 𝑘 that is initially needed for outbound truck 𝑗
.   : transfer time per unit of product type  from inbound door  to outbound door .  : time at which inbound truck  enters the receiving door.  : time at which inbound truck  leaves the receiving door.  : time at which outbound truck  enters the shipping door.  : time at which outbound truck  leaves the shipping door.previous  : time at which the predecessor of outbound truck  leaves the outbound door.  : number of units of product type  transferred from inbound truck  to outbound truck .  : number of units of product type  transferred from temporary storage to outbound truck , which the products have been transferred from inbound truck  to temporary storage.  : time at which outbound truck  starts to load products from inbound truck .  last : time at which the last outbound truck  starts to load products from inbound truck .  : time at which outbound truck  starts to load products from temporary storage.  : if inbound trucks  and  are assigned to the same receiving door and  is a predecessor of truck : 1, otherwise: 0.   : if outbound trucks  and  are assigned to the same shipping door and  is a predecessor of truck : 1, otherwise: 0.

Table 1 :
Levels of parameters for HS.

Table 2 :
Levels of parameters for IHS.

Table 3 :
Levels of parameters for GA.

Table 5 :
Makespan and computational time obtained by three methods for the nine test problems.

Table 6 :
Percentage deviation for makespan and computational time between optimal solutions and other solutions.

Table 7 :
Makespan and percentage deviation under the operation times 20 s and 40 s.