Abstract and Applied Analysis

Volume 2011 (2011), Article ID 589862, 20 pages

http://dx.doi.org/10.1155/2011/589862

## Project Scheduling Heuristics-Based Standard PSO for Task-Resource Assignment in Heterogeneous Grid

Department of Computer Science and Information Engineering, National Chin-Yi University of Technology, No. 35, Lane 215, Section 1, Chung-Shan Road, Taiping, Taichung 411, Taiwan

Received 13 October 2010; Revised 31 December 2010; Accepted 2 January 2011

Academic Editor: Nobuyuki Kenmochi

Copyright © 2011 Ruey-Maw Chen and Chuin-Mu Wang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

The task scheduling problem has been widely studied for assigning resources to tasks in heterogeneous grid environment. Effective task scheduling is an important issue for the performance of grid computing. Meanwhile, the task scheduling problem is an NP-complete problem. Hence, this investigation introduces a named “standard“ particle swarm optimization (PSO) metaheuristic approach to efficiently solve the task scheduling problems in grid. Meanwhile, two promising heuristics based on multimode project scheduling are proposed to help in solving interesting scheduling problems. They are the best performance resource heuristic and the latest finish time heuristic. These two heuristics applied to the PSO scheme are for speeding up the search of the particle and improving the capability of finding a sound schedule. Moreover, both global communication topology and local ring communication topology are also investigated for efficient study of proposed scheme. Simulation results demonstrate that the proposed approach in this investigation can successfully solve the task-resource assignment problems in grid computing and similar scheduling problems.

#### 1. Introduction

Grid computing has been widely applied many applications, such as drug discovery, economic forecasting, seismic analysis, and back-office data processing in support of e-commerce and web services. A grid is a collaborative environment in which one or more tasks can be submitted without knowing where the resources are or even who owns the resources [1]. Meanwhile, a grid environment also provides a computing service infrastructure in the cloud. There are often plenty of tasks needing to be dealt with since an application in grid are usually decomposed into many tasks; it is necessary to efficiently assign and allocate adequate resources for tasks from anywhere. Restated, tasks assigned to inadequate resources always cause application completion time increases. Therefore, the task assignment plays a significant role in the issue of resource allocation and scheduling in grid. In [2], Chen et al. have solved the task scheduling problem in a distributed computing system as in [3], which is without the consideration of resource heterogeneity and the dependence between tasks. Then Chen et al. proposed a new task scheduling model to reflect the actual grid environment with more details, and solved it based on particle swarm optimization (PSO).

Many different task scheduling problems such as assignment, job-shop, flow-shop, vehicle routing, and other scheduling problems have been studied intensively. The studied grid task scheduling problem in this work comes from the task-resource assignment problem [2] which is much more complicated than the above-stated classic task scheduling problems. Restated, a grid application is a task scheduling problem involving partially ordered tasks and distributed heterogeneous resources, and can be represented by a directed acyclic graph (DAG) [4–6]. The scheduling target is to find optimal task-resource assignment and hence minimize application completion time. Most scheduling problems are confirmed to be NP-complete. Thus, many researchers have devoted their efforts to solving task scheduling problems. The exact algorithm such as branch-and-bound method [7] is able to find the optima of the scheduling problem. However, the execution time required is impractical as the number of tasks and resources increases. Hence, many different schemes have been presented for solving scheduling problems. Chen et al. [8] combined a competitive scheme with slack neurons into Hopfield neural networks to solve multiprocessor real-time job scheduling problems. Sandnes [9] presented a stochastic approach of employing randomization in the scheduling of tasks in multiobjective scheduling problems. An artificial immune-system based scheme was proposed to solve the dynamic economic dispatch problem of generating units [10]. Comparatively, several metaheuristics such as genetic algorithm (GA) [11], simulated annealing algorithm (SA) [12], tabu search (TS) [13, 14], ant colony optimization (ACO) [15], and the particle swarm optimization [16] have been effectively proposed for solving these difficult problems. Oh and Wu [17] presented a multiobjective genetic algorithm, which aims to minimize the number of processors required and the total tardiness of tasks. Liu and Wang [18] solved the resource-constrained project scheduling problem of minimizing activities’ cost based on GA. And a thermal generating unit’s commitment scheduling problem was studied by a modified GA [19]. A task scheduling problem with the involvement of the processor in communication was investigated and a GA-based scheduling heuristic was proposed to solve the problem by Sinnen et al. [20]. In [21], a derivative of simulated annealing algorithm with the consideration of the specificity of the solution space was proposed to solve the resource-constrained scheduling problem. Meanwhile, simulated annealing was applied to the berth-scheduling problem to find near-optimal solutions [22]. Tabu search is an approach to prevent the search from trapping into the local minimum, and it has been applied to solving a single machine scheduling problem with distinct due windows to minimize total weighted earliness and tardiness [23] as well as job-shop scheduling [24]. Using ACO to solve multiprocessor system scheduling with precedence and resources constraints was proposed in [25]. In [26], an ACO algorithm was used for solving a dynamic regional nurse-scheduling problem. Moreover, many PSO-based schemes were proposed for solving a variety of scheduling-related problems including process planning, production scheduling [27], job-shop scheduling [28, 29], project scheduling [30], call center scheduling [31], flow-shop scheduling [32], and others [33, 34].

In light of different scheme development, PSO is a promising metaheuristic approach for solving diverse task scheduling problems as well as other application problems. The particle swarm optimization (PSO) was first proposed by Kennedy and Eberhart [16]. In PSO, a swarm of particles spread in the search space and the position of a particle presents a solution. Each particle would move to a new position decided with the individual experience and the global experience heading toward the global optimum. However, many variations of PSO have been studied, and one of them was named “standard” PSO, proposed by Clerc and Kennedy [35] indicating how PSO can be significantly improved. Hence, this investigation aims at enhancing the “standard” PSO for solving the interesting task scheduling in grid. Each particle represents a possible task schedule corresponding to a task-resource assignment graph (T-RAG) and regards the longest path of the task-resource assignment graph as fitness value. Hence, this investigated task scheduling problem became an optimal task-resource assignment graph selection problem.

To increase the efficiency of “standard” PSO, heuristics can be used as an aid for problem solving. Thus, this study enhances “standard” PSO by introducing additional heuristics to solve the task scheduling problem for minimizing task completion time. Nevertheless, a heuristic is usually problem specific, hence different heuristics were surveyed and evaluated. Least total resource usage (LTRU) and shortest feasible mode (SFM) heuristics are frequently applied for determining operating mode for multimode project scheduling problems. Greatest rank positional weight (GRPW), latest finish time (LFT), latest start time (LST), minimum slack (MSLK), and most total successors (MTS) heuristics are commonly used for deciding tasks’ priority in project scheduling problems. Two intuitional heuristics were then proposed for speeding up the PSO’s search when solving investigated task scheduling problems. They are the best performance resource (BPR) heuristic and the latest finish time (LFT) heuristic based on multimode project scheduling problems; they are herein called project scheduling heuristics.

Moreover, the performance of the proposed PSO scheme with different swarm communication topology is also evaluated. Restated, global communication and local communication topologies for obtaining the global experience are analyzed and compared. Finally, the experiment results indicate that the scheme proposed in this work is effective for solving similar class task scheduling problems.

This article is organized as follows. Section 2 introduces the task scheduling problem. The traditional PSO is described in Section 3. Section 4 illustrates application of the PSO to the task scheduling problem, and introduces the additional heuristics proposed in this study. The simulations are presented in Section 5. Finally, Section 6 presents the conclusions.

#### 2. The Task Scheduling Problem

Most grid applications usually involve partially ordered tasks and heterogeneous resources distributed in grid. Hence, the studied new task scheduling problem addresses precedence considerations and resource heterogeneity in grid environment. A simple example is given to illustrate the complexity and difficulty of the investigated scheduling problem; suppose a grid application is decomposed into 5 partially ordered tasks (with different workloads) as shown in Figure 1—two heterogeneous resources (with different abilities) in the grid environment. Therefore, tasks assigned to different resources would require different processing times to run. Additionally, involvement of communication costs (such as data transfer) for partially ordered tasks is considered. Meanwhile, assume that resource M2 has better performance than resource M1, but resource M1 has higher bandwidth than resource M2. Thus, communication time depends on the communication cost and the minimum bandwidth between resources is computed if partially ordered tasks are not assigned to the same resources for processing. Execution time and communication time required for this example are assumed as shown in Tables 1 and 2.

Many task scheduling result cases exist for this simple problem. For instance, consider the following cases.

*Case 2.1. *Tasks 1 and 3 are assigned to resource M1, and tasks 2, 4, and 5 are distributed to M2. Meanwhile, the processing order of tasks for resource M1 is ; the processing order of tasks for resource M2 is . There are three process paths to complete application, and therefore three corresponding time costs (see Table 3).

It requires 62.22 () to process tasks on path 1 since task 1 and task 3 are on the same resource without data transfer. Nevertheless, task 4 on path 2 has to wait until both path 3 finished () and task 1 finished including data transfer (). Hence, the completion time of path 2 is 67.72 (). Accordingly, the completion time of application is the maximum time cost (67.72) corresponding to the largest cost path. Additional scheduling result cases are also given as follows.

*Case 2.2. *With the same task-resource assignment and processing order of tasks for resource M1 as Case 2.1, but the processing order of tasks for resource M2 is . The completion time of application is 72.72 (see Table 4).

Task 4 on path 2 can only be executed when both task 1 is finished plus data transferred () and task 2 on M2 is done (10). Hence, task 4 starts to execute at 27.72 and completes at 67.72 (). In path 3, task 2 has to wait until task 2 finishes (22.5) and task 4 is completed (67.72). Therefore, time cost for path 3 is 72.72 ().

*Case 2.3. *With different task-resource assignment and processing order of tasks for resources as Case 2.1. Assume that tasks 2 and 3 are assigned to resource M1, and tasks 1, 4 and, 5 are allocated to resource M2. Meanwhile, the processing order of tasks for resource M1 is ; the processing order of tasks for resource M2 is . Then, the completion time of application is 90 which can be determined (see Table 5).

*Case 2.4. *With the same task-resource assignment and processing order of tasks for resource M1 as Case 2.4. And, the processing order of tasks for resource M2 is 154. Then, the completion time of application is 99 which can be determined (see Table 6).

However, there are still many other scheduling result cases of this simple example. Hence, the studied task scheduling problem in grid is indeed complicated. To obtain the best schedule with minimal completion time of application, the task-resource assignment and the processing order (priority) determination of tasks have to be decided accurately.

##### 2.1. The Representation of the Task Scheduling Problem

In this interesting scheduling problem [2], there are tasks , and heterogeneous resources , where and are pseudotasks for scheduling indicating the start and finish states. The workload of task is , and the computing ability of resource is , once the is assigned to , then the ’s execution time can then be obtained.

Hence, this work focuses on how to assign these tasks (ignoring the pseudotasks) to resources for gaining the shortest completion time of scheduling (i.e., ’s finish time).

Herein, with the precedence between tasks addressed, the task scheduling problem is expressed as a directed acyclic graph (DAG) as in Figure 2. An arrow from to indicates that is the immediate predecessor of , and the connection weight is the communication cost for transferring data to , where pseudotasks are without data transfer. If the and are assigned to different resources and , respectively, the bandwidth between and is , , then the communication time can be determined. Restated, the can’t start until the has finished with execution time and communication time .

In [19], the is derived from a predefined table as the matrix **BW** as follows:
where when , that is, the communication time once the , are assigned to the same resource.

In a real situation, the bandwidth between two resources is limited by the resource which has lower bandwidth. Therefore, the approach for deriving the is modified instead of using the matrix **BW**, in this study. Restated, resource has its own bandwidth , then the bandwidth between two resources and can be treated as . For example, Mbps, Mbps, Mbps.

The objective of the task-resource assignment in heterogeneous grid is to minimize tasks’ completion time of application. The task-resource assignment in heterogeneous grid can be expressed by the task-resource assignment graph (T-RAG) as displayed in Figure 3. Restated, a task-resource assignment graph corresponds to a solution of the studied scheduling problem. Figure 3 is an example of a task scheduling problem including 6 tasks and 3 heterogeneous resources. After assigning the resources to tasks, the tasks’ execution and communication times are settled. Hence, the scheduling completion time of tasks can be calculated after the T-RAG is determined.

In the T-RAG, , a set of nodes and edges, consists of paths from to . For example, there are 3 paths in Figure 2, where and are pseudotasks for scheduling indicating the start and finish states in the graph.

For path , and are the sets of nodes and edges on path . Once the node is correlated to , the node cost of node is . And when the edge , which is correlated to and , the edge cost is .

Hence, the path cost of path can be calculated by

The path with the largest cost in the T-RAG corresponds to a feasible scheduling completion time, that is, a solution of the task scheduling problem is associated with a fitness as
However, the fitness is set to a very big value if the schedule is an infeasible solution (such as in a deadlock). The primary objective of this study is to minimize the fitness *, *. Therefore, the objective of studied scheduling problem is summarized as indicated in

##### 2.2. Task Queue

The feasible task-resource assignment in heterogeneous grid is subject to precedence constraint. In the example in Figure 3, the and are assigned to use resource at the same time, and hence the sequence for the and must be indicated. Therefore, the task queue for (resource ) is designated, where the is the first executed task on , and the number of tasks to be executed on is . For example, if , then must be executed prior to . However, a new precedence for the resource can be constructed as shown by the dashed arrow in Figure 4 and the calculation of cost in (2.2) should include the new precedence (edge). Meanwhile, fitness calculation is based on the new T-RAG constructed according to the new precedence.

After constructing the new precedence, if the corresponding T-RAG does not satisfy the ordering relationship among tasks, it is called illegal T-RAG, that is, an infeasible solution. For example, *, *, and tasks are assigned to resource , and . The corresponding T-RAG as displayed in Figure 5 is an illegal T-RAG; hence an infeasible solution is produced since is executed prior to , violating the ordering relationship between and tasks indicated in Figure 2. Restated, the illegal T-RAG may occur for an improper task queue. However, this situation could be detected via depth of tasks in DAG, that is, the task with less depth has higher priority than the task with more depth in DAG. In Figure 5, the depth of each task is shown (see Table 7). Hence should be executed on prior to .

#### 3. Particle Swarm Optimization

The particle swarm optimization (PSO) was first proposed by Kennedy and Eberhart (1995) [16]. It is a multiagent general metaheuristic, and can be applied extensively to solve many complex problems. The PSO consists of a swarm of particles in the search space; the position of a particle is indicated by a vector which represents a solution. PSO is initialized with a population of random positioned particles and searches for the best position with best fitness.

In each generation or iteration, every particle moves to a new position and the new position is guided by the velocity (which is vector), then the corresponding fitness of the particles would be calculated. Therefore, the velocity plays an important role in searching for a solution with better fitness. There are two experience positions used in the PSO for updating the velocity; one is the global experience position of all particles, which remembers the global best solution obtained by all particles; the other is each particle’s individual experience, which recalls the best position that particle has been in. These two experience positions are used to determine the velocity.

Let an dimensional space (the number of dimensions is typically concerned with the definition of the problem) have particles. For the th particle (), its position consists of components , where is the th component of the position, the velocity of particle is , and the particle’s individual best experience is . Additionally, represents the global best experience shared among all the particles. The particle’s individual best experience () and the global best experience of the swarm () are recorded and are updated in every step. When updating, the th component of the position and velocity of the th particle are according to (2.4) shown in
where is an inertial weight used to determine the influence of the previous velocity to the new velocity. The and are learning factors used to derive how the th particle approaching the position closes in on the individual experience position or global experience position, respectively. Furthermore, and are the random numbers uniformly distributed in [0, 1], influencing the tradeoff between the global and local exploration abilities during search. In every step, a fitness () of new particle *i* position () obtained via (3.1) is computed and compared with the fitness () of the recorded individual best experience . The recorded individual best experience is replaced by if *.* Otherwise, is maintained. Meanwhile, is compared with the fitness () of the recorded global best experience (). The recorded global best experience () is replaced by if *. *Otherwise, is maintained. The procedure of the particle swarm optimization is as shown in Algorithm 1.

#### 4. Enhanced Particle Swarm Optimization Scheme

##### 4.1. Encoding Task-Resource Assignment and Task Priority

In PSO, the position of a particle is indicated by a vector which represents the solution. How to map the position vector to the solution is significant for the PSO process. Since the task scheduling problem can be solved by task-resource assignment, a scheme for encoding task-resource assignment into the position vector is necessary.

In this study, an easy discrete transfer scheme is applied for transferring the position vector to the task-resource assignment. For the position vector with components ( tasks), the values of are bounded in (0, 1], and the th component of , which can be transferred to the resource assigned to the by the discrete transfer scheme as listed in(3.1) where is the number of resources, if and, the resource assigned to the would be resource . Suppose that the generated task-resource assignment vector, , based on (3.1) is as follows (Table 8).

Moreover, when the same resource is assigned to more than one task, the task priority needs to be decided for the task queue. Hence, the task priority vector is used, where is the task with highest priority. For example, if , where , , are to use the resource , and , use resource , then the task queue of and would be determined to be and based on Pr.

Since the task priority vector Pr is required, the position vector with components is used for mapping. It's important to note that Pr is a permutation without repeating values; the discrete transfer scheme is not applicable. Instead, the random key scheme is suitable for permutation type solutions. Assume there are 5 keys corresponding to 5 task numbers, and the position vector with 5 components is given as follows (Table 9).

After sorting by increasing order, the keys also rearranged as follows (Table 10).

Then the order of keys (3, 5, 1, 2, 4) can be treated as the task priority vector Pr, that is,.

Hence, two position vectors and for PSO are required to represent the task-resource assignment and task priority, and they can be combined to one position vector ; for convenience, has components.

##### 4.2. Heuristics for Task Scheduling Problem

A heuristic is an experience-based strategy or technique that can be used as an aid in problem solving. Generally, heuristics use accessible information to control problem-solving processes. For PSO, a randomly assigned initial particle position may lead the algorithm to be inefficient. Therefore, for solving the problem efficiently, the corresponding heuristics are often studied and integrated into metaheuristics in most research. In this study, there are two intuitional heuristics proposed for speeding up the PSO’s search when solving a task scheduling problem. They are the best performance resource (BPR) heuristic and the latest finish time (LFT) heuristic, which are used for PSO to initialize the position vectors and , respectively.

These two heuristics are based on a multimode project scheduling problem, with the multimode project scheduling problem is similar to the task-resource assignment problem in this study. In [36], the definitions of a multimode project scheduling problem include the precedence between tasks (in which, the task is called activity), and each task needs to be assigned a “mode” for determining the task’s resource type and requirements, hence the task’s duration would be a variable depending on the resource type. Restated, a multimode project scheduling problem is regarded as a “task-mode” assignment problem rather than a “task-resource” assignment problem. Without the communication cost consideration, the studied task scheduling problem and multimode project scheduling problem are similarly defined. Both are constrained by precedence, and execution time of task or activity (based on the assigned resource or mode).

Some heuristics are proposed for multimode project scheduling problems. They are usually classified into two types of rules: the mode priority rule for choosing mode and activity priority rule for deciding priority among activities. Two heuristics were chosen after various heuristics had been reviewed.

The shortest feasible mode (SFM) heuristic [37] in a multimode project scheduling problem is the basis of the proposed best performance resource (BPR) heuristic for task-resource assignment in this study. The rationale behind the SFM heuristic is clear; the shortest feasible mode is selected to minimize the project duration. Restated, the SFM guides tasks to choose the mode with shortest activity duration. Similarly, the logic of the BPR heuristic is apparent with the best performance resource assigned to shorten completion time. Therefore, the BPR heuristic is proposed to assign the best performance resource to all of the tasks during assignment, and then shorten the execution time of tasks reasonably, that is, assigning the resource with maximum ability among resources to and then decide the .

In MRCPSP, the latest finish time (LFT) heuristic [38] is often used for deciding the priority of tasks. Meanwhile, the LFT heuristic is applied in this work to give higher priority to the tasks with smaller latest finish times LFTs, where the LFT is similar to that in the program evaluation and review technique (PERT). Moreover, the LFT is calculated by the upper bound of scheduling completion time: In (4.2), is determined by the critical path. Then perform a traditional backward recursion using shortest execution time for all tasks.

##### 4.3. The Version of Used Particle Swarm Optimization

Many variations of PSO have been proposed, and one of them is the “standard” PSO proposed by Bratton and Kennedy [39] implying that PSO can be significantly improved. In the standard PSO, a different version of velocity update rule is suggested as follows: where the is constriction factor for adjusting the velocity, and this velocity update rule is suggested for its stability [35]. Hence, this velocity update rule is applied in this study.

In [39], the standard PSO presented two swarm communication topologies for PSO; the “gbest” topology in Figure 6(a) has been studied in most research. The gbest is the global best model where every particle is able to share information with each other quickly, and it is outstanding because of its global communication ability. However, the gbest’s global communication ability usually leads to premature convergence. Hence, the “lbest” topology, like in Figure 6(b), has greatly attracted researchers’ attention recently. The feature of lbest is its limited communication; every particle can just communicate with a portion of the swarm. Meanwhile, the lbest topology can be varied such as a ring formation, Von Neumann neighborhood, and so forth. The “lbest” model used in [35] is the simplest form of a local topology, known as the aforementioned *ring *model. The lbest ring model connects each particle to only two other particles in the swarm. Obviously, lbest has a slower convergence rate relative to the gbest.

Bratton et al. note that the gbest usually results in better performance on simple unimodal problems than using lbest, since the situation about falling into local optima does not happen frequently under a unimodal condition. However, the lbest surpasses the gbest in a number of function evaluations, especially in multimodal problems.

For clearly understanding the performance of both topologies for our task scheduling focus, both topologies were tested in Section 5. The global best experience () in (4.2) is obtained on the basis of either global communication topology or local communication topology. In this paper, the lbest topology is based on the ring topology, it is a “small-world network” [40] as indicated in Figure 6(b). In other words, the global experience () based on local communication topology (*lbest*) is determined by , , and particle positions. On the other hand, the global experience () is determined by all particles when applying global communication topology (*gbest*).

Accordingly, the procedure of our proposed enhanced particle swarm optimization is summarized as shown in Algorithm 2.

#### 5. Experimental Results and Comparisons

For verifying the suggested scheme in this investigation, simulated cases based on [2, 41] are generated. The simulation case has 15 tasks and 2 pseudotasks as described in Table 11. In Table 11, the workload, successors, and the communication costs are depicted. For example, task 1 has a workload , its successors are , , , and the corresponding communication costs are , , and .

Three instances of resources A, B, and C with 2, 5, and 10 resources, respectively, are displayed in Table 12. They are used for testing 3 differing resource situations.

The simulation parameters are set as follows: the number of particles is 20 and the initial positions and velocities of particles are randomly assigned except for the heuristics used. Meanwhile, the velocity update rule with constriction factor is used, the constriction factor is a variable based on the circumstances, and different constriction factor values were tested. The learning factors and are set to 2 as suggested in [16]. Meanwhile, and are the random numbers uniformly distributed in [0, 1].

There are a total of 24 sets of testing cases simulated as shown in Table 13. The experimental results are also displayed in Table 13. Each set of a testing case is tested for 30 trials to obtain the minimum and average scheduling completion times. The simulation result is expressed as the format: *minimum completion time/average completion time*. And each trial was iterated 100 and 300 times. Moreover, the two heuristics and two topologies of PSO were also tested. To verify the influences of both LFT and BPR heuristics, four different situations are tested: without both LFT and BPR; with LFT and without BPR; without LFT and with BPR; with both LFT and BPR. Different global best experiences based on global and local communication topologies impact to the performance are also tested. The global experience () for local communication topology (*lbest*) is determined by , , and particle positions. Additionally, the best constriction factor for balancing the global and local searches to enhance the performance is surveyed.

The simulation results indicate that the *lbest* topology is apparently better than the *gbest* on average. The LFT heuristic is efficient in the test especially for instance C. However, if the BPR is polarized, it leads to worse scheduling for testing instance A, but outstanding scheduling for instances B and C. The situation indicates that applying the BPR to the task scheduling problem with fewer resources is improper. Moreover, the BPR is able to perform better than LFT for instances B and C. Hence, these two heuristics are worth applying to improve the efficiency of solving task scheduling problems in grid, but the BPR is not suitable for problems with poor resources.

To verify the effectiveness and efficiency of the proposed scheme, some similar scheduling problems were tested since there is no benchmark for task-resource assignment of heterogeneous grid. As stated in Section 4.2, the multimode project scheduling problem is similar to the studied task-resource assignment problem. There are some multimode resource constrained project scheduling problem (MRCPSP) instances in the project scheduling problem library (PSPLIB) [42], including scheduling problems with 10, 12, 14, 16, 18, 20, and 30 jobs (they are denoted by J10, J12, J14, J16, J18, J20, and J30, resp.). Every job case has different instances (e.g., 536 instances for J10 case and 552 instances for J30 case) with different available modes. Meanwhile, MRCPSP has been confirmed to be an NP-hard optimization problem [43]. Table 14 shows the difficulty of solving the studied problem. Meanwhile, the “Example” column represents the possible solutions of the studied problems. The time required by exhaustive search for simulated TRA-G problem would be seconds days (a solution that can be found in 0.01 *μ*sec (10^{−8} sec) is assumed). The time required by exhaustive search for simulated MRCPSP-J30 problem would be seconds days.

In this study, the suggested algorithm was applied to solve the “largest” scale instance, the J30 case. In J30 case, there are 3 modes available for each activity. Additionally, most of the research performance comparison among different methods is conducted by evaluating the same number of schedules for each case, for example, 1000 schedules, 5000 schedules, or 50000 schedules. Meanwhile, MRCPSP is a task-mode assignment problem; hence, the SFM heuristic is tested instead of the BPR heuristic. Table 15 shows the simulation results of all 552 instances of the J30 case. Each instance simulation was stopped whenever a total number of 5000 schedules were evaluated. The comparison is on the basis of lower bound solutions since no optimal solution is known, and for many instances of that set, a feasible solution does not exist. Hence, the ratio of lower bound solutions was measured, (lower bound solutions found/552)*100%, in the test; test results are demonstrated in Table 15. Moreover, CPU times employed by algorithms are also displayed.

Table 15 illustrates that the proposed scheme yields 57.97% lower bound solutions on J30 case. Currently, no study’s results exceed 60% optimal solutions of all 552 instances. Nevertheless, some studies present their scheme performance with over 60% optimal solutions found, since they did not include all 552 instances (such as [47]) for their tests. Meanwhile, the CPU time for finding 5000 schedules by proposed PSO is about 0.769 second. However, the performance comparison based on computation time was also conducted by Hartman [36]. Hence, the comparisons of simulation results from different algorithms for a time limit of one second are displayed in Table 16. The simulation results for the set with J30 reflect deviations from a lower bound makespan. The average deviation, maximum deviation, and found feasible solutions ratio comparisons are given in Table 16. In this work, more than 6000 schedules (for one instance of J30 case) can be obtained from our algorithm in one second. Restated, the consumed CPU time to find a feasible solution for every instance for J30 would be less than 0.167 ms. The average and maximal deviations are less than 5% and 80%, respectively; more than 90% feasible solution can be obtained in one second. Hence, the proposed scheme is effective for solving similar problems in task-resource assignment.

#### 6. Conclusions and Discussion

The task scheduling of resource allocation is a critical issue in grid. Most task scheduling problems are complicated and NP-complete. The studied task scheduling problem is regarded as a task-resource assignment graph optimization problem. This study proposes an enhanced scheme based on the “standard” PSO to solve the task scheduling problem in grid. Meanwhile, there are two extra heuristics proposed to enhance the efficiency of problem solving: the LFT heuristic and BPR heuristic are applied, where the LFT heuristic helps PSO to decide the priority of tasks in the task queue, and performing well for each test in this study. The BPR heuristic helps PSO to determine task-resource assignment, and performs well for problems with more available resources. However, applying the proposed BPR for task-resource assignment would be worse with a problem with poor resources, since fewer resources can be chosen for obtaining the best performance resource. Moreover, two PSO communication topologies in obtaining global best experience are evaluated for solving task scheduling in this study; they are global communication topology (gbest) and local communication topology (lbest). The “lbest” performs better than the “gbest” in most tests of this problem class. According to simulation results as displayed in Table 13, this proposed scheme, involving two heuristics and “*lbest*” communication topology on top of the “standard” PSO, is effective and efficient for solving task-resource assignment problems in grid. Meanwhile, the proposed scheme can obtain 57.97% lower bound solutions of the largest instances of PSPLIB [42] in 0.769 second, as displayed in Table 15. More than 90% feasible solutions can be yielded in one second; resulting minimal and maximal deviations are less than 5% and 80%. Restated, the simulation results verify that the proposed scheme is adequate and efficient for solving this class of scheduling problems.

Although the scheme proposed in the study is able to solve the task scheduling problem efficiently, further improvement is possible if the BPR heuristic can be improved and made to perform well for any problem. Hence, future work should investigate more suitable heuristics. Meanwhile, this study does not consider the contention for communication resources. To be more close to the real situation, the contention consideration as in [20] should be included in future work. Moreover, more complex task scheduling problems such as processor utilization consideration are planned to be further investigated.

#### Acknowledgment

This work was partly supported by the National Science Council, Taiwan, under contract NSC 99-2221-E-167-007.

#### References

- I. Foster, C. Kesselman, and S. Tuecke, “The anatomy of the grid: enabling scalable virtual organizations,”
*International Journal of High Performance Computing Applications*, vol. 15, no. 3, pp. 200–222, 2001. View at Publisher · View at Google Scholar · View at Scopus - T. Chen, B. Zhang, X. Hao, and Y. Dai, “Task scheduling in grid based on particle swarm optimization,” in
*Proceedings of the 5th International Symposium on Parallel and Distributed Computing (ISPDC '06)*, pp. 238–245, July 2006. View at Publisher · View at Google Scholar · View at Scopus - A. Salman, I. Ahmad, and S. Al-Madani, “Particle swarm optimization for task assignment problem,”
*Microprocessors and Microsystems*, vol. 26, no. 8, pp. 363–371, 2002. View at Publisher · View at Google Scholar · View at Scopus - M. Aggarwal, R. D. Kent, and A. Ngom, “Genetic algorithm based scheduler for computational grids,” in
*Proceedings of the 19th International Symposium on High Performance Computing Systems and Applications (HPCS '05)*, pp. 209–215, May 2005. View at Scopus - G. Malewicz, A. L. Rosenberg, and M. Yurkewych, “On scheduling complex dags for internet-based computing,” in
*Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS '05)*, April 2005. View at Publisher · View at Google Scholar · View at Scopus - L. He, S. A. Jarvis, D. P. Spooner, D. Bacigalupo, G. Tan, and G. R. Nudd, “Mapping DAG-based applications to multiclusters with background workload,” in
*Proceedings of the IEEE International Symposium on Cluster Computing and the Grid*, pp. 855–862, May 2005. View at Publisher · View at Google Scholar · View at Scopus - G. T. Ross and R. M. Soland, “A branch and bound algorithm for the generalized assignment problem,”
*Mathematical Programming*, vol. 8, pp. 91–103, 1975. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - R. M. Chen, S. T. Lo, and Y. M. Huang, “Combining competitive scheme with slack neurons to solve real-time job scheduling problem,”
*Expert Systems with Applications*, vol. 33, no. 1, pp. 75–85, 2007. View at Publisher · View at Google Scholar · View at Scopus - F. E. Sandnes, “Secure distributed configuration management with randomised scheduling of system-administration tasks,”
*IEICE Transactions on Information and Systems*, vol. E86-D, no. 9, pp. 1601–1610, 2003. View at Google Scholar · View at Scopus - M. Basu, “Hybridization of artificial immune systems and sequential quadratic programming for dynamic economic dispatch,”
*Electric Power Components and Systems*, vol. 37, no. 9, pp. 1036–1045, 2009. View at Publisher · View at Google Scholar · View at Scopus - J. H. Holland, “Genetic algorithms and classifier systems: foundations and future directions,” in
*Proceedings of the 2nd International Conference on Genetic Algorithms and Their Application*, 1987. - S. Kirkpatrick, C. D. Gelatt Jr., and M. P. Vecchi, “Optimization by simulated annealing,”
*Science*, vol. 220, no. 4598, pp. 671–680, 1983. View at Google Scholar - F. Glover, “Tabu search—part I,”
*ORSA Journal on Computing*, vol. 1, no. 3, pp. 190–206, 1989. View at Google Scholar - F. Glover, “Tabu search—part II,”
*ORSA Journal on Computing*, vol. 2, no. 1, pp. 4–32, 1990. View at Google Scholar - M. Dorigo and L. M. Gambardella, “Ant colony system: a cooperative learning approach to the traveling salesman problem,”
*IEEE Transactions on Evolutionary Computation*, vol. 1, no. 1, pp. 53–66, 1997. View at Google Scholar · View at Scopus - J. Kennedy and R. Eberhart, “Particle swarm optimization,” in
*Proceedings of the 4th IEEE International Conference on Neural Networks*, pp. 1942–1948, December 1995. View at Scopus - J. Oh and C. Wu, “Genetic-algorithm-based real-time task scheduling with multiple goals,”
*Journal of Systems and Software*, vol. 71, no. 3, pp. 245–258, 2004. View at Publisher · View at Google Scholar · View at Scopus - Z. Liu and H. Wang, “GA-based resource-constrained project scheduling with the objective of minimizing activities’ cost,” in
*Proceedings of the International Conference on Intelligent Computing (ICIC '05)*, vol. 3644 of*Lecture Notes in Computer Science*, pp. 937–946, August 2005. View at Scopus - N. Amjady and A. Shirzadi, “Unit commitment using a new integer coded genetic algorithm,”
*European Transactions on Electrical Power*, vol. 19, no. 8, pp. 1161–1176, 2009. View at Publisher · View at Google Scholar · View at Scopus - O. Sinnen, L. A. Sousa, and F. E. Sandnes, “Toward a realistic task scheduling model,”
*IEEE Transactions on Parallel and Distributed Systems*, vol. 17, no. 3, pp. 263–275, 2006. View at Publisher · View at Google Scholar · View at Scopus - K. Bouleimen and H. Lecocq, “A new efficient simulated annealing algorithm for the resource-constrained project scheduling problem and its multiple mode version,”
*European Journal of Operational Research*, vol. 149, no. 2, pp. 268–281, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - K. H. Kim and K. C. Moon, “Berth scheduling by simulated annealing,”
*Transportation Research B*, vol. 37, no. 6, pp. 541–560, 2003. View at Publisher · View at Google Scholar · View at Scopus - G. Wan and B. P.-C. Yen, “Tabu search for single machine scheduling with distinct due windows and weighted earliness/tardiness penalties,”
*European Journal of Operational Research*, vol. 142, no. 2, pp. 271–281, 2002. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - S. G. Ponnambalam, P. Aravindan, and S. V. Rajesh, “Tabu search algorithm for job shop scheduling,”
*International Journal of Advanced Manufacturing Technology*, vol. 16, no. 10, pp. 765–771, 2000. View at Publisher · View at Google Scholar · View at Scopus - S. T. Lo, R. M. Chen, Y. M. Huang, and C. L. Wu, “Multiprocessor system scheduling with precedence and resource constraints using an enhanced ant colony system,”
*Expert Systems with Applications*, vol. 34, no. 3, pp. 2071–2081, 2008. View at Publisher · View at Google Scholar · View at Scopus - W. J. Gutjahr and M. S. Rauner, “An ACO algorithm for a dynamic regional nurse-scheduling problem in Austria,”
*Computers and Operations Research*, vol. 34, no. 3, pp. 642–666, 2007. View at Publisher · View at Google Scholar · View at Scopus - F. Zhao, Y. Hong, D. Yu, Y. Yang, and Q. Zhang, “A hybrid particle swarm optimisation algorithm and fuzzy logic for process planning and production scheduling integration in holonic manufacturing systems,”
*International Journal of Computer Integrated Manufacturing*, vol. 23, no. 1, pp. 20–39, 2010. View at Publisher · View at Google Scholar · View at Scopus - T. L. Lin, S. J. Horng, T. W. Kao et al., “An efficient job-shop scheduling algorithm based on particle swarm optimization,”
*Expert Systems with Applications*, vol. 37, no. 3, pp. 2629–2636, 2010. View at Publisher · View at Google Scholar · View at Scopus - H. Liu, A. Abraham, and Z. Wang, “A multi-swarm approach to multi-objective flexible job-shop scheduling problems,”
*Fundamenta Informaticae*, vol. 95, no. 4, pp. 465–489, 2009. View at Google Scholar - R. M. Chen, C. L. Wu, C. M. Wang, and S. T. Lo, “Using novel particle swarm optimization scheme to solve resource-constrained scheduling problem in PSPLIB,”
*Expert Systems with Applications*, vol. 37, no. 3, pp. 1899–1910, 2010. View at Publisher · View at Google Scholar · View at Scopus - C. Chiu, M. J. J. Wu, Y. T. Tsai, N. H. Chiu, M. S. H. Ho, and H. J. Shyu, “Constrain-based particle swarm optimization (CBPSO) for call center scheduling,”
*International Journal of Innovative Computing, Information and Control*, vol. 5, no. 12, pp. 4541–4549, 2009. View at Google Scholar · View at Scopus - M. F. Tasgetiren, Y. C. Liang, M. Sevkli, and G. Gencyilmaz, “A particle swarm optimization algorithm for makespan and total flowtime minimization in the permutation flowshop sequencing problem,”
*European Journal of Operational Research*, vol. 177, no. 3, pp. 1930–1947, 2007. View at Publisher · View at Google Scholar · View at Scopus - J. Behnamian, M. Zandieh, and S. M. T. Fatemi Ghomi, “Due windows group scheduling using an effective hybrid optimization approach,”
*International Journal of Advanced Manufacturing Technology*, vol. 46, no. 5–8, pp. 721–735, 2010. View at Publisher · View at Google Scholar · View at Scopus - Y. Hei, X. Li, K. Yi, and H. Yang, “Novel scheduling strategy for downlink multiuser MIMO system: particle swarm optimization,”
*Science in China F*, vol. 52, no. 12, pp. 2279–2289, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - M. Clerc and J. Kennedy, “The particle swarm-explosion, stability, and convergence in a multidimensional complex space,”
*IEEE Transactions on Evolutionary Computation*, vol. 6, no. 1, pp. 58–73, 2002. View at Publisher · View at Google Scholar · View at Scopus - S. Hartmann, “Project scheduling with multiple modes: a genetic algorithm,”
*Annals of Operations Research*, vol. 102, no. 1, pp. 111–135, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - F. F. Boctor, “Heuristics for scheduling projects with resource restrictions and several resource-duration modes,”
*International Journal of Production Research*, vol. 31, no. 11, pp. 2547–2558, 1993. View at Google Scholar · View at Scopus - P. Brucker, A. Drexl, R. Möhring, K. Neumann, and E. Pesch, “Resource-constrained project scheduling: notation, classification, models, and methods,”
*European Journal of Operational Research*, vol. 112, no. 1, pp. 3–41, 1999. View at Google Scholar · View at Scopus - D. Bratton and J. Kennedy, “Defining a standard for particle swarm optimization,” in
*Proceedings of the IEEE Swarm Intelligence Symposium (SIS '07)*, pp. 120–127, April 2007. View at Publisher · View at Google Scholar · View at Scopus - D. J. Watts and S. H. Strogatz, “Collective dynamics of ‘small-world’ networks,”
*Nature*, vol. 393, no. 6684, pp. 440–442, 1998. View at Google Scholar · View at Scopus - J. N. Lin and H. Z. Wu, “Scheduling in grid computing environment based on genetic algorithm,”
*Journal of Computer Research and Development*, vol. 41, no. 12, pp. 2195–2199, 2004 (Chinese). View at Google Scholar · View at Scopus - Project Scheduling Problem Library, PSPLIB, http://129.187.106.231/psplib/.
- W. Herroelen, B. De Reyck, and E. Demeulemeester, “Resource-constrained project scheduling: a survey of recent developments,”
*Computers & Operations Research*, vol. 25, no. 4, pp. 279–302, 1998. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - B. Jarboui, N. Damak, P. Siarry, and A. Rebai, “A combinatorial particle swarm optimization for solving multi-mode resource-constrained project scheduling problems,”
*Applied Mathematics and Computation*, vol. 195, no. 1, pp. 299–308, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - J. Alcaraz, C. Maroto, and R. Ruiz, “Solving the multi-mode resource-constrained project scheduling problem with genetic algorithms,”
*Journal of the Operational Research Society*, vol. 54, no. 6, pp. 614–626, 2003. View at Publisher · View at Google Scholar · View at Scopus - J. Józefowska, M. Mika, R. Różycki, G. Waligóra, and J. Węglarz, “Simulated annealing for multi-mode resource-constrained project scheduling,”
*Annals of Operations Research*, vol. 102, no. 1–4, pp. 137–155, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - C. W. Chiang, Y. Q. Huang, and W. Y. Wang, “Ant colony optimization with parameter adaptation for multi-mode resource-constrained project scheduling,”
*Journal of Intelligent and Fuzzy Systems*, vol. 19, no. 4-5, pp. 345–358, 2008. View at Google Scholar · View at Scopus - S. Hartmann and A. Drexl, “Project scheduling with multiple modes: a comparison of exact algorithms,”
*Networks*, vol. 32, no. 4, pp. 283–297, 1998. View at Google Scholar · View at Zentralblatt MATH