Research Article
Location-Aware Web Service Composition Based on the Mixture Rank of Web Services and Web Service Requests
Algorithm 3
Schsoft (abstract service sm).
// GLLB | |
1. Calculate the weight of different QoS 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 indicates the one for the service candidate or the service request; | |
//Val indicates the value of aggregation function for the service candidate or the service | |
request; | |
5. Select service composition request sr that cannot find a service candidate in Algorithm 2 | |
(Algorithm 2) | |
6. Get the left position lp and the right position rp; | |
7. minlost=+, selectr=-1; | |
8. For | |
If service candidate can satisfy sr for all the QoS | |
minlostemp=; | |
If minlosttemp< minlost | |
minlost=minlosttemp; | |
selectr=; | |
Endif | |
EndIf | |
Endfor | |
9. If selectr=-1 | |
Assign selectr to sr; | |
EndIf | |
//minmore records the total value of the QoS of the web service that is more than the | |
requirement of the web service request under the condition that all of the hard requirements of | |
the service request have been satisfied. | |
10. ; | |
//search from the position of the end of the right position; | |
11. While () | |
11.1 If can satisfy the hard requirement of QoS of | |
selectr=; | |
Assign selectr to ; | |
Break; | |
EndIf | |
EndWhile |