mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-30 01:32:21 +00:00
examples: commented-out path printing for Esther
I'm trying to clean up the core code while not causing too much trouble to our users. Esther pointed out that there's an internal use case at Orange where people are looking at the incremental results when computing paths. I strongly dislike commented-out debugging code, but for the sake of progress, let's put it in here. It's roughly as good as that unused `show` parameter, and it allowed a refactoring to make the code more readable.
This commit is contained in:
@@ -167,6 +167,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
|
||||
if total_path :
|
||||
if pathreq.baud_rate is not None:
|
||||
total_path = propagate(total_path,pathreq,equipment)
|
||||
# for el in total_path: print(el)
|
||||
temp_snr01nm = round(mean(total_path[-1].snr+lin2db(pathreq.baud_rate/(12.5e9))),2)
|
||||
if temp_snr01nm < pathreq.OSNR :
|
||||
msg = f'\tWarning! Request {pathreq.request_id} computed path from {pathreq.source} to {pathreq.destination} does not pass with {pathreq.tsp_mode}\n' +\
|
||||
|
||||
Reference in New Issue
Block a user