Keywords

1 Introduction

The Resource Constrained Project Scheduling Problem (RCPS) can be understood as the scheduling of project activities, so that neither resource constraints nor the precedence constraints are violated, with the aim of minimizing the completion time of the last activity, i.e., the project makespan. Therefore scarce resources are allocated to competing activities over a given time horizon for the best possible performance [7]. RCPSP is considered a NP-hard [3] problem, i.e. it is a complex and difficult combinatorial problem whereby the exact methods have difficulties in solving RCPSP large, therefore other alternatives are needed to solve them. An alternative are the metaheuristics, which have the capacity to get to a near optimal solution even in large problems, minimizing the use of resources. Some approaches used to solve this problem are Genetic Algorithms (GA) [4, 10], Tabu Search (TS) [8], Simulated Annealing (SA) [1], Ant Colony Optimization (ACO) [2, 5], Adaptive search method (AS) [9] and Particle Swarm Optimization (PSO) [2, 12].

In this paper a mathematical model of RCPSP solved with ABC algorithm is presented. We believe that ABC is a metaheuristic able to solve efficiently RCPSP capable of competing with other solutions generated by complete and incomplete techniques.

This paper is organized as follows. In Sect. 2, we describe the RCPSP. Section 3 presents the ABC metaheuristics and the model of the ABC algorithm to RCPSP. Finally, the conclusions are presented in Sect. 4.

2 Resource Constrained Project Scheduling Problem

RCPSP can be defined as projects with limited resources in an environment which must process a set of activities subject to precedence constraints and resources, the latter being shared by several activities. Thus the problem is to perform such allocation optimizing some objective function.

A project consists of a set of activities to complete the project successfully, each activity can be processed in one of several possible modes. Mode determines the duration of the activity, the requirements of different types of resources, possible flows (positive or negative) of money and other characteristics associated with the activity. Among the project activities precedence relations are defined when the order to be executed is determined, these relationships are for technological or process design reasons, for which the project is represented as a directed graph where activities are represented in a node and the precedence relationships between activities are in the arc.

Programming projects may have different objectives. In this kind of problem we have to minimize the proyect duration (makespan) and the resourses utilized are renewable. The results that may be obtained help managers decide how many resources can be used for processing an activity and minimize the time of completion of a project.

The scheduling problem with limited resources has the main components: a set of activities defined as \(A= \left\{ a_{0},a_{1}, a_{2}, ..., a_{n}, a_{n+1}\right\} \), a set of renewable resources limited defined as \(R= \left\{ r_{1}, r_{2},..., r_{m}\right\} \), the first activity \(a_{0}\) and the last activity \(a_{n+1}\) consume zero units of time and do not consume any resources, the duration for each activity is represented by \(d_{i} \ge 0\) with \(i=\{1,..,n\}\), the amount of resources consumed \(q_{ij} \ge 0\), the maximum availability \(Q_{j}\ge 0\) of each resource \(r_{j} \in R \) at each instant of time, the precedence constraints \(P_{a} \in A= \left\{ a_{1}, ..., a_{n+1}\right\} \), each activity \(a_{i}\) can not be initiated while predecessor activities \(P_{i}\) have not been finalized. The set of successor activities \(S_{i}\) for \(a_{i}\) activities being \(i= \{1, ..., n+1\}\), the set of start times for each activity \(T= \left\{ t_{0}, ..., t_{n+1}\right\} \), and the Directed acyclic graph \(G=\left\{ A, E \right\} \) where \( E=\left\{ (a_{i},a_{j})/ a_{i} \in P_{a}; a \in A \right\} \). RCPSP is represented by the following mathematical model containing the minimization of makespan and the constraints of time and resources.

$$\begin{aligned} Min~F_{n+1} \end{aligned}$$
(1)
$$\begin{aligned} F_{h}\le F_{j} - p_{j} \end{aligned}$$
(2)
$$\begin{aligned} \sum _{j\in A(t)} r_{j,k} \end{aligned}$$
(3)
$$\begin{aligned} k\in K;t \ge 0 \end{aligned}$$
(4)
$$\begin{aligned} F_{j}\ge 0 \end{aligned}$$
(5)
$$\begin{aligned} where ~ j = \left\{ 1,...., n+1\right\} ~ and ~ h\in P_{j} \end{aligned}$$

Defined \(F_{j}\) as the completion of the activity j therefore in the mathematical formulation should be minimized \(F_{n+1}\) since \(n+1\) It is the last activity. This is represented in the objective function presented in Eq. 1, used to define the quality of a solution (Fitness). The Eq. 2 does satisfy the precedence constraint between activities since it shows that the completion of an activity h must be greater or equal to the completion of the activity j unless the predecessor activity. The Eqs. 3 and 4 show the limits for each type of resource k and each time instant t , thus not allowing the demand for activities occurring at present does not exceed its capacity. Finally the Eq. 5 defines the decision variables.

3 Artificial Bee Colony for RCPSP

The ABC algorithm is inspired by the behavior of intelligent power of a colony of bees, this is an optimization algorithm based on population introduced by Karaboga [6]. This algorithm is motivated by the intelligent behavior of honey bees, using common parameters such control as a colony size and the maximum number of cycles.

In the ABC system artificial bees fly around in a multidimensional space search and some bees that can be used or spectators choose food sources based on their own experience and their nest mates, and then adjust their positions. Some scout bees fly and food sources chosen randomly and without the use of experience, if the amount of nectar from a new source is greater than the previous one in his memory, memorize the new position and forget the above.

Therefore, the ABC system combines local search methods, carried out by bees employed and spectators, with global search methods, managed by spectators and explorers, trying to balance the exploration and exploitation process.

This algorithm comes from the intelligence swarm and is based on the behavior of natural honey bees to find their food is so in the following points is passed on to detail each of these concepts and computational bees are also analyzed.

Initialization phase. In the initialization phase all parameters are set mainly by the population size m , number of iterations of the algorithm, and the initial values of the solution, which is defined as a vector x with a dimension between 1 and n , where n is the nth dimension of the solution. The initial solution may be random or guided.

$$\begin{aligned} x_{i}=l_{i}+rand(0,1)*(u_{i}-l_{i}) \end{aligned}$$
(6)

The Eq. 6 determined as randomly initialize the dimension i of the solution x . \( l_ {i} \) and \( u_ {i} \) are the minimum and maximum values for \( x_ {i} \).

Phase Employed bees: The bees take a new neighbor solution to the current solution v , this solution is obtained by applying an operator to change random to one or more of the dimensions of the initial solution x . The fitness of v and x is then calculated, selecting the best.

Bees phase spectators: The spectators bees take your probabilistically decision based on the information provided by the Employed bees. Taking the best solution according to the highest probability calculated according to Equation.

$$\begin{aligned} p_{i}=\frac{fit(x_{i})}{\sum ^{m}_{j=1} fit(x_{j})} \end{aligned}$$
(7)

After selecting the best solution x as probability. New neighbor solution v is calculated and the best solution between the two is chosen.

Phase Scout bees: Bees are choosing randomly solution. The worker bees that your solution does not improve over a period of time become explorer may use the above equation to define a new random solution.

3.1 Representation of the Solution

The solution is represented as follows, if the problem is composed of RCPSP n activities, then the bees will move in solution space n dimensions. Ie a solution is a vector \( x_ {i} \), where \( i \ in {1, ..., n} \), the possible values for each dimension are between 0 and 1 . Where each bee represents a solution in the solution space. The order of each element of the solution, represents the order in which to perform the activities. This representation is based on a priority represented by Zhang 2006 [11].

We use a change operator based in simple swap. The different types of swap are Type N, NS, NSC. Type N: such is the nearest neighbor and is choosing a random value as the image you choose Activity 3 and exchanged for activity 4.

Type NS: this rate is to choose a random number as in the picture you can see activity 4 is selected and then has 4 spaces to the right and make the change, then exchanged the 4 activity 8.

Type NSC: in such an activity and randomly select the image that activity 7 is selected and then count backwards 4 spaces for putting this activity in the position being located activity in the rest position and ran forward.

4 Conclusion

In conclusion we have proposed a bio-inspired metaheuristic able to find solutions to RCPSP using the behavior of natural bee colonies. The mathematical model of the problem is clearly presented and it is delivered a clear description of the behavior of ABC. Also we present the model that solves the problem using ABC. Through this algorithm we believe that it is possible generate competitive solutions. As future work is expected develop this proposal and compare with other techniques.