Solving the Software Project Scheduling Problem Using Intelligent Water Drops

Within the category of project scheduling problems, there is a specific problem within the software industry referred to as the software project scheduling problem. The problem consists in the correct allocation of employees to the different tasks that make up a software project, bearing in mind time and cost restraints. To achieve this goal, the present work first uses metaheuristic intelligent water drops illustrating; this is a recent stochastic swarm-based method increasingly used for solving optimization problems. Finally, the results and comparisons with experiments performed with other techniques are presented, demonstrating the solidity of the approach presented.


INTRODUCTION
Given the current competitive world, it is necessary to optimize certain activities within the software project scheduling problem where, due to the complexity of activities confronted by project managers, it is necessary to initiate, plan, execute and close a project.
The Software Project Scheduling Problem (SPSP) is a specific case of the Project Scheduling Problems (PSP) family; in this problem, employees are allocated to tasks with the objective of minimizing the cost and duration of a project while taking into account the precedence of tasks and resource constraints [1,2].It is related to another problem type called the Resource Constraint Project Scheduling Problem (RCPSP), which finds an optimal schedule that meets the precedence requirement and minimizes the project duration and cost.
Scheduling problems can be classified considering various factors such as the amount of stages in the job process, the amount of machines present for each stage, different job processing requirements, setup time/cost requirements and the performance measure to be optimized [3].The SPSP is an NP-hard problem [4].The SPSP is used to organize many activities that require various resources; these resources may or may not be renewable and comply with the objectives set out above.This problem has as its central element the human resource, which is distributed to activities based on skills.An important feature is that PSP [5] has various goals, whereas the main objective of SPSP is to ensure that the project cost and duration are as low as possible [6].
Unless the project that we need to schedule is similar to a previous one, this is one of the most difficult tasks that project managers have to face.They need to estimate the time and resources required to complete each of the activities and organize them into a coherent sequence.
The project scheduling activity consists in dividing the total project into a series of activities, which may be performed in parallel, and estimating the necessary time for each of them.It must be ensured that the handwork is used optimally [7], as shown in Fig. 1.
The problem SPSP consists of assigning a set of tasks to a set of employees, thus introducing the difficulty of each employee possessing the skills necessary to complete this task.The allocation must meet the requirement that a project incurs minimal cost and is completed in the least amount of time.The employees have a salary and possess several skills that allow them to work on several tasks during a working day.The main methods used to solve this problem correspond to the set of techniques based on priority rules or classes of metaheuristics.

Figure 1 Project scheduling process
The SPSP has been resolved using incomplete techniques; Tab. 1 shows works related to Scheduling Problems: In [8], genetic algorithms (GAs) are used to solve many different software project scenarios; [9] uses Genetic Algorithms to present a Time-line based model; [4] proposes an ant colony optimization (ACO) approach known as ACS-SPSP algorithm.Moreover, [10] solves SPSP using a max-min ant system with a hyper-cube framework; [11] analyzed the scalability of eight multiobjective algorithms using instances of increasing size for the SPS problem.Finally, Biju proposes a differential evolution (DE) method that is a direct search stochastic optimization technique that is fairly fast and robust.[10] Scalability analysis of multi-objective metaheuristics solving SPSP [11] Differential evolution (DE) algorithm [12 ] Intelligent Water Droplets (IWD) [13] is a relatively new Metaheuristic based fundamentally on the behavior of water droplets as they move in a natural way from one point to another on a river bank.It corresponds to a probabilistic type approach to solving computational problems, improving the search for good ways through graphics.IWD can effectively solve various Combinatorial NP-hard problems.
IWD can be classified as an intelligence of swarm.Swarm Intelligence is an attractive area of research in the field of artificial intelligence where simple agents and artificial elements are mutually supportive for solving complex problems.
The proposed algorithm is implemented and different instances are executed to study the convergence and obtain solutions of good quality.Moreover, we performed different tests to get a better parametrization.The instances considered, for example, various amounts of iterations.They also tested different amounts of skill, tasks and employees.The results obtained were compared with previous works that used other techniques: Hyper-Cube Ant Colony (MMAS-HC) and Ant Colony System (ACO).
The contribution of this work is to build a different solution for the SPSP adapting the metaheuristic IWD.This work is organized in the following way.Section 2 presents a detailed explanation of the SPSP.The IWD algorithm is presented in detail in Section 3. Section 4 shows the design of the solution for SPSP including subsections presenting the construction graph, update of the soil rules and the algorithm used.Section 5 presents an example of the instance used.Section 6 presents the results obtained, and Section 7 presents the conclusions.

PRESENTATION OF THE PROBLEM TO SOLVE
The SPSP is considered a recurring problem in the management of software companies.Its goal is to find the correct allocation of staff to project tasks.The SPSP should consider the remuneration of employees and their skills in the assignment of the needs of each task [8].In SPSP, the main resources are: the task, i.e., the activities to be completed during the execution of the project, and the employees, i.e., those who must work on different tasks.This approach should allocate staff with the necessary skills to the appropriate tasks.
Different skills are required to complete the various tasks that employees must have in order to be assigned to those tasks.Skills can be as follows: senior programmer, junior programmer, interfaces expert, database expert, leader.S = {s 1 , …, s |S| }, where |S| corresponds to number of skills.
The tasks of the project are all the necessary activities to be performed to complete the software project.These activities may include analysis, design of different components, its programming, its documentation and the entire testing process.The precedence of the tasks is an important issue because a software project consists of sequential tasks that must have an established precedence.The Task Precedence Graph (TPG) is used to control task precedence.This is a non-cyclical graph denoted as G(E, V).The group of tasks corresponds to V = {t 1 ,…, t |T| }.The relationship between the order of the tasks is shown by a group of edges.The edge (t i , t j )  E indicates that the task t i is the predecessor task of t j .Therefore, the set of tasks required for the project is defined as: where |T| is the number of tasks.Every task presents two characteristics: -sk j t is the set of skills for task j.This is a subset of S corresponding to all the necessary skills to complete the task j. -eff j t corresponds to the skill set for executing task j.It is a real number, a subset of S, which corresponds to the workload of task j.The human resources are the main element in this problem; they must have diverse skills, and usually they are engineers with corresponding skills.The project has a group of personnel who are employed at tasks.The project manager must assign the personnel ideal for each activity.The difficulty is to implement proper programming where employees are assigned to the appropriate task.EMP = {e 1 ,…,e |E| } represents a group of persons where |E| corresponds to the personnel quantity involved in the project.Every worker has three characteristics: -sk i e is the set of the employee skills i. sk i e ⊆ S.

Model Description
The principal components used by the SPSP model are: tasks, employees and their corresponding skills.The components of this model are shown in Tab. 2.
An array |E × T| can be used to represent this problem.The amount of human resources and the project activities determine the size of the array |E| × |T|.The elements of the array m ij ∈ [0,1] are a real number that represents the dedication of the i employee to the task j.If m ij = 0, the human resource is not assigned to task j.If m ij = 1, the human resource is assigned to working on task  all day.For example, if m ij = 0.5, employee  uses only half a day for the project.
The generated solution is an array that is not always feasible.This happens, for example, when all the elements of column i are 0, indicating that there are no employees dedicated to task j.This solution is not feasible because the j task cannot be finished.Given the above, some constraints are defined for the purpose of obtaining feasible solutions from the array M.
-The tasks are given as a minimum to an employee as shown in Eq. ( 1).
-Eq. ( 2) shows the employees assigned to tasks j, where the skills needed for task t j are a subset of the union of the skills of the employee assigned to the task.{1,..., } where sk j t corresponds to the skill required in task j and sk i e represents the skills of the employee i. Fig. 2 represents an example of TPG task precedence and the necessary skills t max accompanied by the effort required t eff .In this case, we have several employees, EMP = {e 1 , e 2 , e 3 , e 4 }, and for each of them, there is a group of skills, a maximum quantity of dedication and one correspondent payment.One solution is to complete the array so that tasks are dedicated to employees who have the right skills.An example of what is raised is in Tab. 3. First, it is necessary to validate the viability of the result, for which we use the length of the tasks and cost of the project.The length of each activity is considered as len j t , j ∈ {1, 2,…, |T|}; for this, we occupy the array M and eff j t : Now, we need to get the start init j t and the termination term j t of each task j.To obtain that value, we use the precedence relation TPG(V, E).The calculation of the beginning of each task is given by Eq. ( 4).
With this, we have the start time init j t , the end time term j t and the duration for j task with j = {1,…, |T|}.This is used to construct the Gantt chart of the project (Fig. 3).This reflects a program that does not have a stagnation time.For cases where it occurs, it should be extended to the end of tasks term j t .This requires knowing the length of the final task to determine the full duration of project p len ; this is shown in Eq. ( 6).

Figure 3 Project scheduling process
To know the total cost, it is necessary to have the cost associated with all the tasks as cos j t with j ∈ {1, 2,…, |T|} using Eq. ( 7).The objective is to determine the minimum duration p len and the cost p cos ; consequently, we use a fitness function where w len and w cos are real values.For this, w cos is assigned with the length Average −1 .Then, we multiply the parameters by the corresponding p cos and w len .The function fitness that it is necessary to minimize in this problem is the following: cos cos ( ) An element that is not considered is overwork.Since it increases the cost and time associated with each task, p cos and p len are consequently increased in the software project.Overwork is defined as w i e .The equation is based on the workload of the human resource, and time is used to calculate it.This is presented in Eq. ( 10).To obtain the extra work of project p overw , the totality of the employees is considered.In this case, we use Eq. ( 13).
| | 1 ( ) Once we have all the values, validate if the solution is feasible when this is completed for all tasks, and without extra work, p overw = 0.

GENERAL DESCRIPTION OF THE METAHEURISTIC
In the year 2007, Hamed Shah-Hosseini [14] introduced a new algorithm called IWD to solve the Traveling Salesman Problem (TSP).These metaheuristics are based on the ideal trajectory of water drops moving from one point to another in a river.It is considered a constructive metaheuristic similar to ACO.The IWD is a recent metaheuristic appropriate for combinatorial optimization problems [15].This trip generates three important actions: -The drop increases your velocity.
-Soil joins the drop.
-The soil is decreased where the drop passes.

Figure 4 Water drop behavior
When a drop moves from an initial point to a new point, the velocity is affected in an increasing way; this change is shown in Fig. 4(a); moreover, during displacement, the water drop incorporates the soil into the drops structure, as shown in Fig. 4(b).Additionally, the soil incorporated into the drop is extracted from the soil of the river bed; therefore, the displacement of the drop from one point to another is associated with two actions: It reduces soil in the river and incorporates the extracted soil into the water drop, as shown in Fig. 5(a).Consequently, the velocity at which a drop moves it is very important; given two water drops of similar size and route, a higher velocity will cause a greater collection of soil, as shown in Fig. 5(b).This probability equation is formed by f(soil(i,j)), which is obtained with the following equation: where ε is a small value greater than zero to avoid division by zero and h(soil(i,j)) is used to choose the amount soil(i,l) that connects nodes i with j by an amount greater than zero, obtained using the following equation: ( , ) if min( ( , )) 0 ( ( , )) ( , ) min( ( , )) otherwise The function min(soil(i,l) returns the minimum value of its argument, and as denoted in the formula above, soil(i,l) corresponds to each of the possible nodes to visit, where  indicates the consult for the minimum soil value among those that do not belong to the vector of nodes already visited by the drop.Fig. 6, represents an example of selection probabilities where a water drop found in node A is required to jump to a new node, B, C, D, E or F. In this example, the arc between nodes corresponds to the soil.The probability of election of every node is calculated as follows: 1 Where D has the major probability of being selected due to the lower value of the soil.
Whenever a drop jumps from one node to another, its velocity increases.The new speed is calculated as follows: ( 1) ( ) ( , ) where SA v , SB v and SC v corresponds to amounts greater than zero and the soil(i,j) is the soil between nodes.

Figure 6 Example choice of five probable nodes
The soil incorporated into the drop between the two nodes is shown with Eq. (25).

Δ ( , )
where Δ ( , ) soil i j is obtained with the following equation: ) where parameters SA s , SB s and SC s correspond to amounts greater than zero and the time of the drop K to move from one point to another, represented by ( , : In this way, we have the best solution in the execution of all the iterations.

Algorithm Description
The algorithm used in this work of intelligent water drops is based on [16], as shown below: total best solution = iteration best solution 13: else total best solution 14: Increment the iteration 15: until (iteration max is complete) 16: The algorithm ends at this point with the best total solution

OVERVIEW OF THE INTELLIGENT WATER DROPS FOR SOFTWARE PROJECT SCHEDULING PROBLEM
Here, we present the technique to solve the SPSP for which we must create a Construction Graph.

Construction Graph
The first thing that must be done is adapt the SPSP so it can be graphically represented.To represent the problem, the heuristic and the value of the soil where the drops moved is used for a direction graph.The human resource has to be incorporated into the project activities, and the allocation to each task is shown in the TPG graph.The purpose of the construction graph is to represent the association of the employee to a task.This is built for each task in TPG.This is divided in a graph with nodes and edges.The graph represents the employees, and their proportion of dedication to the task is called den.This is calculated as follows: where midn is the smallest dedication to a project activity.This structure is represented in Fig. 7.The availability of the human resource of the activity must be a multiple of midn or 0. Task division consists of the following steps: -generate a start node and insert in the first column column 0 .
-place a final node and put it in the last column column |E|+1 .
-build edges and incorporate them between columns.The drops move from the left to the right selecting edges from column 1 to column |E| without return.
The water drops select one node by column.When a drop completes its travel, the dedication of the employee to a task is completed.To know the dedication of the i employee to a task j, the water drops travel in the construction graph by selecting nodes probabilistically using Eq.(33). ( ) where ε is a small value greater than zero that makes it possible to avoid division by zero.

RESULTS OBTAINED
The experiments were carried out on a computer with Intel Core i7-4510U 2.0 GHz (4M Cache, up to 3.10 GHz) and Windows 7 Professional; construction was based on the Java language.Technical Gazette 25, 2(2018), 350-357 The experiments focused on comparing the results with another constructive metaheuristic, in this case ACS; however, MMAS-HC was also compared as a reference (Tab.5).
To verify the operation, each instance was executed on thirty occasions using the parameters of Tab. 4. It is a problem of minimization; therefore, the instance that obtained a better result was the 5 employees being superior to ACS but not better than MMAS-HC.

CONCLUSION
We have solved the SPSP problem using the IWD metaheuristic, obtaining good results.The results were compared with a few previous works [10,4].
The contribution of the investigated proposal is to use a new constructive metaheuristic and a slightly studied problem.For the development of the approach, two heuristics to guide the solutions search were considered.
The results obtained were not superior to ACS; in general, these were encouraging, but the exception was with instances where five employees were able to obtain better results than ACS.Future research should address the use of an autonomous search with the aim of improving the results; also, characteristics of other metaheuristics can be used that can improve the search for good solutions.So, you should also consider the incorporation of new heuristics with the objective of better searches for solutions, especially for those instances where the number of employees is large and it requires a larger amount of skills.In addition, the behavior of IWD static parameter values other than those reviewed in the literature -which were used in this work -should be studied.
degree of work j.This is a value of the hours of work assigned to the project in a working day max d i e  [0,1].If the max d i e = 1, it means that the dedication is the entirety of the project.If max d i e is less than one, this is a partial worker.For example: if max d i e = 0.25, the employee has only 1/4 of dedication to the project.-rem i e represents the monthly remuneration of employee i, being a real value.

Figure 2
Figure 2 Project scheduling process.
employee   experiences overwork w i e , the work at t moment is greater than the maximum dedication, e.g., employee overtime for the totality of the project is achieved with the following equation.

Figure 5
Figure 5 Water drop behaviorFor each drop, the initial velocity and the quantity of soil where it should pass are considered.The drops pass by a certain amount of nodes, being a discreet space.The drop to decide which node to pass considers the existing soil between the origin and destination nodes.The 1: input: Problem Instance 2: Assign values to static parameters 4: Assign values to dynamic parameters are initialized 5: Randomly are distributed the IWDs 6: Register the visited node 7: Repeat for IWD = 1 to IWDmaxdo 7.1: IWD travel on the graph choosing nodes Update Velocity Compute DeltaSoil update Edge Soil update IWD soil end for 8: Find the iteration best solution 9: Update the soils of the best solution 10: if (iteration best solution > total best solution) then 11:

Figure 7
Figure 7 TPG graphic with precedence task

Table 1
Summary of similar works

Table 2
Description of the elements for SPSP model Set of skills for the task j.It is a subset of S.
e Set of skills of ei.It is a subset of S. max d i e Maximum dedication of ei, eiE[0,1] rem i e Monthly remuneration of ei M = mij Dedication of employee i to task j init j t The start time of task j term j t Time to end of task j overw Extra hours work of the entire project

Table 3
Example of solution for array M )

Table 4
Values used for the parameters

Table 5
Fitness comparison