Set parameters and Initialize pheromone trails
Begin
for  each service class  do
      use the skyline query process to identify its skyline services;
      Clustering the skyline services into several different clusters;
endfor;
 build the clustering graph and make it as the initial construct graph;
repeat
      ElitistsofCycle = ;
      for  each ant   do
          construct an assignment using Procedure 1;
          if fit( )<fit( ) then
            = ;
      endfor;
      find the best   assignments and add them into ElitistsofCycle;
      update pheromone trails using Procedure 2;
      if  (eighty percent ants obtained the same assignment) then
                  use the expanding process to fractionize the construction graph;
      endif.
until the maximum evaluation number is arrived or
    the other termination condition is satisfied;
return   ;
End
Algorithm 2: CASS.