AdaL-PSO - a new adaptive algorithm for the Multi-Skilled resource-constrained project Scheduling problem

. MS-RCPSP is a combinatorial optimization problem with many practical applications, this problem has been proven to belong to the NP-hard class, the approach to solving this problem is to use algorithms to find an approximate solution. In this paper, we adopted a new adaptive nonlinear weight update strategy based on fitness value and new neighborhood topology for Particle Swarm Optimization algorithm, thereby helping to prevent PSO from falling into local extremes. The new algorithm is called AdaL-PSO. A numerical analysis is carried out using iMOPSE benchmark dataset and is compared with some other early algorithms. The results presented suggest the prospect of our proposed algorithm.


INTRODUCTION
The resource-constrained projects cheduling problem (RCPSP) has been an important optimization problem over the past few decades with many applications in manufacturing, production planning, resource scheduling in cloud computing, and some other areas [1 -3].Over the past few decades, there has been increasing interest in the study of the MS-RCPSP problem, which is an extension of the RCPSP problem.MS-RCPSP is a combinatorial optimization problem that was inspired by a scheduling problem in software development industry, where staff had several different skills, such as programming, data analysis, debugging and so on.In the MS-RCPSP problem, employees have a number of skills and the skill levels vary significantly.Each activity requires a certain skill level, which increases the flexibility of the scheduling problem, but it also makes the problem more complex.
The Resource Constrained Project Scheduling Problem has been proven to belong to NPhard class, which is one of the most investigated topics in the class of scheduling problems [4].
The paper includes six major sections: some methods for solving the MS-RCPSP problem are described in section 2, where an overview of the particle swarm optimization algorithm is also presented.Particle Swarm Optimization is a metaheuristic algorithm which is based on the behavior of social animals, this algorithm has been applied to efficiently solve optimization problems.The mathematical formulation of the MS-RCPSP problem and system model will be presented in section 3 of this paper.The proposed algorithm is presented in section 4, which is based on the Particle Swarm Optimization strategy [4].We also focus on presenting a new neighborhood topology called LNDS (local neighborhood descent search) and inertia weight update strategy based on sigmoid function, these are the two main components of the proposed algorithm.The proposed algorithm is conducted on the iMOPSE benchmark dataset [5], the simulation results are analyzed in detail in section 5 of this paper.We also conducted the algorithm on the factory's data set collected from TNG, this is the data from a large textile company in Viet Nam. Conclusions and directions for future research are presented in section 6 of the paper.

Approximation methods for MS-RCPSP problem
Scheduling problem is an issue of great concern to many companies and is applied in many fields [6 -11].The MS-RCPSP problem, which we mentioned in this paper, is also proven to belong to the NP-hard class [4,12,13].In addition, MS-RCPSP is multimodal or discontinuous and very challenging to solve with traditional optimization stratery.In the past few years, many research works and different approaches have been proposed to solve the MS-RCPSP problem [14 -17].The approach based on metaheuristic algorithms is the most common, the authors in papers [18 -22] used the Genetic Algorithm (GA), Ant Colony Optimization (ACO) and Particle Swarm Optimization.Z. Chen and C. Chyu [23] proposed a scheduling algorithm for Resource-Constrained Project Scheduling Problem based on Evolutionary Algorithm, in the paper authors combine the Evolutionary Algorithm and Local Search method to minimize the execution time of schedule.P. Das [24] proposed a scheduling algorithm for RCPSP based on the Simulated Annealing algorithm.
A hybrid algorithm was created by Myszkowski et al. [5,13], this is a combination of two methods: Differential Evolution method and the Greedy algorithm.The goal of the authors is to minimize the makespan and costs, and the authors also build a new benchmark dataset for the MS-RCPSP problem called iMopse [5], this dataset is created based on real-world instances of the problem.
Mejia et al. [3] proposed a new variant of the MS-RCPSP problem to optimize the schedule of research activities in a nuclear laboratory.In the article [25], the authors proposed two new evolutionary algorithms for the MS-RCPSP problem with the deterioration effect and financial constraints.Hosseinian [26] proposed an extended model of the MS-RCPSP problem, this model has a dual objective, the author's purpose is to simultaneously minimize the makespan and total cost of the project.
Resource-Constrained Project Scheduling Problem and its extention, Multi-Skill Resource-Constrained Project Scheduling Problem, have become important research topics over the last few decades.Many authors have proposed different methods for this problem [27 -30].

Mathematical formulation of PSO
PSO (Particle Swarm Optimization) is one of the most well-known population-based stochastic optimization algorithms which was proposed by Kennedy and Eberhart [32].Velocity and position are updated as follows: (2)

Topological neighborhood for PSO
Particles have been studied in two general types of neighborhoods: 1) global best and 2) local best.There are many topological neighborhoods [33].The formula for updating the position vector is where is the local best position of particle i with the best fitness value among its neighbors.
As shown in Figure 1, three neighborhood topologies are widely used.

Classical RCPSP
MS-RCPSP is an extension of the RCPSP problem, where each resource has multiple skills and each activity requires one or more specific skills to be executed.The description of the classical RCPSP would be introduced as follows: (i) We represent each project by a directed non-cyclical graph G(V, E), where each node on the graph represents a task and the arcs represent the ordinal relationship between the tasks.The arc (u, v)  E shows that task u must be completed before task v begins (Figure 2).
(ii) We add two empty tasks to the project.A task is placed at the beginning of the project, which is the predecessor task of all other tasks in the project and the second empty task is placed at the end of the project, which is the successor of all other tasks.
(iii) The duration of a specific task is the length of the task in execution time, from its start time to its finish time.
(iv) Tasks must not be stopped during execution, until it is done.
(v) Each task requires some resources to execute.

Star topology Ring topology Von neumann topology
The MS-RCPSP is an important scheduling problem that is applied to many real-world problems [5,13,31].In MS-RCPSP each task requires some skills at a specified level to be excuted, whereas resources have multiple skills at different levels.

Some notations of the MS-RPSP are given as follows:
Pre i The set of tasks that need to be completed before task i can be executed

SK
The set of all resource's skills S i : the subset of skills owned by the resource i, S i S; The skill i; The duration of task j The time to complete task j by resource k

Re
The resources used to execute tasks of the project

Re k
The subset of the resources which can perform task k; Re k Re Re i The resource i

W
The project tasks to be done The subset of the task which can be executed by resource k , W k W

W i
The task i The subset of the skill required by task i.A resource has the same skill and skill level equal to or greater than the requirement that can be performed B k , E k The begin time and end time of task k The variable to identify resource v running task u at time t (1: yes, 0: no) The skill level i Level of skill q of a resource The Real-RCPSP problem could be stated as follows: where: (5) subjected to the following constraints: Example 1 In Figure 3, S i.j denotes S i skill type and it has j skill level.The resources of the project have skill types: S 1 and S 2 , and each of them can have a skill level from 1 to 3. The resource constraints for the tasks are presented as follows:

Schedule Representation
The MS-RCPSP problem consists of two important components: resource allocation and task sequencing.In this paper we use the Resource-only scheme method to represent the solution of the problem.Each solution is represented as an vector ; where N is the number of task .

Example 1
Consider a project with tasks as: J={J 1 , J 2 , J 3 , J 4 , J 5 , J 6 , J 7 , J 8 , J 9 , J 10 } and project resources RS = {Re 1 , Re 2 , Re 3 }, as show in Figure 2.  Can be assigned Can not be assigned Our goal is to find a solution with a minimum project completion time (makespan) and satisfy two constraints: the order of execution of tasks and the skill level of the resources.
The duration of the tasks are given in Table 1 Table 1.Task duration.

Task
J 1 J 2 J 3 J 4 J 5 J 6 J 7 J 8 J 9 J 10 Duration 3 5 2 4 1 2 4 4 3 4 Assume that the resources are assigned to the tasks as shown in the following table: A feasible schedule for the project is demonstrated in Figure 2, where it can be seen that the makespan is 17.The above schedule is demonstrated in Table 2, where resource 1 performs tasks J 1 , J 2 , J 6 , J 8 , and J 9 ; resource 2 is assigned to execute tasks J 3 and J 7 ; resource 3 deals with the rest tasks.According to this scheme, the project completion time (makespan) is 17.

Proposed algorithm AdaL-PSO
In the PSO algorithm, two parameters C 1 and C 2 provide local/global exploration, while the inertia weight parameter determines the relative rate of convergence.Many studies have shown that the algorithm convergence speed is significantly reduced when using a fixed inertia value [34].This is a consequence of excessive momentum in the population, so the large step size exceeds the best search regions.In this paper, we proposed an adaptive inertia weight update strategy based on the fitness value.When the fitness value tends to increase, a large inertia weight is needed in order for the design space to be searched thoroughly.As fitness value decreases, which means that the most promising area of the search space has been discovered and the speed of convergence tends to slow down, the inertia weight should be reduced, in order for the momentum of the particles to decrease, allowing them to concentrate in the best search areas.
To accomplish the above strategy, we proposed a fitness-dependent value of the inertia weight.A commonly used inertia update rule is the non-linear decreasing based on sigmoid function, calculated by the formula as below: where: f t is the fitness value at the t th iteration; f min : the minimum value of the fitness function up to time t; f max : the maximum value of the fitness function up to time t.
The inertia weight parameter was updated by the following formula: (15) Sigmoid functions have the domain of all real numbers, with a return value between 0 and 1, it increases monotonically and continuously everywhere.For values less than -10, the function's value is almost equal to zero.For values greater than 10, the function's values are almost equal to one.2), ( 3) and ( 13), ( 14) we have the formula to update the velocity as follows: is calculated based on the best experience of the i th particle and its "social" neighbors.The procedure for determining may include a component that takes into account the current position X i .In this paper, we propose a new algorithm to calculate , that is implemented by a local neighborhood descent search method (LNDS).The goal of this method is to find a new vector position , situated in the neighborhood of the vector and having a better fitness value.
LNDS starts from current position X i and makes changes in m iterations (m is the number of tasks).At each iteration, only one position #d, d = 1,…,m is changed to reduce the fitness function.Hence, a sequence of adjacent position vectors is generated as in the following scheme: val EvalFitness(X i ) (10) if (val < fitness i ) then (11) fitness i  val //restore to its initial value ( 12) else ( 13)End ( 14)return X i , fitness i (15)End The function CheckResource (Re k , Re, Sk) returns true, if Re k satisfies the skill type and skill level constraints for task J d .The constraints are depicted in Figure 3.If the fitness i is not improved, the value in position #d, is restored to its initial value.When the fitness value decreases, the complemented value at position #d is kept, and the LNDS will try to diminish this value once more by complementing the next resource Re k+1 .The algorithm continues with the next positions X i+1 , if the current position X i is a local optimum, then the LNDS will not improve the value fitness i .
The proposed dynamic adaptive local particle swarm optimization (AdaL-PSO) algorithm can be summarized as follows:

AdaL-PSO Algorithm
(1)Begin (2) Load and Valid iMopse dataset (3) t 0 (4) Size  size of the population (5) for i =1 to Size v i  random vector; x i  random vector (6) end for (7) f(t)calculate fitness, makespan (8) fitness.Add(f(t)) (9) while(Stop criterion) (10)  Where: (i) Stop criterion: the loop while -end while would be stopped if the difference between makespan of some continuous generations is smaller than a threshold.

(ii) Size: number of solutions in the population (iii) N: number of tasks
As shown in line 10, the values of inertia weight are dynamically changing and are determined based on the fitness function and line 13, the local best position of the ith particle is calculated by the LNDS function.
At the t-th iteration, the position vector of particle i-th is updated based on the best position of this particle up to time t and the local best of this particle, the is calculated by the local neighborhood descent search method.This method only explores different neighborhoods randomly, it also often runs faster than previous local search algorithms and gives good quality solutions.
We see, each subpopulation will converge to a different optimal value in the search space due to the presence of local attractive features.Thus, niches from the overall population don't have any knowledge of domain problem.However, subpopulation has only few particles, the search capabilities of this model are quite poor, especially in the large search spaces and with many extreme points.To overcome this disadvantage, we propesed a new method to improve the search process in an local best model, which is called local neighborhood descent search (LNDS).
The inertial weights in the proposed algorithm are updated according to the dynamic adaptive method based on the sigmoid function, using formula (15).The value of the inertial weights is updated according to the value of the objective function.This method allows timely adjustment of particle speed, gets out of a locally extrema solution and improves convergence speed.

Simulation datasets
We use two datasets: benchmark dataset iMOPSE and real dataset TNG [35] to evaluate the performance of the proposed algorithm.The above two datasets are also used for GreedyDO and GA algorithms, the experimental results of the proposed algorithm are compared with the experimental results of the two algorithms GreedyDO and GA.The benchmark iMOPSE is a dataset for investigating optimization algorithm, which consists of 15 groups and is presented in Table 3.
The TNG dataset, which is a digitized data set from the industrial sewing production of the TNG company [38], is presented in Table 4.

Parameters and system settings
The simulation is conducted using: Simulation environment: Matlab ver.2014 Simulation tool: the performance of previous algorithms such as GA is fairly evaluated using GARunner [13], the simulation tool provided by the author of those algorithms themself.
(i) Input data: 15 iMOPSE instances and TNG that are described in Table 3 and Table 4 (ii) Number of solutions in the population N p : 100 (iii) Number of generations N g : 40,000 (iv) Since all of the considered algorithms are metaheuristic algorithms, so they do not guarantee the best solution.To evaluate the algorithms, we run on each instance 30 times to get the average value, the standard deviation value, and the best value.The experimental results are presented in Tables 5 and 6, where the makespan value is calculated in hour unit.The data in the above tables are the makespan values of the best solution found by GreedyDO, GA, and the proposed algorithm (AdaL-PSO).Table 5 shows that the makespans found by the GA algorithm are always better than the makespans found by the GreedyDO algorithm.

Performance on iMOPSE dataset
The comparison results between the average value, the best value and the standard deviation of makespan found by the GA algorithm and the proposed algorithm AdaL-PSO are presented in Table 6.
The average makespan time for all the four algorithms is computed, the results in Table 5 and Table 6 show that: (i) Based on 15 instances of iMOPSE experimental dataset, the mean of makespan found by AdaL-PO, GA and Greedy algorithms is: 679.7 (hours); 357.2 (hours); and 325.5 (hours), respectively.We see that the solution of AdaL-PSO algorithm is better than GA by 8 % and better than Greedy by 52 %.
(ii) Based on the mean column in Table 5, we see that the solution found by AdaL-PSO is better than GA from 0.7 % to 24.8 % and better than Greedy from 17 % to 77.5 %.
(iii) In the proposed AdaL-PSO algorithm, we use adaptive inertia weight updated strategy based on the fitness value, which controls the local search and convergence to the global optimum solution.Therefore, the AdaL-PSO algorithm has higher convergence speed and stability.The data in column std of Table 5 demonstrates this problem.The average of the std (standard deviation) column of the AdaL-PSO algorithm is 1.3, while the average of the

MFigure 2 .
Figure 2. The relationship between tasks in a workflow.

Figure 3 .
Figure 3.The relation matrix of resources-tasks assignment.

Table 5 .
The makespan of the best solutions found by GreedyDO and GA.

Table 6 .
The average, the best, and the standard deviation of makespan obtained from GA and AdaL-PSO.