• Aucun résultat trouvé

6 Stochastic Heuristic Methods

The branch and bound method discussed above is deterministic. Now we will pay attention to stochastic heuristic methods. These methods are used in situations where the exact methods would fail or calculations would require a great amount of time.

Heuristic[16] is a technique which seeks goal (i.e. near optimal) solutions at a reasonable computational cost without being able to guarantee either feasibility or optimality, or even in many cases, to state how close to optimality a particular feasible solution is. The most popular heuristics – genetic algorithms, simulated annealing, tabu search and neural networks are reviewed in [16]. Examples of their possible use are described in [13].

4 Combined Heuristic Approach to Resource-Constrained Project Scheduling Problem 53

Let us briefly deal with the genetic algorithms now. The skeleton for GA is shown as follows:

Generate an initial population.

Evaluate fitness of individuals in the population.

Repeatselect parents from the population.

Recombine parents to produce children.

Evaluate fitness of the children.

Replace some or all of the population by the children.

Untila satisfactory solution has been found.

In the following paragraphs, we briefly summarize GA settings to our scheduling problem.

Individuals in the population (chromosomes) are represented as binary strings of lengthn, where a value of 0 or 1 at thei-th bit (gene) implies thatxi¼0 or 1 in the solution respectively.

Thepopulation size Nis usually chosen betweennand 2n.

An initial population consists of N feasible solutions and it is obtained by generating random strings of 0s and 1s in the following way: First, all bits in all strings are set to 0, and then, for each of the strings, randomly selected bits are set to 1 until the solutions (represented by strings) are feasible.

Thefitness functioncorresponds to the objective function to be maximised:

fðxÞ ¼Xn

i¼1

vixi (18)

Pairs of chromosomes (parents) are selected for recombination by thebinary tournament selection method, which selects a parent by randomly choosing two individuals from the population and selecting the most fit one.

Therecombinationis provided by theuniform crossoveroperator. That means each gene in the child solution is created by copying the corresponding gene from one or the other parent, chosen according to a binary random number generator. If a random number is 0, the gene is copied from the first parent; if it is a 1, the gene is copied from the second parent. After crossover, themutationoperation is applied to each child. It works by inverting each bit in the solution with a small probability.

We use a mutation rate of 5/nas a lower bound on the optimal mutation rate. It is equivalent to mutating five randomly chosen bits per string.

If we perform crossover or mutation operations as described above, then the generated children can violate certain capacity constraints. We can assignpenalties to these children that prevent infeasible individuals from entering the population. A more constructive approach uses arepair operatorthat modifies the structure of an infeasible individual, so that the solution becomes feasible. Its pseudo-Pascal code is shown below for a more general case of multiple constraints. Once a new feasible child solution has been generated, the child will replace a randomly chosen solution. We use asteady-state replacement technique based on eliminating the individual with the lowest fitness value. Since the optimal solution values for most

54 M. Sˇeda et al.

problems are not known, the termination of a GA is usually controlled by specifying a maximum number of generationstmax. Usually we choosetmax5,000.

7 Experimentation

The approach discussed in the previous paragraphs has been implemented in Bor-land Delphi. Its interface is similar to Microsoft Project. Although Microsoft Project often is not able to solve a constrained scheduling problem even for very simple projects (it reports some over-allocation and underallocation may be unavoidable), we have never come across this situation when using our programme.

Besides the GA approach, the programme implements another popular heuristic method –simulated annealing –for a comparison, and a user may choose between these two possibilities. It enables a verification of the quality of computational results, as the exact results for large projects are not known.

We have tested the proposed approach in many situations. Table1shows results for one real project with 183 activities, 54 vertices in the network graph and 12 limited resources. This project deals with the innovation action of a Benson boiler in a local power station in the surroundings of Brno. This table contains durations of schedule for this project designed in 30 tests by the genetic algorithm (GA) and by the simulated annealing (SA). Parameters for both methods were set in a way such that the computational time for design of the project schedule should be approxi-mately 2.4 s. The branch and bound (BB) method found a schedule with a duration of 291 days in a several times longer CPU time. The results of BB achieved are favourable because the parallelism of activities was low. The dynamic program-ming approach could not be used because of insufficient memory.

While the results appear comparable, statistically, the results gained by GA are better than the SA results. The well-knownKruskal-Wallis testfor balanced one-way design was used to show that samples were taken from the same population. It has yielded the following results: Average rank for SA¼39.75, for GA¼21.25, the value of test statistic¼17.5472 and computed significance level¼2.8 105. Table 1 Durations for schedule (days) designed by GA and SA

GA GA GA SA SA SA

4 Combined Heuristic Approach to Resource-Constrained Project Scheduling Problem 55

Thus the hypothesis of sampling from the same population is rejected at all traditionally used significance levels (0.05; 0.01; 0.001).

8 Conclusion

In this chapter, a new technique for computing of the resource-constrained project scheduling was proposed. The strategy of activity-shifting was replaced by prolong-ing their duration and dividprolong-ing them into active and sleepprolong-ing parts. It makes it possible to apply a simple CPM algorithm. The proposed algorithm was designed in a mathematical form and verified for a single version of RCPSP. We also sketched how to adapt the proposed algorithm for multiproject scheduling with limited resources.

However, the deterministic approaches are not effective or may not be used in complex projects with multiple constraints because of the exponentially growing time in branch and bound method calculations. A genetic algorithm approach is proposed and compared with simulated annealing.

Further investigation will include fuzzy versions of the problem.

References

1. J. Blazewicz, K.H. Ecker, G. Schmidt, J. Weglarz,Scheduling Computer and Manufacturing Processes(Springer-Verlag, Berlin, 1996)

2. S.E. Elmaghraby, Activity Networks: Project Planning and Control by Network Models (Wiley, New York, 1977)

3. P. Brucker, A. Drexl, R. Mohring, K. Neumann, E. Pesch, Resource-constrained project scheduling: notation, classification, models, and methods. Eur. J. Oper. Res.112: 3–41 (1999) 4. W. Herroelen, E. Demeulemeester, B.D. Reyck, A note on the paper “resource-constrained project scheduling: notation, classification, models, and methods” by Brucker et al. Eur. J.

Oper. Res.128, 679–688 (2001)

5. K. Bouleimen, H. Lecocq, A new efficient simulated annealing algorithm for the resource-constrained project scheduling problem and its multiple mode version. Eur. J. Oper. Res.149, 268–281 (2003)

6. M. Mika, G. Waligo´ra, J. Weglarz, Simulated annealing and tabu search for multi-mode resource-constrained project scheduling with positive discounted cash flows and different payment models. Eur. J. Oper. Res.164, 639–668 (2005)

7. A. Azaron, C. Perkgoz, M. Sakawa, A genetic algorithm for the time-cost trade-off in PERT networks. Appl. Math. Comput.168, 1317–1339 (2005)

8. K.W. Kim, M. Gen, G. Yamazaki, Hybrid genetic algorithm with fuzzy logic for resource-constrained project scheduling. Appl. Soft Comput.2/3F, 174–188 (2003)

9. K.W. Kim, Y.S. Yun, J.M. Yoon, M. Gen, G. Yamazaki, Hybrid genetic algorithm with adaptive abilities for resource-constrained multiple project scheduling. Comput. Indus.56, 143–160 (2005)

10. C. Artigues, P. Michelon, S. Reusser, Insertion techniques for static and dynamic resource-constrained project scheduling. Eur. J. Oper. Res.149, 249–267 (2003)

56 M. Sˇeda et al.

11. V. Valls, S. Quintanilla, F. Ballestin, Resource-constrained project scheduling: a critical activity reordering heuristic. Eur. J. Oper. Res.149, 282–301 (2003)

12 L.-Y. Tseng, S.-C. Chen, A hybrid metaheuristic for the resource-constrained project schedul-ing problem. Eur. J. Oper. Res.175(2), 707–721 (2006)

13. H. Zhang, X. Li, H. Li, F. Huang, Particle swarm optimization-based schemes for resource-constrained project scheduling. Autom. Constr.14, 393–404 (2005)

14. T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein,Introduction to Algorithms(MIT Press, Cambridge, MA, 2001)

15. J. Klapka, J. Dvorˇa´k, P. Popela,Methods of Operational Research(in Czech) (VUTIUM, Brno, 2001)

16. C.R. Reeves,Modern Heuristic Techniques for Combinatorial Problems(Blackwell Scientific Publications, Oxford, 1993)

4 Combined Heuristic Approach to Resource-Constrained Project Scheduling Problem 57

.

Chapter 5

A Development of Data-Logger for Indoor