code speed improvement (-30% computation time)

remove path propagation for each mode
path propogation is only done for each baud rate

Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
This commit is contained in:
Jean-Luc Auge
2019-01-17 15:58:59 +01:00
parent b25a298087
commit 2dd017bddc
2 changed files with 7 additions and 9 deletions

View File

@@ -212,7 +212,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
logger.warning(msg)
total_path = []
else:
total_path,mode = propagate_and_optimize_mode(total_path,pathreq,equipment, show=False)
total_path,mode = propagate_and_optimize_mode(total_path,pathreq,equipment)
# if no baudrate satisfies spacing, no mode is returned and an empty path is returned
# a warning is shown in the propagate_and_optimize_mode
if mode is not None :