## 3 Models and Algorithms
### Lightpath Provisioning  
This subsection proposes a heuristic algorithm to solve the on-line MB-RSA problem for lightpath provisioning. The pseudocode is presented in Algorithm 4. ```
1:\(G(N,E)\), \(cscr\), \(dest\), \(m\), \(BER_{thr}\)>, \(OCATA\_MB\)
2:OUTPUT:\(p\), \(ch\), [\(A^{i}\)]
3:\(1\):\(P\gets kSP(src\), \(dest\))
4:while\(p\
eq\mathcal{O}\)do
5:\(p\leftarrow removeFirst(P)\)
6:\(Ch\gets getAvailableChannels(p)\)
7:\(ch\), [\(A^{i}\)]\(\leftarrow\)\(OCATA\_MB\).selectCh(\(p\), \(Ch\), \(m\), \(BER_{thr}\)) (Algorithm 5)
8:if\(ch\) is not None then return\(<\)\(p\), \(ch\), [\(A^{i}\)]\(>\)
9:return None
```  
**Algorithm 4** OCATA-Assisted on-line MB-RSAThe heuristic receives a connected graph \(G\), a connection request, and the interface to OCATA-MB. The graph \(G\) includes the set \(N\) with the optical nodes and the set \(E\) with the optical links connecting two nodes, where each link \(e\) specifies the status of the channels in every band. The connection request is specified by the pair of source and destination nodes, the order of modulation format \(m\), and the BER threshold to be ensured. The algorithm first computes a set of shortest routes in terms of total distance on the network graph (line 1 in Algorithm 4). Next, the algorithm explores every route in the list to determine the optimal channel (lines 2-6). Then, for every route \(p\), the set of channels that are available in all the links is computed (line 4). The algorithm is assisted by OCATA-MB for the selection of the optimal channel and to compute the optimal detection areas for NLI noise mitigation if needed (line 5). The route and channel, together with the detection areas when NLI noise has to be mitigated to meet the requested QoT, are returned (line 6). Otherwise, the next route is explored until the list is exhausted, in which case the algorithm returns no solution found (line 7). Algorithm 5 presents the pseudocode for channel selection. The algorithm receives the selected route, the set of available channels, the number \(m\) of CPs, and the BER threshold to be assured, and it returns the selected channel and the detection areas in case NLI noise mitigation is needed. The algorithm first retrieves the list of pre-computed reference channels from an internal repository (line 1 in Algorithm 5) and composes an end-to-end DNN model for the selected route for each of the reference channels (line 2) by concatenating individual link models [19]. Next, input samples \(X\) are randomly generated for each reference channel, and features \(Y\) are computed using GMM fitting; only the features for the selected CPs are used for propagation, being the features for the other CPs discarded (line 3). The input features are then propagated using the end-to-end DNNs models for each of the reference channels, which produces a set of output features characterizing the signal at the Rx (line 4). ```
1:\(p\), \(Ch\), \(m\), \(BER_{thr}\) OUTPUT: \(ch\), \([A^{i}]\)
2:\([RCh]\leftarrow\) getRCh()
3:\([M]\leftarrow\) getModelsfRoute(\(p\), \([RCh]\))
4:\([Y^{i



accelerate finding the channels that potentially would provide minimum and maximum BER for a given set. Then, the most appropriate curve for the selected route is retrieved (line 6). The available channels are sequentially explored (lines 7-16) by selecting the one that potentially would provide the maximum BER and checking that the BER could be under the given threshold (lines 8-9). If the anticipated BER is above the threshold, that channel is discarded and the process restarts (lines 10-11). Otherwise, the channel is a candidate to support the lightpath, and its BER is accurately estimated. To that end, the specific features for the candidate channel are computed using the features composition algorithm, and the features of the non-propagated CPs are computed (lines 12-13).