1 Introduction

Generally, the contractor of a project makes a commitment to the completion time and accepts a sanction which is also decided for cases where the undertaking is not fulfilled. Therefore, when a project is prepared, time and cost are determined for each construction activity under normal conditions. However, sometimes, the completion of the project which is committed by the contractor can be delayed for a variety of reasons, or an earlier date can be required for the completion of the project. In such cases, different alternatives such as overtime, additional workers, additional machinery or faster construction techniques should be investigated to ensure the activities are completed sooner. Hereby, the comparison between the additional cost of this new situation and decreased indirect cost is very essential. This problem, called time–cost trade-off (TCT), can be solved by deterministic or stochastic methods.

The problem of TCT is a multi-objective optimization problem in terms of requirement to minimize both time and cost (Albayrak 2017). Conventional optimization methods can only solve single-objective optimization problems. The concept expressed as Pareto optimal solution is becoming meaningful in multi-objective optimization problems. Thus, project manager can find the most appropriate solution, which is non-detectable by conventional methods, according to subjective preferences.

The aim of the study is to develop a novel hybrid metaheuristic algorithm (NHA) based on genetic algorithm (GA) and particle swarm optimization (PSO) for TCT problem and verify the effectiveness of NHA compared to standard PSO.

The rest of this paper is organized as follows. In Sect. 2, the literature review is introduced. In Sect. 3, a brief review of TCT problem is summarized. In Sect. 4, GA, PSO and the proposed method NHA are explained in detail. In Sect. 5, the problem formulation and notations are presented where decision variables, objective function and constraints are elaborated. Then, the numerical experiment is applied, also the obtained results are outlined, and comparison of the performance of the method is discussed in Sect. 5. At the end, the paper is concluded with outcomes and presentation of some future research directions in Sect. 6.

2 Literature Review

According to the literature, time–cost optimization has been investigated since the 1960s. Between the relationship of the activity time and activity cost was assumed as a linear function and the main purpose was to schedule the activities for minimizing the project cost, at that time (Vanhoucke and Debels 2007).

Kelly (1961), Hendrickson and Au (1989) and also Pagnoni (1990) used linear programming as a tool to solve the TCT. Although mathematical programming approaches are suitable for linear time–cost relationship, it is not useful for solving discrete relationship. When the literature is examined, it is known that the purpose of early studies is to minimize one of time or cost (Albayrak and Özdemir 2017). Hegazy (1999), Gutjahr et al. (2000), Feng et al. (2000) and Ke et al. (2009) can be given as examples of single-purpose TCT studies, where a deterministic solution is proposed. The increase in the number of activities in the project network is reflected in the calculation steps in the mathematical programming and significantly increases the mathematical complexity of the problem (Kandil and El-Rayes 2005). It is also known that the problem of time–cost optimization is transformed into a NP-hard (non-deterministic polynomial time) structure with the preference of multi-objective approaches that better represent the real situation, rather than a single-objective function (De et al. 1997).

In the following years, multi-purpose optimization approaches have been developed and applications have been put forward. Some of the featured studies in this area are: Zheng et al. (2004), Ng and Zhang (2008), Xiong and Kuang (2008) and Castro-Lacouture et al. (2009).

Recently, the metaheuristic methods are often preferred, because they present more flexible solutions and have widespread application area than conventional methods. The various metaheuristic algorithms have been proposed for TCT over the past decade. Table 1 presents some related studies in the field of TCT.

Table 1 Previous TCT studies

These algorithms have shown their effectiveness in TCT. Conversely, in most cases, the researchers have investigated more theoretical and therefore the trade-off applications that are close to real-life construction projects have remained limited. The intent of this paper is to present the applicability of an alternative metaheuristic optimization method for solving TCT, when time–cost combinations are available on the activities of a project. This paper is different from the previous studies in terms of proposing a novel method which has not been studied in the project planning so far. The problem that selected to apply the method is well posed to represent the real-life projects. Moreover, presenting the Pareto front gives the opportunity to select the most convenient solution with respect to the project priorities to decision makers flexibly. In this paper, multi-objective solution procedure is proposed to generate non-dominated solutions. An effective metaheuristic multi-objective optimization algorithm based on GA and PSO is used to solve the TCT problem for the first time. Then, the results are compared according to PSO as a well-known optimization method. This algorithm provides an applicable procedure for solving real-life project planning problems. The proposed method generates several sets of non-dominated solutions to assist the project managers in defining their preferences for the objective functions.

3 Time–Cost Trade-Off Problem

There is a close relationship between the duration of an activity and the resource used for that. It can be predicted that the increase in the amount of resources used at the time of the unit is shortened while the direct cost is increased. Taking this foresight into account, the most traditional form of relationship between time and cost can be modelled as Fig. 1a. In general, there is an inverse proportional relationship between time and cost for an activity to be completed. For this reason, when the use of low-cost resources is preferred, the completion time of the process is delayed. In a project, the total cost is obtained by adding direct and indirect costs and there is an optimal time value corresponding to the lowest total cost (Fig. 1b).

Fig. 1
figure 1

The graphic of time–cost relationship a for the activity and b for the project

The time–cost relationship is expressed as a continuous or discrete function. The approach that is thought to reflect the real-life projects is the discrete relationship. In the case of a discrete function, the point corresponding to each time–cost pair of the function is described as a mode and a set of discrete points can be composed. The project planning problems with one or more activities have at least two resource usage alternatives are considered as a multimodal optimization problem. The goal of the project crashing analysis is to find the lowest project cost that provides a specific completion time. Several approaches have been tried to catch this specific endpoint in the project. The most common of these approaches is the development of the resources used, assuming an additional cost. For example, making quantitative or qualitative changes in workers or equipment has a positive impact on shortening the overall project duration or accelerating the project, although it brings extra cost to the project.

Conventional optimization techniques, such as linear programming, are insufficient to obtain optimal results because of the complexity of the problem. In recent years, researchers have chosen metaheuristic algorithms because of their ability to provide optimal solutions to complex problems such as TCT.

4 Metaheuristic Methods

Metaheuristic methods can be useful and effective especially when a problem is difficult to solve with deterministic methods and long calculations are required. Metaheuristic methods are also preferred frequently when the research field is large and complicated. In some problems, metaheuristic methods can be preferred because of their usefulness, even if there is not unfavourable condition. Achieving the results in a short time with approximate but sufficient accuracy makes them useful.

4.1 Particle Swarm Optimization (PSO)

Particle swarm optimization (PSO) is a type of swarm-based algorithm inspired by nature. On the basis of such algorithms, living communities called swarm have movements related to psychosocial factors. In PSO, each individual is called a particle, and the interactions of particles with each other and with the environment create the swarm intelligence. The particles in the community are better than the individual situation in terms of their observation and understanding abilities. This status is particularly seen in bees, birds, fish and even bacteria. In behaviours such as searching for food, migrating and escaping from danger, each particle contributes to the formation of consciousness and foresight in the swarm through its previous experiences and instincts. At this point, some particles lead the swarm, while the other particles follow the pioneers as a harmonious member of the swarm.

PSO was introduced by Kennedy and Eberhart (1995), as a new optimization method in which each particle represents a possible solution.

According to PSO algorithm, if the position and velocity of the particle i which is in the solution space at the moment of t are shown xi(t) and vi(t), respectively, then the position of the particle i at the moment of (t + 1) can be expressed as follows:

$$x_{i} (t + 1) = x_{i} (t) + v_{i} (t + 1)$$
(1)

The component which is shown as the velocity vector in the expression is one of the main elements of the system. The velocity vector includes information which is obtained from both its own and neighbour’s experiences. While personal experiential knowledge is defined cognitive component of the particle, the component obtained from neighbours is also called the social component. The position of each particle in PSO, where each particle represents a solution, is updated every iteration. This update is made on the basis of each particle's best position lbest (best in the locally) and the best of the swarm gbest (best in the globally) for each dimension j ϵ 1, …, N, where N is the dimension of the problem. For this reason, it is very important to define the velocity vector correctly, which has both cognitive and social components. Hence, vij represents the jth element of the velocity vector of the ith particle. Thus, the velocity of particle i is updated using the following equation:

$$v_{ij} (t + 1) = wv_{ij} (t) + c_{1} r_{1j} (t)\left[ {l_{{{\text{best}}}} (t){-}x_{ij} (t)} \right] + c_{2} r_{2j} (t)\left[ {g_{{{\text{best}}}} (t){-}x_{ij} (t)} \right]$$
(2)

where w is the inertia weight which varies 0.8 to 1.2, c1 and c2 ∼ U(0,2) are the acceleration coefficients and r1, r2 ∼ U(0,1) are stochastic random numbers. The inertia weight w influences the ability of the algorithm to search solutions locally or globally. If the value of w decreases, then algorithm tends to search locally, but if w increases, globally search is more possible. Selecting all the coefficients and parameters used in the PSO in compatible with the structure of the problem is quite essential in terms of facilitating the access of optimum.

The personal best position of particle i is the best position (i.e., one resulting in the best fitness value) visited by particle i so far. Then, the personal best of a particle at time step t is updated as Eq. 3 where f denotes the objective function that has to be minimized.

$$y_{i} (t + 1) = \begin{array}{*{20}l} {y_{i} (t),} \hfill & {f(x_{i} (t + 1)) \ge f(y_{i} (t))} \hfill \\ {x_{i} (t + 1),} \hfill & {f(x_{i} (t + 1)) < f(y_{i} (t))} \hfill \\ \end{array}$$
(3)

In Eq. 3, f functions represent the fitness function which is found in the most of the metaheuristic algorithms. This function indicates that the position of a particle in the swarm is close or not to optimum. Equation 4 is used to obtain the global best position (yg) from the individual best position.

$$y_{{\text{g}}} (t) = \min \left\{ {f\left( {x_{i} (t)} \right), \ldots ,f\left( {x_{n} (t)} \right)} \right\}$$
(4)

The flowchart of PSO is given in Fig. 2.

Fig. 2
figure 2

Flowchart of PSO

4.2 Genetic Algorithm (GA)

Genetic algorithm (GA) is a metaheuristic method that belongs to class of the evolutionary algorithms. In GA process, as in the theory of evolution, when weaker individuals (which are far from the optimum) disappear, stronger individuals (which are most likely to be optimum) continue to live.

GA was first introduced by John. H. Holland who is an American scientist with his book named "Adaptation in Natural and Artificial Systems" in (1992). In his book, Holland suggests that complex elements in optimization problems can be coded by GA.

GA imitates the genetic structure and progress of individuals as an optimization method. In GA, structures called individuals correspond to chromosomes in genetic science and represent each possible solution of the problem. Similarly, the genes included in chromosomes are bits which are expressed as decision variables in GA. GA which forms a solution space with an initial population continues the iterations by utilizing the selection operator in each reproduction and each iteration calls the generation.

Mainly, GA has three operators which are used to create new generations. These operators are selection, crossover and mutation operations. All the individuals should be evaluated in terms of the fitness before the selection operator is applied. Thus, individuals with high fitness value become the parents of the next generation. In addition to mentioned above, the selection of the initial population, the structure of the fitness function and the termination conditions of the algorithm are also important parameters that determine the performance of the algorithm. The proper use of the parameters is influential for increasing the individual diversity. Among these operators, the selection ensures that the individuals with high level of fitness value will survive. The crossover as the second GA operator emerges after the mating pool occurs. Crossover is creation of a new individual (offspring) by transferring the gene characteristics of parents to next generation. Two individuals randomly selected from the mating pool transfer their fragments from the gene sequences to each other through dividing single or multi-points. In this way, children are born with the characteristics of both parents. A simple representation of the crossover implementation on four-gene chromosome is given in Fig. 3.

Fig. 3
figure 3

Single-point crossover

The factor that determines the effectiveness of the crossover operator is the crossover rate. This rate controls the level of intergenerational gene transfer when the next offspring is generated. If GA user chooses lower rate, the new population will be very similar to the old population and convergence of the algorithm will be affected negatively. Extremely high crossover rates cause individuals with high fitness values to quickly disappear into new generations without transferring them.

The function of the mutation (the third operator of GA) is to transform at least one of the genes in the chromosome which is an adaptation of the genetic mutation. This operator is used in order to avoid uniformity in the population. The mutation randomly changes one value of the genotype. The mutation allows avoiding local minima in the search space, randomly changing the existing solutions. Thus, new possible solutions can be added to the population. There are different types of mutation. For integer-based chromosomes, the mutation changes a single gene to a value randomly picked from a predefined set. The simplest version of the mutation is called single-point mutation. An example about single-point mutation operator is given in Fig. 4.

Fig. 4
figure 4

Single-point mutation

As in the crossover rate, there is also a ratio about mutation that the user will control the algorithm with knowledge and experience. This rate is one of the main factors which determine whether the solution space is wide enough or not.

GA is a metaheuristic that is very suitable for both flexing and strengthening due to its algorithmic structure. However, the GA-specific flow remains the same, even if the algorithm is improved. The flow of GA begins with the determination of the initial populations which can be formed in several ways. If the user of GA has got some predictions about the problem, the estimated values can be used to generate the initial population to reduce time loss. Otherwise, random number generators are also useful. The second stage of GA flow is to evaluate the fitness. Fitness evaluation has an important role in determining which of the solution candidates is closer to the optimum. The step after evaluating the fitness value is the control of termination criterion. Termination criterion can be the number of iteration or a specific time period. When the termination criterion is satisfied, the algorithm is terminated and the best solution is considered as optimal. In order to express GA steps visually, the flowchart is shown in Fig. 5.

Fig. 5
figure 5

Flowchart of GA

4.3 Novel Hybrid Algorithm (NHA)

A hybrid algorithm combines two or more other algorithms to solve an optimization problem, so the new algorithm is better than the individual algorithms. Interest in hybrid algorithms has grown significantly in recent years, as they not only provide high-quality solutions, but also search with high efficiency. Many efforts have revealed the success of hybrid algorithms in a wide range of real-life optimization problems. In particular, the hybridization of GA and PSO can be successfully applied for solving optimization problems. In the literature, Sebt et al. (2017), Gupta et al. (2019) and Yazdanpanah et al. (2019) have suggested hybrid algorithms based on GA and PSO.

Hybrid algorithms exploit the good properties of different algorithms, and an appropriate selection and combination of individual algorithms is thereby important to solve problems efficiently. This research focuses on TCT problem on a construction project. In this study, a novel hybrid algorithm (NHA) is developed by using GA and PSO in metaheuristic methods for its good global and local search capability. The motivation behind the development of hybridization two algorithms is to take advantage of high convergence rate of PSO over GA. Both methods are based on population and applicable combinatorial optimization problems. For this reason, transformation of a new hybrid algorithm is appropriate to solve TCT problems. The diversity and exploration ability are enhanced by including GA operators into standard PSO considering both strong and weak features of the algorithms. The selection operator of GA prevents the concentration of PSO on weak particles due to its fitness function particularly. In addition to that, GA does not collect information about individuals, whereas PSO is a memory-based algorithm. Besides, local search ability of GA and social component of PSO have made the NHA more advantageous in global optimization.

The flowchart that belongs to NHA which is generated by hybridization of GA from evolutionary algorithms and PSO from swarm intelligence algorithms is given in Fig. 6.

Fig. 6
figure 6

Flowchart of NHA

5 Application of Time–Cost Trade-Off

Optimization applications which are described in detail in the previous section are achieved on the example in order to verify the effectiveness of NHA comparison to PSO in terms of TCT. For this purpose, firstly, the mathematical model of TCT is described and the data of the construction project with 37 activities are explained. For this implementation, PSO and NHA procedures were coded MATLAB R2012a and run with 20 times repetition on a personal computer configured with Intel Core 2, 4 GB RAM, Windows 10, 64 bit.

The mathematical model of TCT problem given in the below is formed with Eqs. 5, 6, 7, 8 as constraints and Eqs. 9 and 10 as objective functions. In equations, ct represents total cost of the project, tt duration of the project, cij cost of the jth mode for ith activity, xij assignment of the jth mode for ith activity, Tn starting time of the nth activity, mn mode alternatives, n total number of activity, Tij duration of jth mode of ith activity and Tmax maximum completion time. According to Eq. 5, the algorithm starts at day 0. Equation 7 states that the sum of the starting time of the 37th activity, which is the last process of the project, and the duration of the same activity on jth mode should be equal or less the maximum completion time of the project. According to Eq. 7, the sum of the starting time of a predecessor activity and the duration of jth mode should be equal or less to starting time of the successor activity. The last constraint Eq. 8 expresses that only one mode j to m can be selected for all activities i to n. Accordingly, it is known that xij has 0–1 variable type which is also called binary variable.


Constraint functions:

$$T_{1} = 0;$$
(5)
$$T_{37} + \mathop \sum \limits_{j = 1}^{{m_{37} }} T_{37j} .x_{37j} \le T_{\max } ;$$
(6)
$$T_{a} + \mathop \sum \limits_{j = 1}^{{m_{a} }} T_{aj} .x_{aj} \le T_{b} ;\;a \to b \;{\text{for}}\;{\text{all}}\;{\text{predecessors}}\;a,b = 1, \ldots ,37;$$
(7)
$$\mathop \sum \limits_{i = 1}^{n} \mathop \sum \limits_{j = 1}^{{m_{i} }} x_{ij} = 1;$$
(8)

Objective functions:

$${\text{Min}} c_{t} = \mathop \sum \limits_{i = 1}^{n} \mathop \sum \limits_{j = 1}^{{m_{i} }} c_{ij} x_{ij}$$
(9)
$${\text{Min}} t_{t} = \left[ {T_{n} + \mathop \sum \limits_{j = 1}^{{m_{n} }} \left( {T_{ij} .x_{ij} } \right)} \right]$$
(10)

The first objective function Eq. 9 aims to minimize total project cost, and the second objective function Eq. 10 aims to minimize total project duration.

5.1 Numerical Experiment

The predecessors, alternative modes, durations, resource requirements and direct cost values for each activity are given in Table 2. In this project, resources are taken into account in terms of direct cost and the resource constraint is considered as 12 employees per day.

Table 2 Project information for the application of TCT

As can be seen from Table 2, time–cost relationship is given as discrete type, since some activities are suitable to be completed in shorter time with the increase in the number of employees. Additionally, the total project duration is limited to 200 days by applying the upper limit definition which is frequently used in optimization problems.

5.2 Results of PSO and NHA Applications

The PSO algorithm starts with random generation of the initial population. Each value obtained is represented by particles as a candidate of results. The positions of particles indicate the fitness values according to the objective function. While these operations are in progress, if a particle obtains better fitness value than before, its current position is updated and is called lbest. Then, the particles are compared with their neighbours to determine the best fitness and called as gbest. The algorithm checks whether the particle is displaced within boundaries by updating the velocity. The position update is necessary for the particles crossed the border. This procedure which continues repeatedly provides gbest when the termination criterion is satisfied.

After preliminary experiments, the number of iterations was found to be 500 and the swarm size was chosen as 20. In the algorithm, the acceleration and inertia coefficients are described as c1 = c2 = 2 and wmin = 0.9, wmax = 1.1, respectively.

According to PSO, TCT values vary between 170 and 199 days for time and $125,500–132,200 for cost. These results can be seen in Table 3. Thus, this project which is subjected to all constraints and boundary conditions can be completed in 170 days minimum. The direct cost corresponding to 170 days is $1,322,000. Similarly, the project can be extended to 199 days and the lowest cost is achieved as $125,500. However, when the results are examined collectively, it is possible to see that this preference is not meaningful. Because there is a better alternative time–cost pair 176 days—$125,500 corresponding to the solution number of 12, this is the optimal time–cost pair, which has the shortest project completion time that corresponds to the lowest possible cost.

Table 3 TCT results of PSO

Following the PSO, the same project has been solved with NHA which is developed in this study. For this purpose, the population size, the crossover rate and the mutation rate are determined as 20, 0.65 and 0.005, respectively, for GA model; meanwhile, PSO parameters remain the same. The approach is started from the initialization phase where the particles and velocities are generated randomly. The results obtained are shown in Table 4. TCT results of NHA have the values of 169–199 days and $125,500–131,200. In other words, the project can be completed in 169 days which is the minimum duration and the corresponding cost is $131,200. If the project is to be completed with the lowest cost alternative, the minimum cost is $125,500 and corresponding the total project duration is 173 days.

Table 4 TCT results of NHA

In NHA, which is limited to 500 iterations, the values forming the Pareto front were observed in the first 150 iterations. The graphic of number of iterations–fitness value is given in Fig. 7. According to Fig. 7, it is concluded that the selected parameters and the number of iterations are sufficient.

Fig. 7
figure 7

The number of iterations–fitness value graphic of NHA

TCT results given in Tables 3 and 4 are visualized comparatively in Fig. 8. Thus, Pareto optimals are found easily. All of the time–cost pairs along Pareto front composed as a result of combining Pareto points are optimal. The results above the Pareto front are non-optimal solutions in terms of time, cost or both of them.

Fig. 8
figure 8

Comparative TCT graphic of PSO and NHA results

The project which has various mode alternatives can be completed in 170–199 days with PSO. If the completion period by 199 days, which is the combination of the worst modes, is desired to crashed by 170 days, cost increases 5.3%. The same project is completed within the range of 169–199 days with NHA, and if the project is to be completed in minimum time, the increase of cost is %4.5. TCT of the project is achieved by PSO and NHA, and minimum total cost is obtained as $125,500 with both algorithms. Although there are more than one project completion alternatives for both metaheuristics, PSO's Pareto point is 176 days and NHA's Pareto point is 173 days.

6 Conclusion

Each of the construction projects has its own unique conditions. For this reason, the priority of the projects may differ according to the project. However, time and cost are important in all of the construction projects, and just one of them from these two elements is very crucial in some projects. This situation can be predicted at the beginning of the project, or sometimes it can also arise due to the problems that arise after the project has started to be implemented. At this point, it is important to obtain time–cost alternatives that are appropriate to the project conditions. This approach, which is possible only using Pareto front, can be achieved through metaheuristics.

In this study, novel hybrid algorithm (NHA) was developed by using genetic algorithm (GA) and particle swarm optimization (PSO) from metaheuristic methods to solve time–cost trade-off (TCT) problem. Both methods are population-based and applicable to combinatorial optimization problems. Thus, these properties allow forming a hybrid algorithm to solve time–cost optimization problem. For developing NHA, the strengths and weaknesses of both methods are taken into account. The exploration and diversify abilities of standard PSO in the solution space have been enhanced with genetic operators. PSO and NHA were implemented on the same project data, respectively. According to the results, especially, GA selection operator in NHA prevents the concentration of PSO from weaker particles in terms of fitness values. Similarly, GA cannot store information about individuals, but PSO is a memory-based algorithm. In addition, the local search capability of GA and the social component of PSO have made NHA more advantageous in global optimization.

This study provides a new method for project planning, but in the construction project management, not only time and cost have an impact on a project, but also the other factors such as safety, quality, environment and resources have impact similarly. Therefore, how to optimize the construction project under the premise of considering these objectives will be a principal research direction in future works.