diff --git a/metrics.tex b/metrics.tex index 248de0f..24c7a02 100644 --- a/metrics.tex +++ b/metrics.tex @@ -167,7 +167,7 @@ \subsection{Heuristic}\label{subsec:heuristics} The function SlidingWindowHeuristic processes a list of vertices, each associated with a list of services, to identify optimal service combinations using a sliding window approach, given the constraints set by parameters verticesList and w (window size). - Initially, the function establishes $\text{G'}$ to store the optimal services or combinations identified during the process (line 2). It iterates from the start to the feasible end of the vertex list to ensure each possible window of services is evaluated (line 3). For each window, the function initializes minMetric to infinity and an empty list minMetricCombination to store the best service combination found within that specific window (line 5-6). + Initially, the function establishes $\text{G'}$ to store the optimal services or combinations identified during the process (line 2). It iterates from the start to the feasible end of the vertex list to ensure each possible window of services is evaluated (line 3). For each window, the function initializes minMetric to infinity and an empty list minMetricCombination to store the best service combination found within that specific window (line 5-6). Within each window, the function iterates through the vertices (line 7), calculating the total metric for services in the current vertex (lines 10-12). It then determines the average metric for these services and checks if this average is the lowest encountered so far within the current window (lines 13-15). If so, it updates minMetric and records the current combination as the best for this window.