A hybrid particle swarm optimization for the generalized assignment problem with time window

. This study focuses on the inbound logistics of the sugarcane industry, which has three main procedures consisting of cultivation, harvest and transportation. Generally, small-scale growers cannot manage all of the procedures effectively, because of their lack of bargaining power and inadequate equipment. For this reason a resource-sharing policy, such as harvester and truck sharing, is used by factories to reduce the cost of the sugarcane harvest, and increase harvester and truck utilization. To solve the generalized assignment problem (GAP) with time window, thus minimizing the total cost from the assignment of the third-party logistics providers to service small-scale growers under capacity and time limitations, a mathematical model has been developed for small-sized problems. For large-scale problems, particle swarm optimization (PSO) is applied and improved by the hybridization of PSO with k-cyclic moves algorithm (PSOK). The results demonstrate that the proposed metaheuristics can solve the problem efficiently since the results are equal to, or close to, the optimal solutions in which the averaged performances of PSO and PSOK are 99.61% and 99.64%, respectively and the averaged relative improvement is 0.1519%.


Introduction
The sugarcane industry is important agricultural industries in Thailand.Currently, Thailand is the secondlargest sugar exporter in the world after Brazil, with exporting approximately 8 million tons of sugar per year [1].Thus it certainly affects the potential economic growth of the country.However, certain problems prevail in this industry related to limited resources and intense competition.As a result of resource constraints, the operating costs have increased greatly, especially the inbound logistics process that involves planting, harvesting and transportation, all of which need to be reduced.Approximately 80% of Thai sugarcane growers are small-scale growers [2] who have a small area of less than 30 rai [3] or about 4.8 hectares.In practice, these growers are not able to manage all procedures effectively because of their lack of bargaining power and inadequate resources.Therefore, some of the small-scale growers have shifted to other economic crops.To reduce costs for the small-scale growers, the mill factories play an important role liaising between the small-scale growers and third-party logistics providers [2], in terms of resource allocation, scheduling and guaranteeing fair prices.Thus, this research considers the allocation of resources for harvesting (sugarcane harvesters) and transportation (trucks), which are mostly required by small-scale growers [4], from third-party logistics providers i (i = 1...m) to service small-scale growers j (j = 1...n), which is the generalized assignment problem (GAP).Each small-scale grower has to be processed by exactly one third-party logistics provider [5].This is subject to the restrictions of the capacity and time, so that the problem becomes the GAP with time window (GAPTW) to minimize the total cost of the assignment.
The GAP has been extended in many ways.For example, the study of [6], [7], and [8].Additionally, the GAP is known as an NP-hard problem [9] Large size problems cannot be resolved by the exact method; thus, many researchers have had to develop heuristics for their solutions (see [10], [11], and [12]).However, there are no publications of the GAPTW.And there is to date no research that has previously applied particle swarm optimization (PSO) to solve the GAP, which is the simple algorithm, observed to be performing optimization, so it became popular.For example, [13] and [14] applied PSO to solve their problems.Due to the attractive features of PSO, this research was focused on implementation of this methodology to solve the GAPTW with the expectation to minimize the total cost.Moreover, the k-cyclic moves algorithm from [15], a local search technique which prevents trapping of the local optima, is combined with PSO called PSOK for improving the solutions.Thus, this study promotes the sugar mill as an intermediary, with assistive equipment for making decisions using metaheuristics.PSOK algorithms are applied in order to obtain approximate solutions with measurement of the performance achieved compared to the mathematical model, so that the thirdparty logistics providers are able to manage their logistics activities more effectively and the small-scale grower can be serviced efficiently at a fair price.https://doi.org/10.1051/matecconf/201819201015ICEAST 2018 2 Materials and methods

Mathematical model
A mathematical model, which is a mixed integer programming model with a concise explanation of each constraint, was developed for solving GAPTW with minimizing the total cost by assignment of the third-party logistics providers i to service small-scale growers j under capacity and time limitations.The parameters and decision variables used in this model are defined as follows: Assumptions 1.The total number of trucks is sufficient for transportation in the harvesting process, regardless of deficiency of trucks or waiting trucks and problems during operation.2. The implementation of third-party logistics providers from harvesting sugarcane to small-scale growers can be performed simultaneously.3.After the sugarcane harvest process has been completed, the sugarcane harvesters and the trucks will return to the base location of the third-party logistics provider.4. Service time includes the harvest and transportation times.

Parameters
: Fuel cost of of third-party logistics provider i to serviced small-scale grower j   : Driver cost of of third-party logistics provider i to serviced small-scale grower j   : Demand from third-party logistics provider i to serviced small-scale grower Equation ( 1) is an objective function which purposes to minimize the total cost of the assignment.Constraint (2) ensures that the total resource requirement of the small-scale grower does not exceed the capacity.Constraint (3) ensures that each small-scale grower is assigned to exactly one third-party logistics provider.Constraint (4) ensures that service time to be carried out is less than the available time of third-party logistics provider.Constraints ( 5) - (6) ensure that the service time must not exceed time window of small-scale growers and third-party logistics.And constraints ( 7) -( 8) are the basic restrictions on the parameters of time and a binary variable.
A mathematical model was validated by comparing the optimal solution obtained from the small-sized problem.The instance of input data used in the test for 3 third-party logistics providers and 5 small-scale growers are shown in Table 1-3.The allocation to meet the lowest cost as shown in Table 4 show that third-party logistics provider 1 was allocated to small-scale grower 1, 3 and 4, and the thirdparty logistics provider 3 was allocated to the small-scale grower 2 and 5.The total cost was 6,768 baht.
From the example, the mathematical model executed by LINGO13 gives the optimal solution because the result is equal to the solution, which has been validated and verified by Microsoft Excel 2013.

Metaheuristic development
The mathematical model cannot solve large problems; thus, a metaheuristic was developed by applying PSO to solve this problem executed by MATLAB (R2017a).

Particle swarm optimization
The PSO is originally attributed to [16], which is an optimization technique, inspired by the collective behavior of movement of organisms in a bird flock or fish school which is the advantages of having several optimization parameters that govern its behavior and efficiency, especially in the behavior of particles while searching, the influence of control parameters on performance, and the convergence properties of the algorithm [17].

K-cyclic moves algorithm
K-cyclic moves algorithm, which is local search, is applied to prevent trapping of the local optima.The notation and procedure of the k-cyclic moves algorithm are presented below.

PSOK algorithm
The notation and PSOK algorithm is given as follows: : The position of the particle l in iteration t vl (t) : The velocity of the particle l in iteration t w : The inertia weight cp : The weight coefficient for the personal best cg : The weight coefficient for global best r1, r2 : Random numbers generated from a uniform distribution in [0, 1] pBestl : The personal best of the particle l gBest : The global best Procedure: PSOK for the GAPTW Input: r1, r2, xi, vi, cp= 2, cg = 2 and w = 0.9 [18] Output: Best solution Begin t ← 1; Initialize L particles as a swarm While t ≤ T; looping Decode particles into solutions Evaluate the particles Do k-cyclic moves algorithm Update pbest i and gbest Update velocity by equation ( 9) Update position by equation ( 10) t ← t + 1; End while Output best solution End Factorial design of the experiment and statistical test by SPSS19 were performed which demonstrated that L = 30 particles and T = 500 iterations are proper to obtain the best solution for this problem.

Computational results
The heuristic performance (  %) between the mathematical model and the proposed algorithm (PSO and PSOK) were calculated.In Table 5 illustrate that the results of both metaheuristics are close and equal to the optimal solution with average the performance of PSO and PSOK is 99.61% and 99.64%, respectively.An experimental design of the factors taken under consideration is 1) the number of third-party logistics providers, 2) the number of small-scale growers, and 3) the time of the third-party logistics provider.Each factor has 3 levels; thus, the total number of trials is 3 3 = 27 combinations and the results of experiments with the relative improvement (%) of PSOK demonstrate that the averaged relative improvement of the PSOK is 0 . 1 3 89% for the best solution and 0 .1519% for the averaged solution.The statistical tests based on SPSS19 showed that Factors 1) and 2) significantly affect the https://doi.org/10.1051/matecconf/201819201015ICEAST 2018 Table 5 The results of the experiment and the computation time *N/A = Out of memory experimental response at the confidence interval of 95%.In other words, these factors affect improving PSOK.

Discussion and conclusion
This paper proposes a mathematical model and metaheuristics to solve the GAPTW.The objective is to minimize the total assignment cost for third-party logistics providers to service small-scale growers under capacity and time limitations, which made the steps more complex than the original GAP.From our literature database, there are no research studies using a metaheuristic algorithm that applies PSO, so the PSO has been used in this research.Furthermore, PSO has been improved by the hybridization of PSO with the k-cyclic moves algorithm (PSOK) to prevent the local trap and develop the solution.A comparison of the performance between the mathematical model and both metaheuristics demonstrate that for small-sized problems, both metaheuristics can give the optimal solutions.When the problem size was increased, the mathematical model could not find the solutions, whereas both metaheuristics could obtain results either equal to or approximately equal to the optimal solutions with the averaged performances of 99.61% and 99.64%, respectively.The results of improving the performance of PSOK demonstrate that the relative improvement is 0.1389% for the best solution and 0.1519% for averaged the best solution, which indicated that the proposed hybrid PSO outperforms the original.The solutions found in this research lead to efficient cost savings, is a major help for third-party logistics providers to serve the smallscale growers at a more standardized and fair price.Therefore, it mitigates the risk of sugarcane growers in changing to other competing economic crops.Thus, the sugar mills would have more sugarcane to the sugarcane supply system, which would achieve a sugar productivity increased to meet the demands of the present global marketing.

No
of moves nr : The number of moves required z : Position of particles 1.The value of nr is randomly selected from [2, k]. 2. Randomize the unique position of z which is equal to a number of nr. 3. Cyclic move selected positions.4. Re-do steps 1.-3.for all particles.

Table 1
The input data of   +   and

Table 2
The input data of   ,    ,    and

Table 3
The input data of   ,    and

Table 4
The cost of the allocation of the third-party logistics provider i to serve the small-scale grower j