Intelligent Optimization of Tower Crane Location and Layout Based on Firefly Algorithm

The existing tower crane positioning layout mainly depends on the experience of construction personnel, and the best tower crane positioning can be found through a large number of manual data calculation. This manual method is time-consuming and impractical. In view of this, aiming at the current situation that building information modeling (BIM) software can only obtain the relative coordinates of components, this article puts forward the key technology of importing computer-aided design (CAD) graphics into geographic information system (GIS) software to automatically obtain the world coordinate information. By clarifying the transfer relationship between the component material supply point, the component initial positioning point, and the tower crane optional positioning point, as well as the cooperative relationship between each positioning point and the tower crane operation, the tower crane positioning optimization model is formed, and the firefly algorithm is used to automatically calculate and generate the best positioning layout method of the tower crane on the project site. In this study, the vertical transportation and positioning of components are studied, and intelligent construction is formed by integrating information technology. It can further enrich the functions of perception, analysis, decision-making, and optimization; realize the decision-making intelligence of industrial buildings; and achieve the organic unity of engineering construction execution system and decision-making command system.


Introduction
Tower crane is an essential equipment for the vertical transportation, installation, and positioning of prefabricated components in high-rise residential buildings. Because there are many types of components transported by tower crane, such as prefabricated components, reinforcement, formwork, and scaffold, and the location of material supply is complex, the positioning and layout planning of tower crane in the construction site of high-rise residence is a common construction technical problem. e previous research on the optimal positioning method of tower crane mainly adopts two methods. e first method is to minimize the cross area between tower cranes. Zhang et al. proposed a computer model to optimize the position of a group of tower cranes to determine the minimum crossing area [1]. Irizarry and Ebrahim integrated geographic information system (GIS) and building information modeling (BIM) to determine the location of the minimum crossing area of tower crane [2]. e second method is to minimize the lifting time and cost of the tower crane. Tam et al. and Wilson K. W. Chan proposed the optimization of supply points around tower cranes based on a genetic algorithm [3]. Huang et al. proposed the optimization of tower crane and material supply location in high-rise building site based on mixed-integer linear programming [4]. Lien and Cheng used particle swarm optimization algorithm to determine the location of tower crane considering the optimization of material supply and demand [5]. Sohn et al. developed a stability-based optimal selection and supporting design management method of tower crane and proposed a method to optimize economic feasibility (cost) on the premise of meeting lifting conditions and stability [6]. Orozco et al. corrected the linearization technique [7]. Balcazar et al. compared the proportional integral differential regulator, the first-order sliding mode regulator, and the second-order sliding mode regulator to adjust two different types of mathematical models [8]. In order to find the optimal travel cost of all crane operations in a given time period, Marzouk and Abubakr proposed tower crane type selection decision support based on building information modeling and genetic algorithm [9]. Moussavi Nadoushani et al. proposed an improved crane location optimization model, which not only minimizes the total cost of lifting operation, but also considers the impact of crane location on its required capacity and operation time [10]. Vazirinia and Kaveh compared the effects of enhanced vibrating particle system (EVPs) in solving the actual tower crane layout problem through the performance of particle swarm optimization (PSO) and four newly developed metaheuristic algorithms, collision volume optimization (CBO), enhanced collision body optimization (ECBO), and vibrating particle system (VPS). e results show that ECBO is superior to the other three methods in both cases [11]. Younes and Marzouk tested the impact of conflict between tower cranes, the maximum efficiency of tower crane layout, and quantitatively evaluated the impact of tower crane operation conflict on the total operation time and cost through agent-based simulation (ABS) model [12]. Sebt et al. described the application of GIS technology [13] in construction site planning, including the acquisition of spatial data mainly used in the location optimization of tower crane, and determining the feasible task area according to the location of demand point and supply point and the working radius of crane. e geometry of the construction site is generated by CAD (computer-aided design) tools, which will determine the appropriate combination of tower cranes to optimize the location. e output of the GIS model includes one or more feasible areas covering all demand and supply points, which are then linked to the GIS tool and generate an integrated layer to visualize the optimal location of the tower crane. Wang et al. developed an integrated method combining building information modeling (BIM) and firefly algorithm (FA) [14] to automatically generate the optimal layout plan of tower crane. Zhu et al. also proposed an open source method (OSA) [15], which retrieves the geometric information in IFC through the spatial structure of IFC (i.e., IFC tree) and converts it into shape file by developing automatic polyhedron generation algorithm (AMG). OSA can connect BIM and GIS more stably and efficiently by strengthening the data conversion from BIM to GIS. Dasović et al. used BIM model to  input local coordinates from BIM into excel table and converted local position coordinates into global coordinates according to Croatia map projection reference coordinate system HTRS96/TM [16].
rough the study of the above literature, it is found that the positioning layout of tower crane has gradually changed from manual calculation to intelligent calculation. Most of the research related to tower crane machinery depends on the application of mathematical programming formulas.
ese methods aim to minimize the cost and time of transferring components. However, the main problems of these studies are: (1) there is a lack of research on the method of obtaining coordinates. Some studies use the relative coordinate system, which is contrary to the universal use of the world coordinate system in the construction process. Some articles simply do not provide coordinate data, which raises questions about the authenticity of the calculation. Since the coordinates of component material supply point, component positioning point, and optional tower crane positioning point are closely related to the mathematical model of tower crane operation, the steps and methods of obtaining world coordinates should be studied first. (2) e research on the existing intelligent optimization algorithm has been indepth enough, and articles used to optimize the positioning and layout of tower crane are also common. (3) At present, the output results after the optimization of tower crane positioning and layout mostly adopt the expression of plane graphics, which is the lack of three-dimensional visual expression.
In view of this, this article presents a method of using CAD and GIS integration to obtain coordinate information and establish tower crane positioning and layout system. e specific contributions are as follows: (1) is article puts forward the key technology of importing CAD graphics into GIS software to automatically obtain the world coordinate information. e rest of this article is organized as follows: In Section 2, the method of transforming CAD and GIS into world coordinates are introduced. In Section 3, we provided a case study describing the mathematical model of tower crane operation and the operation steps of firefly algorithm. In Section 4, we show the calculation results of the case in Section 3 and analyze and visually simulate them. Finally, some conclusions are drawn in Section 5.

Conversion of CAD and GIS into World Coordinates.
Geographic information system (GIS) is defined as a system for storing, retrieving, and analyzing geographic reference data. It is a tool for analyzing geographic environment, mainly two-dimensional [24]. CAD is a system for drawing and updating maps. It is a tool for analyzing the internal environment of individual buildings, including two-dimensional and three-dimensional [25].
e coordinate system is a reference system for measuring horizontal and vertical distances on a map [26]. e coordinate system used by GIS is mainly the geographic coordinate system based on longitude and latitude, which is used to evaluate the location of real-world features. e coordinate system used by CAD is usually based on Cartesian coordinate system [27]. e difference between the coordinate systems used in GIS and CAD is that the geographic coordinate system uses longitude and latitude to represent the horizontal and vertical position relative to the center of the earth, while the Cartesian coordinate system uses a set of simpler axes to locate the position relative to any origin. Often, CAD coordinates need to be converted into GIS coordinates [28]. e CAD software developed by Autodesk company can directly obtain the relative coordinates of the project site.
e LocaSpace viewer software [29] developed by Zhongketuxin company can have a good data transfer interface for the DWG format file output by CAD, avoiding complicated data conversion operations. e world coordinates of components can be queried and obtained through the following simple steps. e conversion of material supply points is taken as an example: (1) e CAD general drawing is simplified and unnecessary information is deleted. (2) After selecting the base point of the simplified general drawing and setting the export unit, the wblock command is called to write the whole general drawing into blocks and exported the world coordinate point table.
(3) LocaSpace viewer4 is opened. (4) Clicked on toolbox ⟶ data conversion ⟶ batch conversion of plane coordinates to longitude and latitude. (5) e processed CAD world coordinate excel table is added, the relevant parameters are set, and started the conversion. (6) e longitude and latitude coordinates of the converted material supply point are obtained.

Integration of CAD and GIS.
As today's organizations become more complex and global, there is often a need to promote better decision-making through a variety of graphics and database applications [30]. CAD software allows organizations to view the details of a single drawing, while GIS allows organizations to view multiple sites with less detail [31]. As a decision support system, GIS can explain and solve practical problems in various fields such as land resource management, surveying and mapping, urban planning, market analysis, geology, and hydrology [32]. CAD applications usually focus on design, which is suitable for the scale of buildings or infrastructure engineering, and usually lack the reliable attribute model. Both software have specific purposes, but with the increasing demand for comprehensive planning, design and management of natural resources, and infrastructure assets, it is usually necessary to visualize or analyze internal and external data at the same time, so as to propose CAD/GIS integration, which is realized by developing a seamless interface, which integrates different views into a single world and a single perspective [33]. ESRI (Environmental Systems Research Institute) is currently the largest GIS software developer. eir ArcGIS application ArcMap reads CAD drawings and directly uses DXF files, which is similar to adding GIS layers to CAD systems [34].
Since the DWG file compatible with lsv4 needs to have a coordinate system, the DWG file exported from CAD is projected by using ArcGIS software [35], and the projection and longitude and latitude coordinates are imported into lsv4. e specific steps are as follows: (1) open ArcGIS software, connect to the target folder, add DWG file ⟶ export to SHP format and load layer ⟶ set the required projection coordinate system ⟶ convert to CAD using arctoolbox conversion tool. (2) Select import CAD in lsv4, import the DWG file in Step (1), and add two control points according to the principle of geographic registration. (3) Load CAD into GIS to realize the integration of CAD and GIS. rough this method, the optimal location of tower crane and the actual location of material supply point at the construction site of a residential project will be determined conveniently, quickly, and accurately. e high-rise residential project is located in Hai'an city. e construction section is composed of four 29-storey residential buildings, covering an area of about 12000 square meters and a total building height of 99 meters.
Around the site around the four main residential buildings, a total of 19 material supply points can be provided for stacking and storing prefabricated components, reinforcement, formwork, and scaffolding. ese 19 points are marked as S1, S2,. . ., and S19, respectively, as shown in Figure 1. At the same time, each floor of the residential project can provide 16 preliminary positioning points of components (D1, D2,. . ., and D16) (Figure 1).
After the tower crane transports the components to one of the initial positions, it will unload immediately for the next lifting. e tower crane is only responsible for the initial positioning of components, and the accurate positioning and installation of components is carried out by the on-site construction personnel with auxiliary equipment with more convenient operation and more accurate positioning. e advantage of this operation is to improve the lifting efficiency of the tower crane and shorten the time consumed in the accurate positioning of components. Even for 19 material supply points and 16 initial positioning points of components, there are hundreds of millions of possible combinations due to the need for four tower cranes to operate one-to-one in the middle, and the optimal solution cannot be easily obtained. For attached tower cranes, they Computational Intelligence and Neuroscience are usually placed near fixed structures that do not hinder other construction activities. erefore, the four tower cranes have 10 alternative positions (TC1, TC2,. . ., and TC10). e positioning layout of tower crane obtained by intelligent optimization algorithm will be marked as T1, T2, T3, and T4. Table 1 lists the coordinates of 19 optional material supply points (s) in GIS. Table 2 lists the coordinates of 16 fixed initial positioning points (d) of components in GIS. Table 3 lists 10 optional tower crane positioning layout (TC) coordinates in GIS.

Solution.
Firefly algorithm (FA) was first studied by Xin She Yang of the Engineering Department of the University of Cambridge in 2009 based on the behavior of fireflies. Firefly algorithm is a heuristic algorithm inspired by the flickering behavior of fireflies. e algorithm has many advantages, such as easy to understand, few parameters, and easy to implement, and has been applied in many fields. It has great potential in solving nondeterministic polynomial problems (NP) [36].

Technical Route.
e road map is shown in Figure 2. First, the firefly algorithm sets the objective function; sets the parameters of the problem to be optimized according to the objective function; initializes the position of the firefly; and sets the number of firefly populations, iteration times, initial fluorescein concentration, and maximum and minimum attraction and absorption coefficient. en, the position of fireflies in the space defined by the objective function is initialized, their fluorescein is updated, and a new generation of firefly population is obtained. en, the optional supply point (s), the optional tower crane positioning point (TC), and the fixed component initial positioning point (d) are coded by double-layer coding. e first layer codes the optional supply point (s) for the component initial e calculation for firefly brightness is firefly brightness � (1/objective function), which is equivalent to fitness. e absorption coefficient will be multiplied by brightness to get firefly attraction after sorting. e firefly's position update formula needs to be calculated and moved accordingly before selecting the qualified firefly and judging whether the iteration has been completed. If the algorithm has completed the global optimization, the cycle is ended and the results are outputted, otherwise return to updating the fluorescein for optimization calculation.

Operation
Steps. Fireflies can determine the existence and attraction of other individuals by sensing the intensity and frequency of luminescence of other fireflies within the effective range, so as to attract the opposite sex and prey. e firefly algorithm is based on the following three rules: (1) All fireflies are gender neutral, which means they are attracted to other fireflies not because of male or female. (2) e attraction of fireflies is directly proportional to their brightness. erefore, for any two flickering fireflies, the firefly with weaker brightness will move towards the firefly with stronger brightness. e higher the brightness means that the smaller the distance between the two fireflies, the greater the distance, the lower the brightness, and the smaller the attraction. If there is no firefly brighter than the current firefly, it will move randomly.
(3) e brightness of the firefly is determined by the value of the objective function (fitness). For the maximization problem, the brightness can be directly proportional to the value of the objective function. For the minimization problem, the brightness is inversely proportional to the value of the objective function.
First, n randomly distributed fireflies in the space are solved. Each firefly has its own perceptual search radius. e brightest firefly is searched within the search radius and moved towards it, then the search radius and attraction are updated, and continued to search and move until the number of iterations is reached. e firefly will gather around the brightest firefly or on the brightest firefly points it can perceive. e position of these points is the optimal solution of the objective function. After designing the objective function, the specific operation steps of firefly algorithm are as follows: Step 1. Initialize the location of the firefly Set the number of firefly population, number of iterations, initial fluorescein concentration, and maximum and minimum attraction and light absorption coefficient.
Step 2. Update fluorescein and generate population Step 3. Update the location of fireflies Update the position and quantity of fireflies, set the attraction coefficient, and the smaller the objective function, the more attractive the firefly will be. e larger the objective function, the more attractive the firefly will be. Limit the range of independent variables.   Step 4. Calculate the maximum brightness and attraction of fireflies Calculate firefly brightness � (1/objective function), which is equivalent to fitness. According to the brightness ranking of fireflies, brightness � 1/objective function. After ranking, the absorption coefficient will be × Brightness, get firefly attraction.
Step 5. Select and judge whether the iteration of the algorithm is completed According to the "for Gen � 1: maxge. . . End" loop statement in Step 4, select the firefly with large objective function value and judge whether it meets the constraints. If so, end the loop, otherwise return to Step 2.
Step 6. Output results According to the algorithm results, the iterative curve of firefly algorithm and the layout of tower crane are drawn. e iterative curve continues to decline, indicating that the algorithm is effective, and the algorithm converges only when the curve finally flattens.

Condition Preset.
In order to establish the mathematical model of tower crane positioning layout, some preset conditions are listed below: (1) All alternative material supply points, tower crane positioning and layout points, as well as the model of tower crane are preset. must be within the allowable weight radius circle of the tower crane, which is jointly determined by the jib length and lifting capacity of the tower crane. More than one tower crane is required for the construction of the project. Since the coordinates of demand points are relatively fixed, more research will focus on the possible positioning and layout of supply points and tower cranes.  Figure 2: Flow chart of the proposed algorithm. 6 Computational Intelligence and Neuroscience objective function is shown in formula (1) [14]. In order to maximize the effectiveness of the tower crane, it is necessary to understand the operating mechanism of the tower crane, master the following parameters, and make overall analysis.

Problem
where K is the number of tower cranes, I is the number of material supply points, and J is the number of initial positioning points of components. T k ij is the delivery time of the k tower crane from the ith supply point (S i ) to the jth component initial positioning point (D j ), which is calculated by equations (4)- (11). Q k ij is the lifting capacity of the k tower crane from the ith supply point (S i ) to the jth component initial positioning point (D j ). C k is the unit time cost of operating the kth crane.
Assuming that Q S i is the total supply of the ith supply point (S i ), according to the relationship that the lifting capacity of all tower cranes is less than the total supply, there is the following conditional constraint formula: Assuming that Q D j is the total demand of the jth component positioning point (D j ), according to the fact that the lifting capacity of all tower cranes is equal to the total demand of each supply point, there is the following conditional constraint formula [14]: (C x k , C y k , C z k ) represents the positioning layout coordinates of the kth tower crane. e mathematical model of tower crane operation is shown in the following formulas [4]: For any lifting, the transportation distance of the hook can be calculated by the following formulas [4]: where T k h is the horizontal transportation time of the hook of the tower crane at position k, which is composed of T k α and T k ω . T k α is the movement time of the hook in the radial direction (along the radius of the circle), and T k ω is the movement time of the hook in the tangential direction (along the tangent direction of the circle). T k v is the vertical movement time of the hook at k position. α and β are two parameters between 0 and 1. α indicates the matching ability of the hook to move in the radial and tangential directions in the horizontal plane, and β reflects those matching abilities in the vertical and horizontal directions. When α � 0, the radial and tangential directions of the hook move synchronously α � 1, the radial and tangential Computational Intelligence and Neuroscience step-by-step movement of the hook depends on the skill level of the operator and the tolerance of the site. When β � 0, the hook moves synchronously in the vertical and horizontal directions β � 1. e hook moves step by step in the vertical and horizontal directions, which also depends on the skill level of the operator and the tolerance of the site.

Setting Firefly Algorithm
Parameters. e firefly algorithm simulates the information transmission behavior of fireflies in the space defined by the objective function by idealizing some luminous characteristics of fireflies. It has the following four important parameters to be set: (1) Luminous Intensity (LI). LI is the luminous intensity of fireflies, which decreases with the increase of the distance between them. LI is determined by the target value in its position. e brighter the firefly, the better its position and the greater its attraction. Generally, the luminous intensity is related to the objective function. Since this simulation is to calculate the minimum value of the objective function, we define LI as the reciprocal of the objective function. See the following formula [14] for details.
Each x i is a feasible vector, that is a feasible tower crane positioning and layout solution. In this vector, the first k objects (x i,1 , x i,2 , L) represent k alternative tower crane positions, and the remaining objects (x i,k+1 , L, x i,d ) represent (d-k) alternative material supply point positions. Each object has a value of "0" or "1." "1" means to select, "0" means not to select.
(2) Attraction between Fireflies. In the firefly algorithm, the attraction function β is a monotonically decreasing function, such as the following generalized calculation formula [37]: where r is the distance between two fireflies. β 0 is the attraction when r � 0. When r reaches a certain level, fireflies will no longer be attractive to each other, so β ≥ β min . c is the light absorption coefficient, c � 1.
(3) e Distance between Fireflies. e Cartesian distance between any two fireflies i and j at x i and x j is shown in the following formula [37]: (4) e Movement of Fireflies. Entering the stage of firefly movement, firefly i will be attracted by another more attractive (brighter) firefly j and move towards it. e movement of firefly is determined by the following formula [37]:

Setting the Operation Parameters of Tower Crane.
Because the construction site of high-rise buildings has different layout methods in different construction stages, this study mainly focuses on the tower crane layout of four residential buildings in the same construction section. In the process of prefabricated construction, the material with the largest transportation volume of tower crane is precast reinforced concrete components. According to the component quantity information provided by the BIM model, it is easy to obtain the number of times that the tower crane of a standard construction section (including 4 residential buildings) needs to be lifted for the construction of the first floor. For this project, 128 components need to be initially positioned on each floor of a residential building, a total of 4. erefore, the total statistical result is that 512 precast concrete components need to be lifted on each floor, as shown in Figure 5.
According to the specifications and construction experience of tower cranes, each tower crane can be lifted and lowered 4 times per hour, and each tower crane can work for 8 hours. In addition, the construction completion time of a standard layer is 5 days. erefore, the number of tower cranes required for the project is: e "cell" function is used to round up the calculation results to the nearest integer multiple for the following reasons: (1) the number of tower cranes must be an integer; (2) the less the number of tower cranes, the lower the cost; and (3) the lifting capacity provided by the tower crane must be greater than the lifting demand. Considering the site restrictions, boom length, and rated lifting capacity of the tower crane, four TC6026 tower cranes are selected. Table 4 shows the main performance parameters of this type of tower crane.

Results and Analysis
Relevant parameters in the firefly algorithm are set as required: initial fluorescein concentration α � 0.5, initial attraction β 0 � 1, minimum attraction β min � 0.2, light absorption coefficient c � 1, the number of firefly population is 100, and the maximum number of iterations is 100. According to the established objective function formula (1), the luminous intensity calculation formula (12) is obtained, and the firefly algorithm code is written with MATLAB r2021b update5 software for optimization calculation. In order to verify the method, the modeling process was checked with the project leader to ensure that there was no omission of data and no error in input. e calculation results of the mathematical model were discussed and finally provided to the project construction party as a preferred scheme. Table 5 shows the coordinates of the five material supply points finally selected, Table 6 shows the coordinates of the 8 Computational Intelligence and Neuroscience four tower crane positioning points finally selected, and Figures 6 and 7 show the performance of the algorithm in this case. e algorithm selects four positioning layout points TC3, TC4, TC5, and TC6 to install the tower crane. e global optimal value is obtained around the fifth generation. e objective function mintc � 236918118.675023, and the push is 0. e positioning layout of the final positioning layout points of the four tower cranes in the GIS software is shown in Figure 8, and the total lifting time is 25355613.747098 s. e positioning and layout of tower crane on the construction site of high-rise residence is a common construction technical problem. According to the construction environment and construction conditions of Hai'an highrise residence site, in view of the problem that only relative coordinates can be obtained in CAD software and the world coordinate information of positioning points cannot be obtained directly, the combination of project CAD model and GIS topographic map is adopted to obtain 19 component material supply points quickly and accurately, world    According to the characteristics of tower crane operation, the coordinate information is associated with the mathematical model of tower crane operation to form the objective function. Facing the needs of multipoint selection, the evaluation index is established, and the positioning and layout points of four tower cranes on the project construction site are finally determined by using the firefly algorithm.
rough the visual output of the calculation   results in the GIS software, the prefabricated components can be lifted in place quickly and safely within the construction period, saving the operation cost.

Conclusions
Because many tower cranes are affected by the above uncertain material supply points and component positioning points, the positioning layout of tower cranes is often considered to be a complex combination problem. e existing tower crane positioning layout mainly depends on the experience of construction personnel, and the best tower crane positioning can be found through a large number of manual data calculation.
is manual method has large input, is time-consuming, and not practical. In order to solve these problems, this article proposes a method of using the integration of CAD and GIS to obtain coordinate information and establish the positioning and layout system of tower crane.
is system can make full use of various component information in the whole life cycle of BIM model, including spatial data, positioning coordinates, construction period data, cost data, and maintenance data. en, the intelligent optimization algorithm is used to combine GIS and intelligent optimization algorithm. Using the component material supply point, component positioning point, and optional tower crane positioning point obtained by GIS, a multi-objective optimization model is established to automatically calculate and generate the best positioning layout of tower crane on the project site, so as to improve the positioning and assembly efficiency of components. In this article, GIS and CAD topographic maps are combined to obtain the world coordinates of components, and BIM software is used for simulation. is method may also be combined with GIS and BIM. With the deepening of follow-up research, it is believed that the data transmission standards between GIS and BIM software will be more accurate and perfect, which will help give full play to the advantages of their respective platforms. In the future work, we compare with other algorithms to further verify the superiority of firefly algorithm.

Computational Intelligence and Neuroscience
Data Availability e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest or personal relationships that could have appeared to influence the work reported in this article.