# A Novel Approach to Multi-Provider Network Slice Selector for 5G and Future Communication Systems
## 6 Experimental Evaluation
### NSSF DAF: Network Slice Selection Strategy  
The NSSF DAF framework processing module was developed by implementing a set of MCDM methods in Python language version 3.8, with the VIKOR, COPRAS, TOPSIS, and Promethee II methods. The initial choice of these methods was made due to their robustness, allowing for the validation of the proposed solution modules. However, other strategies to process data from the _Collector_ module can be applied.  
The Algorithms 1 and 2 constituting the most important part (core) of the proposed framework. Algorithm 2 is responsible for slice selection. Initially, we used the function ParserStream2 DataFrame that applies Algorithm 1; then, the dataframe to be used in the preference calculations was obtained. The applyMethods function applies the defined decision-making methods.  
The _applyMethods_ function (see Algorithm 2) receives the original dataframe for parameters of the _Collector_ module, which can be in the form of a data stream or batch file. The weight vector for each of the criteria used by MCDM methods and the characterization of the criterion type, that is, if the QoS parameter is of the type \"the bigger the better\", which is represented in the array as 1 or \"the smaller the better\", which is defined in the array as \(-1\), in addition to the extra parameters of the MCDM methods were applied.  
The _rankDataMethod_ function defines the ranking of the best slices for each of the methods evaluated. This method implements the process described in Section 5.2 of the _Processor_ module in the multi-criteria decision strategy (MCDM Methods). The other functions (_saveResult_ and _exportTemplateSLA_) presented in the algorithm are responsible for handling the resulting data and configuring the SLA template in a 3 GPP REST format. These functions facilitate integration with 5G CORE and, therefore, with orchestration tools. All computational methods are implemented using VNFs, running in an environment based on OpenStack or Kubernetes [75].  
```
Input:\((S,P)\), where \(S\) is the stream or log of the network flow; P the type settings to convert. Output: dataframe \(d\)
1 ParserStream2 DataFrameParserStream2 DataFrame(\(S\), \(P\)):
2\(dataQoS\longleftarrow\)\(ParserMainParams(S,P)\)
3\(dataQoE\longleftarrow\)\(ParserExtraParams(S,P)\)
4\(d\longleftarrow\)\(concatenate(dataQoS,dataQoE)\)
5\(d\longleftarrow\)\(validateAndSetTypes(d)\)
6 returnd
```  
**Algorithm 1**Parser Stream to dataframe  
```
Input: Number of evaluated slices \(N\), Number of QoS/QoE Criteria \(C\), Dataframe with slice data \(\mathcal{DF}(r,c)\), array of weights \(W\), Criteria types \(T\), MCDM methods \(M\), Methods parameters \(P\) Output: The Best Slice is selected \(\mathcal{S}\), slice ranking \(\mathcal{R}(i)\), SLA slice template \(\mathcal{F}\)
1 begin
2\(DF\leftarrow\)ParserStream2 DataFrame(\(\mathcal{N},\mathcal{C}\)); /* apply Algorithm 1 */
3 while\(DF\
eq\emptyset\)do
4\(\mathcal{DF}\leftarrow\)applyMethods \((\mathcal{DF},\mathcal{M},\mathcal{W},\mathcal{T},\mathcal{P})\); /* making preferences ranking by method RV: Ranking Vikor; RC: Ranking COPRAS; RT: Ranking TOPSIS; RP: Ranking Promethee II. */ \(\mathcal{RV}\leftarrow\)rankDataMethod \((\mathcal{DF}\mathcal{R})\);
5\(\mathcal{RC}\leftarrow\)rankDataMethod \((\mathcal{DF}\mathcal{R})\);
6\(\mathcal{RT}\leftarrow\)rankDataMethod \((\mathcal{DF}\mathcal{R})\);
7\(\mathcal{RP}\leftarrow\)rankDataMethod \((\mathcal{DF}\mathcal{R})\);
8\(\mathcal{S}\leftarrow\)sort(\(\mathcal{RV}[0],\mathcal{RC}[0],\mathcal{RT}[0],\mathcal{RP}[0]\));
9\(\mathcal{R}\leftarrow\)sort(\(\mathcal{RV},\mathcal{RC},\mathcal{RT},\mathcal{RP}\));
10\(\mathcal{SLA}\leftarrow\)saveResult \((\mathcal{RV},\mathcal{RC},\mathcal{RT},\mathcal{RP})\); /* data for 3 GPP REST */
11\(\mathcal{F}\leftarrow\)exportTemplateSLA \((\mathcal{SLA},\mathcal{S},\mathcal{R})\);
12
13 end while
14
15 end while
```  
**Algorithm 2**NSSF Decision-Aid Framework.