Research Article
Location-Aware Web Service Composition Based on the Mixture Rank of Web Services and Web Service Requests
Algorithm 2
Schhard (abstract service sm).
//GLLB | |
1. Calculate the weights of different QoSs according to formulas in Sections 5.1 and 5.2; | |
2. Calculate the aggregation value for the service candidate and service request of the abstract | |
service sm; | |
3. ; | |
4. ; | |
// sort SCO in descending order; | |
//tp can be a service candidate (=”candidate”) or a service request (=”request”); | |
//ID records the ID for the service candidate or the service request; | |
//Val records the value of aggregation function for the service candidate or the service | |
request; | |
5. Select the first service composition request sr | |
6. Get the left position and the right position ; | |
7. minmore=+, selectr=-1; | |
8. For | |
If the service candidate can satisfy for all the QoS | |
; | |
If minmoretemp< minmore | |
minmore=minmoretemp; | |
selectr=; | |
Endif | |
EndIf | |
Endfor | |
9. If selectr=-1 | |
Assign selectr to ; | |
EndIf | |
//minmore records the total value of the QoS of the web service that which is more than the | |
requirement of the service request under the condition that all of requirements of the service | |
composition request have been satisfied. | |
10. ; | |
//search from the position of the end of the right position; | |
11. While () | |
11.1 If can satisfy the requirement of QoS when we suppose every | |
requirement is hard | |
selectr=; | |
Assign selectr to ; | |
Break; | |
EndIf | |
EndWhile |