From 121d45ae813df2750ec4338a3500476d86e7e912 Mon Sep 17 00:00:00 2001 From: EstherLerouzic Date: Mon, 22 Apr 2024 16:25:48 +0200 Subject: [PATCH] fix: save autodesign file after autodesign! Signed-off-by: EstherLerouzic Change-Id: If1c82c8cb7ff9dbb8bf5c2d5c4b96beaa59dc402 --- gnpy/tools/cli_examples.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gnpy/tools/cli_examples.py b/gnpy/tools/cli_examples.py index c923b4ce9..19214b43d 100644 --- a/gnpy/tools/cli_examples.py +++ b/gnpy/tools/cli_examples.py @@ -312,11 +312,6 @@ def path_requests_run(args=None): load_common_data(args.equipment, args.topology, args.sim_params, args.save_network_before_autodesign) # Build the network once using the default power defined in SI in eqpt config - # TODO power density: db2linp(ower_dbm": 0)/power_dbm": 0 * nb channels as defined by - # spacing, f_min and f_max - if args.save_network is not None: - save_network(network, args.save_network) - print(f'Network (after autodesign) saved to {args.save_network}') try: network, _, _ = designed_network(equipment, network, no_insert_edfas=args.no_insert_edfas) @@ -344,6 +339,10 @@ def path_requests_run(args=None): print(f'{ansi_escapes.blue}The following services have been requested:{ansi_escapes.reset}') print(_data) + if args.save_network is not None: + save_network(network, args.save_network) + print(f'Network (after autodesign) saved to {args.save_network}') + print(f'{ansi_escapes.blue}Result summary{ansi_escapes.reset}') header = ['req id', ' demand', ' GSNR@bandwidth A-Z (Z-A)', ' GSNR@0.1nm A-Z (Z-A)', ' Receiver minOSNR', ' mode', ' Gbit/s', ' nb of tsp pairs',