4. Experimental results and discussion

Since there is not any specific library providing grid task scheduling problems for workflow applications, workflow scheduling problems involving larger numbers of tasks were also designed for this study to test whether the proposed method can also perform well on largescale problems. Intrinsically, the workflow scheduling problem can be regarded as a derivative of the multimode resource-constrained project scheduling problem (MRCPSP). Therefore, the task precedence constraints of the designed workflow scheduling problems in this work are generated based on the problem cases (J10, J12, J14, J16, J18, J20, and J30) of the MRCPSP in the PSPLIB library; each problem case has 50 different instances generated. The workload of an activity is a randomly produced number with 1000 as the base unit. The data transmission between predecessors and successors is created by using random numbers with 10 as the base unit. The processing ability and the external bandwidth of computing resources in the grid were generated as those in the problem designed by [15] as listed in Table 1. Table 2 illustrates the workflow application example of a J14 instance including workload, number of successors, precedence (successor), and communication cost. In Table 2, the tasks 0 and 15 are pseudo tasks representing the start and end. The corresponding DAG of the workflow application instance is displayed in Figure 6. The settings of the parameters in constriction and discrete PSOs are χ = 0.72984, χ = 1, and c<sup>1</sup> = c<sup>2</sup> = 2. The values of different SGP parameters SGP = {0, 0.1, 0.2, …, 0.9, 1} were tested on the all designed problems (J10, J12, J14, J16, J18, J20, and J30) to understand their influence on the SGPSO performance. To evaluate the performance of the workflow application scheduling on the grid, Avg.Dev(%) is used and defined as in Eq. (10):

Stochastic Greedy-Based Particle Swarm Optimization for Workflow Application in Grid http://dx.doi.org/10.5772/intechopen.73587 51

$$\begin{split} \text{Dev}(\%) &= \sum\_{i \in \text{instances}} \left( \frac{\text{FIT}\_i - \text{best}\_i}{\text{best}\_i} \times 100\% \right) / |\text{instances}| \\ &\sum\_{i=1 \sim T} \text{Dev}(\%) \\ \text{Avg.Dev}(\%) &= \frac{\sum\_{t=1 \sim T} \text{Dev}(\%)}{T} \end{split} \tag{10}$$


Table 1. Grid environment example.

matching problem. The operation procedures of the proposed scheme of applying SGPSO and DPSO to solve the interested workflow application scheduling problem in the grid are listed in

The diversity of the swarm during moving in the solution space impacts the solution quality. High diversity of the particles in the initial stage is desired for possible most solution space to find a good seed of search. Conversely, in the latter stage, the particles ought to proceed fine search for the better solution, i.e., low diversity of the population should be provided. To analyze the diversity of the SGPSO, the diversity (DIV) of a particle swarm is defined by the

> X N

Dis Xi; Xj � � C<sup>N</sup> 2

∣Xik, Xjk∣

(9)

j¼iþ1

where Dis(Xi, Xj) is the absolute distance between particles Xi and Xj. D is the dimension of the

Since there is not any specific library providing grid task scheduling problems for workflow applications, workflow scheduling problems involving larger numbers of tasks were also designed for this study to test whether the proposed method can also perform well on largescale problems. Intrinsically, the workflow scheduling problem can be regarded as a derivative of the multimode resource-constrained project scheduling problem (MRCPSP). Therefore, the task precedence constraints of the designed workflow scheduling problems in this work are generated based on the problem cases (J10, J12, J14, J16, J18, J20, and J30) of the MRCPSP in the PSPLIB library; each problem case has 50 different instances generated. The workload of an activity is a randomly produced number with 1000 as the base unit. The data transmission between predecessors and successors is created by using random numbers with 10 as the base unit. The processing ability and the external bandwidth of computing resources in the grid were generated as those in the problem designed by [15] as listed in Table 1. Table 2 illustrates the workflow application example of a J14 instance including workload, number of successors, precedence (successor), and communication cost. In Table 2, the tasks 0 and 15 are pseudo tasks representing the start and end. The corresponding DAG of the workflow application instance is displayed in Figure 6. The settings of the parameters in constriction and discrete PSOs are χ = 0.72984, χ = 1, and c<sup>1</sup> = c<sup>2</sup> = 2. The values of different SGP parameters SGP = {0, 0.1, 0.2, …, 0.9, 1} were tested on the all designed problems (J10, J12, J14, J16, J18, J20, and J30) to understand their influence on the SGPSO performance. To evaluate the performance of the workflow application scheduling on the grid, Avg.Dev(%) is used and defined as in Eq. (10):

D

k¼1

� � <sup>¼</sup> <sup>X</sup>

average absolute distance of whole particles as given in Eq. (9) [22]:

DIV ¼

Dis Xi; Xj

N X�1 i¼1

Figure 5.

3.4. The diversity of SGPSO

50 Particle Swarm Optimization with Applications

particle, and N is the number of particles.

4. Experimental results and discussion


Table 2. A workflow application example of J14.

only), only local experience is referred to, and slow convergence exhibits while searching in a

Stochastic Greedy-Based Particle Swarm Optimization for Workflow Application in Grid

http://dx.doi.org/10.5772/intechopen.73587

53

Meanwhile, the obtained minimum Avg.Dev corresponding to the SGP for each problem case is shown in Table 4. The SGP of minimum Avg.Dev for J10 is zero, which is because the best solution in small solution space can be found by exploration search only. The SGPs of minimum Avg.Dev for J12 to J18 and J20 are 0.1 and 0.2, respectively. That is, more exploration search is adequate for small- and medium-scale problems. Since J30 is much more complex than J20, the solution space is vast. Thus, the SGP of the minimum Avg.Dev for J30 is 0.8 indicating that more exploitation search for large-scale problems is desired. Restated, the small-scale problem requires smaller SGP, and the large-scale problem needs larger SGP to

Moreover, the comparisons between conventional PSO (ω = 0.8) and the proposed SGPSO (χ = 0.72984, SGP = 0.1) are provided in Table 5. Table 5 indicates that SGPSO outperforms conventional PSO; SGPSO obtains the minimum Avg.Dev for most problem cases except the largest-scale problem (J30). The particle of conventional PSO swarm refers both global and individual experiences to move, i.e., involving both exploitation and exploration during solution search. However, the particle of the SGPSO swarm with SGP = 0.1 mostly refers to individual experience to be the moving guidance, i.e., exploration is carried out during solution search. As concluded above, larger SGP is required to obtain the optimal solution for large-scale problems; hence, SGP = 0.1 conducting more exploration would cause slow convergence. Therefore, when SGP = 0.8 is applied for solving J30, the resulting Avg.Dev (14.61%) is

A resulting schedule of the corresponding DAG of the workflow application scheduling instance with 14 tasks (Figure 6) is displayed in Figure 7. The fitness evolution of the J14

Additionally, to further realize the search behavior of the proposed scheme, the diversity evolution of the proposed SGPSO is checked. Figure 9 displays the diversity evolution of a J14 instance with SGP = 0, SGP = 0.1, SGP = 0.8, and SGP = 1. The diversity to be checked in this

SGP 0.0 0.1 0.1 0.1 0.1 0.2 0.8 Avg.Dev 3.86 6.58 7.32 15.43 12.14 14.03 14.61

SGPSO 3.88 6.58 7.32 15.43 12.14 14.31 17.27 10.99 PSO 4.52 7.42 8.72 20.55 13.12 15.12 15.92 12.20

J10 J12 J14 J16 J18 J20 J30

J10 J12 J14 J16 J18 J20 J30 Avg.

lower than that (15.92%) by using the conventional PSO as shown in Table 5.

instance with different SGPs is displayed in Figure 8.

vast solution space, i.e., obtained optimal solution demands much more iterations.

obtain optimal solution.

study is defined as in Eq. (9).

Table 4. Minimum Avg.Dev corresponds to the SGP.

Table 5. Comparisons between conventional PSO and SGPSO (SGP = 0.1).

Figure 6. DAG of J14 example in Table 2.

where FITi indicates the fitness of instance i and besti is the best known solution of instance i. The |instances| denotes the number of instances of a problem case; it is 50 in this study. Hence, the Dev(%) represents the average deviation from the best known solutions which is the best solution found so far. The Avg.Dev(%) is the average of T trials; in this work, 10 trials (T = 10) were conducted.

The performance evaluation on J10 to J30 associates with different SGP values is displayed in Table 3. When the SGPs are 0 and 1, the averages of all problem cases' Avg.Dev are 12.43 and 12.05%; they are higher than other Avg.Dev results via other SGPs. This is because only global experience is referred to when SGP = 1 (exploitation only), and convergence of the algorithm in the process of searching in the vast solution space is premature; it is easy to get trapped on local optimums and impossible to obtain the global optimum. When SGP = 0 (exploration


Table 3. Performance evaluation on J10 to J30.

only), only local experience is referred to, and slow convergence exhibits while searching in a vast solution space, i.e., obtained optimal solution demands much more iterations.

Meanwhile, the obtained minimum Avg.Dev corresponding to the SGP for each problem case is shown in Table 4. The SGP of minimum Avg.Dev for J10 is zero, which is because the best solution in small solution space can be found by exploration search only. The SGPs of minimum Avg.Dev for J12 to J18 and J20 are 0.1 and 0.2, respectively. That is, more exploration search is adequate for small- and medium-scale problems. Since J30 is much more complex than J20, the solution space is vast. Thus, the SGP of the minimum Avg.Dev for J30 is 0.8 indicating that more exploitation search for large-scale problems is desired. Restated, the small-scale problem requires smaller SGP, and the large-scale problem needs larger SGP to obtain optimal solution.

Moreover, the comparisons between conventional PSO (ω = 0.8) and the proposed SGPSO (χ = 0.72984, SGP = 0.1) are provided in Table 5. Table 5 indicates that SGPSO outperforms conventional PSO; SGPSO obtains the minimum Avg.Dev for most problem cases except the largest-scale problem (J30). The particle of conventional PSO swarm refers both global and individual experiences to move, i.e., involving both exploitation and exploration during solution search. However, the particle of the SGPSO swarm with SGP = 0.1 mostly refers to individual experience to be the moving guidance, i.e., exploration is carried out during solution search. As concluded above, larger SGP is required to obtain the optimal solution for large-scale problems; hence, SGP = 0.1 conducting more exploration would cause slow convergence. Therefore, when SGP = 0.8 is applied for solving J30, the resulting Avg.Dev (14.61%) is lower than that (15.92%) by using the conventional PSO as shown in Table 5.

A resulting schedule of the corresponding DAG of the workflow application scheduling instance with 14 tasks (Figure 6) is displayed in Figure 7. The fitness evolution of the J14 instance with different SGPs is displayed in Figure 8.

Additionally, to further realize the search behavior of the proposed scheme, the diversity evolution of the proposed SGPSO is checked. Figure 9 displays the diversity evolution of a J14 instance with SGP = 0, SGP = 0.1, SGP = 0.8, and SGP = 1. The diversity to be checked in this study is defined as in Eq. (9).



Table 4. Minimum Avg.Dev corresponds to the SGP.

where FITi indicates the fitness of instance i and besti is the best known solution of instance i. The |instances| denotes the number of instances of a problem case; it is 50 in this study. Hence, the Dev(%) represents the average deviation from the best known solutions which is the best solution found so far. The Avg.Dev(%) is the average of T trials; in this work, 10 trials (T = 10)

The performance evaluation on J10 to J30 associates with different SGP values is displayed in Table 3. When the SGPs are 0 and 1, the averages of all problem cases' Avg.Dev are 12.43 and 12.05%; they are higher than other Avg.Dev results via other SGPs. This is because only global experience is referred to when SGP = 1 (exploitation only), and convergence of the algorithm in the process of searching in the vast solution space is premature; it is easy to get trapped on local optimums and impossible to obtain the global optimum. When SGP = 0 (exploration

SGP J10 J12 J14 J16 J18 J20 J30 Avg. 0 3.86 6.61 7.87 15.55 13.11 16.28 23.70 12.43 0.1 3.88 6.58 7.32 15.43 12.14 14.31 17.27 10.99 0.2 4.44 6.87 7.67 15.95 12.39 14.03 15.93 11.04 0.3 4.18 6.74 8.11 15.93 12.46 14.62 15.13 11.02 0.4 4.27 7.27 8.63 16.49 12.54 15.25 14.92 11.34 0.5 4.55 7.26 8.36 16.52 12.49 14.73 15.22 11.30 0.6 4.69 7.82 8.68 16.74 12.72 14.88 15.62 11.59 0.7 4.60 7.39 8.55 17.35 13.21 14.92 15.41 11.63 0.8 4.93 7.50 8.68 17.40 13.13 15.40 14.61 11.66 0.9 4.97 7.77 8.94 16.78 13.38 15.63 15.53 11.86 1 4.79 7.66 9.06 17.36 13.63 16.13 15.72 12.05

were conducted.

Figure 6. DAG of J14 example in Table 2.

52 Particle Swarm Optimization with Applications

Table 3. Performance evaluation on J10 to J30.

Table 5. Comparisons between conventional PSO and SGPSO (SGP = 0.1).

Finally, this work tested the workflow application problems examined in [15] to verify the proposed method. The comparison is made mainly with the largest-scale case in [15] which

Stochastic Greedy-Based Particle Swarm Optimization for Workflow Application in Grid

http://dx.doi.org/10.5772/intechopen.73587

55

The settings of the parameters in constriction and discrete PSOs are χ = 0.72984, ω = 1, and c1 = c2 = 2. The values of different SGP parameters SGP = {0, 0.1, 0.2, …, 0.9, 1} were tested. The minimum average fitness of the simulation results of iteration = 300 is shown in Figure 10.

involves 15 tasks (represented here as J15).

Figure 9. The diversity evolutions of the swarm of a J14 instance with different SGPs.

Figure 10. The minimum average fitness of J15.

Figure 7. Workflow schedule of the J14 instance.

Figure 8. Fitness evolutions on J14 with different SGPs.

In Figure 9, the diversity remains high until the end of the operation when SGP = 0 without referencing global experience. Restated, particle search behavior keeps exploration until the end and hence suffers slow convergence. Conversely, the diversity quickly drops to none for SGP = 1, i.e., the particles go to exploitation search and therefore lead to premature convergence and trap on local optima. When SGP = 0.8, the behavior is similar to that of SGP = 1 but provides some exploration ability. Hence, SGP = 0.8 has the higher diversity than that of SGP = 1. With the setting of SGP = 0.1, high diversity in the early stage and diversity gradually lowered after the middle stage to the end are provided. Therefore, giving global search in the early stage gradually shrinks the search area in the later stage, hence providing an ideal search process from exploration to exploitation for finding the optimal schedule.

Finally, this work tested the workflow application problems examined in [15] to verify the proposed method. The comparison is made mainly with the largest-scale case in [15] which involves 15 tasks (represented here as J15).

The settings of the parameters in constriction and discrete PSOs are χ = 0.72984, ω = 1, and c1 = c2 = 2. The values of different SGP parameters SGP = {0, 0.1, 0.2, …, 0.9, 1} were tested. The minimum average fitness of the simulation results of iteration = 300 is shown in Figure 10.

Figure 9. The diversity evolutions of the swarm of a J14 instance with different SGPs.

Figure 10. The minimum average fitness of J15.

In Figure 9, the diversity remains high until the end of the operation when SGP = 0 without referencing global experience. Restated, particle search behavior keeps exploration until the end and hence suffers slow convergence. Conversely, the diversity quickly drops to none for SGP = 1, i.e., the particles go to exploitation search and therefore lead to premature convergence and trap on local optima. When SGP = 0.8, the behavior is similar to that of SGP = 1 but provides some exploration ability. Hence, SGP = 0.8 has the higher diversity than that of SGP = 1. With the setting of SGP = 0.1, high diversity in the early stage and diversity gradually lowered after the middle stage to the end are provided. Therefore, giving global search in the early stage gradually shrinks the search area in the later stage, hence providing an ideal search

process from exploration to exploitation for finding the optimal schedule.

Figure 7. Workflow schedule of the J14 instance.

54 Particle Swarm Optimization with Applications

Figure 8. Fitness evolutions on J14 with different SGPs.

Figure 10 shows that the minimal fitness (44.5) can be obtained when SGP = 0.1 and SGP = 0.8. However, the minimum average fitness (45.88) is obtained when SGP = 0.1. The results coincide with the above experiment consequences. The comparison between this work and [15] is listed in Table 6.

By using the SGP to control the search behavior, either exploitation or exploration would make

Stochastic Greedy-Based Particle Swarm Optimization for Workflow Application in Grid

http://dx.doi.org/10.5772/intechopen.73587

57

Meanwhile, high diversity in the early stage and low diversity in the later stage are preferred for searching in the solution space provided as indicated in Figure 9. Therefore, the proposed SGPSO with lower SGP is suggested for solving workflow class scheduling problem in the grid.

Unlike in [15], using heuristics to find initial solutions is not adopted in this work. Therefore, there is no need to consider which heuristic should be designed to increase performance, and hence the algorithm is thus easier to implement. In [15], the best result comes with the constriction factor χ = 0.5 which was obtained after thorough testing. However, the best result can be yielded with the commonly suggested value χ = 0.72984. Hence, the laborious work of

The experimental results show that the proposed method can effectively solve grid task scheduling problems and boost grid performance. In reality, there are many problems similar to grid task scheduling problems, such as the multimode resource-constrained project scheduling problems (MRCPSPs). In the future, the method proposed in this study will be applied to find

This work was partly funded and supported by the Ministry of Science and Technology,

the algorithm simplified and also reduce the execution time.

finding the best constriction factor value is eliminated.

Taiwan, under contract MOST 104-2221-E-167-011.

\* and Yin-Mou Shen<sup>2</sup>

\*Address all correspondence to: rmchen@mail.ncut.edu.tw

1 Department of Computer Science and Information Engineering, National Chin-Yi

2 Department of Information Management, Kun Shan University, Taiwan

The authors declare no conflict of interest.

University of Technology, Taiwan

solutions to MRCPSP-type problems.

Acknowledgements

Conflicts of interest

Author details

Ruey-Maw Chen<sup>1</sup>

According to Table 6, with a small SGP value, the task scheduling outcomes of J15 will become better as the number of iterations increases (100 iterations ! 300 iterations). This is because small SGP values tend to lead to the use of individual experience. In other words, the particles perform exploration search in solution space. In consequence, to obtain the optimums in the vast solution space will consume much time, and the convergence is delayed.


Table 6. Performance comparison on J15 in [15].
