The 1-D bin packing problem optimisation using bees algorithm

The bin packing problem is a classic combinatorial optimisation problem that is widely used in various applications such as assembly line balancing, scheduling, and time-tabling. Metaheuristic algorithms can provide solutions to these problems faster than exact methods. Bees Algorithm, a metaheuristic algorithm inspired by the foraging activity of bees, is known for its performance in solving optimisation problems. To our best knowledge, this is the first use of the Bees Algorithm to solve a bin packing problem. In this paper, we use the basic Bees Algorithm to demonstrate near-optimal solutions and measure the accuracy of solutions to the one-dimensional bin packing problem. The algorithm procedure and parameter settings are set following the previous research. Benchmark datasets are used in the experiment, and accuracy is measured. The results indicate that the basic Bees Algorithm for bin packing problems and previous research on travelling salesman problems produce similar accuracy results.


Introduction
Bin Packing Problem (BPP) is one of basic combinatorial optimisation problem and widely studied [1,2,3]. It is well known that this classic problem can be applied to a variety of diverse practical problems, including scheduling, time tabling, facility location, allocating computer memory, assembly line balancing, and supply chain [1,2,3,4,5,6].
The 1-D bin packing problem is defined as follows: Given an infinite supply of bins, each with a capacity of , and a list of items with sizes no greater than , the problem is to pack the items into the fewest possible bins while keeping the sum of the sizes in each bin below [3,5,7].
A NP-Hard problem like the BPP is difficult to solve using exact methods like branch and bound, because as the size of the problem increases, the solution grows exponentially [1,3,4,8]. Many researchers use heuristic and metaheuristic approaches to find near-optimal solutions for BPP in faster computational time. The one-dimensional BPP has been subjected to a wide range of algorithms, including classical-based heuristic techniques as well as global metaheuristic algorithms. It is worth noting that metaheuristics are helpful in solving binpacking problems since their algorithms can manage complex constraints and deliver high-quality solutions in less time [9].
The extended bin packing problem with variable size and capacity was introduced as a real-world problem in the logistics business and solved using three heuristics approaches by Liu et al. [10]. The proposed approach works well in tackling this problem and finds near-optimal solutions in a short amount of time. An evolutionary approach for bin packing problem is proposed in Luo et al. [11]. Another study that compared the effectiveness and efficiency of several metaheuristic optimisation techniques for solving the one-dimensional bin packing problem was presented by Munien et al. [12]. A comparison was made between the Genetic Algorithm, Firefly Algorithm, Cuckoo Search Algorithm, Artificial Bee Colony Algorithm, and some of their hybrids, and they demonstrate that when deciding which underlying heuristic is better, a tradeoff between solution quality and processing time must be made. It is suggested that other cutting-edge techniques for computational intelligence, such as the Bees Algorithm, be investigated for solving the one-dimensional BPP.
Bees Algorithm (BA) is a well-known metaheuristic that mimics the foraging behaviours of honeybees, introduced by Pham et al. [13]. BA has been widely used to solve many optimisation problems since it can find near-optimal solutions within a reasonable computation time. Engineering, bioinformatics, business, and computer network are a few of the numerous fields where BA has been used to optimise a wide range of problems [14]. Zeybek et al. proposed BA as training algorithms for deep learning models [15]. Previous research has demonstrated that, despite the fact that continuous and combinatorial optimisation problems have very different solution strategies, BA was able to find feasible solutions in both continuous and combinatorial domain. The first combinatorial version of BA was proposed in 2007 for job scheduling [16]. BA has been proposed to solve fundamental combinatorial optimisation problems such as the travelling salesman problem (TSP) [17,18,19] and the vehicle route problem [20,21]. Previous research on combinatorial problems demonstrates Available online at: http://jurnal.untirta.ac.id/index.php/jiss 324 that the Bees Algorithm outperforms other metaheuristic algorithms, including TSP [14], robotic disassembly [22], and many other applications [23].

Industrial Engineering Advance Research & Application
BA, as previously mentioned, performs well in other combinatorial problems; however, because the no free-lunch theorem states that no algorithm can solve all optimisation problems, we are motivated to use the Bees Algorithm to find the near-optimal solution for the bin packing problem. To the best of our knowledge, no previous research has used BA to solve this classic problem. The purpose of this research is to use the basic Bees Algorithm to find a near-optimal solution to another fundamental optimisation problem, BPP.

Problem formulation
Illustration of BPP presented in the Figure 1. The illustration shows that each bin has a weight capacity of 20-unit weight. The weight of the items in the bin must not exceed the capacity. The first bin weighs a total of 19, while the second and third bins weigh a total of 18-unit weight. The bin packing problems' objective is to pack the items in the lists ( ) into the fewest possible bins while ensuring that the sum of the sizes in each bin does not exceed the capacity ( ). A set of n items, = (1, …, ), with each item has positive weight ( ) and a set of bins, = {1, …, } with each bin has same capacity. Equation 1 provides the objective for the bin packing problems and constraints presented in Equations 2-5 [24].
Equation 2 ensures that total item weights in bin j do not exceed capacity. Each item must be packed into exactly one bin, as specified by Equation 3. Equations 4 and 5 ensure that and are both binary numbers.

Bees algorithm
The Bees Algorithm was inspired by the honey bees' foraging behaviour [13]. BA is composed of five parameters: the number of scout bees ( ), the number of elite bees ( ), the number of best bees ( ), the number of elite sites ( ), and the number of best sites ( ). This study uses the best parameter setting based on previous research on parameter tuning for combinatorial problem with a case study on TSP [25]. The BA parameter as follows: = 40, = 20, = 8, = 10, and = 40, iteration = 3000 [17,25]. Figure 2 represents the pseudocode of the basic Bees Algorithm for BPP (see Figure 2). Local search operator in this study uses the basic BA [17]: swap, insert and reverse operator. The stopping criteria uses maximum number of iterations. The procedure begins by randomly generating starting solutions with n scoutbees and then sorting the population. The bees search on elite sites ( ), whereas the bees search on selected sites ( ). Both are local search and employ the swap, insert, and reverse operators. Global bees ( − ) search in the remaining search space at random. The findings are sorted according to their fitness value, and the best bees are selected until the stopping criteria is met.

Experiments result and discussion
Twenty 1-D BPP datasets from OR-library use to evaluate the basic BA in BPP [26]. The datasets listed in Table 1. The experiment for each dataset run 10 times. The BA programmed in MATLAB 2020b. The appendix provides a link to the MATLAB code for the 1D bin packing problem using the basic bees algorithm, which the user can use and test with other datasets.   U120_00  150  120  U120_01  150  120  U120_02  U120_03  U120_04  U120_05  U120_06  U250_00  U250_01  U250_02  U250_03  U250_04  U250_05  U500_00  U500_01  U500_02  U500_03  U1000_00  U1000_01  U1000_02   150  150  150  150  150  150  150  150  150  150  150  150  150  150  150  150  150  150   120  120  120  120  120  250  250  250  250  250  250  500  500  500  500  1000 1000 1000  The experiment results presented in the Table 2. Figure 3 show the graph results of dataset U120_00. The accuracy measure how close the result from Best Known Solution (BKS). The average accuracy is calculated by subtracting the average from BKS and dividing the results by BKS. The same calculation to find the best accuracy is performed. The results show that for all datasets, basic BA for BPP have average accuracy starts from 3.8% to 12.3% and best accuracy starts from 2.0% to 11.5%. As the number of items increases, the accuracy decreases, which is true for all NP problems due to the exponential growth of solution spaces as the number of problems increases. With the same parameter settings, the basic BA for the Traveling Salesman Problem (TSP) demonstrates that the accuracy measurement also produces similar results. Average accuracy ranges from 1.94% to 3.33% for datasets with 100 cities, and from 5.08% to 10.47% for datasets with 150-200 cities [16]. 326

Conclusion
In this paper, we introduce a 1-D bin packing problem solved using metaheuristic approach. We have shown that the Bees Algorithm can be applied to solve this problem. Experimental studies were performed for 20 different BPPs selected from the OR-library. As previously stated, the optimal parameter setting with balanced proportions of scout bees produces the best results. While it is true that this study utilised a balanced proportion, the study could be expanded by utilising a different number with a balanced proportion and statistically comparing the results. Future research will focus on developing an enhanced version of BA for the 1-D BPP. Additionally, the BA can be used to test for 2-D and 3-D BPP.