# SCoPE: Service Composition and Personalization Environment
## 5 ECE Environment
### Step: 3--Service Composition and Ranking
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{2}{c}{_To Care Need Blood Pressure_} & \multicolumn{3}{c}{_To Care Need Home Safety_} \\ \hline
**Available Solutions** & \(pa\) & **Cost** & **Available Solutions** & \(pa\) & **Cost** \\ \hline \(sp_{11}\) & 0.885 & 100 \(\epsilon\) & \(sp_{21}\) & 0.782 & 30 \(\epsilon\) \\ \(sp_{41}\) & 0.767 & 200 \(\epsilon\) & \(sp_{22}\) & 0.927 & 40 \(\epsilon\) \\ \(sp_{64}\) & 0.639 & 75 \(\epsilon\) & \(sp_{64}\) & 0.791 & 75 \(\epsilon\) \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Selected solution fragments for Mr. [PERSON]’s care needs. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Composition Method** & **Solution Index** & **Expected Benefit** \\ \hline Method\({}_{1}\) & Adherence maximization & Better service personalization \\ Method\({}_{2}\) & Services minimization & Better service integration, less interoperability problems \\ Method\({}_{3}\) & Providers minimization & Better integration and cost decrease \\ Method\({}_{4}\) & Balanced Number of Providers & Minimization of service delivery disruption risks \\... &... &... \\ Method\({}_{n}\) & To define & To define \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Some composition methods. ```
functionServiceComposition; //Solution is a vector of services set that attends the customer request Input:CA,cu,PA,cost // The output is a set containing tuples composed of a solution Solution, a solution cost cost, the adherence ad \(\in[0,1]\) of the solution solution to the customer cu, and the ranking based on the relation between ad and cost Output:SolutionsRanking ProcedureAdherenceMaximization;
``` varSolution1;// a vector of solutions these containing services (SE) varad:0.0;// the solution adherence varx:0.0;// an auxiliary variable varm;// care needs numbers of customer cu varnt:0.0;// numbers of solutions in this strategy (adherence maximization) // Main foreach \(\alpha\) incu.CAdo Solution1\(\leftarrow\)null; foreach se inca.se do \(n\)++; if(PA[n])>xthen \(x\leftarrow\)se.pa; Solution1[n]\(\leftarrow\)+<se.ca >;  end end ad_solution1[n]\(\leftarrow\)(x); end end ad_solution1[n]\(\leftarrow\)average; end ProcedureServiceMinimization; ```
varSolution2;// a set of solutions these containing services (SE) varad:0.0;// the solution adherence varn:0.0;// numbers of solutions in this strategy (service minimization) // Main foreach ca incu.CAdo Solution2\(\leftarrow\)null; foreach se inca.se do n++; ifse is the same than (ca++).se then \(\textit{ad.Solution2[n]}\leftarrow\)se.pa; Solution2[n]\(\leftarrow\)+<se.ca >;  end end ad_solution2[n]\(\leftarrow\)average; end ProcedureProviderMinimization; // strategy for minimization of providers number end ProcedureDefinedStrategy; // new strategy end
```

**Algorithm 4**Service Composition and Ranking Algorithm

If we consider the cost, then the solution's matrix can be expanded to include another ranking that combines _ad_ and _cost_. At this stage, the human-in-the-loop process starts and ECE broker interactswith Mr. [PERSON], to discuss opportunities, advantages, and disadvantages of the various solutions and make a final decision. ## 7 Conclusions and Future Work

In the context of aging and well-being, a collaborative Elderly Care Ecosystem has the potential to provide an environment where personalized services might increase customer satisfaction, and give service providers access to new opportunities, allow sharing costs and risks, and strengthen their business. In this context, Collaborative Networks are the pillar that fosters collaboration among diverse stakeholders including service providers. However, to accomplish these objectives, rating and composition of care services should respect individual necessities, since care needs can be currently supported in distinct ways by different providers. In this article, we propose the SCoPE method to support the process of composing and personalizing services in a collaborative network environment for elderly care.