From b0cb604e917af7b9b535d27ae87e15548940734b Mon Sep 17 00:00:00 2001 From: EstherLerouzic Date: Tue, 24 Aug 2021 17:11:40 +0200 Subject: [PATCH] Remove old commented code Signed-off-by: EstherLerouzic Change-Id: Idd2fcca0fe757eb801ab575953828c6df0521bb4 --- gnpy/topology/spectrum_assignment.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gnpy/topology/spectrum_assignment.py b/gnpy/topology/spectrum_assignment.py index 2e6afe9bd..038b5d76b 100644 --- a/gnpy/topology/spectrum_assignment.py +++ b/gnpy/topology/spectrum_assignment.py @@ -357,11 +357,8 @@ def spectrum_selection(test_oms, requested_m, requested_n=None): candidate = select_candidate(candidates, policy='first_fit') else: i = test_oms.spectrum_bitmap.geti(requested_n) - # print(f'N {requested_n} i {i}') - # print(freq_availability[i-m:i+m] ) - # print(freq_index[i-m:i+m]) - if (freq_availability[i - requested_m:i + requested_m] == [1] * (2 * requested_m) and - freq_index[i - requested_m] >= freq_index_min + if (freq_availability[i - requested_m:i + requested_m] == [1] * (2 * requested_m) + and freq_index[i - requested_m] >= freq_index_min and freq_index[i + requested_m - 1] <= freq_index_max): # candidate is the triplet center_n, startn and stopn candidate = (requested_n, requested_n - requested_m, requested_n + requested_m - 1)