Scheduling of Construction Projects under Resource-Constrained Conditions with a Specifically Developed Software using Genetic Algorithms

The purpose of this study is to develop a genetic algorithm (GA) based software that can perform resource allocation close to optimum and that can determine the critical path by minimizing the project duration according to the resource profile for a present work schedule and resource pool using a programmable objective function. In this context, the methodology of GAs was presented, the software was developed and the performance of this software was tested with a sample project. With the developed software, by minimizing the activity durations in both constrained and unconstrained resource conditions, projects can be scheduled, total duration and the critical path of the projects can be determined. With this software, any construction company will be able to determine how much time would be required to complete a project at the bidding stage by considering its resources and constraints and can take the required precautions. The main difference of this present study is that the developed code performs minimization of schedule duration integrated with resource allocation and levelling. It also determines the critical path of the final solutions. Both renewable and non-renewable resources are included in the code which is not often considered in the literature. By minimizing project duration and optimizing resource allocation, construction projects can become more sustainable, and the environmental impact of the construction process could be minimized.


INTRODUCTION
Today it is impossible to envisage an environment with unlimited resources. A management system in which resources are used efficiently is needed in today's conditions where resources and time are limited. A project needs to be planned from start to end to assess time and money optimally and to provide optimum use of work power, equipment-machinery, etc. which are limited [1].
Researchers have been solving resource allocation problems of project planning under constrained resources using classical optimization techniques [2]. However today's project requirements made the content and size of the problems bigger and complicated, so classical solution techniques are insufficient, such that variables are so many, solution clusters are so wide, therefore differentiation of the functions becomes impossible [1]. In this point, solutions are tried to be obtained using an algorithm which is based on J. Holland's [3] study. Holland, who was lecturing about adaptation to nature, started to study GA theory which is based on Charles Darwin's natural theory of evolution [4]. According to natural evolution theory, weak species, which cannot adapt themselves to their habitat, will become extinct. Species which can adapt themselves to their environment can survive. Each generation will take the best properties of previous generations and they evolve by adapting themselves to the natural conditions which can change. The last generation is the one that obtained a better adaptation compared to past generations [5]. The main purpose of natural evolution is to supply necessary development for the living creatures to survive in their environment. All the properties of living creatures are coded in their chromosomes and the properties of the best species are transferred to the next generation. Weak species do not have much chance to survive and to transfer their properties to the next generation [6]. The principles of GA are parallel to the nature's basic principles. A population is generated from the solution cluster of problems. Individuals of this population are formed from the chromosomes which are coded according to a particular system. Individuals of this population are subjected to processes which are the duplicates of natural breeding, and a new generation is formed. Individuals showing the best performance are kept and they are used for the generation of new individuals. The solution to the problem is approached at each new generation. The best individual of the final population is considered to be the solution to the problem. This solution may not be the exact solution but it is close to the ideal solution [7]. Today GA's are being used in many applications like the plane design to national security models. One of the applications of GA is the resourceconstrained project scheduling problems. Many researchers studied on this subject [8][9][10][11][12][13][14][15]. Davis and Patterson [16] solved a project consisting of 2 dummy activities and a total of 27 activities with GA and they compared the solution with the results of other heuristic methods. They determined that the result of GA was superior from that determined from other heuristic methods. Wall [17] applied GA to 1000 number of projects. These projects have dimensions ranging from 10 to 300 activities and 3 to 10 constrained resources. GA was able to obtain the best solution for most of the problems. Sivrikaya-Serifoglu [18] used the GA approach for the minimization of project duration and maximization of net present value. The Result of GA for project duration minimization was compared with the result of local constrained based analysis (LCBA) and it was determined that the solution of GA was better than that of LCBA. Sivrikaya-Serifoglu et al. [19] widened their previous study to incorporate non-renewable resources. Mori & Tseng [20] examined the resource-constrained project scheduling problem with only renewable resources. In their study, an activity number was assigned to each gene of the chromosome, a mode for this activity, scheduling sequence, and start-finish time information coding system was utilized. Mori & Tseng [20] compared their approach with the stochastic approach that was suggested by Drexl and Grünewald [21] and they found that GA was better. Ozdamar [22] used a hybrid GA approach to the problem in which non-renewable resources are present. In this approach Ozdamar [22] defined a 2D chromosome structure with one dimension belonging to activity modes and the second one belonging to rule number defined from group properties. In this study the best results were found to be obtained within an appropriate CPU time by using the suggested approach. Hegazy [23] solved a project planning problem having 20 activities and 6 resources by using three different software. For the case of the unlimited resource, the present duration was calculated as 32 days with CPM, whereas Microsoft Project and Primavera determined it as 49 days. GA solution was determined as 45 days. Guvenc [24] used the algorithm suggested by Goldberg and prepared software by using Delphi 4.0 programming language. Prepared software was tested on a sample project. Hartmann [25] suggested a GA with both renewable and non-renewable resources. In this study, he performed experimental studies and selected the best GA approaches. Furthermore, he compared the best GA approach with the three heuristic approaches that were reported in the literature. According to this comparison, GA was found the give better results according to the average deviation criteria of the best project time. Bettemir and Sonmez [26] proposed a hybrid methodology based on genetic algorithms (GA) and simulated annealing (SA) to solve resource-constrained project scheduling problem; they determined that the GA-SA hybrid methodology is superior to sole GA.The main difference of our study is that our code performs minimization of schedule duration integrated with resource allocation and levelling. It also determines the critical path of the final solutions. Both renewable and non-renewable resources are included in the code which is not often considered in the literature.

APPLICATION OF GAs TO CONSTRUCTION PROJECTS 2.1 Problem Description an Introduction to Structured Software
In this study, the proposed GA model that is enabled to make resource allocation near optimum value by using an objective function for the current schedule and resource pool was developed in addition to this; it minimizes project duration while determining the critical path; moreover the model can easily be applied to real-life problems with its user-friendly interface. The distinguishing feature of this model is its user-friendly non-rigid structure. That is why the proposed model is applicable for all types of projects so the number of activities, resource quantity, and duration of project are not important. The software interface is shown in Fig. 1.

Figure 1 Software interface
Software was developed with Delphi 7.0 and Paradox data tables by using a computer with 2.60 GHz CPU, 4 GB RAM, and Windows 7 operating system. The software has two main parts. Activities, dependencies between activities, resources, and activities resource usage quantities are defined in the first part of the project. Solutions and graphs are shown in the second part after the execution of software. Solutions could be taken as reports and automatically be saved, moreover, solutions can be transferred to excel. Firstly, project information has to be defined for minimization of project duration and calculation of critical path with GA. "Project's" button should be clicked for entering the required information after that "Project Definition" screen appears for the definition of the project. After the project definition step from the "Active Project" selection box, the defined project has to be selected among all the menus that allow data input to become active. "Activity Definition" screen appears after pressing the "Activity" button. "Activity Definition" option allows input of activity names and activities' actual finish dates. Resources and daily usage quantities are defined via the "Resource Definition" screen. Besides, the software provides an opportunity to decrease activity duration with available unused resources.
After defining the resources, the "Precedence" button clicked, and the "Precedence Definitions" menu opened. This menu includes the definitions about which activity precedes or follows each other. Following the definitions of the priority relations, rather than the ordinary completion periods of the activities, probable completion periods where modes were created should be entered by clicking the "Probable Time Periods" button. After this entry is completed, all of the project data will be entered. Afterward, the screen shows details of the definitions of GA parameters opened by clicking the "Project Constants" box ( Fig. 2). Technical Gazette 28, 4(2021), 1362-1370

Figure 2 Project invariants
This screen provides the size of the population, crossover rate, mutation rate, number of generations, starting time of the project, number of the crossover points, information regarding whether the most suitable chromosomes will be used in the new population, and the resource-time relationship. After defining all of these processes, the program runs by clicking the "Run" button.
After running the program, necessary calculations for the minimization of the project time, minimization of the deviations from resource profile, and determination of the critical path according to the new project data will be performed in a few seconds (depending on the size of the project). The information regarding GA will be displayed under the "Project Information" section on the "Home Screen". In the "Project Information" section, the total number of cross-overs and mutations, compatibility, mean compatibility, and the minimum compatibility are displayed. The minimum compatibility value displayed is the total time period of the project. When the program runs, the other buttons on the "Home Screen" where the results are displayed will be also activated. The "Results" screen, where all of the results required by the users are displayed, opens by clicking the "Results" button on "Home Screen" (Fig. 3).

Figure 3 Result screen
The "Results" screen consists of three sections; Jobs, Resources, and Result Information. In the "Jobs" section, Job Name, Starting Date, Ending Date, and Duration of the Job is listed. The "Resources" section shows the status of the resources which will be used during the job. In the "Result Information" section, the total time period, and the critical path of the project are displayed. All of the information on this screen can be exported to Excel by clicking the "Export to Excel" button. Along with User, Report, and Result screens, graphics of the information resulting from the performance of other programs can be viewed by clicking the "Graphics" button on "Home Screen". There are two different graphics on this screen. "Generation-mean compatibility" graphic ( Fig. 4a) is based on the compatibility value of each generation. "Generationoptimum compatibility" graphic ( Fig. 4b) shows the course of minimization of the time period of the project through the generation. For the graphics, the information about the related activities, priority relations, estimated ending date of each activity, resource requirements based on the ordinary time period, and the probable ending dates depending on the resource restrictions which were entered into the program, are stored in the program with dynamic strings. Thus, chromosomes were created by simply changing the activities' ending time, which is randomly chosen.
The implementation of the GA model to construction projects is explained in the following section. For the presentation of GA stages and the solution method, the project schedule given in Fig. 5 is utilized. This project consists of 6 activities including start and finish activities. In the schedule, names of activities, expected, optimistic, and pessimistic durations are presented [1].

Assumptions
To apply GA to construction projects some assumptions have to be made. These are: 1. The project consists of several activities, which may have more than one mode of execution. 2. Activities may require multiple resources. 3. Activity resource needs are defined according to their expected durations and a linear relation is used between resource and time to calculate the resource needs of modes (Fig. 6). The linear relationship presented in Fig. 6 is a simplification of a real-life case. A more complex function may be utilized for time and resource consumption relationships. If the availability of a renewable resource is more than one, computer code first assigns the resource to an activity that has an early start or shorter duration, then the resource is shared among the other activities. 4. The start time of each activity is dependent on the completion of some other activities ("finish-to-start" precedence relations). 5. Activities cannot be interrupted. 6. Resources can be renewable and non-renewable.

Objective of Method
The proposed method has multi-objective performance measures. The method provides both total project duration minimization and minimization of deviations of available resource profiles according to constrained resources or unconstrained resources cases. In addition to the determination of total project duration, software and the proposed methodology can also determine the critical path. To accomplish this goal the required mathematical notation of objective function is given in Eq. (1).
=1, 2, ..., ; =1, 2, ..., The definitions of the symbols of the equation are shown below. t n -The finish time of the last activity (total duration), r ik -The amount of resource k required by activity i at time t i , b k -The total availability of resource k at time t i , A ti -The set of activities in progress at time t i , m -The number of different resource types, n -The number of activities, γ -The weight factor 1 ≤ γ ≤ 0.

Algorithm of Method
For the solution of the problem, GA suggested by Goldberg [4] was used. The flowchart of the algorithm of the operation is presented in Fig. 7. Technical Gazette 28, 4(2021), 1362-1370

Generation of Chromosomes
In the project planning problems, the work program itself presents a solution; for this reason for the generation of chromosomes permutation coding was used. The technique of population coding is utilized in the software; however, directions of activities are coded instead of the order of activities. The presentation suggested by Mori & Tseng [20] was given in Fig. 8 and this approach was used through the study. The probable ending dates of the job (number of the modes) are entered as limitless in the program. The user can insert as many ending dates as she/he wants. Since any ending time chosen for an activity differs from the ordinary time, the program performs the necessary calculations by adapting the resources according to the expected time.

Calculation of Fitness Values
The fitness values of individuals were calculated from the total project duration and deviations of required resources from the available resources.
Total duration fitness: For the calculation of the duration fitness of an individual Eq. (2) was used.
where: A 1 -The exceeding amount in the histogram, A 2 -The area of the available amount, f res -The resource fitness. By combing total duration and resource fitness, resultant fitness function can be described as shown in Eq. (5).

Selection of New Chromosomes
For the generation of new chromosomes roulette wheel selection technique which was suggested by Goldberg [4] was used.The problem of illegal solutions is overcome by using genetic operator algoritms defined by Mori and Tseng [20]. These operators guarantee that precedence constraint specified in the scheduling problem remains satisfied.

Crossover Operation
Two new individuals are generated using crossover operation in which particular parts of two randomly selected individuals from the population are cross changed [27][28][29]. Implemented computer code both one cut point and multi-cut point (up to 4) crossover can be used. The software package was designed to allow the selection of crossover method and crossover ratio by the user. A simple one-point crossover operation is shown in Fig. 10. This is point crossover operation used for the solution of the sample problem.

Mutation Operation
In GAs, some genetic information may be lost early in limited populations. Genes that form the chromosome may all be the same. Such a chromosome cannot be changed by the crossover operation. In such cases, randomly selected genes are changed by outside interference [30]. The software package was designed to allow the user can change the mutation ratio. A simple presentation of mutation operation is shown in Fig. 11.

SAMPLE PROBLEM
To test the software package a project schedule with 14 activities was used (Fig. 12).
Project details are listed in Tab. 1 and available resources are listed in Tab. 2. According to the critical path method solution under unlimited resources assumption, the total duration of the project is calculated as 22 days.    By using resource constraints and information given in Tab. 1 and Tab. 2, activity durations and critical path were calculated using GA and the results are listed in Tab. 3.
According to the GA solution total project duration was calculated as 31 days. In addition, the critical path was also changed (Fig. 13) activity and critical path activities. During calculation, the same weight (0.5) was assigned to research and time variables.

CONCLUSIONS
In this study, a software package that can perform resource distribution using a programmable objective function for a work program was developed. This software can also determine the critical path by minimizing total project duration using GA. When the availability of resources is limited, the concept of critical path loses its original meaning. Some activities may be delayed due to insufficient resources so that the critical path ceases to exist. However, "the critical path" term is used as the path having the largest duration. To test the developed software a project schedule consisting of 14 activities was used. According to the critical path method under unlimited resource assumptions, the total project duration was calculated as 22 days. When resources were constrained total project duration was calculated as 31 days using GA and the critical path of the project was also changed.
As a result, with the developed software any construction company will be able to determine how much time will be required to complete a project at the bidding stage by considering its own resources and constraints and can take necessary precautions. In this regard, it is thought that GAs can provide effective solutions to construction projects for better and more efficient construction plans. In addition, the minimization of the construction process could help minimization of the negative environmental impact of construction.