Skip to main content
. 2022 Nov 23;22(23):9077. doi: 10.3390/s22239077
Algorithm 1 Cluster setup.
Let N be the node requesting the service S.
Let A:={} be a global variable that stores the set of available nodes in the cluster.
Take a service S={P,Q} with processing unit P and related QoS Q such that each Qkj is a finite set of n quality choices for the jth attribute, expressed in decreasing order of preference, for all k QoS dimensions.
Let S:={} be the set of nodes in the cluster capable of providing a given service.
Let N broadcast to the local network the request for nodes to register, adding them to A.
 1: for each diA do
 2:       Let Qj be the QoS delivered by node di
 3:       if Qj is higher (in all its dimensions) than Q then
 4:            C=C{(di,Qj)}
 5:       end if
 6: end for
 7: return C