Research Article

QoS Measurement of Workflow-Based Web Service Compositions Using Colored Petri Net

Algorithm 1

PICK split firing rules (a): for two outcoming arcs, (b): for two outcoming arcs and more memory saving, and (c): generalized for outputs.
(a)
Random generator = new Random();
double x1 = generator.nextDouble();
if(x1<  0.75) // PF1
{
fire(T1); // The function fire(); fires the selected transition
}
double x2 = generator.nextDouble();
if(x2< 0.6) // PF2
{
fire(T2); // The function fire(); fires the selected transition
}
(b)
Random generator = new Random();
double x = generator.nextDouble();
if(x< 0.75) // PF1
{
fire(T1); // The function fire(); fires the selected transition
}
x = generator.nextDouble();
if(x< 0.6) // PF2
{
fire(T2); // The function fire(); fires the selected transition
}
(c)
Random generator = new Random();
for(int i=0; i  <  n; i++)
{
double x = generator.nextDouble();
if (x< P[i])
  fire(T[i]);
}