An Adaptive Fitness-Dependent Optimizer for the One-Dimensional Bin Packing Problem

In recent years, the one-dimensional bin packing problem (1D-BPP) has become one of the most famous combinatorial optimization problems. The 1D-BPP is a robust NP-hard problem that can be solved through optimization algorithms. This paper proposes an adaptive procedure using a recently optimized swarm algorithm and fitness-dependent optimizer (FDO), named the AFDO, to solve the BPP. The proposed algorithm is based on the generation of a feasible initial population through a modified well-known first fit (FF) heuristic approach. To obtain a final optimized solution, the most critical parameters of the algorithm are adapted for the problem. To the best of our knowledge, this is the first study to apply the FDO algorithm in a discrete optimization problem, especially for solving the BPP. The adaptive algorithm was tested on 30 instances obtained from benchmark datasets. The performance and evaluation results of this algorithm were compared with those of other popular algorithms, such as the particle swarm optimization (PSO) algorithm, crow search algorithm (CSA), and Jaya algorithm. The AFDO algorithm obtained the smallest fitness values and outperformed the PSO, CS, and Jaya algorithms by 16%, 17%, and 11%, respectively. Moreover, the AFDO shows superiority in terms of execution time with improvements over the execution times of the PSO, CS, and Jaya algorithms by up to 46%, 54%, and 43%, respectively. The experimental results illustrate the effectiveness of the proposed adaptive algorithm for solving the 1D-BPP.


I. INTRODUCTION
The bin packing problem (BPP) is a commonly studied combinatorial optimization problem; it can be defined as a finite collection of items with varying specifications to be packed into several bins or containers [1] without exceeding the capacity of each bin. The BPP can be viewed as a particular case of the one-dimensional (1D) cutting-stock problem [2], [3]. The BPP focuses on minimizing the number of used bins or the amount of wasted space inside a bin. Therefore, solving the BPP can help solve many real-world problems, such as cutting-stock packaging design in supply chain management [4] and industrial applications [5], [6]. The 1D-BPP allows items to be packed according to a fixed dimension. Although this problem seems simple to define, The associate editor coordinating the review of this manuscript and approving it for publication was Manuel Rosa-Zurera. it is a well-known NP-hard problem [7], and achieving an optimal solution is time consuming, especially with the increasing magnitude of the problem. Therefore, different approximation solutions have been proposed for solving the 1D-BPP based on heuristic approaches, such as next fit (NF) and first fit (FF) [8], or through hybrid approximation algorithms, such as FF decreasing (FFD) and best fit decreasing (BFD) methods [9]. In [9], items were not separated onto shelves. Although the algorithms, as mentioned earlier, provide a solution, they are bound to the proposed approximation ratio. Coffman Jr. et al. [10] provided an overview of the approximation algorithms used for solving the 1D-BPP.
Another new and popular solution of this problem involves the use of metaheuristic approaches naturally inspired by biological, physical, or sociological phenomena; these include the genetic algorithm (GA) [11], particle swarm optimization (PSO) [12], and the tabu search (TS) method [13]. VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ Cui [14] used the NF heuristic with the GA to solve combinatorial optimization problems. One of the main advantages of metaheuristic approaches for solving various optimization problems is obtaining high-quality solutions through fewer iterations (i.e., shorter computational time). Additionally, metaheuristic approaches are flexible and straightforward [15], [16]. However, there is no universal algorithm that addresses all common optimization problems well. Therefore, solving NP-hard problems is still an open challenge; thus, in the current study, the 1D-BPP was approached practically and effectively by proposing an adaptive version of the fitness-dependent optimizer (FDO) algorithm called the AFDO. The FDO algorithm is a newly proposed swarm intelligence algorithm that is stable in both exploration and exploitation phases compared with other algorithms based on benchmark test functions and statistical analysis [17].
Therefore, this study adapted the FDO algorithm to solve the 1D-BPP. The adaptation occurred in two main phases: a random initial population is used, and an update to the algorithm procedure was added. In this study, the FF heuristic was modified to obtain a better initial solution (i.e., exploration phase), and an adaptive procedure was then embedded through operators in the updating stage during solution improvement to obtain the final optimal solution (i.e., exploitation phase). A set of experiments was used to test the feasibility of the proposed algorithm, and the results show superiority over those of previously used algorithms. To the best of our knowledge, this is the first study to propose the use of the FDO algorithm to solve the 1D-BPP in a discrete domain.
The remainder of this paper is organized as follows. Section 2 provides an overview of the most recent research focused on solving the BPP. The mathematical model and objective function of the BPP are discussed in section 3. Furthermore, the general structure of the FDO algorithm is illustrated in section 4. In section 5, we propose the modelling of the 1D-BPP by using the AFDO algorithm. Section 6 presents the testing of the proposed algorithm on benchmark datasets and a performance analysis. Finally, section 7 draws the conclusions.

II. LITERATURE REVIEW
As the BPP is considered an NP-hard problem, its solution is generally contingent upon the availability of efficient methods. Various exact and heuristic methods have been proposed to solve the BPP in past years. For example, Martello and Toth [18] presented a branch-and-bound procedure, where the procedure of Scholl et al. [19] was combined with TS to develop a new branching schema. A new lower bound based on the cutting-stock problem was designed in [20] for BPP. Although exact methods find the best solution, they are unable to solve the problem when constraints are added. In addition, these methods are affected by the size of the problem. Delorme et al. [21] reviewed the most important exact methods for solving the 1D-BPP.
Some heuristic methods have also been proposed for solving the 1D-BPP; they provide approximate solutions ranging from the FF to the best fit (BF) or worst fit and other variations [22], [23]. Each of these heuristic methods assigns several varying objects to the first, best, or worst bins according to the bin capacity. Although each method displayed good results in each case, the results are not necessarily optimal. Heuristic methods cannot be treated as a general approach because they depend on the nature of the problem. Therefore, the best solution is achieved when the time of execution is considered an essential factor, and the worst solution is achieved when the quality is considered an essential factor.
Recently, researchers have discussed improving the current algorithms to produce an optimal solution based on increasing the number of parameters in and constraints of the BPP. Korf [24] proposed an improved algorithm for packing cartons into a minimum number of identical containers based on a local guided search process.
Based on the advantages of metaheuristic algorithms over exact methods, one of the most popular metaheuristic algorithms, GA, has been extensively applied to solve the BPP [25], [26]. In [27], a new island parallel grouping GA (IPGG) was developed to solve the 1D-BPP based on a modified class of the GA designed for solving complex grouping problems. Ross et al. [28], [29] solved the BPP through combinations of GAs and hyperheuristics. Another solution for solving the 1D-BPP was based on the greedy randomized adaptive search (GRASP) procedure [30], and it was built in two main phases: random initiation based on the integration of the FF and BF as a first phase and the application of a TS as the second phase to enhance the initial solution. In contrast, in the current study, two main stages are considered; in the first phase, a randomized FF heuristic is applied to generate initial feasible solutions, and an AFDO is applied in the second phase to achieve the optimal solution. Stakic et al. [31] presented different greedy randomized adaptive search procedure (GRASP) algorithms for solving a vector BPP and its variants.
Hemmelmayr et al. [32] introduced a solution for the BPP through a variable neighbourhood search (VNS), and Fleszar and Hindi [33] combined a minimal bin slack heuristic [34] with a VNS to combine the advantages of both methods for solving the 1D-BPP. Loh et al. [35] proposed a simple heuristic based on weight annealing (WA) to solve the BPP and improve the solution quality. An FFD heuristic was applied as a first step in [36] to obtain the initial solution, which was improved through a simulated annealing algorithm. The FFD heuristic requires a decreasing order of items before processing, whereas the proposed method does not require item sorting. With more constraints on packing items, a VNS can be used to solve the BPP with conflicts [37]. The Firefly algorithm was presented to solve the 1D-BPP with fixedsized bins [38].
A hybrid improvement procedure utilizing TS was proposed in [39] to improve the results when the current solution was not feasible for the BPP. Similarly, in [40], a multistep TS was proposed to solve the BPP, where a partial solution was first derived based on the dynamic programming of the item set. An adaptive cuckoo search algorithm was proposed in [41], which combines the standard cuckoo search with the decoding mechanism to solve the BPP. Moreover, a quantum cuckoo search was presented in [42], where the solution was represented as a binary representation, and the obtained results were compared with the FFD results. In this paper, the AFDO solution for the BPP is represented as a 1D discrete value, where the index identifies the item and the corresponding values represent the bins. The experimental results were compared with the results of other popular algorithms, such as PSO, the crow search algorithm (CSA), and the Jaya algorithm. Although these algorithms are successful in solving various well-known problems, the proposed algorithm has a crucial difference in improving the quality of the solution.
Variants of other algorithms [43], [44] have been proposed for solving the 1D-BPP, and their results were evaluated through various benchmark datasets. In this paper, the proposed adaptive algorithm was tested using three benchmark datasets with various item weights and bin capacities. The results of the AFDO algorithm for solving the 1D-BPP were better than those of other algorithms in terms of achieving the optimal solution (i.e., the minimum number of bins) within a reasonable execution time.

III. MATHEMATICAL MODEL OF THE 1D-BPP
Solving the BPP can be considered practical for many reallife problems, such as collecting musical pieces to be stored on audio compact discs at maximal capacity, filling up containers, job scheduling, and passenger bus allocation [8]. All of these problems can be modelled as BPPs, with the primary constraint being that the set of items assigned to a bin should not exceed a specific capacity. Therefore, the aim is to use as few bins as possible. An extended view of the 1D-BPP mathematical model can be found in [21], [45], where items had a single dimension (size, weight, or any other measure). The general mathematical formula of the 1D-BPP can be described as follows.
Given a set of n items, I = I 1 , . . . , I n , capacity C ∈ N, and size function S : I → N, the objective is to find a feasible assignment f that minimizes the number of used bins. The feasible assignment of items into N bins can be considered a partitioning process for the set of items, P = {P 1 , . . . , P N }. For each P k , the sum of the item sizes or weights in P k must not exceed the capacity C, which can be modelled as follows. The objective function is minimized as subject to the following constraints.
Constraint (1): Constraint (4): 1} ∀i ∈ I and ∀k ∈ P Constraint (1) is a decision variable related to the number of partitions used (i.e., bins), which is one if bin k is used and 0 otherwise. Capacity constraint (2) guarantees that the total number of items in each bin does not exceed the bin capacity (assuming that all bin capacities are identical). Constraints (3) and (4) guarantee that each item is assigned to precisely one partition (i.e., bin). However, the 1D-BPP is an NP-hard problem that requires an efficient algorithm for its solution.

IV. FDO ALGORITHM
In recent years, many researchers working on optimization problems have tried to develop new algorithms to apply to real-world optimization problems. One of the most recent swarm intelligent algorithms that is inspired by nature is the FDO developed in 2019 [17]. The FDO algorithm encompasses the specific characteristics of bee swarms in the reproductive process and their collective decision-making behaviours. However, the FDO algorithm differs from the honeybee algorithm or artificial bee colony algorithm. Furthermore, FDO somewhat mimics the particle position updating process of the PSO algorithm.
The PSO algorithm requires more computations in terms of updating both the velocity and the particle positions, and the FDO requires fewer computations for updating the positions. Moreover, the FDO algorithm was tested on a group of 19 classic benchmark test functions, and the results showed that its efficiency was comparable to the PSO efficiency. Bees are social insects that live in hollow trees or small caves. They work in groups in colonies called hives [46]. There are three kinds of bees in a natural colony: queen bees, worker bees, and drones or scout bees. Each one has a distinct role and task according to its characteristics. The FDO focuses on the task of the scout bees, i.e., the exploration of the environment to find and locate a new place for the colony to build a hive (i.e., exploit preferable hives). Once a suitable location is found, the bees perform a ''dance'' to interact with the swarm [47]. For algorithmic representation, each hive exploited by a scout bee (i.e., the artificial search agent) represents a possible solution, and the best hive represents the global optimum solution according to the fitness weight. The main steps in the FDO algorithm are discussed as follows, and the overall process is shown in Fig. 1.

A. STEP 1 (INITIAL POPULATION)
The initial population consists of a random set of artificial scout bees in the search space X i (i = 1, 2, . . . , n). Each scout bee position represents a solution. These bees try to find a better hive by searching randomly for more positions and evaluating the locations to allocate resources for the best one.

B. STEP 2 (SCOUT BEE FITNESS WEIGHT)
Each scout bee position is evaluated according to the fitness weight, as represented by the following equation: is the fitness value of the global best solution, f (X i,t ) is the fitness value of the current solution at iteration t, and wf is the weight factor. Considering wf = {0, 1}, in the case of zero (i.e., neglected), the algorithm provides a stable search, whereas wf = 1 represents a high level of convergence and a low chance of coverage. Considering that fw ∈ [0, 1], Furthermore, fw = 0 when f X * i,t dramatically affects the movement of a bee to a new position, as described in step 3.

C. STEP 3 (SCOUT BEE MOVEMENT)
The scout bees move from their current position at iteration t to a new position by adding ''pace'' to find a better position, as shown in equation (3).
where X i represents the current position of the scout bee at iteration t and pace is the movement rate, which depends on the value of the fitness weight fw, as shown in equation (4), for different cases. The direction of pace is based on a random mechanism.
where r is a random number in the range of [−1, 1]. Unlike any other similar algorithm, updating the FDO is dependent only on the fitness weight fw and random number r.

D. STEP 4 (TERMINATION CONDITION)
The fitness value of each scout bee is computed for each iteration, and the locations of the new hives are updated. This process is repeated until a termination condition is satisfied (i.e., the maximum number of iterations t max is reached). At the end of the iterations, the global best solution is produced as the final solution.

V. AFDO FOR THE 1D-BPP
In this section, we propose an AFDO algorithm to improve the BPP solution quality. This adaptive version is based on the generation of a feasible random initial population through a randomized FF heuristic. The FF heuristic is a well-known and simple heuristic for the 1D-BPP. It is a greedy algorithm that packs each item into the lowest-indexed bin and ensures that the capacity constraint is not violated. Furthermore, at least one solution representing the optimal solution is guaranteed to exist [48], based on which set of random movements is applied to update the bee location, generate a new position and obtain a global best solution. The steps of the proposed AFDO method are discussed in detail as follows.

A. STEP 1 (SCOUT BEE REPRESENTATION)
Each artificial scout bee represents a candidate solution to the BPP. The presentation scheme for the solution is a critical part of solving any optimization problem. In this paper, each assignment P k can be represented by a vector of n dimensions of integer numbers, and indices and values are used to identify the item and represent the bin, respectively, as shown in Fig. 2. This representation helps minimize the number of bins used and allows a group of items to be packed into the same bin without violating the bin capacity constraint.  Each run of the AFDO algorithm starts with the generation of an initial population. The quality of the initial population considerably affects both the execution time and result quality. In this study, the FF heuristic [49] was modified to allow for the random generation of different initial solutions. The basic concept of the modified FF heuristic based on the packing of a randomly selected item from a shuffled list of items to the first suitable bin is that if the item does not fit any available bin, then a new bin is created to pack the item. To illustrate the modified FF heuristic, consider a set of 10 items (i.e., I = I 1 , . . . , I 10 ); the corresponding weighted items are packed into bins with identical capacities of 10 (C = 10). Fig. 2 shows the standard representation of an FF heuristic that packs the items into five bins. Fig. 3 shows the list of items and three randomly generated candidate solutions from the modified FF. Each solution P k in the population is formed by packing a number of items into a number of bins. The characteristics of the modified FF are twofold. First, the modified FF allows for the generation of different solutions with different packing schemes; this approach is suitable and practical for cases where the target number of bins is not known. As shown in Fig. 3, one of the solutions allows the items to be packed into four bins. Second, the modified FF heuristic allows the generation of diversified feasible solutions that can be used as the starting stage for the proposed algorithm. VOLUME 8, 2020

C. STEP 3 (FITNESS VALUE CALCULATION)
At each iteration, every scout bee in the population is evaluated according to the fitness function f , and the bee with the minimum fitness value is assigned the best candidate solution X * i,t . The goal of the 1D-BPP is to minimize the number of used bins N to pack all n items as follows: With the number of bins as the objective function, the algorithm experiences stagnation due to having many solutions with different representations and the same number of bins. However, it is better to integrate this criterion with another that is focused on bin fullness as follows: where fill k is the full capacity of bin k, C is the bin capacity, N is the total number of bins, and k is a constant that defines the equilibrium of the filled bin (usually 2).
In addition to minimizing the number of used bins, the fitness function aims to minimize the number of empty spaces for each bin remaining after packing the items. Therefore, the candidate with the lowest fitness value (i.e., lowest unused space) is considered the best solution. The fitness value represents how close the solution is to the objective.

D. STEP 4 (SCOUT BEE FITNESS WEIGHT)
The fitness weight fw of each scout bee in the current population is computed using equation (1). For a more stable search, we set wf = 0, which implies that the factor can be neglected. The computation of fw dramatically affects the movement of scout bees towards a new position.

E. STEP 5 (SCOUT BEE MOVEMENT)
Updating the position of an artificial scout bee depends on the movement rate, pace, and direction. In the proposed AFDO algorithm, to solve the 1D-BPP, only a positive direction is considered, where r is a random number generated in the uniform distribution [0, 1] because of the nature of the problem. Equation (4) can be rewritten in the format of the AFDO algorithm as follows: Equation (8) represents two cases that influence the direction of movement. In the first case, the result of (X i,t ⊗ r) is a random sequence of Vs generated from the current solution depending on the number of items, I, and the number of bins, N, in a given instance of the BPP dataset. Here, V is a raw vector (3 tuple) and is represented as V =<a, b, c> with three indices: a represents the item_id, b represents the current bin_no., and c represents the new bin_no. The variable r indicates the probability of a given number of tasks being selected from I, as illustrated in Fig. 4. In the example in Fig. 4, we assume that there are 10 items and r = 0.3; then, the number of raw vectors, V = 3, is randomly chosen from the current candidate solution as < 7, 1, 2 >, which indicates that 7 items are currently in bin 1. In this case, the new bin is 2 (i.e., the new bin is chosen randomly from a list of N bins). The modification of this parameter in the algorithm allows for the possibility of obtaining multiple solutions through randomization.
To compute the result of the operator , the difference between the two candidate solutions is computed in terms of the sequence of raw vectors V; ⊗ is the probability of fw selecting all raw vectors V from (X i,t X * i,t ). Fig. 5 illustrates returns the value representing how far the current candidate is from the global best candidate in the form of a sequence of raw vectors V. For example, if item I 1 is assigned to the same bin in both solutions, then the item remains unchanged; otherwise, it is assigned to the new bin. According to Fig. 5, if item 4 is assigned to bin 1 in X i,t and bin 3 in X * i,t , then V =< 4, 1, 3 >.
From the two cases mentioned earlier, pace can be viewed as a sequence of raw vectors V sequentially applied to the current candidate solution in the population to obtain a new solution according to equation (9) (Fig. 6).
The example in Fig. 6 shows that item 4 is currently assigned to bin 1 and can be assigned to the new bin 3, which implies that V is equivalent to < 4, 1, 3 >. This reassignment can occur if and only if the solution does not violate the capacity constraint (i.e., the weight of item 4 is less than or equal to the remaining capacity of bin 3). V =< 8, 2, 4 > is not applied according to the capacity constraints. Generally, the successful application of V implies the removal of item I i from bin O and its packaging into bin P if the remaining capacity of bin P is greater than or equal to S i . Then, the free capacities of both bins O and P are updated.
Thus, two critical parameters r and fw are modified through the adaptive algorithm to update the positions of artificial scout bees and improve the range of exploration of the search space to solve the 1D-BPP.

F. STEP 6 (TERMINATION CONDITION)
Steps 3-5 are repeated until a predefined number of iterations, t max , is reached or the number of distinct bins in the current best solution reaches the optimal solution according to equation (5). Once the termination condition is satisfied, the best global candidate solution represents the optimal assignment of items for the BPP.

VI. EXPERIMENTAL EVALUATION
The proposed algorithm is implemented in Java, and the integrated development environment is Eclipse Java Neon V-1.8, which encompasses the benefits of object-oriented programming and runs on Intel(R) Core i7 2.80 GHz CPU with 8 GB RAM and the Windows 10 operating system. The proposed adaptive algorithm (i.e., the AFDO) was evaluated against other popular algorithms, such as PSO [50], the CSA [51], and the Jaya algorithm [52]. All of the algorithms were tested on a set of publicly available benchmark datasets [53]. The benchmark datasets are divided into three datasets, each comprising various items and bin capacities. The algorithms were applied to some instances of the three datasets, and the qualities of the solutions were evaluated by achieving the largest (Max.), smallest (Min.), and average (Avg.) fitness values out of ten runs for each instance. Furthermore, the performance of the proposed algorithm was compared to the performance of other algorithms according to several evaluation metrics, such as the minimum number of used bins (b * ), average fitness value (AvgF), average execution time (AvgT ), and performance percentage (PP), as illustrated below.
• The number of used bins (b * ) for each algorithm is compared with the optimal number for each instance, m * .
• The average fitness value (AvgF) is achieved by computing a fitness function [i.e., equation (6)] over ten runs: where f i is the fitness value of the i th run.
• The average execution time (AvgT ) is computed in milliseconds according to equation (11). The smaller the execution time is, the more efficient the algorithm.
where T i is the time need to reach a feasible solution in the i th run. where the variations in f PSO,CSA,Jaya are the fitness value results of the PSO, CS, and Jaya algorithms, respectively. To achieve a fair comparison between the AFDO and other algorithms, the population size was initiated with ten individuals for all algorithms, where the maximum number of iterations ranged from 50 to 100 for all the compared algorithms. The characteristic parameters and different parameters associated with each algorithm are listed in Table 1.
The main parameters of the most popular swarm algorithm PSO are set to two (i.e., C 1 = C 2 = 2), and CSA has fewer computation parameters and is affected mainly by the flight length, which is set to one (i.e., fl = 1), and a randomly generated awarness probability. Although the Jaya algorithm is considered a parameterless algorithm that is affected only by the two random numbers as learning factors, it requires more computational steps. According to the parameters of the proposed adaptive algorithm AFDO, the weight factor is set to zero (i.e., wf = 0) to achieve search stability with high coverage of the search space. Moreover, the random walk parameter is generated within the range [0,1] to obtain the learning factors for Jaya and the awareness probability for the CSA.  End for Set b * to the current best number of bins /// artificial scout bee movement For each candidate X i,t in the population pop Compute fw according to equation (1). The proposed algorithm was tested on 15 instances from Dataset 1 with various numbers of items n = {50, 100, 200, 500}; bin capacities C = {100, 120, 150}; weights (sizes) of items w j from [1,100], [20,100], and [30,100] for j = 1..., n; and the minimal number of bins m * for each instance. These instances are named ''NxCyWz_v'', and the corresponding parameters are listed in Table 2. Table 3 shows the optimal number of bins (m * ) in each instance and the results of all the algorithms in terms of the number of used bins, b * . Moreover, the AFDO algorithm is shown to have reached the optimal number of bins in all test instances (i.e., b * = m * ). In the table, the numbers in bold represent the best results obtained throughout this study.
Moreover, the AFDO algorithm displays high efficiency in solving the 1D-BPP in terms of the average fitness value, as illustrated in Table 4.
As shown in Table 4, the adaptive FDO algorithm yielded the smallest average fitness value for all instances. For example, as shown in instance no. 3 (N1C1W1_I), the AvgF of the proposed algorithm is 0.1662, and those of PSO, the CSA, and the Jaya algorithm are 0.1846, 0.1803, and 0.1872, respectively. For other instances, the AFDO obtained a lower minimum fitness value (Min.) than did other algorithms; for example, for instance no. 11 (N2C1W1_C), the AFDO algorithm achieved a minimum fitness value of 0.158, and the PSO, CS and Jaya algorithm achieved values of 0.194, 0.186 and 0.171, respectively.  Additionally, the superior capability of the proposed algorithm is evident from the results obtained through comparisons with other algorithms; this superiority was achieved through the feasible improvement of the initial population and the effective exploration approach to obtain the optimal solution. According to Table 3, for many instances, such as instances 2, 7, 8, 9, 10, and 15, the proposed algorithm reached m * (i.e., b * = m * ), but the other algorithms did not reach the optimal number of bins. For example, in instance 8 (N1C2W2_R), the AFDO reached the optimal number of bins (m * = 25) for packing 50 items with a bin capacity of 120 for each bin in the smallest number of iterations, while CSA and Jaya yielded 26 and PSO reached 27 at the end of the iterative process, as shown in Fig. 7.
Moreover, the quality of the initial population of the AFDO solution was improved, and the maximum fitness value of the  scout bees was 0.192, which is smaller than the values in the other algorithms. During the iterations, the solution improved due to the set of operators used to explore the search space and achieve a final optimal solution with a minimum fitness value equal to 0.16.
Although the compared algorithms reached the minimal number of bins in some instances, such as instances 3, 4, 5 and 13, as shown in Table 4, the AFDO showed superiority based on the performance percentage in terms of the average fitness value, as shown in Fig. 8.
For example, in instance 3 (N1C1W1_I), the proposed adaptive algorithm achieved a better average fitness value than PSO (by 10%), the CSA (by 8%), and the Jaya algorithm (by 11%). For other instances, the improvement achieved by the proposed algorithm ranged from 4% to 10% when  compared with PSO and from 3% to 12% and 11% when compared with the CSA and Jaya algorithm, respectively.
In terms of the average execution time, AvgT , the proposed adaptive FDO algorithm is superior to other compared algorithms for achieving a packing solution, as listed in Table 5.
As shown in the table, the AFDO algorithm has the smallest AvgT when compared with the values of the other algorithms in reaching an optimal solution. For example, in instance 3 (N1C1W1_I), the AvgT of the proposed algorithm was 94.6 ms, while those of PSO, the CSA, and the Jaya algorithm were 143.2, 122.9, and 174.2 ms, respectively. Fig. 9 shows the average execution times of the compared algorithms for solving some BPP instances and achieving the optimal number of bins.
The AFDO algorithm outperforms PSO in minimizing the average execution time for packing a set of items into the minimum number of bins by up to 49% for different instances. Furthermore, the proposed algorithm achieved improvements within ranges of 11%-44% and 13%-46% when compared to the CS and Jaya algorithms, respectively.

B. COMPUTATIONAL RESULTS FOR DATASET 2
All instances from Dataset 2 are characterized by the same bin capacity C = 1000 and various numbers of 97968 VOLUME 8, 2020  items n = {50, 100, 200, 500}. In Dataset 2, the weight of an item is determined by two parameters: the average weight and delta. The average weight avgWeight = {C/3, C/5, C/7, C/9}, and delta represents the maximum deviation of each w j from avgWeight, where delta = {20%, 50%, 90%}. The proposed algorithm and other compared algorithms were tested on ten instances from this dataset, and the instances were named ''NxWyBzRv'', with parameters defined in Table 6.
The solutions of the BPP instances using different algorithms in terms of the number of used bins and the optimal number of bins for each instance are listed in Table 7.
As shown in the above table, the AFDO algorithm reached the optimal number of bins in all test instances (i.e., b * = m * ). Furthermore, the AFDO gained superiority in terms of the average fitness value when compared with the other algorithms (PSO, CSA, and Jaya algorithm) over ten runs, as illustrated in Table 8.
For all test instances, the proposed adaptive algorithm achieves the smallest average fitness value. For example,  in instance 3 (N1W1B2R7), the AvgF of the AFDO is 0.1229, the AvgF of the PSO algorithm is 0.169, the AvgF of the CSA is 0.1536, and the AvgF of the Jaya algorithm is 0.1536.
Although all the algorithms reached the optimal number of bins as a solution for some instances (e.g., instances 4, 5, 7 and 9) for Dataset 2, differences occurred. For example, when solving instance 4 (N1W2B2R9), all the algorithms reached the optimal number of bins (i.e., m * = 11) but with different AvgF values. The AvgF values of the AFDO, PSO, CS, and Jaya algorithms are 0.118, 0.1205, 0.1219, and 0.1236, respectively.
In some instances, such as instance 7 (N2W2B3R9), the proposed algorithm achieves the minimum fitness value (Min.= 0.075), which was better than the minimum fitness values of the other algorithms (Min.= 0.076) with different packing schema for packing 100 items into 20 bins, as shown in Figs. 10 and 11.
The AFDO algorithm has shown its efficiency not only in terms of the average fitness value but also in terms of the average execution time, as illustrated in Table 9.
The efficiency of the proposed algorithm in terms of the execution time is illustrated in Table 9, as it required the shortest time to pack a set of items into the minimum number of bins. VOLUME 8, 2020   For example, in instance, 6 (N2W2B1R2), the AvgT value of the AFDO algorithm was 182.1 ms, whereas those of the PSO, CS, and Jaya algorithms were 228.0909, 309.6, and 306.9 ms, respectively. The AvgT of the adaptive algorithm throughout different test instances improved by up to 56% when compared with that of PSO, 51% when compared with that of the CSA and 48% when compared with that of the Jaya algorithm.
The capability of the adaptive algorithm to solve the 1D-BPP was reflected not only by obtaining the optimal number of bins (e.g., instances 1, 2, 6, 9 and 10) but also in requiring fewer iterations, as illustrated in Fig. 12.
The figure shows the effectiveness of the AFDO solution for solving instance N4W4B2R7 in the fewest number of iterations. The solution improved during the iterative process (e.g.,, the number of bins is 58 for the first 20 iterations) to reach the optimal number of bins (b * = m * = 57) at iteration 22, and the other algorithms did not reach the optimal number of bins through the maximum number of iterations.
All of the above results of test instances from Dataset 2 unquestionably demonstrate the effectiveness and efficiency of the proposed algorithm for solving the 1D-BPP with improvements in the quality of the solution.

C. COMPUTATIONAL RESULTS FOR DATASET 3
Five instances from Dataset 3 are tested with the number of items n = 200 and the largest bin capacity C = 100, 000.  The weight of each item w j is within the range [20, 000, 35, 000] for j = 1..., n to guarantee the diversity of the packing problem. These instances are named ''HARDv,'' where v=0. . . 9. Table 10 lists the results of the compared algorithms in terms of the number of used bins b * and the optimal number of bins for each instance m * .
Although the solution of the AFDO algorithm for this dataset did not reach the optimal number of bins, the solution was better than those of the PSO, CS and Jaya algorithms. For example, in instance 5 (HARD7), the proposed adaptive algorithm packed items into 58 bins (i.e., b * = 58), while other algorithms packed the same number of items into 59 bins (i.e., b * = 59). In addition, the AFDO algorithm achieved the smallest average fitness value for all test instances over ten runs, as shown in Table 11.
Regarding instance 3 (HARD4), the proposed algorithm obtained an average fitness value of AvgF= 0.1814, while the PSO, CS, and Jaya algorithms obtained values of 0.1939, 0.1934 and 0.1941, respectively. The improvement in the AFDO in terms of the average fitness value for different test instances ranged from 5% to 7% when compared with the PSO and CSA results and reached up to 10% when compared with the value for the Jaya algorithm. In addition, the proposed algorithm recorded the smallest minimum fitness value via the adaptive procedure with different operators when searching for an optimal solution. For example, as in instance 2 (HARD3), the Min. value of the AFDO was 0.171, which improved by 4%, 6%, and 5% when compared with that of PSO (Min.= 0.179), the CSA and the Jaya algorithm, respectively.
Obtaining a high-quality solution within a reasonable execution time is an essential factor, especially when there are substantial scaling problems. The AFDO algorithm outperforms other comparison algorithms in solving the 1D-BPP, as shown in Table 12, in terms of the average execution time to achieve a feasible packing solution for a broad set of items.
As stated in Table 10, as an example, when solving instance 4 (HARD5) for packing 200 items, all of the comparison algorithms reached the same number of bins (b * = 60) but at different times. The proposed adaptive algorithm (AFDO) requires an average execution time of 486 ms, and the PSO, CS, and Jaya algorithms require execution times of 718.6, 589.5, and 571.8 ms, respectively. Fig. 13 shows the performance percentage (PP%) of the proposed AFDO algorithm compared to that of the other algorithms in obtaining solutions for the five instances in terms of the average execution time.
The above figure shows the performance of the proposed algorithm compared with that of the other algorithms. The reduction in AvgT via the FDO algorithm ranged from 17% to 34% when compared with that of PSO, from 16% to 38% when compared with that of the CSA and reached up to 34% when compared with that of the Jaya algorithm for different instances.
As mentioned above, all of the tests show that the bestperforming algorithm is the AFDO, as it has the smallest average fitness value and shortest average execution time and achieves the optimal number of bins in all instances for Datasets 1 and 2. For Dataset 3, the AFDO achieved the lowest number of bins with the shortest execution time compared with the other algorithms. VOLUME 8, 2020

VII. CONCLUSION
The BPP is one of the most famous combinatorial optimization problems, and it has a surprisingly large number of applications, especially in logistics and supply chain management. Solving this problem in a reasonable time requires an efficient optimization method. This study is based on the adaptive version of the most recent swarm algorithm called FDO. The proposed AFDO algorithm is based on a feasible random initial population through a modified FF heuristic and improves the BPP solution by adjusting the parameters to search for the final optimal solution. In this study, the proposed algorithm and other popular algorithms, including the PSO, CS, and Jaya algorithms, were tested on three standard benchmark datasets to demonstrate the efficiency and effectiveness of the AFDO in solving the BPP. These datasets were characterized by various numbers of items and different bin capacities to guarantee a large number of packing solutions. The proposed algorithm and other algorithms were tested on 15 instances in the first dataset, and the results demonstrated the effectiveness of the AFDO algorithm in terms of achieving the optimal solution (i.e., the optimal number of bins) within a reasonable time compared to the other algorithms. At the same time, the proposed adaptive algorithm achieved an average fitness value that was up to 19% better than the PSO average fitness value, 22% better than the CSA average fitness value, and 18% better than the Jaya algorithm average fitness value when obtaining solutions for the different instances in Dataset 1.
Moreover, updating the phase of the adaptive procedure via different operator strategies led to the optimal solution with fewer iterations. With a larger bin capacity than in the previous case, all compared algorithms were tested on ten instances from the second dataset, where each instance was associated with various item weights and packing schemes. In all test instances, the AFDO algorithm reached the minimal number of used bins, with an average execution time that was 10% to 56% better than that of PSO, 5% to 46% better than that of the CSA and 48% better than that of the Jaya algorithm. For a large-scale 1D-BPP, the proposed algorithm displayed high efficiency in obtaining solutions for instances from the third dataset with the smallest minimum and average fitness values when compared to those of other algorithms. In the last dataset, the AFDO did not reach the optimal number of bins but achieved a better item packing schema with a lower number of bins compared to the results of the PSO, CS, and Jaya algorithms. Based on the experimental results and a performance analysis of various test instances (i.e., 30 instances), the results showed that the proposed algorithm can be used to effectively explore the search space and locate an optimal solution with the smallest fitness value within a reasonable time when compared with other popular algorithms. In the future, we plan to improve this algorithm in two ways. The first is by comparing the proposed algorithm with other recent metaheuristic algorithms and testing the methods with the remaining instances from each dataset. The second is by applying the proposed algorithm to real-life packing problems in a specific domain, such as the logistic and transportation sectors.