Abstract
Construction project cost prediction is an important function in construction-related fields; it can provide an important basis for project feasibility study and design scheme comparison and selection, and its accuracy will directly affect the investment decision of the project. The successful realization of construction cost prediction can bring great convenience to the control and management of construction cost. The purpose of this paper is to study a fast, accurate, convenient, deducible, and rational construction project cost prediction method, to provide a basis for the cost management of the whole life cycle of the project. Therefore, this paper uses particle swarm optimization algorithm to improve BP neural network and proposes a novel construction project cost prediction algorithm based on particle swarm optimization-guided BP neural network. Aiming at the defects of BP neural network updating weights and thresholds with the gradient descent method, this paper uses the advantages of particle swarm optimization in the field of parameter optimization to optimize BP neural network with PSO algorithm. The structure of BP neural network weights and the threshold of each neuron in the coding, through intelligent search for each particle, find the most suitable weights and thresholds, so that the BP neural network has faster convergence speed, better generalization ability, and higher prediction precision. Simulation results also show that the proposed algorithm is competitive enough.
1. Introduction
Construction project management [1–3] primarily consists of preliminary investment estimation [4, 5], plan design expansion design [6], construction drawing design [7], stage design budget, project budget in the bidding stage, project settlement, and project final accounts after completion, among other things. The investment estimation of construction costs [8–10] is the focus of construction project management. The profitability of a project is determined by the investment estimate of the construction cost [11]. The cost of construction and installation works, or the cost of construction works, plays a significant role in estimating the investment value of construction projects. As a result, estimating the cost of a construction project is crucial [12].
Predicting the cost of a construction project [13] is an important topic in the construction industry. It can serve as a solid foundation for project feasibility studies and design alternatives. Its precision has a direct impact on project investment decisions. The successful implementation of construction project cost prediction can improve the control and management of construction project costs, making it a valuable research topic.
The cost of a construction project is forecasted using historical data from similar projects and mathematical models. In the past, traditional statistical analysis [14–16] and simple regression theory [17] were frequently used to predict construction project costs [18], using moving smoothing, linear regression, or the unit index method, for example. We discovered through extensive scientific research that the traditional construction engineering cost estimation method has several flaws, including low calculation accuracy and long calculation times. Since the influencing factors of construction project cost are many and complicated, and the data collected on the past project cost has high randomness and ambiguity. Also, when selecting indicators for estimation, most of the indicators have a certain degree of consistency. It refers to a geographical area or the construction industry. The uniformity in the field, for example, did not take into account the management level, professional capabilities of the travel industry unit, as well as project quality, safety, and construction period, and was unable to adapt well to the market economic system. As a result, traditional construction project cost forecasting [19, 20] often fails to achieve satisfactory accuracy, and it often takes a long time. The construction project cost prediction loses its practical significance as a result of its low precision and time-consuming nature.
The realization of high-precision cost forecasting through mathematical modeling has piqued the interest of industry professionals and academics [21, 22], thanks to the rapid advancement of computer and neural network technologies [23–25]. Certain mathematical models and related historical engineering data are used to make the construction cost forecast. The BP neural network [26] is a relatively simple mathematical model in comparison to other learning models, but it has a lot of application value in project cost prediction. However, the traditional BP neural network prediction model has defects such as low calculation accuracy, poor stability, and insufficient generalization ability. Therefore, this paper intends to use the combination of particle swarm optimization algorithm and BP neural network to quickly predict the project cost.
The main contributions of this article are as follows:(1)This paper proposes a novel construction project cost prediction algorithm based on particle swarm optimization-guided BP neural network, which can predict the construction project cost more accurately and provide a basis for the cost management of the whole life cycle of the project.(2)This paper uses the advantages of particle swarm optimization in the field of parameter optimization to optimize the BP neural network through the PSO algorithm. That is, to code the weights and thresholds between the neurons in the BP neural network structure, and find the most suitable weights and thresholds through the intelligent search of each particle, so that the BP neural network has a faster convergence speed, stronger generalization ability, and higher prediction accuracy.
The rest of this article is organized as follows: Section 2 introduces the background of the research. Section 3 introduces the principle of the proposed algorithm in detail. Section 4 provides the experimental results. In Section 5, a conclusion based on this work is given.
2. Background
Construction project cost prediction is a very important aspect of work in the construction engineering industry, and it is very important in the management of construction projects. The prediction of construction project cost often occurs in the early stage of project construction. It is the basis of the feasibility study of construction projects and the important basis for the comparison and selection of design schemes, which will directly affect the investment decision of the project. In view of the timely accuracy required for project investment decision-making, therefore, the accuracy and effectiveness of construction project cost forecasts are of vital importance.
In the past, the prediction of construction project cost was mainly achieved through the unit index method, that is, according to the characteristics, structure, and scale of the project, the corresponding forecasting index was applied, calculated, and summarized. The whole process is relatively complicated and time consuming; at the same time, this set of forecasting schemes also has the problem that the forecasting accuracy is difficult to guarantee. The unit index method is used to predict the construction project cost. The index system is unified by the local or industry, each project’s construction management level and construction site conditions are not uniform, and they have strong individualism. Therefore, the use of the unit index method fails to fully consider the individuality of each single project, which leads to the insufficient accuracy of the method for predicting the construction project cost.
In recent years, many domestic and foreign experts and scholars have proposed a new method of construction project cost prediction in order to achieve accurate and rapid construction cost forecasting, that is, forecasting based on traditional statistical analysis methods. Most of these researchers have adopted methods such as probability theory and linear regression to quickly predict the cost of construction projects. These forecasting technologies can often realize the forecast of construction project cost under certain conditions; but, they often have problems such as low forecasting accuracy and time-consuming forecasting, and their generalization ability is poor, and their application prospects are not good.
Many researchers are focusing their efforts on construction cost prediction, and it is difficult to find a more suitable mathematical model to achieve satisfactory construction cost prediction accuracy and speed. The previous unit index method had an index system that was uniformly formulated by localities or industries and had poor marketability. It is often difficult to consider the unique construction management circumstances of each project, and it has no promotional value. Traditional statistical analysis methods, such as linear regression analysis, are difficult to use and time consuming. In recent years, with the advancement of science and technology, the development of computer science and artificial intelligence theory, some intelligent mathematical theoretical models have been gradually applied to the application of these theories in the construction cost forecasting, and certain effects have been achieved. For example, with the development of the construction project cost prediction model based on artificial neural network prediction with higher prediction accuracy, the prediction speed is also faster. However, these research results are often due to the unreasonable construction of the project cost index system or the lack of clear selection of case projects, resulting in poor universality of the research results. There are still many problems to be solved in the prediction of construction project cost.
3. Methodology
3.1. Project Costs
The estimated or actual expenditure of the construction project during the construction period is referred to as project cost. In today’s market, project cost can take on two different meanings depending on the supply and demand objects. The total fixed asset investment cost of the expected or actual expenditure of a project is analyzed from the perspective of the investor (owner). Investors must complete a series of activities, including investment decision-making, survey and design, bidding, construction, and completion and acceptance, in order to obtain the expected benefits of an investment project. The project cost refers to the total cost of the above activities. From this perspective, the project cost is the total investment in fixed assets of the construction project, as shown in Figure 1.

From the standpoint of market exchanges, the contract price of construction projects formed by the market is referred to as project cost. It is a common and important type of project cost. Using the construction project as the transaction object, the market forms the price agreed upon by the main body of demand (investors) and the main body of supply (contractors)—construction and installation project costs, through the contract transaction (most contract parties bid, and the contractor bids), on the basis of multiple estimates.
From the above content, we can see that the meaning of the project cost changes with the change of the construction object. In fact, the two meanings grasp the essence of the project cost from different perspectives. For the investor (owner), the project cost not only involves the construction of a project to pay all the costs, in addition to the contract price, but also includes the construction of early investment management fees, consulting fees, research and test fees, environmental impact assessment fees, reserve fees, and interest generated in the construction period and other costs. But for the contractor, the cost of the construction project refers to the cost of the construction and installation project signed with the investor (owner). For the whole construction project, the cost of construction and installation can account for 65–70% of the total cost, and other costs are calculated based on the cost of construction and installation. Therefore, this paper takes the second meaning of construction installation project cost as the research object.
It is the construction and installation project investment in the construction project investment, as well as a component of the project cost, from the perspective of investment. It is a price determined by the market and agreed upon by the investor and the construction party in the context of market transactions. The cost of construction and installation projects refers to the costs of the project’s construction, supporting projects, and production equipment installation. The structure is depicted in Figure 2.

3.2. Particle Swarm Optimization Algorithm
3.2.1. Mathematical Description of PSO
The goal of particle swarm optimization (PSO) is to set the initial position and speed of a swarm of random particles, then find the best solution using a constant iterative search under certain conditions. It is a clever algorithm that is based on group behavior. Bird behavior appears to be under some control, according to research into their flight characteristics. There appears to be some relationship between individuals and between individuals and groups under this control, and the birds rely on this connection for food.
Suppose that in a -dimensional target search space, there are particles that represent the possible solutions of the problem, that is to say, the position of the particle is the possible solution of the research problem in the -dimensional space. The population is , where the position and velocity of the particle are , and the particles will be updated in the iterative process according to the optimal solution. One is the best position of the individual searched by the particle, that is,, and the other one is the best position determined by the population search, that is, . When the -th particle finds the abovementioned best extreme point, the velocity of the particle and the position of the next iteration are updated according to the following equation:where is the number of iterations and and are acceleration constants, namely, learning factors. mainly adjusts the step size of the particle flying to its own best position, mainly adjusts the step size of the particle flying to the global best position, and are random numbers evenly distributed between 0 and 1.
In order to improve the search ability of particles, a particle swarm algorithm with inertia weight is proposed, and the inertia weight factor is introduced to the initial velocity of each iteration of the particles:
The introduction of inertial weight can affect the optimization ability of particles. Specifically, a larger can improve the global search ability of the algorithm, and a smaller can improve the local search ability of the algorithm. According to the different forms of inertial weight , a variety of particle swarm algorithms have been produced. Common ones include adaptive weights, linearly decreasing weights, and random weight algorithms. This paper uses linearly decreasing inertia weights, and the weight change formula is as follows:
3.2.2. Optimization Process of PSO
The PSO algorithm flow is shown in Algorithm 1.
| ||||||||||||||||
3.3. Project Cost Prediction Model
BP neural network algorithm is a single point search method based on gradient descent of error function, which has no global search ability. Therefore, in the process of learning and training of BP neural network, it is inevitable that there will be poor robustness, slow convergence speed, poor generalization ability, and other shortcomings. However, the PSO algorithm has the advantages of simple structure, large search range, strong robustness, fast convergence, and so on, and can solve most global optimal solutions. Therefore, this study combines the advantages of the two and establishes a project cost prediction model based on PSO optimization and BP neural network parameters.
In the modeling process of the BP neural network, two key numbers need to be set: weight and threshold , which are a group of random values and easily fall into local minimum values. The training of weights and thresholds is actually a complex problem to find the optimal parameters. The gradient descent method is used to update the connection weights and thresholds. Even if there is a slight change in weights and thresholds, the neural network will get completely different operating results. The determination and optimization of these two factors determine the generalization ability and stability of the model to a great extent. To optimize the BP network through the PSO algorithm, it is necessary to encode the weights and thresholds among each neuron in the structure of the BP network, and search each particle intelligently to find the most appropriate weights and thresholds, so that the BP neural network has faster convergence speed and better generalization ability.
The individual in the PSO algorithm corresponds to the initial weight parameters of each layer of the BP network, and the weight coefficient of each layer is adjusted by the particle swarm algorithm. When the termination condition is met, the search is stopped. The structure of the BP neural network proposed in this paper is . There are weights connecting the input layer and the hidden layer, weights connecting the hidden layer and the output layer, and the number of hidden layer thresholds is ., There are thresholds in the output layer, so the dimension of the particle is . The fitness function F of PSO is expressed in the following equation:where is the total number of input learning samples, is the number of output nodes, is the actual output value of the corresponding parameter, and is the expected output value of the corresponding parameter. Therefore, the model of the construction project cost prediction algorithm based on particle swarm optimization-guided BP neural network is shown in Figure 3.

4. Experiments and Results
4.1. Experimental Setup
The Matlab 2018b platform is used to simulate and analyze the construction project cost prediction model developed in this study. It is created using a matrix system. Its instruction expression is similar to engineering mathematics language, reducing the time-consuming challenges connected with programming in language and other languages. It greatly reduces the number of programming sentences and improves the efficiency of computing. It is a type of powerful mathematical software that is well-suited for mathematical modeling and the processing of extremely complex mathematical operations. A large number of toolboxes are preinstalled, and users can name them as needed. In addition, the operating system used is Windows 10, and the parameter settings of the improved BP neural network are shown in Table 1.
4.2. Dataset
The data selected in this paper are from the final accounting data of a real estate enterprise’s existing project in Jiangsu. We obtained the final account data of 240 completed high-rise residential projects constructed by the real estate company in Jiangsu in the past three years. After eliminating unnecessary and redundant information, 227 sets of valid training samples were obtained. In Section 3.1, the high-rise residential project cost prediction index includes numerical quantitative index and character qualitative index. For the selected sample data, quantitative indicators such as floor area and number of floors can be directly input according to the actual engineering data, but qualitative indicators such as basic types and interior wall decoration cannot be directly input. It makes it simple for the prediction model to learn and train on the sample data. The unilateral cost Y is taken as the output set, and the remaining indicators are taken as the input set. The data of qualitative indicators of character type after quantitative processing are shown in Table 2.
4.3. Evaluation Index
In this paper, the relative error and the relative error of the average absolute value are used to reflect the influence of different algorithms on the prediction effect of the model. The calculation equation is as follows:where and represent the actual value and predicted value of the -th sample, respectively, and represents the number of test samples.
4.4. Forecast Result Analysis
According to the input set of the prediction model obtained above, 20% of the 227 sets of data were first selected as test data, and then the remaining 80% of the data were used as training data to train the model. BP neural network and PSO-BP neural network are used to simulate and predict the construction cost, respectively. The prediction comparison results are shown in Table 3.
The prediction model that optimizes the BP neural network parameters through the PSO algorithm is significantly better than the single BP neural network model in terms of predictive stability, as shown in Table 3 and Figure 4, and the model is more stable. Simultaneously, the relative errors of the three models can be controlled within 10%, and the prediction effects of the three models are excellent, as shown in Table 3. Forecast accuracy can be achieved during the investment decision-making stage. The optimized PSO-BP model, on the other hand, is significantly less accurate than the BP neural network, and the BP neural network’s error is lower than the ARIMA model, as determined by the average absolute relative error of the test samples. Thus, the high-rise residential project cost prediction model based on PSO-BP neural network performs better in terms of error control and prediction accuracy.

The results show that the BP neural network model with optimized parameters has a good application effect in cost prediction. For the construction project cost prediction, the prediction model based on PSO optimization BP neural network parameters has a good guiding significance, and it is very suitable for the preliminary construction cost prediction.
4.5. Ablation Experiments
In order to further verify the effectiveness and superiority of the algorithm in this section, this section conducts the particle swarm optimization algorithm to improve the ablation experiment of the BP neural network. Let “PSO” represent the particle swarm algorithm, the results of the ablation experiment are shown in Table 4.
It can be clearly seen from Table 4 that the average absolute percentage error of using only the BP network is the largest. Secondly, the MAPE of PSO is lower than that of the BP network, but no matter what, BP + PSP has achieved the best prediction performance. This again proves the superiority of the algorithm in this paper.
5. Conclusion
In this paper, a fast, accurate, convenient, and reasonable construction project cost forecasting method to provide a basis for the cost management of the whole life cycle of the project has been studied. Therefore, this paper improves the BP neural network through the particle swarm optimization algorithm, and proposes a novel construction project cost prediction algorithm based on the particle swarm optimization-guided BP neural network. Aiming at the defects of the BP neural network using gradient descent method to update weights and thresholds, this paper uses the advantages of the particle swarm algorithm in the field of parameter optimization to optimize the BP neural network through PSO algorithm. That is, to code the weights and thresholds between the neurons in the BP neural network structure, and find the most suitable weights and thresholds through the intelligent search of each particle, so that the BP neural network has a faster convergence speed. Stronger generalization ability, higher prediction accuracy, and simulation experiments also show that the discussed algorithm has competitive performance.
In addition, considering that the current work is time series data, in the next work, an attempt will be made to use the LSTM network to continue the research.
Data Availability
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The author declares no conflicts of interest.