# Moving towards Smart Cities: A Selection of Middleware for Fog-to-Cloud Services +
## 4 Ranking Procedure Applied  
Let us assume the following setup that will be used as the basis of the ranking demonstration performed in this section. First, consider four alternatives A1, A2, A3, and A4 as services operated on fog and cloud platforms. These could be for instance the available candidates that could reach a satisfactory agreement between the providers and end-users with specific needs. Then consider a committee of three decision makers D1, D2, and D3, formed to select the best alternative. We assume also the priority of importance ranked as: Availability(C1) > Adaptability(C2) > Usability(C3) > Performance(C4) > Cost(C5) > Scalability(C6) > Proximity(C7) > Mobility(C8) > Network(C9) > Security(C10) when choosing the best fog or cloud service. However, the priority of these ten criteria can be varied in other cases, for instance to reflect different preferences of different stakeholders. The whole computational procedure with a numerical example can be summarized as follows:  
1. Form a committee of decision-makers (Table 5); the fuzzy rating of each decision-maker can be represented as trapezoidal fuzzy numbers (Figure 3); the linguistic terms for ranking the alternatives and evaluation criteria are shown in Tables 3 and 4 successively. 2. Present the importance weights of the criteria determined by the formed decision-makers D1, D2, and D3 (  
Rate the four alternatives by the formed decision-makers under the criteria (Table 6). Convert the linguistic variables shown in Tables 5 and 6 into trapezoidal fuzzy numbers to form a fuzzy decision matrix (Table 7). Form the aggregated fuzzy decision matrix (Table 8). Form the normalized aggregated fuzzy decision matrix (Table 9) and weighted normalized fuzzy decision matrix (Table 10). Determine the fuzzy positive ideal solution (FPIS) and fuzzy negative ideal solution (FNIS) (Table 11). Calculate the similarity of each alternative from the fuzzy positive ideal solution (see Appendix A). Rank the alternatives according to the average similarity value (Table 12). In this numerical example, the ranking order to the four alternatives is A1 > A2 > A4 > A3. Therefore, the alternative A1 is the best service to  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Criteria**} & \multirow{2}{*}{**Alternatives**} & \multicolumn{3}{c}{**Decision Makers Assessments**} \\ \cline{3-5}  & & **D1** & **D2** & **D3** \\ \hline \multirow{4}{*}{**C1**} & **A1** & [7,8,8,9,1] & [5,6,7,8,1] & [4 \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline  & **C1** & **C2** & **C3** & **C4** & **C5** & **C6** & **C7** & **C8** & **C9** & **C10** \\ \hline
**A1** & [0.4444,0.7037, 0] & [0.40,7] & [0.5585,0.8148, 0] & [0.15,0.5333, 0.4444, 0.7037, 0] & [0.12,0.2666, 0.4444, 0.7037, 0] & [0.5585,0.8148, 0] & [0.4444,0.7037, 0] & [0.4444,0.7037, 0] \\
**A2** & [0.222,0.307, 0] & [0.10,0.6333, 0.4444, 0.226, 0.102.266, 0.4444, 0.5925, 0.807, 0.7407, 0.71] & 0.3333,0.507, 0.7407, 0.71 & 0.8518,1 0.444, 0.7037, 0.7407, 0.71 & 0.9444,0.727, 0.7407, 0.7407,1 \\
**A3** & [0.7407,1] & 0.666,1] & 0.0737,0.8885 & 0.3333,0.51 & 0.629,0.8888, 0.81 & 0.7407,1 & 0.9525,0.8888, 0.7407,1 & 0.777.71,1 \\ \hline
**A3** & [0.4444,0.6286, 0.10] & [0.10,0.2666, 0.4444, 0.6296, 0.10] & [0.10,0.8333, 0.5055, 0.8148, 0.4438, 0.835, 0.845, 0.8448, 0.8444, 0.62862, 0.1111, 0.2962, 0.7207, 0.8888] & [0.3330,0.555, 0.8158, 0.8158, 0.8158, 0.8370, 0.8888] & [0.3703,0.555, 0.8555] \\
**A4** & [0.2222,0.5925, 0.515, 0.7333, 0.4444, 0.5925, 0.50,666, 0.11] & [0.11,0.555, 0.40,533, 0.4444, 0.777, 0.7444, 0.7037, 0.722, 0.5185, 0.4074, 0.6296,1.0766,0.9] & [0.6296,0.8888, 0.7333, 0.9] & [0.5555,1] & 0.5666,0.877, 0.777,1 & 0.9525,1 & 0.4814,0.8888 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Weighted normalized fuzzy decision matrix.