Skip to content

Commit

Permalink
fix: save autodesign file after autodesign!
Browse files Browse the repository at this point in the history
Signed-off-by: EstherLerouzic <[email protected]>
Change-Id: If1c82c8cb7ff9dbb8bf5c2d5c4b96beaa59dc402
  • Loading branch information
EstherLerouzic committed Nov 26, 2024
1 parent c3a5804 commit 121d45a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gnpy/tools/cli_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)', ' [email protected] A-Z (Z-A)',
' Receiver minOSNR', ' mode', ' Gbit/s', ' nb of tsp pairs',
Expand Down

0 comments on commit 121d45a

Please sign in to comment.