#### Abstract

The prefabricated construction industry has entered a new stage of development with the support of national policies. In order to solve the optimal scheduling problem of transportation vehicles in urban multi-prefabricated component factories, in this study, the aggregation optimization algorithm is introduced, and a new hybrid optimization algorithm is designed and improved, that is, the improved hybrid difference firefly algorithm (IHDFA). On the basis of fully considering the transportation cost and road traffic impedance, the prefabricated component factory constructs a linear programming model with the shortest transportation path and the lowest comprehensive cost as the main goal to reasonably plan the driving arrangement of transportation vehicles. Finally, the IHDFA algorithm is applied to a specific example and compared with the genetic algorithm, firefly algorithm, differential evolution algorithm, particle swarm algorithm, and hybrid differential firefly algorithm. The results show that the IHDFA proposed in this study effectively reduces the comprehensive transportation cost of prefabricated components, which verifies the practicability and effectiveness of the optimization model and algorithm.

#### 1. Introduction

With further development in China’s reform and opening-up policy, rapid urbanization, sustainable development of the construction industry, and improved living environment with enhanced life standard have become increasingly prominent [1]. The construction industry is one of the most important industries in China and plays a major role in promoting the steady growth of the national economy [2]. However, conventional cast-in-place or masonry structures are still the main modes of urban housing construction in China, which have various disadvantages including high energy consumption, increased pollution, low production efficiency, several safety concerns, long construction period, and inadequate use of technology [3]. The existing construction mode has been unable to meet the requirements of modern urbanization development, green energy conservation, and environmental protection proposed by the government [1]. Prefabricated buildings have benefits of low energy consumption, environmental protection, convenience, and a high degree of industrialization, which is the inevitable trend in the development of the global construction industry; this has developed to a relatively mature stage in Europe, the United States, and other developed countries [4]. However, the development of prefabricated buildings in China is relatively slow, and there is a lack of appropriate industry standards and building systems suitable for China’s local conditions. A significant gap still exists in building industrialization [5, 6]. Recently, the Chinese government has started to issue and formulate a series of policies, such as guidelines for the development of prefabricated buildings, the 13th five-year plan of action for prefabricated buildings, and building evaluation standards. These policies are aimed at guiding and implementing the assembly building construction mode for upgrading the construction industry [3]. In 2016, the State Council proposed that in the next ten years, approximately 30% of new construction should be prefabricated buildings in China. In 2020, the newly started assembly buildings in China were 630 million square meters, increasing 50% over 2019, accounting for 20.5% of the newly built building area. It is anticipated that by 2025, assembly building will account for more than 50% of newly constructed buildings [1].

Prefabrication is a construction process in which prefabricated concrete components are produced in factories and then transported to construction sites through large vehicles. The prefabricated components are erected in place by assembly technology for connection point construction [7]. The transportation of prefabricated building components is mainly the transportation of bulk goods. The transportation of components adopts the self-supporting distribution mode of prefabrication factory, in which the transportation cost is approximately 50–60% of the logistics cost, and the high transportation cost is one of the main reasons restricting the development of prefabricated buildings [8, 9]. At present, the scheduling scheme of prefabricated components mainly depends on the experience of managers and lacks a scientific and efficient management model [10]. When the number of prefabricated construction sites is large and the demand for prefabricated components is substantially high, it is difficult to ensure the timely arrival of prefabricated components and effective control of transportation costs by relying on personal experience. To effectively reduce the inventory and logistics costs, improve the supply chain environment of prefabricated components, and achieve environmental benefits, it is necessary to establish several prefabricated component factories in cities, scientifically and reasonably plan the component transportation service scope according to the transportation distance, and then use artificial intelligence algorithms for a scheduling scheme as an effective method of highly unifying social and economic benefits [11, 12].

Prefabricated components will produce a large amount of transportation energy consumption in the process of transportation services. According to the annual report released by the European Environment Agency, 72% of the energy consumption of the global transportation sector comes from road vehicles [13, 14]. Therefore, ways to reduce transportation energy consumption in the process of component transportation are a significantly important role in the development of “green buildings” [15, 16]. The prefabricated components for the prefabricated buildings must be produced in strict accordance with the production plan [17]. Otherwise, it will lead to significant delays in the construction schedule and huge economic losses. In addition, the construction sites have very strict requirements for the delivery time of components; therefore, it is necessary to impose monetary penalties on the delivery vehicles in advance and delayed arrival, to urge the prefabricated component factory for delivering on time, and ensure that the prefabricated buildings are constructed as per schedule according to the production plan [18].

The rest of the article is organized as follows: first, a detailed review of the vehicle routing problem with a time window (VRPTW) is presented in Section 2. Then, we introduce the problems, symbols, and variables to be considered in the experiment in Section 3 and provide the necessary mathematical expressions. The heuristic method and experimental results are discussed in Sections 4 and 5, respectively. Finally, conclusions are provided in Section 6.

#### 2. Literature Review

The vehicle routing problem (VRP) is a classical combinatorial optimization problem widely employed in several fields [19, 20]. In 1959, American scholars Dantzing and others described the VPR as having multiple transport vehicles, and several loading, and unloading points. Through proper planning of the transport vehicles, the problem can be described as passing through the loading and unloading points in a certain order on the premise of meeting a series of constraints (load, demand, transportation time, etc.) and achieve certain goals, such as the minimum or maximum distance, time, and cost [15, 21]. In an actual transportation process, the distribution of several goods needs to have specific time requirements to complete the transportation service between the earliest and latest time specified by customers, thus forming a time window [22, 23]. Therefore, the transportation vehicle routing problem becomes a VRPTW [24, 25].

Considering the vehicle optimal scheduling problem with time windows in urban multidistribution centers, the swarm intelligence optimization algorithm has certain benefits in solving such problems and provides new ideas and methods for optimal scheduling problems. Recently, scholars have made various explorations [26, 27]. Several researchers designed and improved an intelligent water drop algorithm [28]. The application example shows that the improved algorithm can effectively reduce the cost of such green vehicle problems, thus reducing the carbon emissions of vehicles in the transportation process and achieving the purpose of reducing the environmental pollution. Chang et al. proposed a discrete differential evolution algorithm to fully consider resource constraints and designed a local search method based on exchange and a continuous work penalty mechanism to obtain the globally optimal solution [29]. Ren et al. proposed an adaptive genetic algorithm, which uses a user-defined crossover operator to address the mathematical model. They demonstrated the influence of road characteristics and distance on the optimal allocation path through simulation [12]. Rosić et al. proposed an adaptive firefly differential evolution (AHFADE) algorithm based on the firefly differential evolution algorithm to solve the maximum-likelihood estimation problem effectively. The simulation results were compared with the existing algorithms, and it was observed that the proposed AHFADE algorithm had strong robustness in a high noise environment [30]. Tung et al. proposed a heuristic program composed of construction and advanced phases to solve vehicle routing and scheduling problems. The experimental results showed that the proposed heuristic algorithm has good performance in terms of solution quality and computing time [22]. Mohamed et al. proposed two new mutation strategies based on differential evolution algorithm, which enhanced the exploration and convergence ability of the algorithm [31]. Cheng et al. proposed a new variation of DE to reduce the variation strategy of randomness in search direction and improve the search capability of the algorithm [32].

In summary, the existing research mainly focuses on algorithm improvement and other aspects to carry out related research. It has a deep theoretical foundation, but the following deficiencies still exist: (1) owing to the particularity and complexity of prefabricated components in the transportation process, existing research focuses on the “one-to-many” network transportation mode in which one prefabricated component factory serves multiple construction sites; little attention has been paid to the distribution relationship between multiple factories and construction sites; (2) only the cost of waiting for unloading and penalty cost of not meeting the time window requirements are considered. The increased cost due to urban traffic congestion and environmental, climate, and human factors is ignored; (3) currently, several researchers are working on the vehicle routing problem with soft and hard time window constraints, energy consumption cost, traffic jam, and other factors; however, there are relatively few investigations on comprehensive optimization problems that combine the two for multiobjective research.

Considering the shortcomings, this study aims at investigating the actual supply-demand relationship between the construction sites and prefabricated component factories. In this study, the urban multi-prefabricated component factory was considered the research object. The research contents include are as follows:(1)To achieve the goal of reducing energy consumption and total cost as goal, through qualitative and quantitative analysis considering the soft time window, energy consumption, and urban road traffic impedance, this study established a model of vehicle transportation cost, energy consumption, and total cost. In addition, a multiobjective mathematical model of vehicle transportation scheduling scheme based on vehicle transportation cost, waiting time cost, and delay penalty cost was established.(2)The multiobjective aggregation optimization simplified the complex problem, and the traditional DE and FA are effectively combined. On this basis, an improved hybrid difference firefly algorithm (IHDFA) was proposed to solve the objective function.(3)The results are compared with other heuristic algorithms to provide the lowest cost transportation vehicle scheduling scheme for the prefabricated component factories. Through an example application, the practicability and superiority of the IHDFA are verified, and an effective solution and scientific basis are provided for the optimal scheduling of prefabricated component vehicles for the relationship of urban complex network.

Compared with the existing research, this study mainly has the following two innovations and contributions. (1) *Content Innovation*. This study focuses on the transportation optimization model of multi-prefabricated component factories in the city; secondly, in the analysis process, according to the road traffic flow and other data, the road resistance function is added, which can simulate the real situation of the transportation process of prefabricated components; finally, an intelligent optimization algorithm is designed and improved to solve the problem. (2) *Method Innovation*. For the problem that the standard firefly algorithm is easy to fall into local optimization, on this basis, the difference mechanism is introduced to enhance and maintain the diversity of the population; the following and adjacent search mechanism is introduced in the solution process to effectively ensure the local optimization ability of the algorithm; finally, the spiral search mechanism is introduced to better balance the global detection ability and local search ability of the algorithm.

The structure of this article is as follows: Section 3 describes the transportation of prefabricated components, determines the research object, and establishes the objective function on the basis of the minimum comprehensive cost; Section 4 describes and designs the experimental method of this research; in Section 5, the case in the actual project is simulated, and the experimental results are analyzed and discussed; Section 6 draws the main research conclusions.

#### 3. Problem Description and Assumptions

##### 3.1. Problem Description

Several prefabricated component factories are built around the city to satisfy the increasing supply-demand of prefabricated components on construction sites. The specific problems are described as follows:(i)The number of prefabricated component factories in the city is *a* = {1, 2, 3, …, *A*}, which is responsible for providing prefabricated component production and transportation services for the construction site *j* = {1, 2, 3, …, *N*}, and the distance and demand are known.(ii)The number of vehicles available for deployment in the prefabricated component factory is *K*_{j} (*j* = 1, 2, 3, …, *N*). The demand for components in each transportation site is *G*_{j} (*j* = 1, 2, 3, …, *N*). The required weight of ingredients for each construction site is greater than the maximum carrying capacity of each vehicle, and the time of delivery needed window is (*ET*_{j}, *LT*_{j}). If the arrival time of transport vehicles is not within the time window, they will be subject to certain economic penalties.(iii)According to the order requirements of different construction sites, the prefabricated component factory assigns vehicles to transport prefabricated components from the factory to the designated location. The prefabricated component factory needs to make careful consideration and a reasonable decision on the transportation vehicles, transportation sequence, and transportation scheme.

Under the constraints of maximum load capacity and on-site delivery demand, the inclusive transportation cost (including transportation, waiting for unloading, and penalty costs) of prefabricated components in all prefabrication plants is minimized.

In the research of road impedance function, the road resistance function model proposed by the Federal Highway Administration (FHWA)—Bureau of Public Roads (BPR)—is a conventional method [33]. In the transportation and distribution of prefabricated components, the road impedance function is expressed as follows:where *t* is the travel time of the road segment (min); *t*_{0} is the travel time of the road section when the traffic volume is zero (min); *m* is the amount of motor vehicle traffic in the driving section (vehicle/h); *n* is the actual capacity of motor vehicles on the road section (vehicles/h); and *α* and *β* are undetermined parameters, considered 0.15 and 4, respectively [33].

In the transportation of prefabricated components, the conventional time calculation method (*t* = *d*/*s*) does not apply to the traffic conditions for some large cities where vehicles drive on urban trunk roads, and the streets are equipped with isolation facilities for motor and nonmotor vehicles. Therefore, the impedance function ignores the interference of nonmotor to motor vehicles, which is consistent with the actual situation of urban road mass transportation.

##### 3.2. Problem Assumptions

To facilitate the research problem and the establishment and solution of the model, the following assumptions were considered:(1)The prefabricated component factory has a certain number of transport vehicles of uniform specifications and models, with carrying capacity *Q.* The number of vehicles available for deployment can meet the transportation requirements of all construction site.(2)The prefabricated components are all manufactured in advance, and all transport vehicles can be loaded directly.(3)The prefabricated components are distributed according to the selected route, and there is no loss of prefabricated components during transportation.(4)All construction sites require different types and quantities of components *G*_{j}*.*(5)The impact of traffic impedance on delivery time during component transportation is considered while ignoring unforeseen factors such as weather, environment, and manufacturing factors.(6)To ensure the continuity of transportation vehicles, the vehicles immediately return to the original road after unloading and continue the next round of transportation. The parameters involved in the proposed model are described in Table 1.

##### 3.3. Parameter Derivation

According to the transportation process of prefabricated components, a brief description of the transportation process of prefabricated components on a construction site is given. The prefabricated component factory *a* has *K*_{a} transportation vehicles that can be deployed to carry out *k*^{th} component transportation on the construction site *j* according to the formulated plan [34]. The time node process of prefabricated component vehicle transportation is shown in Figure 1:

According to the transportation process of prefabricated components, the above parameters are deduced as follows:(1)The time *AT*_{ajk} when the *k*^{th} vehicle of factory *a* arrives at the construction site *j* is expressed as(2)If the arrival time of the *k*^{th} transport vehicle at the construction site *j* is earlier than the departure time of the (*k*-1)^{th} transport vehicle, it needs to wait. The waiting time is as follows: When *DT*_{ajk-}―*AT*_{ajk}―*UT*_{ajk} > 0, it indicates that when the *k*^{th} vehicle arrives at the construction site *j*, the (*k*-1)^{th} vehicle has not been unloaded, and the waiting time for unloading is *DT*_{ajk-1}―*AT*_{ajk}―*UT*_{ajk}, whereas when *DT*_{ajk-1}－*AT*_{ajk}－*UT*_{ajk} ≤ 0, the (*k*-1)^{th} vehicle has already left the construction site, and the waiting time for unloading is zero.(3)The constraint time *ET*_{ajk} for the *k*^{th} delivery service exceeding the soft time window can be expressed as follows: When *AT*_{ajk} > *LT*_{j,}*AT*_{ajk} *<* *ET*_{j}, it indicates that the time when the transport vehicle arrives at the required construction site *AT*_{ajk} does not meet the constraints of soft time window (*ET*_{j}, *LT*_{j}) and the prefabricated component factory bears the economic penalties because of the delivery delay; when *ET*_{j} ≤ *AT*_{ajk} ≤ *LT*, it indicates that the time when the transport vehicle arrives at the required construction site *AT*_{ajk} meets the constraints of the soft time window (*ET*_{j}, *LT*_{j}) and the prefabricated component factory does not bear the economic penalty caused by the delay in transportation.(4)The time when the *k*^{th} transport vehicle returns to the factory can be expressed as

##### 3.4. Mathematical Model

###### 3.4.1. Decision Variables

*x*: when the *k*^{th} component transportation of the construction site *j* is delivered by the vehicle *i* of the prefabricated component factory *a*, *x* = 1; otherwise, *x* = 0.

###### 3.4.2. Objective Function

(i)Transportation cost Transportation cost (*C*_{t}) indicates the cost incurred by the vehicle for delivering the components to the required site and returning to the factory. It mainly comprises a series of direct costs incurred due to vehicle transportation, such as vehicle loss, transportation labor costs, vehicle depreciation, and vehicle energy consumption. It can be divided into fixed and variable costs as follows:(ii)Time cost of waiting for unloading After the arrival of the transport vehicle at the required site, waiting in line to unload the prefabricated component (*C* ) results in waste of resources, such as idle personnel and vehicles, and may cause failure in meeting the time requirements of other construction sites and the loss of reputation. Therefore, certain monetary penalties should be imposed. The waiting time cost is expressed as follows:(iii)Penalty cost Early arrival of transport vehicles may disrupt the planning and arrangement of the construction site. The delay of transportation vehicles will lead to the delay of construction progress, so the prefabricated component factory needs to accept the economic claim of the construction party, that is, penalty cost (*C*_{p}), which is given as

Therefore, the objective function undertaken by the prefabricated component factory can be expressed as follows:

###### 3.4.3. Restrictions

Equation (10) indicates that the departure time of two adjacent vehicles is greater than the loading time of the transportation to ensure that the vehicle is loaded; equation (11) provides that at least one vehicle is available for deployment in the prefabricated component factory, and equation (12) indicates that the carrying capacity of all vehicles delivered can meet the needs of all construction sites.

#### 4. Experimental Method

##### 4.1. Division of Experimental Phases

The vehicle scheduling problem of multiple prefabricated component factories in the city has complex network relationships as well as several influencing factors and requires a large degree of calculation. For simplification, the transportation problem of multiple prefabricated component factories was transformed into the transportation problem of a single prefabricated component factory, thereby reducing the difficulty of solving the model. To achieve this goal, the concept of merge optimization algorithm (MOA), namely “target aggregation, target solving and target optimization,” was used in this study.

The hybrid algorithm for optimal scheduling proposed in this study can be divided into two stages: In the first stage, the idea of “aggregation” was employed to cluster the prefabricated component factories and construction sites according to their distances. It was divided into the nearest prefabricated component factory to complete the transportation of prefabricated components so that the complex multidepot vehicle routing problem with time window (MDVRPTW) can be decomposed into multiple instances of relatively simple single depot vehicle routing problem with time window (SDVRPTW) to achieve the simplification of the model. In the second stage, based on the IHDFA to solve the combined single prefabricated component factory transportation problem, the departure time and transportation cost of each prefabricated component factory were determined and the optimal global solution set of the MDVRPTW model, which significantly reduces the solution time and improves the efficiency of the algorithm, was obtained. The hybrid optimization algorithm solution is shown in Figure 2.

##### 4.2. Merge Optimization Algorithm

Several scattered construction sites were merged into the transportation scope of a prefabrication component factory through the idea of aggregation. That is, MDVRPTW was converted to SDVRPTW, which realized the simplification of complex issues. However, the distance difference between certain construction sites and multiple prefabrication factories was not evident in actual problems. Therefore, it was impossible to judge which factory should deliver the components through a short distance. Therefore, the marginal coefficient (*L*_{j}) concept was introduced, which is the ratio of the distance between the construction site and nearest prefabrication factory to the distance between the construction site and the next nearest prefabrication factory. When the marginal coefficient was small, indicating that the distance to a prefabrication factory has evident benefits, the construction site was directly divided into the transportation scope of the prefabrication factory. In contrast, when the marginal coefficient was large, it indicates that the gap between the two was not evident; the construction site was included in a set of edge points. Therefore, the edge threshold (*φ*) was introduced and considered the boundary and employed as the dividing standard. If the edge coefficient was less than the threshold, it was directly divided into the nearest factory. Otherwise, it was combined with edge points. The aggregation optimization algorithm implementation flowchart is presented in Figure 3.

The specific design procedure of the MOA was as follows.

*Step 1. *Calculate the distance between each construction site and the prefabricated component factory to form a distance matrix *D* *=* {*d*_{ij} |*i* *=* 1, 2, 3, …, *N*; *j* *=* 1, 2, 3, …, *M*}.

*Step 2. *Calculate the edge coefficient *L*_{i} = *d*_{ij1}*/d*_{ij2}, where *j*_{1} and *j*_{2} are the prefabricated component factories closest and next to the construction site, respectively.

*Step 3. *Set as the edge value threshold (*φ*), if *L*_{i} ≤ *φ*, the construction site *i* is considered the nonedge point of the factory *j*_{1}. Otherwise, construction site *i* is considered the edge point of the factories *j*_{1} and *j*_{2.}

*Step 4. *The nonedge points are divided into the service scope of the nearest prefabricated component factory in turn to form the construction site point set *M* *=* {1, 2, 3, …, *m*}, and *m* is allocated to the nearest prefabrication factory.

*Step 5. *The construction site of each edge is constructed as the set of edge points *N* *=* {1, 2, 3, …, *n*}. First, the nonedge point set is divided. After the nonedge construction site is allocated nearby, the distance between each edge point and the construction site in the finished nonedge point collection *M* is calculated in turn.

*Step 6. *Compare each distance value, and divide the original nonedge point to the nearest edge point set *M* to complete the division of the required construction site.

##### 4.3. Firefly Algorithm

The firefly algorithm (FA) is based on the movement of fireflies in nature. It is a meta-heuristic algorithm proposed by Professor Xin-She YANG of Cambridge University in 2008 [35]. The algorithm is mainly based on the following characteristic to achieve optimization: “In the entire search space, individual fireflies with high absolute brightness attract fireflies with low absolute brightness.” It is an intelligent heuristic optimization algorithm based on group search. It has the characteristics of high calculation efficiency, few setting parameters, high optimization precision, and fast convergence speed. The specific parameters are expressed as follows:(1)The relative brightness of firefly *i* to *j* can be described as a monotonically decreasing exponential function of the distance as follows: where *I*_{i} is the original light intensity at the source (i.e., at the distance *r* = 0) and is the light absorption coefficient and *r*_{ij} represents the space distance from firefly *i* to *j*.(2)The light attraction coefficient between individual fireflies can be defined as *β*_{ij}*.* where _{0} is the original light attractiveness at *r* = 0.(3)For two fireflies *x*_{i} and, these can be updated as follows: where *x*_{i} (*t*) and *x*_{j} (*t*) indicate the positions of fireflies *i* and *j* in the *t* generation, respectively; *a* is the step size; and *rand* is a random number uniformly distributed in [0, 1].

In the present study, we considered *β*_{0} = 1, *α* [0, 1], and *γ* = 1 [36].

##### 4.4. Differential Evolution

Differential evolution (DE) is an optimization algorithm based on population evolution. It first generates an initial population with a scale of *NP* (number of individuals in the population) and spatial dimension of *D*. The individual is *x*_{i} = [*x*_{i,1}, *x*_{i,2}, *x*_{i,3},…, *x*_{i,j}], where *i* = 1, 2, 3, …, *NP* and *j* = 1, 2, 3, …, *D* [37, 38]. The DE algorithm mainly comprises the following three steps.

###### 4.4.1. Mutation Process

The mutation operator plays a vital role in the evolution process. Three individuals *X*_{r1}(*G*), *X*_{r2}(*G*), and *X*_{r3}(*G*) are randomly selected from the DE population. The mutant individuals are presented in equation (16) as follows:where *V*_{i} (*G*+1) is the mutated individual, *X*_{i} (*G*) represents the *i*^{th} individual in the *G*^{th} generation population, *r*_{1}, *r*_{2}, *r*_{3} ∈ {1, 2, 3, …, *NP*} and *i* ≠ *r*_{1} ≠ *r*_{2} ≠ *r*_{3}, and *F* is the scaling factor between [0, 1] [39].

###### 4.4.2. Crossover Process

The *G* generation population {*X*_{i} (*G*)} and its mutated intermediate {*V*_{i} (*G*+1)} were crossed among individuals. The individual after the crossover can be defined as follows:where *j* = 1, 2, 3, …, *D*, *D* is the dimension of space, *rand* [0, 1] is a random number uniformly distributed in [0, 1], the crossover rate *CR∈* [0*,* 1] is a predefined rate, and *jrand* is a randomly generated integer in [0, *D*]. Thus, if and only if *rand* [0, 1] ≤ *CR* or *j* *=* *jrand*, then the binomial crossover operator copies the *j*^{th} variable of mutant vector *V*_{i} (*G*+1) to its corresponding element in the trial vector *U*_{i} (*G* + 1). Otherwise, the parameter is inherited from the related target vector *X*_{i} (*G*) [30].

###### 4.4.3. Selection Process

The selection operation determines the evolutionary direction of the entire population, and the greedy strategy is used to select the individuals entering the next generation. By comparing the fitness values of *U*_{i} (*G*+1) and *X*_{i} (*G*), the smaller individuals are selected as the offspring for the next generation operation. Otherwise, *X*_{i} (*G*) will remain until *U*_{i} (*G*+1) becomes the new individual for the next generation. Therefore, the selection operator can be defined as follows:where *X*_{i} (*G*+1) is the target vector selected for the next generation and *h*(*x*) is the fitness function. The algorithm was repeated until the termination criterion is satisfied.

##### 4.5. Improved Firefly Algorithm with Mixed-Difference Evolution

In the conventional firefly algorithm, the firefly will move toward the brightest firefly in the vicinity and effectively develop the search space. However, it creates confusion in the search direction and is unable to retain the information of the optimal location; thus, the ability of global optimization and local search needs to be improved. Therefore, based on the conventional firefly algorithm, a different mechanism was introduced. A variety of improvement strategies were adopted to enhance the firefly algorithm to solve large-scale optimization problems more effectively.

###### 4.5.1. Improvement Strategy

(i)Differential mechanism of population leader In the conventional FA, the optimization mainly depends on the firefly following the search of other fireflies. Although this updated mechanism can play an optimization effect, it cannot save the optimal solution of each generation, and the objective function will rise in the experiment. Because different fireflies follow different individuals, the search direction of the algorithm is often confused and can easily fall into the local optimum when solving large-scale problems. Therefore, the leader difference mechanism was introduced into the conventional FA to maintain the optimization ability of the algorithm and increase the convergence speed. The individuals with the mutation can be expressed as follows: where *X*_{best} (*G*) is the best individual of *G* generation and *X*_{r1} (*G*) and *X*_{r2} (*G*) are two individuals randomly selected from DE population.(ii)Following and approaching search mechanism In the conventional FA, all individuals follow the brightest one nearby to search, and the brightness of firefly individuals decreases with an increase in distance. The firefly generation moves to the poor individual and cannot effectively use the optimal population information for evolution, resulting in population degradation. Therefore, based on (i), introducing the following and approaching search mechanism can effectively avoid the population degradation of firefly individuals in the evolutionary process. First, the fitness values were normalized as follows: where *fit*_{i} is the fitness value of the current individual. Provided follow-up and adjacent search probability *r* = 0.5, when *S*(*fit*_{i}) < *r*, it indicates that the fitness value of the individual is small, and the follow-up optimal individual search will be performed. Otherwise, it will follow the adjacent brightest individual search, the firefly individual after the updated location can be expressed as follows: where *X*_{i} (*G*), *X*_{best} (*G*), and *X*_{j} (*G*) represent the best and brightest individuals corresponding to *i* and *j* individuals in the *G*^{th} generation population, respectively. *rand* is a random number uniformly distributed in [0, 1], and *β*_{ij} represents the attraction between individual fireflies.(iii)Individual spiral search mechanism To ensure that the algorithm can effectively develop the local search space, the individual spiral search mechanism was introduced to obtain an effective search of the surrounding space. The individual spiral search mechanism is as follows: where *e*^{rand} and sin(2*π* × *rand*) represent the randomness of the search step and direction, respectively.(iv)Selection process Combining (ii) and (iii), by comparing the fitness values of and , the smaller individual is selected as the offspring for the next generation operation. Otherwise, the original individual is specified as the next generation new individual, and the procedure is repeated until the termination condition is met. Therefore, the selection process can be defined as follows:

###### 4.5.2. Algorithm Design Process

In order to better understand the details of the IHDFA, the design steps and flow of an improved hybrid difference firefly algorithm are shown in Figures 4 and 5. The operations of different populations are located in the iterative cycle of the algorithm, and the time complexity takes the individual as the basic unit. Therefore, the final time complexity is the product of the time complexity of population operation and the time complexity of algorithm iteration. In the process of the algorithm design, the time complexity of the algorithm is compared and analyzed. Among them, the time complexity of the IHDFA is the same as that of the GA, FA and HDFA; compared with DE and PSO algorithms, the IHDFA has higher running time cost, but the optimization effect is much better than DE and PSO algorithms. The time complexity is shown in Table 2.

#### 5. Experimental Results and Analysis

This research example is programmed with MATLAB 2019 software and analyzed on the PC side with 3.60 GHz processor, 16GB RAM and Windows 10 operating system. In order to prove the effectiveness and superiority of the IHDFA proposed in this study, three groups of case parameters are selected for simulation, and the experimental results are compared with GA, FA, DE, PSO, and HDFA.

##### 5.1. Experimental Data and Parameter Settings

Taking the component transportation of 3 prefabricated component factories in Xi’an and 12 construction sites around them as an example, a Baidu map was employed to determine the location of the prefabricated component factory and construction site. To understand the construction site’s demand for materials and acceptable time window constraints, the distance between the prefabricated component factory and construction site is shown in Table 3. The demand of the construction site component, quantity, and time window constraints on transport vehicles are presented in Table 4. According to the on-site investigation, the startup cost was *λ*_{1} = 350 yuan per vehicle, the unit transportation cost when fully loaded was *λ*_{2} = 4.8 yuan/km, the unit transportation cost when returning with zero loads was *λ*_{3} = 3.5 yuan/km, the coefficient for the cost of waiting time for unloading of the prefabricated component factory was *λ*_{4} = 2.5, and the unit penalty cost coefficient was *λ*_{5} = 8 as agreed by both parties. The earliest time permitted for delivery at each construction site was 9:00, and the earliest time for the prefabrication factory to be loaded was 8:00. The transport vehicle was a semitrailer with a maximum load capacity of *Q* = 25 tons. The number of vehicles in each factory was six, and the departure interval was 25 min.

##### 5.2. Multidepot Vehicle Routing Problem with Time Window Aggregation Optimization

Using the MDVRP aggregation optimization algorithm, 12 known construction sites were allocated to the transportation services of three prefabrication plants, as shown in Table 5. In order to more accurately verify the superiority of the IHDFA, three groups of different cases are selected for simulation analysis: (i) the actual traffic capacity on the transportation section is 4000pcu/h, the load speed = 55 km/h, and the no-load speed = 60 km/h; (ii) the actual traffic capacity on the transportation section is 4500pcu/h, the load speed = 55 km/h, and the no-load speed = 60 km/h; and (iii) the actual traffic capacity on the transportation section is 4000 pcu h, the load speed = 50 km/h, and the no-load speed = . The round-trip time of component transportation between the prefabricated component factory and the construction site can be calculated by formula (1), as shown in Table 6.

##### 5.3. Experimental Results and Comparison

According to the experimental simulation, the total cost iteration convergence simulation results are shown in Figures 6–8. In case (i), the IHDFA is iterated 119 times, and the optimal total transportation cost is 17468.38 yuan. In case (ii), the IHDFA has 121 iterations and the total optimal transportation cost is 17148.38 yuan; and in case (iii), the IHDFA has 195 iterations and the total optimal transportation cost is 18146.88 yuan. In the three groups of simulation experiments, the IHDFA has higher solution accuracy and faster convergence speed than FA, DE, GA, PSO, and HDFA, followed by HDFA and FA, and PSO is the worst.

In cases (i), (ii), and (iii) through experimental simulation, it can be clearly seen that the total target cost of the IHDFA proposed in this study is the lowest compared with GA, DE, FA, PSO, and HDFA. In addition, in the same case, the vehicle transportation cost and vehicle waiting cost solved by different heuristic algorithms remain basically unchanged, and the delay penalty cost of transportation vehicles changes greatly. In practical engineering application, through the IHDFA. The algorithm is applied to select the optimal transportation vehicle scheduling scheme to minimize the waiting time of transportation vehicles on the premise of meeting the time window requirements of the construction site. The comparative analysis of target cost data is shown in Figures 9–11.

The comprehensive comparison shows that the conventional FA was slightly better than the IHDFA in terms of running time and convergence speed. For selecting the optimal value, the output cost of the IHDFA was lower, and the transportation cost, waiting time, and delay time were reduced. In the transportation management of prefabricated components in urban multi-prefabrication component factories, reducing the transportation cost of prefabricated components is the primary goal of managers. Therefore, in the face of the ever-expanding scale of prefabricated buildings, the production management department can use the models and methods proposed in this study to effectively perform component transportation optimization.

#### 6. Conclusion

First, the clustering optimization algorithm was introduced to simplify the complex network transportation relationship. Second, based on the conventional the FA and DE algorithm, the IHDFA was proposed to solve the optimal scheduling problem of prefabricated components in multi-prefabrication component factories. Compared with the conventional algorithms, the proposed algorithm has the following advantages:(1)In the process of initial population evolution, the differential mechanism was introduced to enhance and maintain its diversity.(2)In the process of solving, the following and near search mechanism was introduced so that some individuals follow the optimal individual search, and the other individuals follow the near particular investigation, which effectively ensures the local optimization performance of the algorithm.(3)The spiral search mechanism was applied to select the individual according to the arbitrary rules to spiral search around itself to ensure the global optimization of the algorithm. Finally, the appropriate individual will enter the next generation to better balance the algorithm’s global detection and local search abilities.

The numerical results show that the IHDFA has certain advantages in searching global optimal solution, stability, and robustness compared with GA, DE, FA, PSO, and HDFA. Based on the performance and practicability of the IHDFA, it provides a good solution in solving optimal scheduling. Since the parameters of the algorithm are determined according to the relevant literature, a single set of parameters and data are used for example solution and analysis, which will have a certain impact on the random selection of the path. Next, the setting of parameters needs further research to achieve better convergence through parameter adjustment.

#### Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This research was supported by the Project of National Natural Foundation of China (Grant number: 71774132) and Shaanxi Provincial Department of Education Service Local Special Plan Project (Grant number: 21JC009).