1. Introduction
When determining the layout of steel bridge components, the goal is to achieve maximum material utilization by adjusting the positions of the parts while considering the processing techniques. The primary objectives are to optimize the use of steel, reduce material waste, and lower production costs. The layout problem falls under the category of NP-complete (nondeterministic polynomial complete) problems, which are complex combinatorial optimization problems. Solutions to these problems typically cannot be obtained directly through calculations but are instead derived through indirect “guesswork,” hence the term nondeterministic. There is no known polynomial-time algorithm that can solve all forms of layout problems. Instead, heuristic algorithms, approximation algorithms, or other optimization techniques are usually employed to find approximate solutions. These algorithms include linear programming methods, genetic algorithms, tabu search algorithms, local search algorithms, and ant colony algorithms [
1].
Research on two-dimensional layout problems is mainly split into two areas. On the one hand, there are sequencing algorithms, which determine the order in which parts are placed. Common sequencing algorithms include genetic algorithms, ant colony algorithms, simulated annealing algorithms, and particle swarm algorithms. Each of these algorithms has its own strengths and weaknesses when solving sequencing problems. Nowadays, when addressing sequencing problems, researchers often combine two types of algorithms, such as the genetic simulated annealing algorithm or the hybrid genetic-variable neighborhood search algorithm, to develop a more efficient and effective algorithm. On the other hand, there is the positioning strategy. Positioning is a method of establishing the position on the motherboard of parts that have been determined in order. Commonly used positioning strategies include the bottom-left algorithm, the lowest horizontal line algorithm, and the critical polygon algorithm [
2]. Research on layout problems mainly involves sheet metal cutting, which has important significance in theory and in practice.
The layout problem can be traced back to 1939, but it did not significantly gain attention until the 1960s. Gilmore and Gomory [
3,
4,
5,
6] conducted research on one-dimensional cutting stock problems and two-dimensional rectangular cutting problems, proposing the use of linear programming methods to solve these layout issues. In 1988, to better study layout problems, scholars founded the Europe Special Interest Group on Cutting and Packing (ESICUP) at an international conference in Paris. This organization focuses specifically on researching and discussing layout problems. Over the years, ESICUP has collected a significant amount of research findings from scholars and research institutions, providing crucial support for subsequent studies. Furthermore, with the rapid development of computer technology, scholars have begun using intelligent algorithms to optimize the layout of parts.
In layout problems, positioning strategies and sequencing algorithms are crucial. In terms of the positioning strategy, Art [
7] first proposed a method called “left-side docking”, which involves moving the laid-out parts to the left as much as possible. Thus, the parts are concentrated as much as possible to reduce the blank area. Later, Dowsland [
8] and others improved the left-side docking method. Based on the left-side docking method, if there is a cavity in the part, the part is placed into the cavity to improve resource utilization. Baker [
9] and others proposed the BL algorithm. Simply put, its aim is to position the parts as far left and down as possible. This algorithm is easy to implement, has low time costs, and is widely used in rectangular layout design.
In terms of sequencing algorithms, since different layout sequences can significantly impact the layout results, many scholars have conducted research on these algorithms. Delchambre [
10] applied the genetic algorithm to tackle the layout problem, while Błazewicz [
11] utilized the tabu search algorithm. Leung [
12] and others introduced the local search algorithm to address layout challenges; Solimanpur [
13] employed the ant colony algorithm to solve the layout problem with dynamic constraints. These algorithms were applied to the two-dimensional layout problem and achieved good results.
The two-dimensional layout problem is a combinatorial optimization problem. Currently, there is no known algorithm that can find the solution to the problem in polynomial time. The solution process is relatively complex and has significant research importance. The methods for solving combinatorial optimization problems include exact solutions and heuristic algorithms. Although exact solutions often yield better results, the time-consuming nature of their use escalates exponentially with the complexity of the problem. This drawback undermines their practical applicability in production scenarios.
The layout problem studied in this study is based on the layout problem of preparing material for steel bridges. During the production process, a substantial number of parts need to be laid out; when preparing steel bridge parts, not just one, but many components are required to produce each part. Since the motherboard for the layout is a steel plate, it takes a long time to cut the parts. Therefore, when choosing a layout, we should arrange the parts as neatly as possible while maintaining a high overall utilization rate to facilitate part cutting. Thus, based on actual production needs, in this study, a heuristic algorithm was used to study the two-dimensional layout problem. By adopting a “one size fits all” layout strategy and utilizing a genetic whale algorithm, we aimed to find the optimal solution to this problem.
2. Mathematical Model of Rectangular Layout Problem
The layout problem can be divided into two categories according to the motherboard type. The first is the boxing layout, in which the layout is determined after determining the shape and size of the motherboard. If the parts exceed the boundary of the motherboard, they are placed on the next one. Another type of layout problem is the band layout, where the width of the motherboard is predetermined but its height is unlimited. The final height (after all the parts are arranged) is the height of the motherboard. In the following, we use the band layout as an example to establish a mathematical model for the rectangular layout problem.
The two-dimensional rectangular layout can be described as follows: n rectangles of different sizes, denoted as , are placed onto a rectangular sheet S without overlapping, where represents the parts. The width of the sheet is W, and the height is unlimited. Under the constraint conditions, the height H of the sheet that is used is minimized to maximize the utilization rate of the sheet.
The following constraints must be met during the placement of rectangular parts onto the motherboard:
- (1)
Different rectangular parts and must not overlap each other;
- (2)
The rectangular piece must be inside the motherboard S;
- (3)
The rectangular piece can be rotated 90°.
This can be explained more in depth as follows: Assume that the width of the rectangular mother plate
S is the
x-axis, the height is the
y-axis, and the plate’s lower left corner is the origin of the
x,
y coordinate system. Suppose that
is a set of
n rectangular pieces, and
,
, where
represents the horizontal coordinate of the bottom left corner of the part,
represents the vertical coordinate of the bottom left corner of the part,
represents the width of the part, and
represents the height of the part.
denotes the rotation angle of the part, and
is the rotation angle. To minimize gaps and overlaps between parts and maximize material utilization, rotation angles of 0° and 90° were selected, and
. Therefore, the mathematical model of the two-dimensional rectangular layout problem can be established as follows:
Equation (
1) represents the optimization objective function for a rectangular layout, which is the ratio of the area occupied by the parts on the master plate after placement. Equation (
2) indicates that the parts should not exceed the boundary range of the master plate when placed. Equation (
3) represents that there should be no overlapping between the placed parts. Equation (
4) indicates that the parts can be rotated by 90°.
3. Layout Strategy
Since the parts for bridge materials are cut from steel plates, the layout needs to facilitate the subsequent cutting processes. Therefore, in this study, the “one size fits all” layout strategy was applied. The basic idea of this algorithm is to cut through the entire plate along the layout path from one end of the plate to the other during each cutting process. This method is called “one size fits all” because it uses the same direction at each cutting stage to ensure that the entire plate is cut while meeting the process requirements. We call cutting in the same direction a stage.
In the actual production process, in order to improve the efficiency, the cutting process is usually divided into three or four stages. To achieve this, the three-stage precise nesting and the three-stage non-precise nesting methods are commonly used as cutting strategies.
Figure 1 and
Figure 2 illustrate these two nesting methods. In these diagrams, rectangles with numbers represent parts, where the same number indicates parts of the same size. The vertical lines outside the rectangles represent cuts, with different numbers denoting different cutting stages. The arrows of different colors represent different stages. During cutting, we refer to cuts in the same direction as one stage. In the three-stage precise layout method, square pieces can be cut to an accurate size within three stages. This method ensures a high production efficiency while meeting specification requirements as closely as possible. In the non-precise method, an additional fourth stage of cutting may be required for some square pieces to meet the specification requirements.
The “one size fits all” layout strategy not only considers the process requirements and production efficiency but also focuses on meeting product specifications. When preparing materials for steel bridges, manufacturing companies choose an appropriate cutting stage and layout method according to specific requirements to achieve the best production results. This integrated approach to process and specification provides greater flexibility in the production process to accommodate different types of products and their requirements.
Due to the difference in the number of stages, different authors use different names for each stage.
Figure 3 shows specific details of the key stage modules. During the actual cutting process, the initial cut can be made along either the long or short side.
Figure 3 illustrates an example perpendicular to one of the sides.
In taking the three stages of the cutting process as an example (see
Figure 3), the first stage involves horizontal cutting to generate modules that we call stripes. The steel plate is divided into Stripe1 and Stripe2 along the red lines. The second stage involves vertical cutting to generate modules called stacks. For example, Stripe1 is further cut along the blue lines to form Stack1, Stack2, and Stack3. The third stage involves horizontal cutting to generate modules we call items. For instance, Stack1 is further cut along the black lines to form Item1, Item2, and Item3. The cutting process in these three stages facilitates the subsequent cutting of parts for preparing material for steel bridges.
The layout used in this study was a three-stage non-precision layout, which can be described as follows: n rectangular parts of different sizes, with a quantity , are placed without overlapping onto a rectangular motherboard S with width W and an unlimited height. Under the condition that the “one size fits all” constraint is met, the height H of the board is minimized, thereby maximizing the utilization rate of the motherboard.
The following constraints must be met during the placement of rectangular parts onto the motherboard:
- (1)
Different rectangular parts and must not overlap each other;
- (2)
The rectangular piece must be inside the motherboard S;
- (3)
The highest point of the rectangular part cannot exceed the height of the stripe where it is located;
- (4)
The width of the rectangular piece cannot exceed the width of the stack;
- (5)
Parts of the same type in the same stripe must have the same rotation angle.
Assume that the width direction of the rectangular motherboard S is the x-axis, the height direction is the y-axis, the lower left corner of the board is the origin of the x, y coordinate system, and the motherboard S is divided into multiple stripes. indicates n rectangular parts, where their arrangement has been optimized; they only need to be arranged in sequence. , , where represents the coordinates of the lower left corner of ; represents the width and height of ; is the rotation angle of , ; and is the number of . The specific process is as follows:
- (1)
Place the first
in the bottom left corner of Stripe1; the width of the first stack, Stack1, in Stripe1 is the same as the width of
, and the height of Stack1 is equal to the height of Stripe1. Then, the remaining
parts, denoted as
, are sequentially placed into Stack1. As shown in
Figure 4, during the queuing process, when the remaining height of Stack1 cannot accommodate
, then
will be queued into the next stack Stack2, and the width of Stack2 is the width of
.
- (2)
As shown in
Figure 5, if all parts of
are arranged without exceeding the height of Stack1,
will be placed there. First, it is determined whether the width of
is greater than the width of Stack1. If the width of
is not greater than the width of Stack1, then
will be placed in Stack1. Similarly, when the remaining height of Stack1 cannot accommodate
, then
will be placed in the next stack, Stack2, and the width of Stack2 is the width of
. If the width of
is greater than the width of Stack1, then
is arranged in Stack2, and the width of Stack2 is the width of
.
- (3)
As shown in
Figure 6, parts are arranged in sequence according to the above two steps. When the remaining width of Stripe1 cannot accommodate more parts, the parts are arranged into Stripe2, and the height of Stripe1 is updated. The height of Stripe1 is the highest point in Stripe1. All the parts are arranged according to the above steps.
4. Hybrid Genetic Algorithm
(1) Basic principles of the genetic whale algorithm
The genetic whale algorithm proposed in this article combines the genetic algorithm with the whale optimization algorithm. Its fundamental principle is utilizing the genetic algorithm (GA) as the outer loop and integrating the whale optimization algorithm (WOA) into the GA. This design aims to make full use of the global search capability of the GA and the local search capability of the WOA to avoid falling into the local optimal solution during the search process. This enables the genetic whale algorithm to more effectively uncover the optimal solution on a global scale and to fully exploit the global search capabilities of the GA. During the entire algorithm operation, the GA not only dominates the outer loop but also incorporates the WOA, so the two work together to significantly improve the efficiency of the final solution. Therefore, the genetic whale algorithm is initiated from a randomly generated or a customized initial population. In each cycle, the individuals of the population are selected and crossed, the whale hunting process is then added, and finally, the mutation process is performed; the above is then repeated. A fixed number of iterations is used while monitoring the convergence of the objective function and the diversity of the population. The loop is terminated when any condition is met to obtain the optimal solution. The basic steps of the genetic whale algorithm are shown in
Figure 7.
(2) Initialize the population
In this algorithm, the quality of the initial population directly affects its search performance. The initial population should have a certain diversity and should also meet the constraints of the problem. On the basis of conventional layout constraints, as shown in
Figure 8, this study introduced “stripe” as a height-limiting factor, employing a random generation method. In the population initialization stage, the stripe height is randomly generated after the part sequence is randomly generated. The stripe height is determined using a random generation range based on the size of the parts and the width of the plate in the actual problem. The sequence of parts and the height of the stripe together form an individual. The number of stripes should be slightly larger to ensure that all parts can be arranged. As shown in
Figure 8, the numerical values in the sequence of previously placed parts represent the part numbers. A positive value indicates that the part’s rotation angle is 0°, while a negative value indicates that the part’s rotation angle is 90°. The numerical values in the sequence of stripe heights represent the heights of each stripe.
The initialized stripe height cannot be the final stripe height. Just as the parts are arranged in the sequence, the height of the stripe needs to be optimized through the crossover and mutation of the algorithm.
(3) Fitness function calculation
In the layout problem studied in this study, the fitness was the final utilization rate of the motherboard. The design of the fitness function is as follows:
Here, represents the sum of the areas of all discharged parts, W is the width of the motherboard, and L is the final length after all parts are arranged on the motherboard. The larger the , the higher the utilization rate and the better the layout effect. Since the width W of the motherboard is a fixed value, we can also regard L as the adaptation value. The smaller the L, the higher the adaptation value.
(4) Select operation
This study used the roulette selection method to select individuals. In this process, the cumulative fitness value of all individuals is first calculated (the cumulative fitness value of the
ith individual is
), and then a random number
is generated. When
, the
ith individual is selected, and the probability of each individual being selected is
.
(5) Crossover operation
The two-point crossover method was selected here. Two crossover points are selected based on the crossover probability. The crossover points of the two parent chromosomes are the same, and the genes at the two crossover points of the two parent chromosomes are swapped. When the number of parts is
N and the crossover probability is
P (
), an integer
a is randomly generated as the first intersection point
, and the other intersection point
b is
. Since the nodes of the chromosomes in this article represent the order in which the parts are arranged, the sequence numbers of the two nodes cannot be the same, so during the crossover process, each sequence number needs to be exchanged according to the corresponding position of the other chromosome. Only the stripe heights at the intersection points need to be exchanged in the individual during the crossover stage. This process is illustrated in
Figure 9, where parts in the input sequence are swapped according to the blue arrows, exchanging the positions of part numbers. The heights in the stripe height sequence are swapped at the crossover positions.
(6) Mutation operation
As shown in
Figure 10, in the problem studied in this study, since the encoding values in the part input sequence represent the part numbers, each part needs to be placed onto the master plate. Therefore, the gene values cannot be repeated. We chose to randomly exchange two gene positions to perform the mutation operation. In the stripe height sequence, a random gene value is altered.
(7) Whale hunting
In the whale hunting stage, some ordinary individuals need to be moved closer to the optimal individuals, and some positions of ordinary individuals need to be changed into the corresponding positions of the optimal individuals, as shown in
Figure 11.
5. Experiment
To further validate the proposed algorithm’s effectiveness in solving real-world layout problems and to enhance the algorithm’s performance, we used the test case from reference [
14] as Experiment 1. This case includes eight types of parts, totaling 131 pieces, and the width of the master plate was 2000 cm. The part information is shown in
Table 1.
In reference [
14], three different algorithms were tested and compared using this case study. These three algorithms are the maximal rectangle algorithm, greedy algorithm, and simulated annealing algorithm. To evaluate the results of this experiment, the test results of our algorithm were compared with those of the algorithms in reference [
14].
Table 2 shows the test results of each algorithm.
As shown in
Table 2, the layout generation time of the algorithm in this study is longer than those of the maximal rectangle algorithm and the greedy algorithm in reference [
14], but shorter than that of the simulated annealing algorithm. However, the layout utilization rate is 98.12%, which is higher than those of the other three algorithms.
To further validate the effectiveness of the algorithm in solving real-world layout problems during the preparation of material for steel bridges, we conducted Experiment 2 using a set of real preparation data from an enterprise. There are 14 types of parts, comprising 266 pieces in total. The detailed data are shown in
Table 3.
To evaluate the performance of the genetic whale algorithm, experiments were conducted using this algorithm, and the results were compared with the results from using the whale optimization algorithm (WOA) and genetic algorithm (GA). Each experiment was repeated 10 times, and the experimental data are shown in
Table 4.
From
Table 4, it can be observed that the average utilization rate of the genetic whale algorithm is 97.45%, which is 2.33% and 3.29% higher than the average utilization rate of the whale optimization algorithm (WOA) and genetic algorithm (GA), respectively. Moreover, in the 10 experiments, the highest utilization rate for the genetic whale algorithm was 99.18%, which is sufficient to prove its effectiveness.
Figure 12 shows the optimal layout results.
6. Conclusions
In this study, we delved into the fundamental theory of the two-dimensional layout problem, developed a mathematical model for the rectangular layout problem, explored a strategy to solve the layout problem, and considered the impact of the height limit. We integrated the genetic algorithm with the whale optimization algorithm to address layout problems, generating the genetic whale algorithm, and introduced a coding method to optimize part sequencing on the motherboard. According to the experimental data, the average utilization rate of the genetic whale algorithm is 97.45%, which is 2.33% and 3.29% higher than the average utilization rate of the WOA and GA, respectively. Compared with the other two algorithms, it can obtain better results. Our algorithm’s highest utilization rate is 99.18%, demonstrating that it can effectively solve the layout problem under the studied constraints. The genetic whale algorithm generates better quality solutions than the genetic and whale algorithms.
In employing advanced layout algorithms and fully automated, intelligent equipment, the production efficiency and precision of steel cutting and material preparation can be enhanced, significantly reducing steel wastage, lowering material costs, and improving project efficiency. Through comparative experiments, the effectiveness and practicality of the algorithm proposed in this paper were demonstrated, providing valuable insights for future implementations of thhe automated preparation of materials for steel bridges.