mirror of
				https://github.com/Telecominfraproject/oopt-gnpy.git
				synced 2025-10-31 18:18:00 +00:00 
			
		
		
		
	Compare commits
	
		
			62 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 0d236fd31e | ||
|   | 9a84e29433 | ||
|   | 143f63170e | ||
|   | b2d7f883a1 | ||
|   | 73dbdf3042 | ||
|   | 4a071c53d7 | ||
|   | dcde64a8db | ||
|   | 38cc0e3cc5 | ||
|   | fb70413784 | ||
|   | 87e10c240e | ||
|   | 43c1085be6 | ||
|   | 4ace60bea2 | ||
|   | f950a6aee8 | ||
|   | fb4195c775 | ||
|   | 29f42666e5 | ||
|   | 9bf7f336e3 | ||
|   | eed6564f11 | ||
|   | fbb2f2c587 | ||
|   | 44040c4d06 | ||
|   | ee9af69558 | ||
|   | ce21609fec | ||
|   | a1289e6a9b | ||
|   | 138115e1d7 | ||
|   | ed41305f55 | ||
|   | 9736f7c032 | ||
|   | be7ae35db3 | ||
|   | 2b4a4ab72c | ||
|   | 426c88432d | ||
|   | 2a800b781f | ||
|   | 8d1d3677ed | ||
|   | 5b6f8c60cf | ||
|   | 3a733b1fd5 | ||
|   | 2d68b94a46 | ||
|   | bc71823bd0 | ||
|   | 5481b93728 | ||
|   | 05e301182d | ||
|   | 47c89626e3 | ||
|   | 7a032a63b5 | ||
|   | f195d5f496 | ||
|   | 56569f866f | ||
|   | bf1f293043 | ||
|   | d7c1a6b75e | ||
|   | c69c2a3af2 | ||
|   | fb29d72906 | ||
|   | 30a06da6b1 | ||
|   | 139c8cc1e7 | ||
|   | 7034d4c686 | ||
|   | 10164495b9 | ||
|   | 87211b35e9 | ||
|   | e9f9ddb4d6 | ||
|   | 8ea13bb4d6 | ||
|   | b45829d2df | ||
|   | 6ac3a517cf | ||
|   | 2f2920a716 | ||
|   | 07fd89351b | ||
|   | 7c60b000b5 | ||
|   | 537eb017b5 | ||
|   | 9c514e8086 | ||
|   | 78efb6c650 | ||
|   | 3510d59250 | ||
|   | 41d9d156a6 | ||
|   | e9d5e748e4 | 
							
								
								
									
										8
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							| @@ -14,7 +14,7 @@ jobs: | ||||
|       - uses: actions/checkout@v3 | ||||
|         with: | ||||
|           fetch-depth: 0 | ||||
|       - uses: fedora-python/tox-github-action@v0.4 | ||||
|       - uses: fedora-python/tox-github-action@v37.0 | ||||
|         with: | ||||
|           tox_env: ${{ matrix.tox_env }} | ||||
|           dnf_install: ${{ matrix.dnf_install }} | ||||
| @@ -106,8 +106,7 @@ jobs: | ||||
|         with: | ||||
|           python-version: ${{ matrix.python_version }} | ||||
|       - run: | | ||||
|           pip install -r tests/requirements.txt | ||||
|           pip install --editable . | ||||
|           pip install --editable .[tests] | ||||
|           pytest -vv | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
| @@ -136,8 +135,7 @@ jobs: | ||||
|         with: | ||||
|           python-version: ${{ matrix.python_version }} | ||||
|       - run: | | ||||
|           pip install -r tests/requirements.txt | ||||
|           pip install --editable . | ||||
|           pip install --editable .[tests] | ||||
|           pytest -vv | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|   | ||||
| @@ -1,5 +1,17 @@ | ||||
| version: 2 | ||||
| build: | ||||
|     image: latest | ||||
|   os: ubuntu-22.04 | ||||
|   tools: | ||||
|     python: "3.12" | ||||
|   apt_packages: | ||||
|     - graphviz | ||||
|  | ||||
| python: | ||||
|     version: 3.8 | ||||
| requirements_file: docs/requirements.txt | ||||
|   install: | ||||
|     - method: pip | ||||
|       path: . | ||||
|       extra_requirements: | ||||
|         - docs | ||||
|  | ||||
| sphinx: | ||||
|   configuration: docs/conf.py | ||||
|   | ||||
| @@ -23,7 +23,7 @@ Read our [documentation](https://gnpy.readthedocs.io/), learn from the demos, an | ||||
|  | ||||
| This example demonstrates how GNPy can be used to check the expected SNR at the end of the line by varying the channel input power: | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| GNPy can do much more, including acting as a Path Computation Engine, tracking bandwidth requests, or advising the SDN controller about a best possible path through a large DWDM network. | ||||
| Learn more about this [in the documentation](https://gnpy.readthedocs.io/), or give it a [try online at `gnpy.app`](https://gnpy.app/): | ||||
|   | ||||
							
								
								
									
										19
									
								
								docs/conf.py
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								docs/conf.py
									
									
									
									
									
								
							| @@ -65,7 +65,7 @@ author = 'Telecom Infra Project - OOPT PSE Group' | ||||
| # | ||||
| # This is also used if you do content translation via gettext catalogs. | ||||
| # Usually you set "language" from the command line for these cases. | ||||
| language = None | ||||
| language = 'en' | ||||
|  | ||||
| # List of patterns, relative to source directory, that match files and | ||||
| # directories to ignore when looking for source files. | ||||
| @@ -84,18 +84,11 @@ todo_include_todos = False | ||||
| # The theme to use for HTML and HTML Help pages.  See the documentation for | ||||
| # a list of builtin themes. | ||||
| # | ||||
| on_rtd = os.environ.get('READTHEDOCS') == 'True' | ||||
| if on_rtd: | ||||
|     html_theme = 'default' | ||||
|     html_theme_options = { | ||||
|         'logo_only': True, | ||||
|     } | ||||
| else: | ||||
|     html_theme = 'alabaster' | ||||
|     html_theme_options = { | ||||
|         'logo': 'images/GNPy-logo.png', | ||||
|         'logo_name': False, | ||||
|     } | ||||
| html_theme = 'alabaster' | ||||
| html_theme_options = { | ||||
|     'logo': 'images/GNPy-logo.png', | ||||
|     'logo_name': False, | ||||
| } | ||||
|  | ||||
| html_logo = 'images/GNPy-logo.png' | ||||
|  | ||||
|   | ||||
| @@ -91,7 +91,8 @@ Advanced Specification | ||||
| ********************** | ||||
|  | ||||
| The amplifier performance can be further described in terms of gain ripple, NF ripple, and the dynamic gain tilt. | ||||
| When provided, the amplifier characteristic is fine-tuned as a function of carrier frequency. | ||||
| When provided, the amplifier characteristic is fine-tuned as a function of carrier frequency. Note that in this advanced | ||||
| specification tilt is defined vs frequency while tilt_target specified in EDFA instances is defined vs wavelength. | ||||
|  | ||||
| .. _extending-raman: | ||||
|  | ||||
| @@ -119,38 +120,32 @@ A *mode* usually refers to a particular performance point that is defined by a c | ||||
|  | ||||
| The following data are required for each mode: | ||||
|  | ||||
| ``bit-rate`` | ||||
|   Data bit rate, in :math:`\text{Gbits}\times s^{-1}`. | ||||
| ``baud-rate`` | ||||
|   Symbol modulation rate, in :math:`\text{Gbaud}`. | ||||
| ``required-osnr`` | ||||
|   Minimal allowed OSNR for the receiver. | ||||
| ``bit_rate`` | ||||
|   Data bit rate, in :math:`\text{bits}\times s^{-1}`. | ||||
| ``baud_rate`` | ||||
|   Symbol modulation rate, in :math:`\text{baud}`. | ||||
| ``OSNR`` | ||||
|   Minimal required OSNR for the receiver. In :math:`\text{dB}` | ||||
| ``tx-osnr`` | ||||
|   Initial OSNR at the transmitter's output. | ||||
| ``grid-spacing`` | ||||
|   Initial OSNR at the transmitter's output. In :math:`\text{dB}` | ||||
| ``min-spacing`` | ||||
|   Minimal grid spacing, i.e., an effective channel spectral bandwidth. | ||||
|   In :math:`\text{Hz}`. | ||||
| ``tx-roll-off`` | ||||
| ``roll-off`` | ||||
|   Roll-off parameter (:math:`\beta`) of the TX pulse shaping filter. | ||||
|   This assumes a raised-cosine filter. | ||||
| ``rx-power-min`` and ``rx-power-max`` | ||||
|   The allowed range of power at the receiver. | ||||
|   (work in progress) The allowed range of power at the receiver. | ||||
|   In :math:`\text{dBm}`. | ||||
| ``cd-max`` | ||||
|   Maximal allowed Chromatic Dispersion (CD). | ||||
|   In :math:`\text{ps}/\text{nm}`. | ||||
| ``pmd-max`` | ||||
|   Maximal allowed Polarization Mode Dispersion (PMD). | ||||
|   In :math:`\text{ps}`. | ||||
| ``cd-penalty`` | ||||
|   *Work-in-progress.* | ||||
|   Describes the increase of the requires GSNR as the :abbr:`CD (Chromatic Dispersion)` deteriorates. | ||||
| ``dgd-penalty`` | ||||
|   *Work-in-progress.* | ||||
|   Describes the increase of the requires GSNR as the :abbr:`DGD (Differential Group Delay)` deteriorates. | ||||
| ``pmd-penalty`` | ||||
|   *Work-in-progress.* | ||||
|   Describes the increase of the requires GSNR as the :abbr:`PMD (Polarization Mode Dispersion)` deteriorates. | ||||
| ``penalties`` | ||||
|   Impairments such as Chromatic Dispersion (CD), Polarization Mode Dispersion (PMD), and Polarization Dispersion Loss (PDL) | ||||
|   result in penalties at the receiver. The receiver's ability to handle these impairments can be defined for each mode as | ||||
|   a list of {impairment: in defined units, 'penalty_value' in dB} (see `transceiver section here <json.rst#_transceiver>`). | ||||
|   Maximum allowed CD, maximum allowed PMD, and maximum allowed PDL should be listed there with corresponding penalties. | ||||
|   Impairments experienced during propagation are linearly interpolated between given points to obtain the corresponding penalty. | ||||
|   The accumulated penalties are subtracted from the path GSNR before comparing with the minimum required OSNR. | ||||
|   Impairments: PMD in :math:`\text{ps}`, CD in :math:`\text{ps/nm}`, PDL in :math:`\text{dB}`, penalty_value in :math:`\text{dB}` | ||||
|  | ||||
|  | ||||
| GNPy does not directly track the FEC performance, so the type of chosen FEC is likely indicated in the *name* of the selected transponder mode alone. | ||||
|  | ||||
| @@ -168,6 +163,7 @@ The set of parameters for each ROADM model therefore includes: | ||||
|   Per-channel target TX power towards the egress amplifier. | ||||
|   Within GNPy, a ROADM is expected to attenuate any signal that enters the ROADM node to this level. | ||||
|   This can be overridden on a per-link in the network topology. | ||||
|   Targets can be set using power or power spectral density (see `roadm section here <json.rst#__roadm>`) | ||||
| ``pmd`` | ||||
|   Polarization mode dispersion (PMD) penalty of the express path. | ||||
|   In :math:`\text{ps}`. | ||||
|   | ||||
							
								
								
									
										1
									
								
								docs/images/gnpy-transmission-example.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								docs/images/gnpy-transmission-example.svg
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| After Width: | Height: | Size: 478 KiB | 
| @@ -17,6 +17,7 @@ in real-world mesh optical networks. It is based on the Gaussian Noise Model. | ||||
|    about-project | ||||
|    model | ||||
|    gnpy-api | ||||
|    release-notes | ||||
|  | ||||
| Indices and tables | ||||
| ================== | ||||
|   | ||||
| @@ -14,28 +14,29 @@ fully-functional programs. | ||||
|     specific, delineated use cases to drive requirements for future | ||||
|     development.* | ||||
|  | ||||
| This example demonstrates how GNPy can be used to check the expected SNR at the end of the line by varying the channel input power: | ||||
| This example demonstrates how GNPy can be used to check the expected SNR at the end of the line by varying the channel input power, | ||||
| or to run a planning script to check SNR of several services: | ||||
|  | ||||
| .. image:: https://telecominfraproject.github.io/oopt-gnpy/docs/images/transmission_main_example.svg | ||||
| .. image:: images/gnpy-transmission-example.svg | ||||
|    :width: 100% | ||||
|    :align: left | ||||
|    :alt: Running a simple simulation example | ||||
|  | ||||
| By default, this script operates on a single span network defined in | ||||
| `gnpy/example-data/edfa_example_network.json <gnpy/example-data/edfa_example_network.json>`_ | ||||
| By default, the gnpy-transmission-example script operates on a single span network defined in | ||||
| `gnpy/example-data/edfa_example_network.json <../gnpy/example-data/edfa_example_network.json>`_ | ||||
|  | ||||
| You can specify a different network at the command line as follows. For | ||||
| example, to use the CORONET Global network defined in | ||||
| `gnpy/example-data/CORONET_Global_Topology.json <gnpy/example-data/CORONET_Global_Topology.json>`_: | ||||
| `gnpy/example-data/CORONET_Global_Topology.json <../gnpy/example-data/CORONET_Global_Topology.json>`_: | ||||
|  | ||||
| .. code-block:: shell-session | ||||
|  | ||||
|     $ gnpy-transmission-example $(gnpy-example-data)/CORONET_Global_Topology.json | ||||
|  | ||||
| It is also possible to use an Excel file input (for example | ||||
| `gnpy/example-data/CORONET_Global_Topology.xls <gnpy/example-data/CORONET_Global_Topology.xls>`_). | ||||
| `gnpy/example-data/CORONET_Global_Topology.xls <../gnpy/example-data/CORONET_Global_Topology.xls>`_). | ||||
| The Excel file will be processed into a JSON file with the same prefix. | ||||
| Further details about the Excel data structure are available `in the documentation <docs/excel.rst>`__. | ||||
| Further details about the Excel data structure are available `in the documentation <excel.rst>`__. | ||||
|  | ||||
| The main transmission example will calculate the average signal OSNR and SNR | ||||
| across network elements (transceiver, ROADMs, fibers, and amplifiers) | ||||
| @@ -56,10 +57,10 @@ interference noise. | ||||
| Further Instructions for Use | ||||
| ---------------------------- | ||||
|  | ||||
| Simulations are driven by a set of `JSON <docs/json.rst>`__ or `XLS <docs/excel.rst>`__ files. | ||||
| Simulations are driven by a set of `JSON <json.rst>`__ or `XLS <excel.rst>`__ files. | ||||
|  | ||||
| The ``gnpy-transmission-example`` script propagates a spectrum of channels at 32 Gbaud, 50 GHz spacing and 0 dBm/channel.  | ||||
| Launch power can be overridden by using the ``--power`` argument. | ||||
| Launch power in fiber spans can be overridden by using the ``--power`` argument. | ||||
| Spectrum information is not yet parametrized but can be modified directly in the ``eqpt_config.json`` (via the ``SpectralInformation`` -SI- structure) to accommodate any baud rate or spacing. | ||||
| The number of channel is computed based on ``spacing`` and ``f_min``, ``f_max`` values. | ||||
|  | ||||
| @@ -71,8 +72,8 @@ An experimental support for Raman amplification is available: | ||||
|        $(gnpy-example-data)/raman_edfa_example_network.json \ | ||||
|        --sim $(gnpy-example-data)/sim_params.json --show-channels | ||||
|  | ||||
| Configuration of Raman pumps (their frequencies, power and pumping direction) is done via the `RamanFiber element in the network topology <gnpy/example-data/raman_edfa_example_network.json>`_. | ||||
| General numeric parameters for simulation control are provided in the `gnpy/example-data/sim_params.json <gnpy/example-data/sim_params.json>`_. | ||||
| Configuration of Raman pumps (their frequencies, power and pumping direction) is done via the `RamanFiber element in the network topology <../gnpy/example-data/raman_edfa_example_network.json>`_. | ||||
| General numeric parameters for simulation control are provided in the `gnpy/example-data/sim_params.json <../gnpy/example-data/sim_params.json>`_. | ||||
|  | ||||
| Use ``gnpy-path-request`` to request several paths at once: | ||||
|  | ||||
| @@ -82,7 +83,7 @@ Use ``gnpy-path-request`` to request several paths at once: | ||||
|      $ gnpy-path-request -o output_file.json \ | ||||
|        meshTopologyExampleV2.xls meshTopologyExampleV2_services.json | ||||
|  | ||||
| This program operates on a network topology (`JSON <docs/json.rst>`__ or `Excel <docs/excel.rst>`__ format), processing the list of service requests (JSON or XLS again). | ||||
| This program operates on a network topology (`JSON <json.rst>`__ or `Excel <excel.rst>`__ format), processing the list of service requests (JSON or XLS again). | ||||
| The service requests and reply formats are based on the `draft-ietf-teas-yang-path-computation-01 <https://tools.ietf.org/html/draft-ietf-teas-yang-path-computation-01>`__ with custom extensions (e.g., for transponder modes). | ||||
| An example of the JSON input is provided in file `service-template.json`, while results are shown in `path_result_template.json`. | ||||
|  | ||||
|   | ||||
							
								
								
									
										797
									
								
								docs/json.rst
									
									
									
									
									
								
							
							
						
						
									
										797
									
								
								docs/json.rst
									
									
									
									
									
								
							| @@ -154,6 +154,8 @@ it is suggested to include an estimation of the loss coefficient for the Raman p | ||||
| a dictionary-like definition of the ``RamanFiber.params.loss_coef`` | ||||
| (e.g. ``loss_coef = {"value": [0.18, 0.18, 0.20, 0.20], "frequency": [191e12, 196e12, 200e12, 210e12]}``). | ||||
|  | ||||
| .. _transceiver: | ||||
|  | ||||
| Transceiver | ||||
| ~~~~~~~~~~~ | ||||
|  | ||||
| @@ -180,25 +182,62 @@ used to determine the service list path feasibility when running the | ||||
|  | ||||
| The modes are defined as follows: | ||||
|  | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | field                | type      | description                             | | ||||
| +======================+===========+=========================================+ | ||||
| | ``format``           | (string)  | a unique name to ID the mode            | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | ``baud_rate``        | (number)  | in Hz                                   | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | ``OSNR``             | (number)  | min required OSNR in 0.1nm (dB)         | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | ``bit_rate``         | (number)  | in bit/s                                | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | ``roll_off``         | (number)  | Pure number between 0 and 1. TX signal  | | ||||
| |                      |           | roll-off shape. Used by Raman-aware     | | ||||
| |                      |           | simulation code.                        | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | ``tx_osnr``          | (number)  | In dB. OSNR out from transponder.       | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| | ``cost``             | (number)  | Arbitrary unit                          | | ||||
| +----------------------+-----------+-----------------------------------------+ | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | field                      | type      | description                             | | ||||
| +============================+===========+=========================================+ | ||||
| | ``format``                 | (string)  | a unique name to ID the mode            | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``baud_rate``              | (number)  | in Hz                                   | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``OSNR``                   | (number)  | min required OSNR in 0.1nm (dB)         | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``bit_rate``               | (number)  | in bit/s                                | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``roll_off``               | (number)  | Pure number between 0 and 1. TX signal  | | ||||
| |                            |           | roll-off shape. Used by Raman-aware     | | ||||
| |                            |           | simulation code.                        | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``tx_osnr``                | (number)  | In dB. OSNR out from transponder.       | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``equalization_offset_db`` | (number)  | In dB. Deviation from the per channel   | | ||||
| |                            |           | equalization target in ROADM for this   | | ||||
| |                            |           | type of transceiver.                    | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``penalties``              | (list)    | list of impairments as described in     | | ||||
| |                            |           | impairment table.                       | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
| | ``cost``                   | (number)  | Arbitrary unit                          | | ||||
| +----------------------------+-----------+-----------------------------------------+ | ||||
|  | ||||
| Penalties are linearly interpolated between given points and set to 'inf' outside interval. | ||||
| The accumulated penalties are substracted to the path GSNR before comparing with the min required OSNR. | ||||
| The penalties per impairment type are defined as a list of dict (impairment type - penalty values) as follows: | ||||
|  | ||||
| +-----------------------------+-----------+-----------------------------------------------+ | ||||
| | field                       | type      | description                                   | | ||||
| +=============================+===========+===============================================+ | ||||
| | ``chromatic_dispersion`` or | (number)  | In ps/nm/. Value of chromatic dispersion.     | | ||||
| | ``pdl`` or                  |           | In dB. Value of polarization dependant loss.  | | ||||
| | ``pmd``                     | (string)  | In ps. Value of polarization mode dispersion. | | ||||
| +-----------------------------+-----------+-----------------------------------------------+ | ||||
| | ``penalty_value``           | (number)  | in dB. Penalty on the transceiver min OSNR    | | ||||
| |                             |           | corresponding to the impairment level         | | ||||
| +-----------------------------+-----------+-----------------------------------------------+ | ||||
|  | ||||
| for example: | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     "penalties": [{ | ||||
|             "chromatic_dispersion": 360000, | ||||
|             "penalty_value": 0.5 | ||||
|         }, { | ||||
|             "pmd": 110, | ||||
|             "penalty_value": 0.5 | ||||
|         } | ||||
|     ] | ||||
|  | ||||
| .. _roadm: | ||||
|  | ||||
| ROADM | ||||
| ~~~~~ | ||||
| @@ -208,6 +247,10 @@ The user can only modify the value of existing parameters: | ||||
| +-------------------------------+-----------+----------------------------------------------------+ | ||||
| | field                         |   type    | description                                        | | ||||
| +===============================+===========+====================================================+ | ||||
| | ``type_variety``              | (string)  | Optional. Default: ``default``                     | | ||||
| |                               |           | A unique name to ID the ROADM variety in the JSON  | | ||||
| |                               |           | template topology input file.                      | | ||||
| +-------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``target_pch_out_db``         | (number)  | Default :ref:`equalization strategy<equalization>` | | ||||
| | or                            |           | for this ROADM type.                               | | ||||
| | ``target_psd_out_mWperGHz``   |           |                                                    | | ||||
| @@ -235,6 +278,189 @@ The user can only modify the value of existing parameters: | ||||
| |                               |           | insert a ``Fused`` node on the degree              | | ||||
| |                               |           | output.                                            | | ||||
| +-------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``roadm-path-impairments``    | (list of  | Optional. List of ROADM path category impairments. | | ||||
| |                               | dict)     |                                                    | | ||||
| +-------------------------------+-----------+----------------------------------------------------+ | ||||
|  | ||||
| In addition to these general impairment, the user may define detailed set of impairments for add, | ||||
| drop and express path within the the ROADM. The impairment description is inspired from the `IETF | ||||
| CCAMP optical impairment topology <https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang>`_ | ||||
| (details here: `ROADM attributes IETF <https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/files/4262135/ROADM.attributes_IETF_v8draft.pptx>`_). | ||||
|  | ||||
| The ``roadm-path-impairments`` list allows the definition of the list of impairments by internal path category (add, drop or express). Several additional paths can be defined -- add-path, drop-path or express-path. They are indexed and the related impairments are defined per band. | ||||
|  | ||||
| Each item should contain: | ||||
|  | ||||
| +--------------------------------+-----------+----------------------------------------------------+ | ||||
| | field                          |   type    | description                                        | | ||||
| +================================+===========+====================================================+ | ||||
| | ``roadm-path-impairments-id``  | (number)  | A unique number to ID the impairments.             | | ||||
| +--------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``roadm-express-path``         | (list)    | List of the impairments defined per frequency      | | ||||
| | or                             |           | range. The impairments are detailed in the         | | ||||
| | ``roadm-add-path``             |           | following table.                                   | | ||||
| | or                             |           |                                                    | | ||||
| | ``roadm-drop-path``            |           |                                                    | | ||||
| | (mutually exclusive)           |           |                                                    | | ||||
| +--------------------------------+-----------+----------------------------------------------------+ | ||||
|  | ||||
| Here are the parameters for each path category and the implementation status: | ||||
|  | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | field                      | Type      | Description                                               | Drop path   | Add path    | Express (thru) path | | ||||
| +============================+===========+===========================================================+=============+=============+=====================+ | ||||
| | ``frequency-range``        | (list)    | List containing ``lower-frequency`` and                   |             |             |                     | | ||||
| |                            |           | ``upper-frequency`` in Hz.                                |             |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-maxloss``          | (number)  | In dB. Default: 0 dB. Maximum expected path loss on this  | Implemented | Implemented | Implemented         | | ||||
| |                            |           | roadm-path assuming no additional path loss is added =    |             |             |                     | | ||||
| |                            |           | minimum loss applied to channels when crossing the ROADM  |             |             |                     | | ||||
| |                            |           | (worst case expected loss due to the ROADM).              |             |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-minloss``          |           | The net loss from the ROADM input, to the  output of the  | Not yet     | N.A.        | N.A.                | | ||||
| |                            |           | drop block (best case expected loss).                     | implemented |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-typloss``          |           | The net loss from the ROADM input, to the output of the   | Not yet     | N.A.        | N.A.                | | ||||
| |                            |           | drop block (typical).                                     | implemented |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-pmin``             |           | Minimum power levels per carrier expected at the output   | Not yet     | N.A.        | N.A.                | | ||||
| |                            |           | of the drop block.                                        | implemented |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-pmax``             |           | (Add) Maximum (per carrier) power level permitted at the  | Not yet     | Not yet     | N.A.                | | ||||
| |                            |           | add block input ports.                                    | implemented | implemented |                     | | ||||
| |                            |           |                                                           |             |             |                     | | ||||
| |                            |           | (Drop) Best case per carrier power levels expected at     |             |             |                     | | ||||
| |                            |           | the output of the drop block.                             |             |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-ptyp``             |           | Typical case per carrier power levels expected at the     | Not yet     | N.A.        | N.A.                | | ||||
| |                            |           | output of the drop block.                                 | implemented |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-noise-figure``     |           | If the add (drop) path contains an amplifier, this is     | Not yet     | Not yet     | N.A.                | | ||||
| |                            |           | the noise figure of that amplifier inferred to the        | Implemented | Implemented |                     | | ||||
| |                            |           | add (drop) port.                                          |             |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-osnr``             | (number)  | (Add) Optical Signal-to-Noise Ratio (OSNR).               | implemented | Implemented | N.A.                | | ||||
| |                            |           | If the add path contains the ability to adjust the        |             |             |                     | | ||||
| |                            |           | carrier power levels into an add path amplifier           |             |             |                     | | ||||
| |                            |           | (if present) to a target value,                           |             |             |                     | | ||||
| |                            |           | this reflects the OSNR contribution of the                |             |             |                     | | ||||
| |                            |           | add amplifier assuming this target value is obtained.     |             |             |                     | | ||||
| |                            |           |                                                           |             |             |                     | | ||||
| |                            |           | (Drop) Expected OSNR contribution of the drop path        |             |             |                     | | ||||
| |                            |           | amplifier(if present)                                     |             |             |                     | | ||||
| |                            |           | for the case of additional drop path loss                 |             |             |                     | | ||||
| |                            |           | (before this amplifier)                                   |             |             |                     | | ||||
| |                            |           | in order to hit a target power level (per carrier).       |             |             |                     | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-pmd``              | (number)  | PMD contribution of the specific roadm path.              | Implemented | Implemented | Implemented         | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-cd``               |           |                                                           | Not yet     | Not yet     | Not yet             | | ||||
| |                            |           |                                                           | Implemented | Implemented | Implemented         | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-pdl``              | (number)  | PDL contribution of the specific roadm path.              | Implemented | Implemented | Implemented         | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
| | ``roadm-inband-crosstalk`` |           |                                                           | Not yet     | Not yet     | Not yet             | | ||||
| |                            |           |                                                           | Implemented | Implemented | Implemented         | | ||||
| +----------------------------+-----------+-----------------------------------------------------------+-------------+-------------+---------------------+ | ||||
|  | ||||
| Here is a ROADM example with two add-path possible impairments: | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     "roadm-path-impairments": [ | ||||
|       { | ||||
|           "roadm-path-impairments-id": 0, | ||||
|           "roadm-express-path": [{ | ||||
|               "frequency-range": { | ||||
|                   "lower-frequency": 191.3e12, | ||||
|                   "upper-frequency": 196.1e12 | ||||
|                   }, | ||||
|               "roadm-maxloss": 16.5 | ||||
|               }] | ||||
|       }, { | ||||
|           "roadm-path-impairments-id": 1, | ||||
|           "roadm-add-path": [{ | ||||
|               "frequency-range": { | ||||
|                   "lower-frequency": 191.3e12, | ||||
|                   "upper-frequency": 196.1e12 | ||||
|               }, | ||||
|               "roadm-maxloss": 11.5, | ||||
|               "roadm-osnr": 41 | ||||
|           }] | ||||
|       }, { | ||||
|           "roadm-path-impairments-id": 2, | ||||
|           "roadm-drop-path": [{ | ||||
|               "frequency-range": { | ||||
|                   "lower-frequency": 191.3e12, | ||||
|                   "upper-frequency": 196.1e12 | ||||
|                   }, | ||||
|               "roadm-pmd": 0, | ||||
|               "roadm-cd": 0, | ||||
|               "roadm-pdl": 0, | ||||
|               "roadm-maxloss": 11.5, | ||||
|               "roadm-osnr": 41 | ||||
|           }] | ||||
|       }, { | ||||
|           "roadm-path-impairments-id": 3, | ||||
|           "roadm-add-path": [{ | ||||
|               "frequency-range": { | ||||
|                   "lower-frequency": 191.3e12, | ||||
|                   "upper-frequency": 196.1e12 | ||||
|               }, | ||||
|               "roadm-pmd": 0, | ||||
|               "roadm-cd": 0, | ||||
|               "roadm-pdl": 0, | ||||
|               "roadm-maxloss": 11.5, | ||||
|               "roadm-osnr": 20 | ||||
|           }] | ||||
|       }] | ||||
|  | ||||
| On this example, the express channel has at least 16.5 dB loss when crossing the ROADM express path with the corresponding impairment id. | ||||
|  | ||||
| roadm-path-impairments is optional. If present, its values are considered instead of the ROADM general parameters. | ||||
| For example, if add-path specifies 0.5 dB PDL and the general PDL parameter states 1.0 dB, then 0.5 dB is applied for this roadm-path only. | ||||
| If present in add and/or drop path, roadm-osnr replaces the portion of add-drop-osnr defined for the whole ROADM, | ||||
| assuming that add and drop contribution aggregated in add-drop-osnr are identical: | ||||
|  | ||||
| .. math:: | ||||
|  | ||||
|   add\_drop\_osnr = - 10log10(1/add_{osnr} + 1/drop_{osnr}) | ||||
|  | ||||
| when: | ||||
|  | ||||
| .. math:: | ||||
|  | ||||
|   add_{osnr} = drop_{osnr} | ||||
|  | ||||
| .. math:: | ||||
|  | ||||
|   add_{osnr} = drop_{osnr} = add\_drop\_osnr + 10log10(2) | ||||
|  | ||||
|  | ||||
| The user can specify the roadm type_variety in the json topology ROADM instance. If no variety is defined, ``default`` ID is used. | ||||
| The user can define the impairment type for each roadm-path using the degrees ingress/egress immediate neighbor elements and the roadm-path-impairment-id defined in the library for the corresponding type-variety. | ||||
| Here is an example: | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     { | ||||
|       "uid": "roadm SITE1", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "detailed_impairments", | ||||
| 	    "params": { | ||||
| 		    "per_degree_impairments": [ | ||||
| 		    { | ||||
| 			    "from_degree": "trx SITE1", | ||||
| 		      "to_degree": "east edfa in SITE1 to ILA1", | ||||
| 			    "impairment_id": 1 | ||||
| 		    }] | ||||
| 	    } | ||||
|     } | ||||
|  | ||||
| It is not permitted to use a roadm-path-impairment-id for the wrong roadm path type (add impairment only for add path). | ||||
| If nothing is stated for impairments on roadm-paths, the program identifies the paths implicitly and assigns the first impairment_id that matches the type: if a transceiver is present on one degree, then it is an add/drop degree. | ||||
|  | ||||
| On the previous example, all «implicit» express roadm-path are assigned roadm-path-impairment-id = 0 | ||||
|  | ||||
| Global parameters | ||||
| ----------------- | ||||
| @@ -298,13 +524,37 @@ See ``delta_power_range_db`` for more explaination. | ||||
| |                                             |           | from `arXiv:1710.02225                      | | ||||
| |                                             |           | <https://arxiv.org/abs/1710.02225>`_).      | | ||||
| +---------------------------------------------+-----------+---------------------------------------------+ | ||||
| | ``nli_params.computed_channels``            | (number)  | The channels on which the NLI is            | | ||||
| |                                             |           | explicitly evaluated.                       | | ||||
| | ``dispersion_tolerance``                    | (number)  | Optional. Pure number. Tuning parameter for | | ||||
| |                                             |           | ggn model solution. Default value is 1.     | | ||||
| +---------------------------------------------+-----------+---------------------------------------------+ | ||||
| | ``phase_shift_tolerance``                   | (number)  | Optional. Pure number. Tuning parameter for | | ||||
| |                                             |           | ggn model solution. Defaut value is 0.1.    | | ||||
| +---------------------------------------------+-----------+---------------------------------------------+ | ||||
| | ``nli_params.computed_channels``            | (list     | Optional. The exact channel indices         | | ||||
| |                                             | of        | (starting from 1) on which the NLI is       | | ||||
| |                                             | numbers)  | explicitly evaluated.                       | | ||||
| |                                             |           | The NLI of the other channels is            | | ||||
| |                                             |           | interpolated using ``numpy.interp``.        | | ||||
| |                                             |           | In a C-band simulation with 96 channels in  | | ||||
| |                                             |           | a 50 GHz spacing fix-grid we recommend at   | | ||||
| |                                             |           | one computed channel every 20 channels.     | | ||||
| |                                             |           | least one computed channel every 20         | | ||||
| |                                             |           | channels. If this option is present, the    | | ||||
| |                                             |           | next option "computed_number_of_channels"   | | ||||
| |                                             |           | is ignored. If none of the options are      | | ||||
| |                                             |           | present, the NLI is computed for all        | | ||||
| |                                             |           | channels (no interpolation)                 | | ||||
| +---------------------------------------------+-----------+---------------------------------------------+ | ||||
| | ``nli_params.computed_number_of_channels``  | (number)  | Optional. The number of channels on which   | | ||||
| |                                             |           | the NLI is explicitly evaluated.            | | ||||
| |                                             |           | The channels are                            | | ||||
| |                                             |           | evenly selected between the first and the   | | ||||
| |                                             |           | last carrier of the current propagated      | | ||||
| |                                             |           | spectrum.                                   | | ||||
| |                                             |           | The NLI of the other channels is            | | ||||
| |                                             |           | interpolated using ``numpy.interp``.        | | ||||
| |                                             |           | In a C-band simulation with 96 channels in  | | ||||
| |                                             |           | a 50 GHz spacing fix-grid we recommend at   | | ||||
| |                                             |           | least 6 channels.                           | | ||||
| +---------------------------------------------+-----------+---------------------------------------------+ | ||||
|  | ||||
| Span | ||||
| @@ -437,10 +687,40 @@ Span configuration is not a list (which may change in later releases) and the us | ||||
|         } | ||||
|     } | ||||
|  | ||||
| Power sweep functionality is triggered when setting "power_range_db" in SI in the library. This defines a | ||||
| list of reference powers on which a new design is performed and propagation is triggered | ||||
| (only gnpy-transmission-example script). | ||||
|  | ||||
| for example, with the following settings: | ||||
|  | ||||
|   - ``power_dbm`` = 0 dBm | ||||
|   - max power of the amplifier = 20 dBm, | ||||
|   - user defined ``delta_p`` set by user = 3 dB | ||||
|   - 80 channels, so :math:`pch_{max}` = 20 - 10log10(80) = 0.96 dBm | ||||
|   - ``delta_power_range_db`` = [-3, 0, 3] | ||||
|   - power_sweep -> power range [-3, 0] dBm | ||||
|  | ||||
| then the computation of delta_p during design for each power of this power sweep is: | ||||
|  | ||||
|   - with :math:`p_{ref}` = 0 dBm, computed_delta_p = min(:math:`pch_{max}`, :math:`p_{ref}` + ``delta_p``) - :math:`p_{ref}` = 0.96 ; | ||||
|     - user defined ``delta_p`` = 3 dB **can not** be applied because of saturation, | ||||
|   - with :math:`p_{ref}` = -3 dBm (power sweep) computed_delta_p = min(:math:`pch_{max}`, :math:`p_{ref}` + ``delta_p``) - :math:`p_{ref}` = | ||||
|     min(0.96, -3.0 + 3.0) - (-3.0) = 3.0 ; | ||||
|     - user defined ``delta_p`` = 3 dB **can** be applied. | ||||
|  | ||||
| so the user defined delta_p is applied as much as possible. | ||||
|  | ||||
| .. _spectral_info: | ||||
|  | ||||
| SpectralInformation | ||||
| ~~~~~~~~~~~~~~~~~~~ | ||||
|  | ||||
| GNPy requires a description of all channels that are propagated through the network. | ||||
|  | ||||
| This block defines a reference channel (target input power in spans, nb of channels) which is used to design the network or correct the settings. | ||||
| It may be updated with different options --power. | ||||
| It also defines the channels to be propagated for the gnpy-transmission-example script unless a different definition is provided with ``--spectrum`` option. | ||||
|  | ||||
| Flexgrid channel partitioning is available since the 2.7 release via the extra ``--spectrum`` option. | ||||
| In the simplest case, homogeneous channel allocation can be defined via the ``SpectralInformation`` construct which defines a spectrum of N identical carriers: | ||||
|  | ||||
| @@ -463,7 +743,8 @@ In the simplest case, homogeneous channel allocation can be defined via the ``Sp | ||||
| +----------------------+-----------+-------------------------------------------+ | ||||
| | ``tx_osnr``          | (number)  | In dB. OSNR out from transponder.         | | ||||
| +----------------------+-----------+-------------------------------------------+ | ||||
| | ``power_dbm``        | (number)  | Reference channel power, in dBm.          | | ||||
| | ``power_dbm``        | (number)  | In dBm. Target input power in spans to    | | ||||
| |                      |           | be considered for the design              | | ||||
| |                      |           | In gain mode                              | | ||||
| |                      |           | (see spans/power_mode = false), if no     | | ||||
| |                      |           | gain is set in an amplifier, auto-design  | | ||||
| @@ -488,6 +769,9 @@ In the simplest case, homogeneous channel allocation can be defined via the ``Sp | ||||
| |                      |           | If the ``--power`` CLI option is used,    | | ||||
| |                      |           | its value replaces this parameter.        | | ||||
| +----------------------+-----------+-------------------------------------------+ | ||||
| | ``tx_power_dbm``     | (number)  | In dBm. Optional. Power out from          | | ||||
| |                      |           | transceiver. Default = power_dbm          | | ||||
| +----------------------+-----------+-------------------------------------------+ | ||||
| | ``power_range_db``   | (number)  | Power sweep excursion around              | | ||||
| |                      |           | ``power_dbm``.                            | | ||||
| |                      |           | This defines a list of reference powers   | | ||||
| @@ -544,6 +828,9 @@ In this approach, each partition is internally homogeneous, but different partit | ||||
| | ``tx_osnr``          | (number)  | In dB. Optional. OSNR out from            | | ||||
| |                      |           | transponder. Default value is 40 dB.      | | ||||
| +----------------------+-----------+-------------------------------------------+ | ||||
| | ``tx_power_dbm``     | (number)  | In dBm. Optional. Power out from          | | ||||
| |                      |           | transceiver. Default value is 0 dBm       | | ||||
| +----------------------+-----------+-------------------------------------------+ | ||||
| | ``delta_pdb``        | (number)  | In dB. Optional. Power offset compared to | | ||||
| |                      |           | the reference power used for design       | | ||||
| |                      |           | (SI block in equipment library) to be     | | ||||
| @@ -647,3 +934,467 @@ With the PSW equalization: | ||||
|  | ||||
| the power out of the ROADM will be computed as 2.0e-4 * 50 = 0.01 mW ie -20 dBm for label 1 types of carriers | ||||
| and 2.0e4 * 75 = 0.015 mW ie -18.24 dBm for label2 channels. So a ratio of ~ 1.76 dB between target powers for these carriers. | ||||
|  | ||||
|  | ||||
| .. _topology: | ||||
|  | ||||
| Topology | ||||
| -------- | ||||
|  | ||||
| Topology file contains a list of elements and a list of connections between the elements to form a graph. | ||||
|  | ||||
| Elements can be: | ||||
|  | ||||
| - Fiber | ||||
| - RamanFiber | ||||
| - Edfa | ||||
| - Fused | ||||
| - Roadm | ||||
| - Transceiver | ||||
|  | ||||
|  | ||||
| Common attributes | ||||
| ~~~~~~~~~~~~~~~~~ | ||||
|  | ||||
| All elements contain the followind attributes: | ||||
|  | ||||
| - **"uid"**: mandatory, element unique identifier. | ||||
| - **"type"**: mandatory, element type among possible types (Fiber, RamanFiber, Edfa, Fused, Roadm, Transceiver). | ||||
| - **"metadata"**: optional data including goelocation. | ||||
|  | ||||
|  | ||||
| Fiber attributes/ RamanFiber attributes | ||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
|  | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | field                |   type    | description                                      | | ||||
| +======================+===========+==================================================+ | ||||
| | ``type_variety``     | (string)  | optional, value must be listed in the            | | ||||
| |                      |           | library to be a valid type. Default type         | | ||||
| |                      |           | is SSMF.                                         | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``params``           | (dict of  | see table below.                                 | | ||||
| |                      | numbers)  |                                                  | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
|  | ||||
|  | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | params fields        |   type    | description                                      | | ||||
| +======================+===========+==================================================+ | ||||
| | ``length``           | (number)  | optional, length in ``length_units``, default    | | ||||
| |                      |           | length is 80 km.                                 | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``length_units``     | (string)  | Length unit of measurement. Default is "km".     | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``loss_coef``        | (number   | In dB/km. Optional, loss coefficient. Default    | | ||||
| |                      | or dict)  | is 0.2 dB/km. Slope of the loss can be defined   | | ||||
| |                      |           | using a dict of frequency values such as         | | ||||
| |                      |           | ``{"value": [0.18, 0.18, 0.20, 0.20],            | | ||||
| |                      |           | "frequency": [191e12, 196e12, 200e12, 210e12]}`` | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``att_in``           | (number)  | In dB. Optional, attenuation at fiber input, for | | ||||
| |                      |           | padding purpose. Default is 0 dB.                | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``con_in``           | (number)  | In dB. Optional, input connector loss. Default   | | ||||
| |                      |           | is using value defined in library ``Span``       | | ||||
| |                      |           | section.                                         | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``con_out``          | (number)  | In dB. Optional, output connector loss. Default  | | ||||
| |                      |           | is using value defined in library ``Span``       | | ||||
| |                      |           | section.                                         | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     { | ||||
|         "uid": "fiber (A1->A2)", | ||||
|         "type": "Fiber", | ||||
|         "type_variety": "SSMF", | ||||
|         "params": | ||||
|         { | ||||
|               "length": 120.0, | ||||
|               "loss_coef": 0.2, | ||||
|               "length_units": "km", | ||||
|               "att_in": 0, | ||||
|               "con_in": 0, | ||||
|               "con_out": 0 | ||||
|         } | ||||
|     } | ||||
|  | ||||
| The RamanFiber can be used to simulate Raman amplification through dedicated Raman pumps. The Raman pumps must be listed | ||||
| in the key ``raman_pumps`` within the RamanFiber ``operational`` dictionary. The description of each Raman pump must | ||||
| contain the following: | ||||
|  | ||||
| +---------------------------+-----------+------------------------------------------------------------+ | ||||
| | operational fields        | type      | description                                                | | ||||
| +===========================+===========+============================================================+ | ||||
| | ``power``                 | (number)  | Total pump power in :math:`W`                              | | ||||
| |                           |           | considering a depolarized pump                             | | ||||
| +---------------------------+-----------+------------------------------------------------------------+ | ||||
| | ``frequency``             | (number)  | Pump central frequency in :math:`Hz`                       | | ||||
| +---------------------------+-----------+------------------------------------------------------------+ | ||||
| | ``propagation_direction`` | (string)  | The pumps can propagate in the same or opposite direction  | | ||||
| |                           |           | with respect the signal. Valid choices are ``coprop`` and  | | ||||
| |                           |           | ``counterprop``, respectively                              | | ||||
| +---------------------------+-----------+------------------------------------------------------------+ | ||||
|  | ||||
| Beside the list of Raman pumps, the RamanFiber ``operational`` dictionary must include the ``temperature`` that affects | ||||
| the amplified spontaneous emission noise generated by the Raman amplification. | ||||
| As the loss coefficient significantly varies outside the C-band, where the Raman pumps are usually placed, | ||||
| it is suggested to include an estimation of the loss coefficient for the Raman pump central frequencies within | ||||
| a dictionary-like definition of the ``RamanFiber.params.loss_coef`` | ||||
| (e.g. ``loss_coef = {"value": [0.18, 0.18, 0.20, 0.20], "frequency": [191e12, 196e12, 200e12, 210e12]}``). | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     { | ||||
|       "uid": "Span1", | ||||
|       "type": "RamanFiber", | ||||
|       "type_variety": "SSMF", | ||||
|       "operational": { | ||||
|         "temperature": 283, | ||||
|         "raman_pumps": [ | ||||
|           { | ||||
|             "power": 224.403e-3, | ||||
|             "frequency": 205e12, | ||||
|             "propagation_direction": "counterprop" | ||||
|           }, | ||||
|           { | ||||
|             "power": 231.135e-3, | ||||
|             "frequency": 201e12, | ||||
|             "propagation_direction": "counterprop" | ||||
|           } | ||||
|         ] | ||||
|       }, | ||||
|       "params": { | ||||
|         "type_variety": "SSMF", | ||||
|         "length": 80.0, | ||||
|         "loss_coef": { | ||||
|           "value": [0.18, 0.18, 0.20, 0.20], | ||||
|           "frequency": [191e12, 196e12, 200e12, 210e12] | ||||
|         }, | ||||
|         "length_units": "km", | ||||
|         "att_in": 0, | ||||
|         "con_in": 0.5, | ||||
|         "con_out": 0.5 | ||||
|       }, | ||||
|       "metadata": { | ||||
|         "location": { | ||||
|           "latitude": 1, | ||||
|           "longitude": 0, | ||||
|           "city": null, | ||||
|           "region": "" | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
| Edfa attributes | ||||
| ~~~~~~~~~~~~~~~ | ||||
|  | ||||
| The user can specify the amplifier configurations, which are applied depending on general simulation setup: | ||||
| - if the user has specified ``power_mode`` as True in Span section, delta_p is applied and gain_target is ignored and recomputed. | ||||
| - if the user has specified ``power_mode`` as False in Span section, gain_target is applied and delta_p is ignored. | ||||
| If the user has specified unfeasible targets with respect to the type_variety, targets might be changed accordingly. | ||||
| For example, if gain_target leads to a power value above the maximum output power of the amplifier, the gain is saturated to | ||||
| the maximum achievable total power. | ||||
|  | ||||
| The exact layout used by simulation can be retrieved thanks to --save-network option. | ||||
|  | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | field                |   type    | description                                      | | ||||
| +======================+===========+==================================================+ | ||||
| | ``type_variety``     | (string)  | Optional, value must be listed in the library    | | ||||
| |                      |           | to be a valid type. If not defined, autodesign   | | ||||
| |                      |           | will pick one in the library among the           | | ||||
| |                      |           | ``allowed_for_design``. Autodesign selection is  | | ||||
| |                      |           | based J. -L. Auge, V. Curri and E. Le Rouzic,    | | ||||
| |                      |           | Open Design for Multi-Vendor Optical Networks    | | ||||
| |                      |           | , OFC 2019. equation 4                           | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
| | ``operational``      | (dict of  | Optional, configuration settings of the          | | ||||
| |                      | numbers)  | amplifier. See table below                       | | ||||
| +----------------------+-----------+--------------------------------------------------+ | ||||
|  | ||||
| +----------------------+-----------+-------------------------------------------------------------+ | ||||
| | operational field    |   type    | description                                                 | | ||||
| +======================+===========+=============================================================+ | ||||
| | ``gain_target``      | (number)  | In dB. Optional Gain target between in_voa and out_voa.     | | ||||
| |                      |           |                                                             | | ||||
| +----------------------+-----------+-------------------------------------------------------------+ | ||||
| | ``delta_p``          | (number)  | In dB. Optional Power offset at the outpout of the          | | ||||
| |                      |           | amplifier and before out_voa compared to reference channel  | | ||||
| |                      |           | power defined in SI block of library.                       | | ||||
| +----------------------+-----------+-------------------------------------------------------------+ | ||||
| | ``out_voa``          | (number)  | In dB. Optional, output variable optical attenuator loss.   | | ||||
| +----------------------+-----------+-------------------------------------------------------------+ | ||||
| | ``in_voa``           | (number)  | In dB. Optional, input variable optical attenuator loss.    | | ||||
| +----------------------+-----------+-------------------------------------------------------------+ | ||||
| | ``tilt_target``      | (number)  | In dB. Optional, tilt target on the whole wavelength range  | | ||||
| |                      |           | of the amplifier.                                           | | ||||
| +----------------------+-----------+-------------------------------------------------------------+ | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     { | ||||
|       "uid": "Edfa1", | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_low_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 15.0, | ||||
|         "delta_p": -2, | ||||
|         "tilt_target": -1, | ||||
|         "out_voa": 0 | ||||
|       }, | ||||
|       "metadata": { | ||||
|         "location": { | ||||
|           "latitude": 2, | ||||
|           "longitude": 0, | ||||
|           "city": null, | ||||
|           "region": "" | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
| Roadm | ||||
| ~~~~~ | ||||
|  | ||||
| +----------------------------------------+-----------+----------------------------------------------------+ | ||||
| | field                                  |   type    | description                                        | | ||||
| +========================================+===========+====================================================+ | ||||
| | ``type_variety``                       | (string)  | Optional. If no variety is defined, ``default``    | | ||||
| |                                        |           | ID is used.                                        | | ||||
| |                                        |           | A unique name must be used to ID the ROADM         | | ||||
| |                                        |           | variety in the JSON library file.                  | | ||||
| +----------------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``target_pch_out_db``                  | (number)  | :ref:`Equalization strategy<equalization>`         | | ||||
| | or                                     |           | for this ROADM. Optional: if not defined, the      | | ||||
| | ``target_psd_out_mWperGHz``            |           | one defined in library for this type_variety is    | | ||||
| | or                                     |           | used.                                              | | ||||
| | ``target_out_mWperSlotWidth``          |           |                                                    | | ||||
| | (mutually exclusive)                   |           |                                                    | | ||||
| +----------------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``restrictions``                       | (dict of  | Optional. If defined, it overrides restriction     | | ||||
| |                                        |  strings) | defined in library for this roadm type_variety.    | | ||||
| +----------------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``per_degree_pch_out_db``              | (dict of  | Optional. If defined, it overrides ROADM's general | | ||||
| | or                                     |  string,  | target power/psd for this degree. Dictionary with  | | ||||
| | ``per_degree_psd_out_mWperGHz``        |  number)  | key = degree name (uid of the immediate adjacent   | | ||||
| | or                                     |           | element) and value = target power/psd value.       | | ||||
| | ``per_degree_psd_out_mWperSlotWidth``  |           |                                                    | | ||||
| +----------------------------------------+-----------+----------------------------------------------------+ | ||||
| | ``per_degree_impairments``             | (list of  | Optional. Impairments id for roadm-path. If        | | ||||
| |                                        |  dict)    | defined, it overrides the general values defined   | | ||||
| |                                        |           | by type_variety.                                   | | ||||
| +----------------------------------------+-----------+----------------------------------------------------+ | ||||
|  | ||||
| Definition example: | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     { | ||||
|       "uid": "roadm SITE1", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "detailed_impairments", | ||||
| 	    "params": { | ||||
| 		  "per_degree_impairments": [ | ||||
| 		    { | ||||
| 			    "from_degree": "trx SITE1", | ||||
| 		      "to_degree": "east edfa in SITE1 to ILA1", | ||||
| 			    "impairment_id": 1 | ||||
| 		    }], | ||||
|           "per_degree_pch_out_db": { | ||||
|             "east edfa in SITE1 to ILA1": -13.5 | ||||
|           } | ||||
| 	    } | ||||
|     } | ||||
|  | ||||
| In this example, all «implicit» express roadm-path are assigned as roadm-path-impairment-id = 0, and the target power is | ||||
| set according to the value defined in the library except for the direction heading to "east edfa in SITE1 to ILA1", where | ||||
| constant power equalization is used to reach -13.5 dBm target power. | ||||
|  | ||||
| Fused | ||||
| ~~~~~ | ||||
|  | ||||
| The user can define concentrated losses thanks to Fused element. This can be useful for example to materialize connector with its loss between two fiber spans. | ||||
| ``params`` and ``loss`` are optional, loss of the concentrated loss is in dB. Default value is 0 dB. | ||||
| A fused element connected to the egress of a ROADM will disable the automatic booster/preamp selection. | ||||
|  | ||||
| Fused ``params`` only contains a ``loss`` value in dB. | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|       "params": { | ||||
|         "loss": 2 | ||||
|       } | ||||
|  | ||||
|  | ||||
| Transceiver | ||||
| ~~~~~~~~~~~ | ||||
|  | ||||
| Transceiver elements represent the logical function that generates a spectrum. This must be specified to start and stop propagation. However, the characteristics of the spectrum are defined elsewhere, so Transceiver elements do not contain any attribute. | ||||
| Information on transceivers' type, modes and frequency must be listed in :ref:`service file<service>` or :ref:`spectrum file<mixed-rate>`. Without any definition, default :ref:`SI<spectral_info>` values of the library are propagated. | ||||
|  | ||||
| .. _service: | ||||
|  | ||||
| Service JSON file | ||||
| ----------------- | ||||
|  | ||||
| Service file lists all requests and their possible constraints. This is derived from draft-ietf-teas-yang-path-computation-01.txt: | ||||
| gnpy-path-request computes performance of each request independantly from each other, considering full load (based on the request settings), | ||||
| but computes spectrum occupation based on the list of request, so that the requests should not define overlapping spectrum. | ||||
| Lack of spectrum leads to blocking, but performance estimation is still returned for information. | ||||
|  | ||||
|  | ||||
| +-----------------------+-------------------+----------------------------------------------------------------+ | ||||
| | field                 |   type            | description                                                    | | ||||
| +=======================+===================+================================================================+ | ||||
| | ``path-request``      | (list of          | list of requests.                                              | | ||||
| |                       |  request)         |                                                                | | ||||
| +-----------------------+-------------------+----------------------------------------------------------------+ | ||||
| | ``synchronization``   | (list of          | Optional. List of synchronization vector. One synchronization  | | ||||
| |                       | synchronization)  | vector contains the disjunction constraints.                   | | ||||
| +-----------------------+-------------------+----------------------------------------------------------------+ | ||||
|  | ||||
| - **"path-request"** list of requests made of: | ||||
|  | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | field                 |   type     | description                                                    | | ||||
| +=======================+============+================================================================+ | ||||
| | ``request-id``        | (number)   | Mandatory. Unique id of request. The same id is referenced in  | | ||||
| |                       |            | response with ``response-id``.                                 | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | ``source``            | (string)   | Mandatory. Source of traffic. It must be one of the UID of     | | ||||
| |                       |            | transceivers listed in the topology.                           | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | ``src-tp-id``         | (string)   | Mandatory. It must be equal to ``source``.                     | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | ``destination``       | (string)   | Mandatory. Destination of traffic. It must be one of the UID   | | ||||
| |                       |            | of transceivers listed in the topology.                        | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | ``dst-tp-id``         | (string)   | Mandatory. It must be equal to ``destination``.                | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | ``bidirectional``     | (boolean)  | Mandatory. Boolean indicating if the propagation should be     | | ||||
| |                       |            | checked on source-destination only (false) or on               | | ||||
| |                       |            | destination-source (true).                                     | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
| | ``path-constraints``  | (dict)     | Mandatory. It contains the list of constraints including type  | | ||||
| |                       |            | of transceiver, mode and nodes to be included in the path.     | | ||||
| +-----------------------+------------+----------------------------------------------------------------+ | ||||
|  | ||||
| ``path-constraints`` contains ``te-bandwidth`` with the following attributes: | ||||
|  | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | field                             |   type     | description                                                    | | ||||
| +===================================+============+================================================================+ | ||||
| | ``technology``                    | (string)   | Mandatory. Only one possible value ``flex-grid``.              | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``trx_type``                      | (string)   | Mandatory. Type of the transceiver selected for this request.  | | ||||
| |                                   |            | It must be listed in the library transceivers list.            | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``trx_mode``                      | (string)   | Optional. Mode selected for this path. It must be listed       | | ||||
| |                                   |            | within the library transceiver's modes. If not defined,        | | ||||
| |                                   |            | the gnpy-path-request script automatically selects the mode    | | ||||
| |                                   |            | that has performance above minimum required threshold          | | ||||
| |                                   |            | including margins and penalties for all channels (full load)   | | ||||
| |                                   |            | and 1) fit in the spacing, 2) has the largest baudrate,        | | ||||
| |                                   |            | 3) has the largest bitrate.                                    | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``spacing``                       | (number)   | Mandatory. In :math:`Hz`. Spacing is used for full spectral    | | ||||
| |                                   |            | load feasibility evaluation.                                   | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``path_bandwidth``                | (number)   | Mandatory. In :math:`bit/s`. Required capacity on this         | | ||||
| |                                   |            | service. It is used to determine the needed number of channels | | ||||
| |                                   |            | and spectrum occupation.                                       | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``max-nb-of-channel``             | (number)   | Optional. Number of channels to take into account for the full | | ||||
| |                                   |            | load computation. Default value is computed based on f_min     | | ||||
| |                                   |            | and f_max of transceiver frequency range and min_spacing of    | | ||||
| |                                   |            | mode (once selected).                                          | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``output-power``                  | (number)   | Optional. In :math:`W`. Target power to be considered at the   | | ||||
| |                                   |            | fiber span input. Default value uses power defined in  SI in   | | ||||
| |                                   |            | the library converted in Watt:                                 | | ||||
| |                                   |            | :math:`10^(power\_dbm/10)`.                                    | | ||||
| |                                   |            |                                                                | | ||||
| |                                   |            | Current script gnpy-path-request redesign the network on each  | | ||||
| |                                   |            | new request, using this power together with                    | | ||||
| |                                   |            | ``max-nb-of-channel`` to compute target gains or power in      | | ||||
| |                                   |            | amplifiers. This parameter can therefore be useful to test     | | ||||
| |                                   |            | different designs with the same script.                        | | ||||
| |                                   |            |                                                                | | ||||
| |                                   |            | In order to keep the same design for different requests,       | | ||||
| |                                   |            | ``max-nb-of-channel` and ``output-power`` of each request      | | ||||
| |                                   |            | should be kept identical.                                      | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``tx_power``                      | (number)   | Optional. In :math:`W`.  Optical output power emitted by the   | | ||||
| |                                   |            | transceiver. Default value is output-power.                    | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``effective-freq-slot``           | (list)     | Optional. List of N, M values defining the requested spectral  | | ||||
| |                                   |            | occupation for this service. N, M use ITU-T G694.1 Flexible    | | ||||
| |                                   |            | DWDM grid definition.                                          | | ||||
| |                                   |            | For the flexible DWDM grid, the allowed frequency slots have a | | ||||
| |                                   |            | nominal central frequency (in :math:`THz`) defined by:         | | ||||
| |                                   |            | 193.1 + N × 0.00625 where N is a positive or negative integer  | | ||||
| |                                   |            | including 0                                                    | | ||||
| |                                   |            | and 0.00625 is the nominal central frequency granularity in    | | ||||
| |                                   |            | :math:`THz` and a slot width defined by:                       | | ||||
| |                                   |            | 12.5 × M where M is a positive integer and 12.5 is the slot    | | ||||
| |                                   |            | width granularity in :math:`GHz`.                              | | ||||
| |                                   |            | Any combination of frequency slots is allowed as long as       | | ||||
| |                                   |            | there is no overlap between two frequency slots.               | | ||||
| |                                   |            | Requested spectrum should be consistent with mode min_spacing  | | ||||
| |                                   |            | and path_bandwidth: 1) each slot inside the list must be       | | ||||
| |                                   |            | large enough to fit one carrier with min_spacing width,        | | ||||
| |                                   |            | 2) total number of channels should be large enough to support  | | ||||
| |                                   |            | the requested path_bandwidth.                                  | | ||||
| |                                   |            | Note that gnpy-path-request script uses full spectral load and | | ||||
| |                                   |            | not this spectrum constraint to compute performance. Thus, the | | ||||
| |                                   |            | specific mix of channels resulting from the list of requests   | | ||||
| |                                   |            | is not considered to compute performances.                     | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``route-object-include-exclude``  | (list)     | Optional. Indexed List of routing include/exclude constraints  | | ||||
| |                                   |            | to compute the path between source and destination.            | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
|  | ||||
| ``route-object-include-exclude`` attributes: | ||||
|  | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | field                             |   type     | description                                                    | | ||||
| +===================================+============+================================================================+ | ||||
| | ``explicit-route-usage``          | (string)   | Mandatory. Only one value is supported: ``route-include-ero``  | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``index``                         | (number)   | Mandatory. Index of the element to be included.                | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``nodes_id``                      | (string)   | Mandatory. UID of the node to include in the path.             | | ||||
| |                                   |            | It must be listed in the list of elements in topology file.    | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``hop-type``                      | (string)   | Mandatory. One among these two values: ``LOOSE`` or            | | ||||
| |                                   |            | ``STRICT``.  If LOOSE, constraint may be ignored at            | | ||||
| |                                   |            | computation time if no solution is found that satisfies the    | | ||||
| |                                   |            | constraint. If STRICT, constraint MUST be satisfied, else the  | | ||||
| |                                   |            | computation is stopped and no solution is returned.            | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
|  | ||||
| - **"synchronization"**: | ||||
|  | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | field                             |   type     | description                                                    | | ||||
| +===================================+============+================================================================+ | ||||
| | ``"relaxable``                    | (boolean)  | Mandatory. Only false is supported.                            | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``disjointness``                  | (string)   | Mandatory. Only ``node link`` is supported.                    | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
| | ``request-id-number``             | (list)     | Mandatory. List of ``request-id`` whose path should be         | | ||||
| |                                   |            | disjointed.                                                    | | ||||
| +-----------------------------------+------------+----------------------------------------------------------------+ | ||||
|  | ||||
| .. code-block:: json | ||||
|  | ||||
|     "synchronization-id": "3", | ||||
|       "svec": { | ||||
|         "relaxable": false, | ||||
|         "disjointness": "node link", | ||||
|         "request-id-number": [ | ||||
|           "3", | ||||
|           "1" | ||||
|         ] | ||||
|   | ||||
							
								
								
									
										269
									
								
								docs/release-notes.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										269
									
								
								docs/release-notes.rst
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,269 @@ | ||||
| .. _release-notes: | ||||
|  | ||||
| Release change log | ||||
| ================== | ||||
|  | ||||
| Each release introduces some changes and new features. | ||||
|  | ||||
| (prepare text for next release) | ||||
| ROADM impairments can be defined per degree and roadm-path type (add, drop or express). | ||||
| Minimum loss when crossing a ROADM is no more 0 dB. It can be set per ROADM degree with roadm-path-impairments. | ||||
|  | ||||
| The transceiver output power, which was previously set using the same parameter as the input span power (power_dbm), | ||||
| can now be set using a different parameter. It can be set as: | ||||
|  | ||||
|   - for all channels, with tx_power_dbm using SI similarly to tx_osnr (gnpy-transmission-example script) | ||||
|  | ||||
|     .. code-block:: json | ||||
|  | ||||
|       "SI": [{ | ||||
|               "f_min": 191.35e12, | ||||
|               "baud_rate": 32e9, | ||||
|               "f_max": 196.1e12, | ||||
|               "spacing": 50e9, | ||||
|               "power_dbm": 3, | ||||
|               "power_range_db": [0, 0, 1], | ||||
|               "roll_off": 0.15, | ||||
|               "tx_osnr": 40, | ||||
|               "tx_power_dbm": -10, | ||||
|               "sys_margins": 2 | ||||
|           } | ||||
|       ] | ||||
|  | ||||
|   - for certain channels, using -spectrum option and tx_channel_power_dbm option (gnpy-transmission-example script). | ||||
|  | ||||
|     .. code-block:: json | ||||
|  | ||||
|       { | ||||
|         "spectrum": [ | ||||
|           { | ||||
|             "f_min": 191.35e12, | ||||
|             "f_max":193.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40 | ||||
|           }, | ||||
|           { | ||||
|             "f_min": 193.15e12, | ||||
|             "f_max":193.15e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40, | ||||
|             "tx_power_dbm": -10 | ||||
|           }, | ||||
|           { | ||||
|             "f_min": 193.2e12, | ||||
|             "f_max":195.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40 | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|  | ||||
|   - per service using the additional parameter ``tx_power`` which similarly to ``power`` should be defined in Watt (gnpy-path-request script) | ||||
|  | ||||
|     .. code-block:: json | ||||
|  | ||||
|       { | ||||
|         "path-request": [ | ||||
|           { | ||||
|             "request-id": "0", | ||||
|             "source": "trx SITE1", | ||||
|             "destination": "trx SITE2", | ||||
|             "src-tp-id": "trx SITE1", | ||||
|             "dst-tp-id": "trx SITE2", | ||||
|             "bidirectional": false, | ||||
|             "path-constraints": { | ||||
|               "te-bandwidth": { | ||||
|                 "technology": "flexi-grid", | ||||
|                 "trx_type": "Voyager", | ||||
|                 "trx_mode": "mode 1", | ||||
|                 "spacing": 50000000000.0, | ||||
|                 "path_bandwidth": 100000000000.0 | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             "request-id": "0 with tx_power", | ||||
|             "source": "trx SITE1", | ||||
|             "destination": "trx SITE2", | ||||
|             "src-tp-id": "trx SITE1", | ||||
|             "dst-tp-id": "trx SITE2", | ||||
|             "bidirectional": false, | ||||
|             "path-constraints": { | ||||
|               "te-bandwidth": { | ||||
|                 "technology": "flexi-grid", | ||||
|                 "trx_type": "Voyager", | ||||
|                 "trx_mode": "mode 1", | ||||
|                 "tx_power": 0.0001, | ||||
|                 "spacing": 50000000000.0, | ||||
|                 "path_bandwidth": 100000000000.0 | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|  | ||||
| v2.9 | ||||
| ---- | ||||
|  | ||||
| The revision introduces a major refactor that separates design and propagation. Most of these changes have no impact | ||||
| on the user experience, except the following ones: | ||||
|  | ||||
| **Network design - amplifiers**: amplifier saturation is checked during design in all cases, even if type_variety is | ||||
| set; amplifier gain is no more computed on the fly but only at design phase. | ||||
|  | ||||
| Before, the design did not consider amplifier power saturation during design if amplifier type_variety was stated. | ||||
| With this revision, the saturation is always applied: | ||||
| If design is made for a per channel power that leads to saturation, the target are properly reduced and the design | ||||
| is freezed. So that when a new simulation is performed on the same network for lower levels of power per channel | ||||
| the same gain target is applied. Before these were recomputed, changing the gain targets, so the simulation was | ||||
| not considering the exact same working points for amplifiers in case of saturation. | ||||
|  | ||||
| Note that this case (working with saturation settings) is not recommended. | ||||
|  | ||||
| The gain of amplifiers was estimated on the fly also in case of RamanFiber preceding elements. The refactor now | ||||
| requires that an estimation of Raman gain of the RamanFiber is done during design to properly compute a gain target. | ||||
| The Raman gain is estimated at design for every RamanFiber span and also during propagation instead of being only | ||||
| estimated at propagation stage for those Raman Fiber spans concerned with the transmission. The auto-design is more | ||||
| accurate for unpropagated spans, but this results in an increase overall computation time. | ||||
| This will be improved in the future. | ||||
|  | ||||
| **Network design - ROADMs**: ROADM target power settings are verified during design. | ||||
|  | ||||
| Design checks that expected power coming from every directions ingress from a ROADM are consistent with output power | ||||
| targets. The checks only considers the adjacent previous hop. If the expected power at the input of this ROADM is | ||||
| lower than the target power on the out-degree of the ROADM, a warning is displayed, and user is asked to review the | ||||
| input network to avoid this situation. This does not change the design or propagation behaviour. | ||||
|  | ||||
| **Propagation**: amplifier gain target is no more recomputed during propagation. It is now possible to freeze | ||||
| the design and propagate without automatic changes. | ||||
|  | ||||
| In previous release, gain was recomputed during propagation based on an hypothetical reference noiseless channel | ||||
| propagation. It was not possible to «freeze» the autodesign, and propagate without recomputing the gain target | ||||
| of amplifiers. | ||||
| With this new release, the design is freezed, so that it is possible to compare performances on same basis. | ||||
|  | ||||
| **Display**: "effective pch (dbm)" is removed. Display contains the target pch which is the target power per channel | ||||
| in dBm, computed based on reference channel used for design and the amplifier delta_p in dB (and before out VOA | ||||
| contribution). Note that "actual pch out (dBm)" is the actual propagated total power per channel averaged per spectrum | ||||
| band definition at the output of the amplifier element, including noises and out VOA contribution. | ||||
|  | ||||
| v2.8 | ||||
| ---- | ||||
|  | ||||
| **Spectrum assignment**: requests can now support multiple slots. | ||||
| The definition in service file supports multiple assignments (unchanged syntax): | ||||
|  | ||||
|   .. code-block:: json | ||||
|  | ||||
|           "effective-freq-slot": [ | ||||
|             { | ||||
|               "N": 0, | ||||
|               "M": 4 | ||||
|             }, { | ||||
|               "N": 50, | ||||
|               "M": 4 | ||||
|             } | ||||
|           ], | ||||
|  | ||||
| But in results, label-hop is now a list of slots and center frequency index: | ||||
|  | ||||
|   .. code-block:: json | ||||
|  | ||||
|           { | ||||
|             "path-route-object": { | ||||
|               "index": 4, | ||||
|               "label-hop": [ | ||||
|                 { | ||||
|                   "N": 0, | ||||
|                   "M": 4 | ||||
|                 }, { | ||||
|                   "N": 50, | ||||
|                   "M": 4 | ||||
|                 } | ||||
|               ] | ||||
|             } | ||||
|           }, | ||||
|  | ||||
| instead of  | ||||
|  | ||||
|   .. code-block:: json | ||||
|  | ||||
|           { | ||||
|             "path-route-object": { | ||||
|               "index": 4, | ||||
|               "label-hop": { | ||||
|                 "N": 0, | ||||
|                 "M": 4 | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|  | ||||
|  | ||||
|  | ||||
| **change in display**: only warnings are displayed ; information are disabled and needs the -v (verbose) | ||||
| option to be displayed on standard output. | ||||
|  | ||||
| **frequency scaling**: A more accurate description of fiber parameters is implemented, including frequency scaling of | ||||
| chromatic dispersion, effective area, Raman gain coefficient, and nonlinear coefficient. | ||||
|  | ||||
| In particular: | ||||
|  | ||||
| 1. Chromatic dispersion can be defined with ``'dispersion'`` and ``'dispersion_slope'``, as in previous versions, or | ||||
| with ``'dispersion_per_frequency'``; the latter must be defined as a dictionary with two keys, ``'value'`` and | ||||
| ``'frequency'`` and it has higher priority than the entries ``'dispersion'`` and ``'dispersion_slope'``. | ||||
| Essential change: In previous versions, when it was not provided the ``'dispersion_slope'`` was calculated in an | ||||
| involute manner to get a vanishing beta3 , and this was a mere artifact for NLI evaluation purposes (namely to evaluate | ||||
| beta2 and beta3, not for total dispersion accumulation). Now, the evaluation of beta2 and beta3 is performed explicitly | ||||
| in the element.py module. | ||||
|  | ||||
| 2. The effective area is provided as a scalar value evaluated at the Fiber reference frequency and properly scaled | ||||
| considering the Fiber refractive indices n1 and n2, and the core radius. These quantities are assumed to be fixed and | ||||
| are hard coded in the parameters.py module. Essential change: The effective area is always scaled along the frequency. | ||||
|  | ||||
| 3. The Raman gain coefficient is properly scaled considering the overlapping of fiber effective area values scaled at | ||||
| the interacting frequencies. Essential change: In previous version the Raman gain coefficient depends only on | ||||
| the frequency offset. | ||||
|  | ||||
| 4. The nonlinear coefficient ``'gamma'`` is properly scaled considering the refractive index n2 and the scaling | ||||
| effective area.  Essential change: As the effective area, the nonlinear coefficient is always scaled along the | ||||
| frequency. | ||||
|  | ||||
| **power offset**: Power equalization now enables defining a power offset in transceiver library to represent | ||||
| the deviation from the general equalisation strategy defined in ROADMs. | ||||
|  | ||||
|   .. code-block:: json | ||||
|  | ||||
|             "mode": [{ | ||||
|                     "format": "100G", | ||||
|                     "baud_rate": 32.0e9, | ||||
|                     "tx_osnr": 35.0, | ||||
|                     "min_spacing": 50.0e9, | ||||
|                     "cost": 1, | ||||
|                     "OSNR": 10.0, | ||||
|                     "bit_rate": 100.0e9, | ||||
|                     "roll_off": 0.2, | ||||
|                     "equalization_offset_db": 0.0 | ||||
|                 }, { | ||||
|                     "format": "200G", | ||||
|                     "baud_rate": 64.0e9, | ||||
|                     "tx_osnr": 35.0, | ||||
|                     "min_spacing": 75.0e9, | ||||
|                     "cost": 1, | ||||
|                     "OSNR": 13.0, | ||||
|                     "bit_rate": 200.0e9, | ||||
|                     "roll_off": 0.2, | ||||
|                     "equalization_offset_db": 1.76 | ||||
|                 } | ||||
|             ] | ||||
|  | ||||
| v2.7 | ||||
| ---- | ||||
| @@ -1,7 +0,0 @@ | ||||
| alabaster>=0.7.12,<1 | ||||
| docutils>=0.17.1,<1 | ||||
| myst-parser>=0.16.1,<1 | ||||
| Pygments>=2.11.2,<3 | ||||
| rstcheck | ||||
| Sphinx>=4.4.0,<5 | ||||
| sphinxcontrib-bibtex>=2.4.1,<3 | ||||
| @@ -29,10 +29,11 @@ from typing import Union | ||||
| from logging import getLogger | ||||
|  | ||||
| from gnpy.core.utils import lin2db, db2lin, arrange_frequencies, snr_sum, per_label_average, pretty_summary_print, \ | ||||
|     watt2dbm, psd2powerdbm | ||||
| from gnpy.core.parameters import RoadmParams, FusedParams, FiberParams, PumpParams, EdfaParams, EdfaOperational | ||||
|     watt2dbm, psd2powerdbm, calculate_absolute_min_or_zero | ||||
| from gnpy.core.parameters import RoadmParams, FusedParams, FiberParams, PumpParams, EdfaParams, EdfaOperational, \ | ||||
|     RoadmPath, RoadmImpairment | ||||
| from gnpy.core.science_utils import NliSolver, RamanSolver | ||||
| from gnpy.core.info import SpectralInformation, ReferenceCarrier | ||||
| from gnpy.core.info import SpectralInformation | ||||
| from gnpy.core.exceptions import NetworkTopologyError, SpectrumError, ParametersError | ||||
|  | ||||
|  | ||||
| @@ -94,6 +95,7 @@ class Transceiver(_Node): | ||||
|         self.penalties = {} | ||||
|         self.total_penalty = 0 | ||||
|         self.propagated_labels = [""] | ||||
|         self.tx_power = None | ||||
|  | ||||
|     def _calc_cd(self, spectral_info): | ||||
|         """Updates the Transceiver property with the CD of the received channels. CD in ps/nm. | ||||
| @@ -155,7 +157,8 @@ class Transceiver(_Node): | ||||
|         # use raw_values so that the added SNR penalties are not cumulated | ||||
|         snr_added = 0 | ||||
|         for s in args: | ||||
|             snr_added += db2lin(-s) | ||||
|             if s is not None: | ||||
|                 snr_added += db2lin(-s) | ||||
|         snr_added = -lin2db(snr_added) | ||||
|         self.osnr_ase = snr_sum(self.raw_osnr_ase, self.baud_rate, snr_added) | ||||
|         self.snr = snr_sum(self.raw_snr, self.baud_rate, snr_added) | ||||
| @@ -192,6 +195,7 @@ class Transceiver(_Node): | ||||
|         osnr_ase = per_label_average(self.osnr_ase, self.propagated_labels) | ||||
|         osnr_ase_01nm = per_label_average(self.osnr_ase_01nm, self.propagated_labels) | ||||
|         snr_01nm = per_label_average(self.snr_01nm, self.propagated_labels) | ||||
|         tx_power_dbm = per_label_average(watt2dbm(self.tx_power), self.propagated_labels) | ||||
|         cd = mean(self.chromatic_dispersion) | ||||
|         pmd = mean(self.pmd) | ||||
|         pdl = mean(self.pdl) | ||||
| @@ -205,7 +209,8 @@ class Transceiver(_Node): | ||||
|                             f'  CD (ps/nm):                {cd:.2f}', | ||||
|                             f'  PMD (ps):                  {pmd:.2f}', | ||||
|                             f'  PDL (dB):                  {pdl:.2f}', | ||||
|                             f'  Latency (ms):              {latency:.2f}']) | ||||
|                             f'  Latency (ms):              {latency:.2f}', | ||||
|                             f'  Actual pch out (dBm):      {pretty_summary_print(tx_power_dbm)}']) | ||||
|  | ||||
|         cd_penalty = self.penalties.get('chromatic_dispersion') | ||||
|         if cd_penalty is not None: | ||||
| @@ -220,6 +225,7 @@ class Transceiver(_Node): | ||||
|         return result | ||||
|  | ||||
|     def __call__(self, spectral_info): | ||||
|         self.tx_power = spectral_info.tx_power | ||||
|         self._calc_snr(spectral_info) | ||||
|         self._calc_cd(spectral_info) | ||||
|         self._calc_pmd(spectral_info) | ||||
| @@ -242,6 +248,7 @@ class Roadm(_Node): | ||||
|         # on the path, since it depends on the equalization definition on the degree. | ||||
|         self.ref_pch_out_dbm = None | ||||
|         self.loss = 0  # auto-design interest | ||||
|         self.loss_pch_db = None | ||||
|  | ||||
|         # Optical power of carriers are equalized by the ROADM, so that the experienced loss is not the same for | ||||
|         # different carriers. The ref_effective_loss records the loss for a reference carrier. | ||||
| @@ -258,6 +265,19 @@ class Roadm(_Node): | ||||
|         self.per_degree_pch_out_dbm = self.params.per_degree_pch_out_db | ||||
|         self.per_degree_pch_psd = self.params.per_degree_pch_psd | ||||
|         self.per_degree_pch_psw = self.params.per_degree_pch_psw | ||||
|         self.ref_pch_in_dbm = {} | ||||
|         self.ref_carrier = None | ||||
|         # Define the nature of from-to internal connection: express-path, drop-path, add-path | ||||
|         # roadm_paths contains a list of RoadmPath object for each path crossing the ROADM | ||||
|         self.roadm_paths = [] | ||||
|         # roadm_path_impairments contains a dictionnary of impairments profiles corresponding to type_variety | ||||
|         # first listed add, drop an express constitute the default | ||||
|         self.roadm_path_impairments = self.params.roadm_path_impairments | ||||
|         # per degree definitions, in case some degrees have particular deviations with respect to default. | ||||
|         self.per_degree_impairments = {f'{i["from_degree"]}-{i["to_degree"]}': {"from_degree": i["from_degree"], | ||||
|                                                                                 "to_degree": i["to_degree"], | ||||
|                                                                                 "impairment_id": i["impairment_id"]} | ||||
|                                        for i in self.params.per_degree_impairments} | ||||
|  | ||||
|     @property | ||||
|     def to_json(self): | ||||
| @@ -272,9 +292,10 @@ class Roadm(_Node): | ||||
|         to_json = { | ||||
|             'uid': self.uid, | ||||
|             'type': type(self).__name__, | ||||
|             'type_variety': self.type_variety, | ||||
|             'params': { | ||||
|                 equalisation: value, | ||||
|                 'restrictions': self.restrictions, | ||||
|                 'restrictions': self.restrictions | ||||
|             }, | ||||
|             'metadata': { | ||||
|                 'location': self.metadata['location']._asdict() | ||||
| @@ -287,6 +308,9 @@ class Roadm(_Node): | ||||
|             to_json['params']['per_degree_psd_out_mWperGHz'] = self.per_degree_pch_psd | ||||
|         if self.per_degree_pch_psw: | ||||
|             to_json['params']['per_degree_psd_out_mWperSlotWidth'] = self.per_degree_pch_psw | ||||
|         if self.per_degree_impairments: | ||||
|             to_json['per_degree_impairments'] = list(self.per_degree_impairments.values()) | ||||
|  | ||||
|         return to_json | ||||
|  | ||||
|     def __repr__(self): | ||||
| @@ -297,13 +321,15 @@ class Roadm(_Node): | ||||
|             return f'{type(self).__name__} {self.uid}' | ||||
|  | ||||
|         total_pch = pretty_summary_print(per_label_average(self.pch_out_dbm, self.propagated_labels)) | ||||
|         total_loss = pretty_summary_print(per_label_average(self.loss_pch_db, self.propagated_labels)) | ||||
|         return '\n'.join([f'{type(self).__name__} {self.uid}', | ||||
|                           f'  effective loss (dB):     {self.ref_effective_loss:.2f}', | ||||
|                           f'  reference pch out (dBm): {self.ref_pch_out_dbm:.2f}', | ||||
|                           f'  actual pch out (dBm):    {total_pch}']) | ||||
|                           f'  Type_variety:            {self.type_variety}', | ||||
|                           f'  Reference loss (dB):     {self.ref_effective_loss:.2f}', | ||||
|                           f'  Actual loss (dB):        {total_loss}', | ||||
|                           f'  Reference pch out (dBm): {self.ref_pch_out_dbm:.2f}', | ||||
|                           f'  Actual pch out (dBm):    {total_pch}']) | ||||
|  | ||||
|     def get_roadm_target_power(self, ref_carrier: ReferenceCarrier = None, | ||||
|                                spectral_info: SpectralInformation = None) -> Union[float, ndarray]: | ||||
|     def get_roadm_target_power(self, spectral_info: SpectralInformation = None) -> Union[float, ndarray]: | ||||
|         """Computes the power in dBm for a reference carrier or for a spectral information. | ||||
|         power is computed based on equalization target. | ||||
|         if spectral_info baud_rate is baud_rate = [32e9, 42e9, 64e9, 42e9, 32e9], and | ||||
| @@ -325,22 +351,22 @@ class Roadm(_Node): | ||||
|             if self.target_pch_out_dbm is not None: | ||||
|                 return self.target_pch_out_dbm | ||||
|             if self.target_psd_out_mWperGHz is not None: | ||||
|                 return psd2powerdbm(self.target_psd_out_mWperGHz, ref_carrier.baud_rate) | ||||
|                 return psd2powerdbm(self.target_psd_out_mWperGHz, self.ref_carrier.baud_rate) | ||||
|             if self.target_out_mWperSlotWidth is not None: | ||||
|                 return psd2powerdbm(self.target_out_mWperSlotWidth, ref_carrier.slot_width) | ||||
|                 return psd2powerdbm(self.target_out_mWperSlotWidth, self.ref_carrier.slot_width) | ||||
|         return None | ||||
|  | ||||
|     def get_per_degree_ref_power(self, degree, ref_carrier): | ||||
|     def get_per_degree_ref_power(self, degree): | ||||
|         """Get the target power in dBm out of ROADM degree for the reference bandwidth | ||||
|         If no equalization is defined on this degree use the ROADM level one. | ||||
|         """ | ||||
|         if degree in self.per_degree_pch_out_dbm: | ||||
|             return self.per_degree_pch_out_dbm[degree] | ||||
|         elif degree in self.per_degree_pch_psd: | ||||
|             return psd2powerdbm(self.per_degree_pch_psd[degree], ref_carrier.baud_rate) | ||||
|             return psd2powerdbm(self.per_degree_pch_psd[degree], self.ref_carrier.baud_rate) | ||||
|         elif degree in self.per_degree_pch_psw: | ||||
|             return psd2powerdbm(self.per_degree_pch_psw[degree], ref_carrier.slot_width) | ||||
|         return self.get_roadm_target_power(ref_carrier) | ||||
|             return psd2powerdbm(self.per_degree_pch_psw[degree], self.ref_carrier.slot_width) | ||||
|         return self.get_roadm_target_power() | ||||
|  | ||||
|     def get_per_degree_power(self, degree, spectral_info): | ||||
|         """Get the target power in dBm out of ROADM degree for the spectral information | ||||
| @@ -354,34 +380,43 @@ class Roadm(_Node): | ||||
|             return psd2powerdbm(self.per_degree_pch_psw[degree], spectral_info.slot_width) | ||||
|         return self.get_roadm_target_power(spectral_info=spectral_info) | ||||
|  | ||||
|     def propagate(self, spectral_info, degree): | ||||
|     def propagate(self, spectral_info, degree, from_degree): | ||||
|         """Equalization targets are read from topology file if defined and completed with default | ||||
|         definition of the library. | ||||
|         If the input power is lower than the target one, use the input power instead because | ||||
|         a ROADM doesn't amplify, it can only attenuate. | ||||
|         There is no difference for add or express : the same target is applied. For the moment | ||||
|         propagates operates with spectral info carriers all having the same source or destination. | ||||
|         If the input power is lower than the target one, use the input power minus the ROADM loss | ||||
|         if is exists, because a ROADM doesn't amplify, it can only attenuate. | ||||
|         There is no difference for add or express : the same target is applied. | ||||
|         For the moment propagate operates with spectral info carriers all having the same source or destination. | ||||
|         """ | ||||
|         # TODO maybe add a minimum loss for the ROADM | ||||
|  | ||||
|         # record input powers to compute the actual loss at the end of the process | ||||
|         input_power_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase) | ||||
|         # apply min ROADM loss if it exists | ||||
|         roadm_maxloss_db = self.get_roadm_path(from_degree, degree).impairment.maxloss | ||||
|         spectral_info.apply_attenuation_db(roadm_maxloss_db) | ||||
|         # records the total power after applying minimum loss | ||||
|         net_input_power_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase) | ||||
|         # find the target power for the reference carrier | ||||
|         ref_per_degree_pch = self.get_per_degree_ref_power(degree, spectral_info.pref.ref_carrier) | ||||
|         ref_per_degree_pch = self.get_per_degree_ref_power(degree) | ||||
|         # find the target powers for each signal carrier | ||||
|         per_degree_pch = self.get_per_degree_power(degree, spectral_info=spectral_info) | ||||
|  | ||||
|         # Definition of ref_pch_out_dbm for the reference channel: | ||||
|         # Depending on propagation upstream from this ROADM, the input power (p_spani) might be smaller than | ||||
|         # Depending on propagation upstream from this ROADM, the input power might be smaller than | ||||
|         # the target power out configured for this ROADM degree's egress. Since ROADM does not amplify, | ||||
|         # the power out of the ROADM for the ref channel is the min value between target power and input power. | ||||
|         # (TODO add a minimum loss for the ROADM crossing) | ||||
|         self.ref_pch_out_dbm = min(spectral_info.pref.p_spani, ref_per_degree_pch) | ||||
|         ref_pch_in_dbm = self.ref_pch_in_dbm[from_degree] | ||||
|         # Calculate the output power for the reference channel (only for visualization) | ||||
|         self.ref_pch_out_dbm = min(ref_pch_in_dbm - roadm_maxloss_db, ref_per_degree_pch) | ||||
|  | ||||
|         # Definition of effective_loss: | ||||
|         # Optical power of carriers are equalized by the ROADM, so that the experienced loss is not the same for | ||||
|         # different carriers. effective_loss records the loss for the reference carrier. | ||||
|         self.ref_effective_loss = spectral_info.pref.p_spani - self.ref_pch_out_dbm | ||||
|         input_power = spectral_info.signal + spectral_info.nli + spectral_info.ase | ||||
|         # Calculate the effective loss for the reference channel | ||||
|         self.ref_effective_loss = ref_pch_in_dbm - self.ref_pch_out_dbm | ||||
|  | ||||
|         # Calculate the target power per channel according to the equalization policy | ||||
|         target_power_per_channel = per_degree_pch + spectral_info.delta_pdb_per_channel | ||||
|         # Computation of the per channel target power according to equalization policy | ||||
|         # Computation of the correction according to equalization policy | ||||
|         # If target_power_per_channel has some channels power above input power, then the whole target is reduced. | ||||
|         # For example, if user specifies delta_pdb_per_channel: | ||||
|         # freq1: 1dB, freq2: 3dB, freq3: -3dB, and target is -20dBm out of the ROADM, | ||||
| @@ -396,28 +431,84 @@ class Roadm(_Node): | ||||
|         # that had the min power. | ||||
|         # This change corresponds to a discussion held during coders call. Please look at this document for | ||||
|         # a reference: https://telecominfraproject.atlassian.net/wiki/spaces/OOPT/pages/669679645/PSE+Meeting+Minutes | ||||
|         correction = (abs(watt2dbm(input_power) - target_power_per_channel) | ||||
|                       - (watt2dbm(input_power) - target_power_per_channel)) / 2 | ||||
|         correction = calculate_absolute_min_or_zero(net_input_power_dbm - target_power_per_channel) | ||||
|         new_target = target_power_per_channel - correction | ||||
|         delta_power = watt2dbm(input_power) - new_target | ||||
|         delta_power = net_input_power_dbm - new_target | ||||
|  | ||||
|         spectral_info.apply_attenuation_db(delta_power) | ||||
|         spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.params.pmd ** 2) | ||||
|         spectral_info.pdl = sqrt(spectral_info.pdl ** 2 + self.params.pdl ** 2) | ||||
|  | ||||
|         # Update the PMD information | ||||
|         pmd_impairment = self.get_roadm_path(from_degree=from_degree, to_degree=degree).impairment.pmd | ||||
|         spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + pmd_impairment ** 2) | ||||
|  | ||||
|         # Update the PMD information | ||||
|         pdl_impairment = self.get_roadm_path(from_degree=from_degree, to_degree=degree).impairment.pdl | ||||
|         spectral_info.pdl = sqrt(spectral_info.pdl ** 2 + pdl_impairment ** 2) | ||||
|  | ||||
|         # Update the per channel power with the result of propagation | ||||
|         self.pch_out_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase) | ||||
|  | ||||
|         # Update the loss per channel and the labels | ||||
|         self.loss_pch_db = input_power_dbm - self.pch_out_dbm | ||||
|         self.propagated_labels = spectral_info.label | ||||
|  | ||||
|     def update_pref(self, spectral_info): | ||||
|         """Update Reference power | ||||
|     def set_roadm_paths(self, from_degree, to_degree, path_type, impairment_id=None): | ||||
|         """set internal path type: express, drop or add with corresponding impairment | ||||
|  | ||||
|         This modifies the spectral info in-place. Only the `pref` is updated with new p_spani, | ||||
|         while p_span0 is not changed. | ||||
|         If no impairment id is defined, then use the first profile that matches the path_type in the | ||||
|         profile dictionnary. | ||||
|         """ | ||||
|         spectral_info.pref = spectral_info.pref._replace(p_spani=self.ref_pch_out_dbm) | ||||
|         # initialize impairment with params.pmd, params.cd | ||||
|         # if more detailed parameters are available for the Roadm, the use them instead | ||||
|         roadm_global_impairment = {'roadm-pmd': self.params.pmd, | ||||
|                                    'roadm-pdl': self.params.pdl} | ||||
|         if path_type in ['add', 'drop']: | ||||
|             # without detailed imparments, we assume that add OSNR contribution is the same as drop contribution | ||||
|             # add_drop_osnr_db = - 10log10(1/add_osnr + 1/drop_osnr) with add_osnr = drop_osnr | ||||
|             # = add_osnr_db + 10log10(2) | ||||
|             roadm_global_impairment['roadm-osnr'] = self.params.add_drop_osnr + lin2db(2) | ||||
|         impairment = RoadmImpairment(roadm_global_impairment) | ||||
|  | ||||
|     def __call__(self, spectral_info, degree): | ||||
|         self.propagate(spectral_info, degree=degree) | ||||
|         self.update_pref(spectral_info) | ||||
|         if impairment_id is None: | ||||
|             # get the first item in the type variety that matches the path_type | ||||
|             for path_impairment_id, path_impairment in self.roadm_path_impairments.items(): | ||||
|                 if path_impairment.path_type == path_type: | ||||
|                     impairment = path_impairment | ||||
|                     impairment_id = path_impairment_id | ||||
|                     break | ||||
|             # at this point, path_type is not part of roadm_path_impairment, impairment and impairment_id are None | ||||
|         else: | ||||
|             if impairment_id in self.roadm_path_impairments: | ||||
|                 impairment = self.roadm_path_impairments[impairment_id] | ||||
|             else: | ||||
|                 msg = f'ROADM {self.uid}: impairment profile id {impairment_id} is not defined in library' | ||||
|                 raise NetworkTopologyError(msg) | ||||
|         # print(from_degree, to_degree, path_type) | ||||
|         self.roadm_paths.append(RoadmPath(from_degree=from_degree, to_degree=to_degree, path_type=path_type, | ||||
|                                           impairment_id=impairment_id, impairment=impairment)) | ||||
|  | ||||
|     def get_roadm_path(self, from_degree, to_degree): | ||||
|         """Get internal path type impairment""" | ||||
|         for roadm_path in self.roadm_paths: | ||||
|             if roadm_path.from_degree == from_degree and roadm_path.to_degree == to_degree: | ||||
|                 return roadm_path | ||||
|         msg = f'Could not find from_degree-to_degree {from_degree}-{to_degree} path in ROADM {self.uid}' | ||||
|         raise NetworkTopologyError(msg) | ||||
|  | ||||
|     def get_per_degree_impairment_id(self, from_degree, to_degree): | ||||
|         """returns the id of the impairment if the degrees are in the per_degree tab""" | ||||
|         if f'{from_degree}-{to_degree}' in self.per_degree_impairments.keys(): | ||||
|             return self.per_degree_impairments[f'{from_degree}-{to_degree}']["impairment_id"] | ||||
|         return None | ||||
|  | ||||
|     def get_path_type_per_id(self, impairment_id): | ||||
|         """returns the path_type of the impairment if the is is defined""" | ||||
|         if impairment_id in self.roadm_path_impairments.keys(): | ||||
|             return self.roadm_path_impairments[impairment_id].path_type | ||||
|         return None | ||||
|  | ||||
|     def __call__(self, spectral_info, degree, from_degree): | ||||
|         self.propagate(spectral_info, degree=degree, from_degree=from_degree) | ||||
|         return spectral_info | ||||
|  | ||||
|  | ||||
| @@ -451,13 +542,8 @@ class Fused(_Node): | ||||
|     def propagate(self, spectral_info): | ||||
|         spectral_info.apply_attenuation_db(self.loss) | ||||
|  | ||||
|     def update_pref(self, spectral_info): | ||||
|         spectral_info.pref = spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||
|                                                          p_spani=spectral_info.pref.p_spani - self.loss) | ||||
|  | ||||
|     def __call__(self, spectral_info): | ||||
|         self.propagate(spectral_info) | ||||
|         self.update_pref(spectral_info) | ||||
|         return spectral_info | ||||
|  | ||||
|  | ||||
| @@ -482,6 +568,7 @@ class Fiber(_Node): | ||||
|                                        f"({1e-3 * self.params.length} km), boundaries excluded.") | ||||
|         self.lumped_losses = db2lin(- lumped_losses_power)  # [linear units] | ||||
|         self.z_lumped_losses = array(z_lumped_losses) * 1e3  # [m] | ||||
|         self.ref_pch_in_dbm = None | ||||
|  | ||||
|     @property | ||||
|     def to_json(self): | ||||
| @@ -527,10 +614,17 @@ class Fiber(_Node): | ||||
|             interpolation = interp1d(ref_frequency, parameter)(spectrum_frequency) | ||||
|             return interpolation | ||||
|         except ValueError: | ||||
|             try: | ||||
|                 start = spectrum_frequency[0] | ||||
|                 stop = spectrum_frequency[-1] | ||||
|             except IndexError: | ||||
|                 # when frequency is a 0-dimensionnal array | ||||
|                 start = spectrum_frequency | ||||
|                 stop = spectrum_frequency | ||||
|             raise SpectrumError('The spectrum bandwidth exceeds the frequency interval used to define the fiber ' | ||||
|                                 f'{name} in "{type(self).__name__} {self.uid}".' | ||||
|                                 f'\nSpectrum f_min-f_max: {round(spectrum_frequency[0] * 1e-12, 2)}-' | ||||
|                                 f'{round(spectrum_frequency[-1] * 1e-12, 2)}' | ||||
|                                 f'\nSpectrum f_min-f_max: {round(start * 1e-12, 2)}-' | ||||
|                                 f'{round(stop * 1e-12, 2)}' | ||||
|                                 f'\n{name} f_min-f_max: {round(ref_frequency[0] * 1e-12, 2)}-' | ||||
|                                 f'{round(ref_frequency[-1] * 1e-12, 2)}') | ||||
|  | ||||
| @@ -675,21 +769,16 @@ class Fiber(_Node): | ||||
|         self.pch_out_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase) | ||||
|         self.propagated_labels = spectral_info.label | ||||
|  | ||||
|     def update_pref(self, spectral_info): | ||||
|         # in case of Raman, the resulting loss of the fiber is not equivalent to self.loss | ||||
|         # because of Raman gain. In order to correctly update pref, we need the resulting loss: | ||||
|         # power_out - power_in. We use the total signal power (sum on all channels) to compute | ||||
|         # this loss, because pref is a noiseless reference. | ||||
|         loss = round(lin2db(self._psig_in / sum(spectral_info.signal)), 2) | ||||
|         self.pch_out_db = spectral_info.pref.p_spani - loss | ||||
|         spectral_info.pref = spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||
|                                                          p_spani=self.pch_out_db) | ||||
|  | ||||
|     def __call__(self, spectral_info): | ||||
|         # _psig_in records the total signal power of the spectral information before propagation. | ||||
|         self._psig_in = sum(spectral_info.signal) | ||||
|         self.propagate(spectral_info) | ||||
|         self.update_pref(spectral_info) | ||||
|         # In case of Raman, the resulting loss of the fiber is not equivalent to self.loss | ||||
|         # because of Raman gain. The resulting loss is: | ||||
|         # power_out - power_in. We use the total signal power (sum on all channels) to compute | ||||
|         # this loss. | ||||
|         loss = round(lin2db(self._psig_in / sum(spectral_info.signal)), 2) | ||||
|         self.pch_out_db = self.ref_pch_in_dbm - loss | ||||
|         return spectral_info | ||||
|  | ||||
|  | ||||
| @@ -717,11 +806,16 @@ class RamanFiber(Fiber): | ||||
|     def to_json(self): | ||||
|         return dict(super().to_json, operational=self.operational) | ||||
|  | ||||
|     def __str__(self): | ||||
|         return super().__str__() + f'\n  reference gain (dB):         {round(self.estimated_gain, 2)}' \ | ||||
|             + f'\n  actual gain (dB):            {round(self.actual_raman_gain, 2)}' | ||||
|  | ||||
|     def propagate(self, spectral_info: SpectralInformation): | ||||
|         """Modifies the spectral information computing the attenuation, the non-linear interference generation, | ||||
|         the CD and PMD accumulation. | ||||
|         """ | ||||
|         # apply the attenuation due to the input connector loss | ||||
|         pin = watt2dbm(sum(spectral_info.signal)) | ||||
|         attenuation_in_db = self.params.con_in + self.params.att_in | ||||
|         spectral_info.apply_attenuation_db(attenuation_in_db) | ||||
|  | ||||
| @@ -751,6 +845,8 @@ class RamanFiber(Fiber): | ||||
|         spectral_info.apply_attenuation_db(attenuation_out_db) | ||||
|         self.pch_out_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase) | ||||
|         self.propagated_labels = spectral_info.label | ||||
|         pout = watt2dbm(sum(spectral_info.signal)) | ||||
|         self.actual_raman_gain = self.loss + pout - pin | ||||
|  | ||||
|  | ||||
| class Edfa(_Node): | ||||
| @@ -761,7 +857,7 @@ class Edfa(_Node): | ||||
|             operational = {} | ||||
|         self.variety_list = kwargs.pop('variety_list', None) | ||||
|         super().__init__(*args, params=EdfaParams(**params), operational=EdfaOperational(**operational), **kwargs) | ||||
|         self.interpol_dgt = None  # interpolated dynamic gain tilt | ||||
|         self.interpol_dgt = None  # interpolated dynamic gain tilt defined per frequency on amp band | ||||
|         self.interpol_gain_ripple = None  # gain ripple | ||||
|         self.interpol_nf_ripple = None  # nf_ripple | ||||
|         self.channel_freq = None  # SI channel frequencies | ||||
| @@ -771,13 +867,20 @@ class Edfa(_Node): | ||||
|         self.pin_db = None | ||||
|         self.nch = None | ||||
|         self.pout_db = None | ||||
|         self.target_pch_out_db = None | ||||
|         self.target_pch_out_dbm = None | ||||
|         self.effective_pch_out_db = None | ||||
|         self.passive = False | ||||
|         self.att_in = None | ||||
|         self.effective_gain = self.operational.gain_target | ||||
|         self.delta_p = self.operational.delta_p  # delta P with Pref (power swwep) in power mode | ||||
|         self.tilt_target = self.operational.tilt_target | ||||
|         # self.operational.delta_p is defined by user for reference channel | ||||
|         # self.delta_p is set with self.operational.delta_p, but it may be changed during design: | ||||
|         # - if operational.delta_p is None, self.delta_p is computed at design phase | ||||
|         # - if operational.delta_p can not be applied because of saturation, self.delta_p is recomputed | ||||
|         # - if power_mode is False, then it is set to None | ||||
|         self.delta_p = self.operational.delta_p | ||||
|         # self._delta_p contains computed delta_p during design even if power_mode is False | ||||
|         self._delta_p = None | ||||
|         self.tilt_target = self.operational.tilt_target  # defined per lambda on the amp band | ||||
|         self.out_voa = self.operational.out_voa | ||||
|         self.propagated_labels = [""] | ||||
|  | ||||
| @@ -789,7 +892,7 @@ class Edfa(_Node): | ||||
|                 'operational': { | ||||
|                     'gain_target': round(self.effective_gain, 6) if self.effective_gain else None, | ||||
|                     'delta_p': self.delta_p, | ||||
|                     'tilt_target': self.tilt_target, | ||||
|                     'tilt_target': self.tilt_target,  # defined per lambda on the amp band | ||||
|                     'out_voa': self.out_voa | ||||
|                 }, | ||||
|                 'metadata': { | ||||
| @@ -823,9 +926,10 @@ class Edfa(_Node): | ||||
|                           f'  pad att_in (dB):        {self.att_in:.2f}', | ||||
|                           f'  Power In (dBm):         {self.pin_db:.2f}', | ||||
|                           f'  Power Out (dBm):        {self.pout_db:.2f}', | ||||
|                           f'  Delta_P (dB):           ' + (f'{self.delta_p:.2f}' if self.delta_p is not None else 'None'), | ||||
|                           f'  target pch (dBm):       ' + (f'{self.target_pch_out_db:.2f}' if self.target_pch_out_db is not None else 'None'), | ||||
|                           f'  effective pch (dBm):    {self.effective_pch_out_db:.2f}', | ||||
|                           '  Delta_P (dB):           ' + (f'{self.delta_p:.2f}' | ||||
|                                                           if self.delta_p is not None else 'None'), | ||||
|                           '  target pch (dBm):       ' + (f'{self.target_pch_out_dbm:.2f}' | ||||
|                                                           if self.target_pch_out_dbm is not None else 'None'), | ||||
|                           f'  actual pch out (dBm):   {total_pch}', | ||||
|                           f'  output VOA (dB):        {self.out_voa:.2f}']) | ||||
|  | ||||
| @@ -853,20 +957,12 @@ class Edfa(_Node): | ||||
|         # For now, with homogeneous spectrum, we can calculate it as the difference between neighbouring channels. | ||||
|         self.slot_width = self.channel_freq[1] - self.channel_freq[0] | ||||
|  | ||||
|         """in power mode: delta_p is defined and can be used to calculate the power target | ||||
|         This power target is used calculate the amplifier gain""" | ||||
|         pref = spectral_info.pref | ||||
|         if self.delta_p is not None: | ||||
|             self.target_pch_out_db = round(self.delta_p + pref.p_span0, 2) | ||||
|             self.effective_gain = self.target_pch_out_db - pref.p_spani | ||||
|  | ||||
|         """check power saturation and correct effective gain & power accordingly:""" | ||||
|         # Compute the saturation accounting for actual power at the input of the amp | ||||
|         self.effective_gain = min( | ||||
|             self.effective_gain, | ||||
|             self.params.p_max - self.pin_db | ||||
|         ) | ||||
|         self.effective_pch_out_db = round(pref.p_spani + self.effective_gain, 2) | ||||
|  | ||||
|         """check power saturation and correct target_gain accordingly:""" | ||||
|         self.nf = self._calc_nf() | ||||
| @@ -1026,7 +1122,7 @@ class Edfa(_Node): | ||||
|         p = polyfit(self.channel_freq, self.interpol_dgt, 1) | ||||
|         dgt_slope = p[0] | ||||
|  | ||||
|         # Calculate the target slope | ||||
|         # Calculate the target slope defined per frequency on the amp band | ||||
|         targ_slope = -self.tilt_target / (self.params.f_max - self.params.f_min) | ||||
|  | ||||
|         # first estimate of DGT scaling | ||||
| @@ -1102,12 +1198,6 @@ class Edfa(_Node): | ||||
|         self.pch_out_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase) | ||||
|         self.propagated_labels = spectral_info.label | ||||
|  | ||||
|     def update_pref(self, spectral_info): | ||||
|         spectral_info.pref = \ | ||||
|             spectral_info.pref._replace(p_span0=spectral_info.pref.p_span0, | ||||
|                                         p_spani=spectral_info.pref.p_spani + self.effective_gain - self.out_voa) | ||||
|  | ||||
|     def __call__(self, spectral_info): | ||||
|         self.propagate(spectral_info) | ||||
|         self.update_pref(spectral_info) | ||||
|         return spectral_info | ||||
|   | ||||
| @@ -8,70 +8,75 @@ gnpy.core.equipment | ||||
| This module contains functionality for specifying equipment. | ||||
| """ | ||||
|  | ||||
| from gnpy.core.utils import automatic_nch, db2lin | ||||
| from gnpy.core.exceptions import EquipmentConfigError | ||||
|  | ||||
|  | ||||
| def trx_mode_params(equipment, trx_type_variety='', trx_mode='', error_message=False): | ||||
|     """return the trx and SI parameters from eqpt_config for a given type_variety and mode (ie format)""" | ||||
|     """return the trx and SI parameters from eqpt_config for a given type_variety and mode (ie format) | ||||
|  | ||||
|     if the type or mode do no match an existing transceiver in the library, then the function | ||||
|     raises an error if error_message is True else returns a default mode based on equipment['SI']['default'] | ||||
|     If trx_mode is None (but type is valid), it returns an undetermined mode whatever the error message: | ||||
|     this is a special case for automatic mode selection. | ||||
|     """ | ||||
|     trx_params = {} | ||||
|     default_si_data = equipment['SI']['default'] | ||||
|     # default transponder characteristics | ||||
|     # mainly used with transmission_main_example.py | ||||
|     default_trx_params = { | ||||
|         'f_min': default_si_data.f_min, | ||||
|         'f_max': default_si_data.f_max, | ||||
|         'baud_rate': default_si_data.baud_rate, | ||||
|         'spacing': default_si_data.spacing, | ||||
|         'OSNR': None, | ||||
|         'penalties': {}, | ||||
|         'bit_rate': None, | ||||
|         'cost': None, | ||||
|         'roll_off': default_si_data.roll_off, | ||||
|         'tx_osnr': default_si_data.tx_osnr, | ||||
|         'min_spacing': None, | ||||
|         'equalization_offset_db': 0 | ||||
|     } | ||||
|     # Undetermined transponder characteristics | ||||
|     # mainly used with path_request_run.py for the automatic mode computation case | ||||
|     undetermined_trx_params = { | ||||
|         "format": "undetermined", | ||||
|         "baud_rate": None, | ||||
|         "OSNR": None, | ||||
|         "penalties": None, | ||||
|         "bit_rate": None, | ||||
|         "roll_off": None, | ||||
|         "tx_osnr": None, | ||||
|         "min_spacing": None, | ||||
|         "cost": None, | ||||
|         "equalization_offset_db": 0 | ||||
|     } | ||||
|  | ||||
|     try: | ||||
|         trxs = equipment['Transceiver'] | ||||
|         # if called from path_requests_run.py, trx_mode is filled with None when not specified by user | ||||
|         # if called from transmission_main.py, trx_mode is '' | ||||
|         if trx_mode is not None: | ||||
|             mode_params = next(mode for trx in trxs | ||||
|                                if trx == trx_type_variety | ||||
|                                for mode in trxs[trx].mode | ||||
|                                if mode['format'] == trx_mode) | ||||
|             trx_params = {**mode_params} | ||||
|             # sanity check: spacing baudrate must be smaller than min spacing | ||||
|     trxs = equipment['Transceiver'] | ||||
|     if trx_type_variety in trxs: | ||||
|         modes = {mode['format']: mode for mode in trxs[trx_type_variety].mode} | ||||
|         trx_frequencies = {'f_min': trxs[trx_type_variety].frequency['min'], | ||||
|                            'f_max': trxs[trx_type_variety].frequency['max']} | ||||
|         if trx_mode in modes: | ||||
|             # if called from transmission_main.py, trx_mode is '' | ||||
|             trx_params = {**modes[trx_mode], **trx_frequencies} | ||||
|             if trx_params['baud_rate'] > trx_params['min_spacing']: | ||||
|                 raise EquipmentConfigError(f'Inconsistency in equipment library:\n Transponder "{trx_type_variety}"' | ||||
|                                            + f' mode "{trx_params["format"]}" has baud rate' | ||||
|                                            + f' {trx_params["baud_rate"] * 1e-9:.3f} GHz greater than min_spacing' | ||||
|                                            + f' {trx_params["min_spacing"] * 1e-9:.3f}.') | ||||
|                 # sanity check: baudrate must be smaller than min spacing | ||||
|                 raise EquipmentConfigError(f'Inconsistency in equipment library:\n Transponder "{trx_type_variety}" ' | ||||
|                                            + f'mode "{trx_params["format"]}" has baud rate ' | ||||
|                                            + f'{trx_params["baud_rate"] * 1e-9:.2f} GHz greater than min_spacing ' | ||||
|                                            + f'{trx_params["min_spacing"] * 1e-9:.2f}.') | ||||
|             trx_params['equalization_offset_db'] = trx_params.get('equalization_offset_db', 0) | ||||
|         else: | ||||
|             mode_params = {"format": "undetermined", | ||||
|                            "baud_rate": None, | ||||
|                            "OSNR": None, | ||||
|                            "penalties": None, | ||||
|                            "bit_rate": None, | ||||
|                            "roll_off": None, | ||||
|                            "tx_osnr": None, | ||||
|                            "min_spacing": None, | ||||
|                            "cost": None, | ||||
|                            "equalization_offset_db": 0} | ||||
|             trx_params = {**mode_params} | ||||
|         trx_params['f_min'] = equipment['Transceiver'][trx_type_variety].frequency['min'] | ||||
|         trx_params['f_max'] = equipment['Transceiver'][trx_type_variety].frequency['max'] | ||||
|  | ||||
|         # TODO: novel automatic feature maybe unwanted if spacing is specified | ||||
|         # trx_params['spacing'] = _automatic_spacing(trx_params['baud_rate']) | ||||
|         # temp = trx_params['spacing'] | ||||
|         # print(f'spacing {temp}') | ||||
|     except StopIteration: | ||||
|         if error_message: | ||||
|             raise EquipmentConfigError(f'Could not find transponder "{trx_type_variety}" with mode "{trx_mode}" in equipment library') | ||||
|         else: | ||||
|             # default transponder charcteristics | ||||
|             # mainly used with transmission_main_example.py | ||||
|             trx_params['f_min'] = default_si_data.f_min | ||||
|             trx_params['f_max'] = default_si_data.f_max | ||||
|             trx_params['baud_rate'] = default_si_data.baud_rate | ||||
|             trx_params['spacing'] = default_si_data.spacing | ||||
|             trx_params['OSNR'] = None | ||||
|             trx_params['penalties'] = {} | ||||
|             trx_params['bit_rate'] = None | ||||
|             trx_params['cost'] = None | ||||
|             trx_params['roll_off'] = default_si_data.roll_off | ||||
|             trx_params['tx_osnr'] = default_si_data.tx_osnr | ||||
|             trx_params['min_spacing'] = None | ||||
|             trx_params['equalization_offset_db'] = 0 | ||||
|  | ||||
|     trx_params['power'] = db2lin(default_si_data.power_dbm) * 1e-3 | ||||
|             return trx_params | ||||
|         if trx_mode is None: | ||||
|             # if called from path_requests_run.py, trx_mode is filled with None when not specified by user | ||||
|             trx_params = {**undetermined_trx_params, **trx_frequencies} | ||||
|             return trx_params | ||||
|     if trx_type_variety in trxs and error_message: | ||||
|         raise EquipmentConfigError(f'Could not find transponder "{trx_type_variety}" with mode "{trx_mode}" ' | ||||
|                                    + 'in equipment library') | ||||
|     if error_message: | ||||
|         raise EquipmentConfigError(f'Could not find transponder "{trx_type_variety}" in equipment library') | ||||
|  | ||||
|     trx_params = {**default_trx_params} | ||||
|     return trx_params | ||||
|   | ||||
| @@ -45,15 +45,6 @@ class Channel( | ||||
|     """ | ||||
|  | ||||
|  | ||||
| class Pref(namedtuple('Pref', 'p_span0, p_spani, ref_carrier')): | ||||
|     """noiseless reference power in dBm: | ||||
|  | ||||
|     p_span0: inital target carrier power for a reference channel defined by user | ||||
|     p_spani: carrier power after element i for a reference channel defined by user | ||||
|     ref_carrier records the baud rate of the reference channel | ||||
|     """ | ||||
|  | ||||
|  | ||||
| class SpectralInformation(object): | ||||
|     """Class containing the parameters of the entire WDM comb. | ||||
|  | ||||
| @@ -61,7 +52,7 @@ class SpectralInformation(object): | ||||
|  | ||||
|     def __init__(self, frequency: array, baud_rate: array, slot_width: array, signal: array, nli: array, ase: array, | ||||
|                  roll_off: array, chromatic_dispersion: array, pmd: array, pdl: array, latency: array, | ||||
|                  delta_pdb_per_channel: array, tx_osnr: array, ref_power: Pref, label: array): | ||||
|                  delta_pdb_per_channel: array, tx_osnr: array, tx_power: array, label: array): | ||||
|         indices = argsort(frequency) | ||||
|         self._frequency = frequency[indices] | ||||
|         self._df = outer(ones(frequency.shape), frequency) - outer(frequency, ones(frequency.shape)) | ||||
| @@ -89,18 +80,9 @@ class SpectralInformation(object): | ||||
|         self._latency = latency[indices] | ||||
|         self._delta_pdb_per_channel = delta_pdb_per_channel[indices] | ||||
|         self._tx_osnr = tx_osnr[indices] | ||||
|         self._pref = ref_power | ||||
|         self._tx_power = tx_power[indices] | ||||
|         self._label = label[indices] | ||||
|  | ||||
|     @property | ||||
|     def pref(self): | ||||
|         """Instance of gnpy.info.Pref""" | ||||
|         return self._pref | ||||
|  | ||||
|     @pref.setter | ||||
|     def pref(self, pref: Pref): | ||||
|         self._pref = pref | ||||
|  | ||||
|     @property | ||||
|     def frequency(self): | ||||
|         return self._frequency | ||||
| @@ -207,6 +189,14 @@ class SpectralInformation(object): | ||||
|     def tx_osnr(self, tx_osnr): | ||||
|         self._tx_osnr = tx_osnr | ||||
|  | ||||
|     @property | ||||
|     def tx_power(self): | ||||
|         return self._tx_power | ||||
|  | ||||
|     @tx_power.setter | ||||
|     def tx_power(self, tx_power): | ||||
|         self._tx_power = tx_power | ||||
|  | ||||
|     @property | ||||
|     def channel_number(self): | ||||
|         return self._channel_number | ||||
| @@ -237,12 +227,6 @@ class SpectralInformation(object): | ||||
|  | ||||
|     def __add__(self, other: SpectralInformation): | ||||
|         try: | ||||
|             # Note that pref.p_spanx from "self" and "other" must be identical for a given simulation (correspond to the | ||||
|             # the simulation setup): | ||||
|             # - for a given simulation there is only one design (one p_span0), | ||||
|             # - and p_spani is the propagation result of p_span0 so there should not be different p_spani either. | ||||
|             if (self.pref.p_span0 != other.pref.p_span0) or (self.pref.p_spani != other.pref.p_spani): | ||||
|                 raise SpectrumError('reference powers of the spectrum are not identical') | ||||
|             return SpectralInformation(frequency=append(self.frequency, other.frequency), | ||||
|                                        slot_width=append(self.slot_width, other.slot_width), | ||||
|                                        signal=append(self.signal, other.signal), nli=append(self.nli, other.nli), | ||||
| @@ -257,13 +241,12 @@ class SpectralInformation(object): | ||||
|                                        delta_pdb_per_channel=append(self.delta_pdb_per_channel, | ||||
|                                                                     other.delta_pdb_per_channel), | ||||
|                                        tx_osnr=append(self.tx_osnr, other.tx_osnr), | ||||
|                                        ref_power=Pref(self.pref.p_span0, self.pref.p_spani, self.pref.ref_carrier), | ||||
|                                        tx_power=append(self.tx_power, other.tx_power), | ||||
|                                        label=append(self.label, other.label)) | ||||
|         except SpectrumError: | ||||
|             raise SpectrumError('Spectra cannot be summed: channels overlapping.') | ||||
|  | ||||
|  | ||||
|     def _replace(self, carriers, pref): | ||||
|     def _replace(self, carriers): | ||||
|         self.chromatic_dispersion = array([c.chromatic_dispersion for c in carriers]) | ||||
|         self.pmd = array([c.pmd for c in carriers]) | ||||
|         self.pdl = array([c.pdl for c in carriers]) | ||||
| @@ -271,7 +254,6 @@ class SpectralInformation(object): | ||||
|         self.signal = array([c.power.signal for c in carriers]) | ||||
|         self.nli = array([c.power.nli for c in carriers]) | ||||
|         self.ase = array([c.power.ase for c in carriers]) | ||||
|         self.pref = pref | ||||
|         return self | ||||
|  | ||||
|  | ||||
| @@ -279,6 +261,7 @@ def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, fl | ||||
|                                           signal: Union[float, ndarray, Iterable], | ||||
|                                           baud_rate: Union[float, ndarray, Iterable], | ||||
|                                           tx_osnr: Union[float, ndarray, Iterable], | ||||
|                                           tx_power: Union[float, ndarray, Iterable] = None, | ||||
|                                           delta_pdb_per_channel: Union[float, ndarray, Iterable] = 0., | ||||
|                                           slot_width: Union[float, ndarray, Iterable] = None, | ||||
|                                           roll_off: Union[float, ndarray, Iterable] = 0., | ||||
| @@ -286,7 +269,6 @@ def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, fl | ||||
|                                           pmd: Union[float, ndarray, Iterable] = 0., | ||||
|                                           pdl: Union[float, ndarray, Iterable] = 0., | ||||
|                                           latency: Union[float, ndarray, Iterable] = 0., | ||||
|                                           ref_power: Pref = None, | ||||
|                                           label: Union[str, ndarray, Iterable] = None): | ||||
|     """This is just a wrapper around the SpectralInformation.__init__() that simplifies the creation of | ||||
|     a non-uniform spectral information with NLI and ASE powers set to zero.""" | ||||
| @@ -306,6 +288,7 @@ def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, fl | ||||
|         ase = zeros(number_of_channels) | ||||
|         delta_pdb_per_channel = full(number_of_channels, delta_pdb_per_channel) | ||||
|         tx_osnr = full(number_of_channels, tx_osnr) | ||||
|         tx_power = full(number_of_channels, tx_power) | ||||
|         label = full(number_of_channels, label) | ||||
|         return SpectralInformation(frequency=frequency, slot_width=slot_width, | ||||
|                                    signal=signal, nli=nli, ase=ase, | ||||
| @@ -313,8 +296,7 @@ def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, fl | ||||
|                                    chromatic_dispersion=chromatic_dispersion, | ||||
|                                    pmd=pmd, pdl=pdl, latency=latency, | ||||
|                                    delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                    tx_osnr=tx_osnr, | ||||
|                                    ref_power=ref_power, label=label) | ||||
|                                    tx_osnr=tx_osnr, tx_power=tx_power, label=label) | ||||
|     except ValueError as e: | ||||
|         if 'could not broadcast' in str(e): | ||||
|             raise SpectrumError('Dimension mismatch in input fields.') | ||||
| @@ -322,55 +304,46 @@ def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, fl | ||||
|             raise | ||||
|  | ||||
|  | ||||
| def create_input_spectral_information(f_min, f_max, roll_off, baud_rate, power, spacing, tx_osnr, delta_pdb=0, | ||||
|                                       ref_carrier=None): | ||||
| def create_input_spectral_information(f_min, f_max, roll_off, baud_rate, spacing, tx_osnr, tx_power, | ||||
|                                       delta_pdb=0): | ||||
|     """Creates a fixed slot width spectral information with flat power. | ||||
|     all arguments are scalar values""" | ||||
|     number_of_channels = automatic_nch(f_min, f_max, spacing) | ||||
|     frequency = [(f_min + spacing * i) for i in range(1, number_of_channels + 1)] | ||||
|     p_span0 = watt2dbm(power) | ||||
|     p_spani = watt2dbm(power) | ||||
|     delta_pdb_per_channel = delta_pdb * ones(number_of_channels) | ||||
|     label = [f'{baud_rate * 1e-9 :.2f}G' for i in range(number_of_channels)] | ||||
|     return create_arbitrary_spectral_information(frequency, slot_width=spacing, signal=power, baud_rate=baud_rate, | ||||
|     return create_arbitrary_spectral_information(frequency, slot_width=spacing, signal=tx_power, baud_rate=baud_rate, | ||||
|                                                  roll_off=roll_off, delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                                  tx_osnr=tx_osnr, | ||||
|                                                  ref_power=Pref(p_span0=p_span0, p_spani=p_spani, | ||||
|                                                                 ref_carrier=ref_carrier), | ||||
|                                                  label=label) | ||||
|                                                  tx_osnr=tx_osnr, tx_power=tx_power, label=label) | ||||
|  | ||||
|  | ||||
| def carriers_to_spectral_information(initial_spectrum: dict[float, Carrier], power: float, | ||||
|                                      ref_carrier: ReferenceCarrier) -> SpectralInformation: | ||||
| def carriers_to_spectral_information(initial_spectrum: dict[float, Carrier], | ||||
|                                      power: float) -> SpectralInformation: | ||||
|     """Initial spectrum is a dict with key = carrier frequency, and value a Carrier object. | ||||
|     :param initial_spectrum: indexed by frequency in Hz, with power offset (delta_pdb), baudrate, slot width, | ||||
|     tx_osnr and roll off. | ||||
|     tx_osnr, tx_power and roll off. | ||||
|     :param power: power of the request | ||||
|     :param ref_carrier: reference carrier (baudrate) used for the reference channel | ||||
|     """ | ||||
|     frequency = list(initial_spectrum.keys()) | ||||
|     signal = [power * db2lin(c.delta_pdb) for c in initial_spectrum.values()] | ||||
|     signal = [c.tx_power for c in initial_spectrum.values()] | ||||
|     roll_off = [c.roll_off for c in initial_spectrum.values()] | ||||
|     baud_rate = [c.baud_rate for c in initial_spectrum.values()] | ||||
|     delta_pdb_per_channel = [c.delta_pdb for c in initial_spectrum.values()] | ||||
|     slot_width = [c.slot_width for c in initial_spectrum.values()] | ||||
|     tx_osnr = [c.tx_osnr for c in initial_spectrum.values()] | ||||
|     tx_power = [c.tx_power for c in initial_spectrum.values()] | ||||
|     label = [c.label for c in initial_spectrum.values()] | ||||
|     p_span0 = watt2dbm(power) | ||||
|     p_spani = watt2dbm(power) | ||||
|     return create_arbitrary_spectral_information(frequency=frequency, signal=signal, baud_rate=baud_rate, | ||||
|                                                  slot_width=slot_width, roll_off=roll_off, | ||||
|                                                  delta_pdb_per_channel=delta_pdb_per_channel, tx_osnr=tx_osnr, | ||||
|                                                  ref_power=Pref(p_span0=p_span0, p_spani=p_spani, | ||||
|                                                                 ref_carrier=ref_carrier), | ||||
|                                                  label=label) | ||||
|                                                  tx_power=tx_power, label=label) | ||||
|  | ||||
|  | ||||
| @dataclass | ||||
| class Carrier: | ||||
|     """One channel in the initial mixed-type spectrum definition, each type being defined by | ||||
|     its delta_pdb (power offset with respect to reference power), baud rate, slot_width, roll_off | ||||
|     and tx_osnr. delta_pdb offset is applied to target power out of Roadm. | ||||
|     tx_power, and tx_osnr. delta_pdb offset is applied to target power out of Roadm. | ||||
|     Label is used to group carriers which belong to the same partition when printing results. | ||||
|     """ | ||||
|     delta_pdb: float | ||||
| @@ -378,6 +351,7 @@ class Carrier: | ||||
|     slot_width: float | ||||
|     roll_off: float | ||||
|     tx_osnr: float | ||||
|     tx_power: float | ||||
|     label: str | ||||
|  | ||||
|  | ||||
| @@ -387,7 +361,7 @@ class ReferenceCarrier: | ||||
|     constant power spectral density (PSD) equalization is set. Reference channel is the type that has been defined | ||||
|     in SI block and used for the initial design of the network. | ||||
|     Computing the power out of ROADM for the reference channel is required to correctly compute the loss | ||||
|     experienced by p_span_i in Roadm element. | ||||
|     experienced by reference channel in Roadm element. | ||||
|  | ||||
|     Baud rate is required to find the target power in constant PSD: power = PSD_target * baud_rate. | ||||
|     For example, if target PSD is 3.125e4mW/GHz and reference carrier type a 32 GBaud channel then | ||||
| @@ -398,7 +372,7 @@ class ReferenceCarrier: | ||||
|     For example, if target PSW is 2e4mW/GHz and reference carrier type a 32 GBaud channel in a 50GHz slot width then | ||||
|     output power should be -20 dBm and for a 64 GBaud channel  in a 75 GHz slot width, power target would be -18.24 dBm. | ||||
|  | ||||
|     Other attributes (like slot_width or roll-off) may be added there for future equalization purpose. | ||||
|     Other attributes (like roll-off) may be added there for future equalization purpose. | ||||
|     """ | ||||
|     baud_rate: float | ||||
|     slot_width: float | ||||
|   | ||||
| @@ -8,15 +8,17 @@ gnpy.core.network | ||||
| Working with networks which consist of network elements | ||||
| """ | ||||
|  | ||||
| from copy import deepcopy | ||||
| from operator import attrgetter | ||||
| from collections import namedtuple | ||||
| from logging import getLogger | ||||
|  | ||||
| from gnpy.core import elements | ||||
| from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError | ||||
| from gnpy.core.utils import round2float, convert_length | ||||
| from gnpy.core.info import ReferenceCarrier | ||||
| from gnpy.tools.json_io import Amp | ||||
| from gnpy.core.utils import round2float, convert_length, psd2powerdbm, lin2db, watt2dbm, dbm2watt | ||||
| from gnpy.core.info import ReferenceCarrier, create_input_spectral_information | ||||
| from gnpy.core.parameters import SimParams, EdfaParams | ||||
| from gnpy.core.science_utils import RamanSolver | ||||
|  | ||||
|  | ||||
| logger = getLogger(__name__) | ||||
| @@ -38,7 +40,7 @@ def edfa_nf(gain_target, variety_type, equipment): | ||||
|     return amp._calc_nf(True) | ||||
|  | ||||
|  | ||||
| def select_edfa(raman_allowed, gain_target, power_target, equipment, uid, restrictions=None): | ||||
| def select_edfa(raman_allowed, gain_target, power_target, equipment, uid, restrictions=None, verbose=True): | ||||
|     """amplifer selection algorithm | ||||
|     @Orange Jean-Luc Augé | ||||
|     """ | ||||
| @@ -61,15 +63,8 @@ def select_edfa(raman_allowed, gain_target, power_target, equipment, uid, restri | ||||
|     # power attribut include power AND gain limitations | ||||
|     edfa_list = [Edfa_list( | ||||
|         variety=edfa_variety, | ||||
|         power=min( | ||||
|             pin | ||||
|             + edfa.gain_flatmax | ||||
|             + TARGET_EXTENDED_GAIN, | ||||
|             edfa.p_max | ||||
|         ) | ||||
|         - power_target, | ||||
|         gain_min=gain_target + 3 | ||||
|         - edfa.gain_min, | ||||
|         power=min(pin + edfa.gain_flatmax + TARGET_EXTENDED_GAIN, edfa.p_max) - power_target, | ||||
|         gain_min=gain_target + 3 - edfa.gain_min, | ||||
|         nf=edfa_nf(gain_target, edfa_variety, equipment)) | ||||
|         for edfa_variety, edfa in edfa_dict.items() | ||||
|         if ((edfa.allowed_for_design or restrictions is not None) and not edfa.raman)] | ||||
| @@ -78,15 +73,8 @@ def select_edfa(raman_allowed, gain_target, power_target, equipment, uid, restri | ||||
|     # do not allow extended gain min for Raman | ||||
|     raman_list = [Edfa_list( | ||||
|         variety=edfa_variety, | ||||
|         power=min( | ||||
|             pin | ||||
|             + edfa.gain_flatmax | ||||
|             + TARGET_EXTENDED_GAIN, | ||||
|             edfa.p_max | ||||
|         ) | ||||
|         - power_target, | ||||
|         gain_min=gain_target | ||||
|         - edfa.gain_min, | ||||
|         power=min(pin + edfa.gain_flatmax + TARGET_EXTENDED_GAIN, edfa.p_max) - power_target, | ||||
|         gain_min=gain_target - edfa.gain_min, | ||||
|         nf=edfa_nf(gain_target, edfa_variety, equipment)) | ||||
|         for edfa_variety, edfa in edfa_dict.items() | ||||
|         if (edfa.allowed_for_design and edfa.raman)] \ | ||||
| @@ -110,9 +98,10 @@ def select_edfa(raman_allowed, gain_target, power_target, equipment, uid, restri | ||||
|                     please increase span fiber padding') | ||||
|         else: | ||||
|             # TODO: convert to logging | ||||
|             logger.warning(f'\n\tWARNING: target gain in node {uid} is below all available amplifiers min gain: ' | ||||
|                            + '\n\tamplifier input padding will be assumed, consider increase span fiber padding ' | ||||
|                            + 'instead.\n') | ||||
|             if verbose: | ||||
|                 logger.warning(f'\n\tWARNING: target gain in node {uid} is below all available amplifiers min gain: ' | ||||
|                                + '\n\tamplifier input padding will be assumed, consider increase span fiber padding ' | ||||
|                                + 'instead.\n') | ||||
|             acceptable_gain_min_list = edfa_list | ||||
|  | ||||
|     # filter on gain+power limitation: | ||||
| @@ -132,30 +121,33 @@ def select_edfa(raman_allowed, gain_target, power_target, equipment, uid, restri | ||||
|     #       =>chose the amp with the best NF among the acceptable ones: | ||||
|     selected_edfa = min(acceptable_power_list, key=attrgetter('nf'))  # filter on NF | ||||
|     # check what are the gain and power limitations of this amp | ||||
|     power_reduction = round(min(selected_edfa.power, 0), 2) | ||||
|     if power_reduction < -0.5: | ||||
|     power_reduction = min(selected_edfa.power, 0) | ||||
|     if power_reduction < -0.5 and verbose: | ||||
|         logger.warning(f'\n\tWARNING: target gain and power in node {uid}\n' | ||||
|                        + '\tis beyond all available amplifiers capabilities and/or extended_gain_range:\n' | ||||
|                        + f'\ta power reduction of {power_reduction} is applied\n') | ||||
|                        + f'\ta power reduction of {round(power_reduction, 2)} is applied\n') | ||||
|     return selected_edfa.variety, power_reduction | ||||
|  | ||||
|  | ||||
| def target_power(network, node, equipment):  # get_fiber_dp | ||||
|     """Computes target power using J. -L. Auge, V. Curri and E. Le Rouzic, | ||||
|     Open Design for Multi-Vendor Optical Networks, OFC 2019. | ||||
|     equation 4 | ||||
|     """ | ||||
|     if isinstance(node, elements.Roadm): | ||||
|         return 0 | ||||
|  | ||||
|     SPAN_LOSS_REF = 20 | ||||
|     POWER_SLOPE = 0.3 | ||||
|     dp_range = list(equipment['Span']['default'].delta_power_range_db) | ||||
|     node_loss = span_loss(network, node) | ||||
|  | ||||
|     node_loss = span_loss(network, node, equipment) | ||||
|     try: | ||||
|         dp = round2float((node_loss - SPAN_LOSS_REF) * POWER_SLOPE, dp_range[2]) | ||||
|         dp = max(dp_range[0], dp) | ||||
|         dp = min(dp_range[1], dp) | ||||
|     except IndexError: | ||||
|         raise ConfigurationError(f'invalid delta_power_range_db definition in eqpt_config[Span]' | ||||
|                                  f'delta_power_range_db: [lower_bound, upper_bound, step]') | ||||
|         raise ConfigurationError('invalid delta_power_range_db definition in eqpt_config[Span]' | ||||
|                                  'delta_power_range_db: [lower_bound, upper_bound, step]') | ||||
|  | ||||
|     return dp | ||||
|  | ||||
| @@ -194,12 +186,74 @@ def next_node_generator(network, node): | ||||
|         yield from next_node_generator(network, next_node) | ||||
|  | ||||
|  | ||||
| def span_loss(network, node): | ||||
|     """Total loss of a span (Fiber and Fused nodes) which contains the given node""" | ||||
| def estimate_raman_gain(node, equipment, power_dbm): | ||||
|     """If node is RamanFiber, then estimate the possible Raman gain if any | ||||
|     for this purpose computes stimulated_raman_scattering loss_profile. This may be time consuming. | ||||
|     """ | ||||
|     if isinstance(node, elements.RamanFiber): | ||||
|         if hasattr(node, "estimated_gain"): | ||||
|             return node.estimated_gain | ||||
|         f_min = equipment['SI']['default'].f_min | ||||
|         f_max = equipment['SI']['default'].f_max | ||||
|         roll_off = equipment['SI']['default'].roll_off | ||||
|         baud_rate = equipment['SI']['default'].baud_rate | ||||
|         power = dbm2watt(power_dbm) | ||||
|         spacing = equipment['SI']['default'].spacing | ||||
|         tx_osnr = equipment['SI']['default'].tx_osnr | ||||
|  | ||||
|         # reduce the nb of channels to speed up | ||||
|         spacing = spacing * 3 | ||||
|         power = power * 3 | ||||
|  | ||||
|         sim_params = { | ||||
|             "raman_params": { | ||||
|                 "flag": True, | ||||
|                 "result_spatial_resolution": 50e3, | ||||
|                 "solver_spatial_resolution": 100 | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         # in order to take into account gain generated in RamanFiber, propagate in the RamanFiber with | ||||
|         if hasattr(node, "estimated_gain"): | ||||
|             # do not compute twice to save on time | ||||
|             return node.estimated_gain | ||||
|         spectral_info = create_input_spectral_information(f_min=f_min, f_max=f_max, roll_off=roll_off, | ||||
|                                                           baud_rate=baud_rate, tx_power=power, spacing=spacing, | ||||
|                                                           tx_osnr=tx_osnr) | ||||
|         pin = watt2dbm(sum(spectral_info.signal)) | ||||
|         attenuation_in_db = node.params.con_in + node.params.att_in | ||||
|         spectral_info.apply_attenuation_db(attenuation_in_db) | ||||
|         save_sim_params = {"raman_params": SimParams._shared_dict['raman_params'].to_json(), | ||||
|                            "nli_params": SimParams._shared_dict['nli_params'].to_json()} | ||||
|         SimParams.set_params(sim_params) | ||||
|         stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(spectral_info, node) | ||||
|         attenuation_fiber = stimulated_raman_scattering.loss_profile[:spectral_info.number_of_channels, -1] | ||||
|         spectral_info.apply_attenuation_lin(attenuation_fiber) | ||||
|         attenuation_out_db = node.params.con_out | ||||
|         spectral_info.apply_attenuation_db(attenuation_out_db) | ||||
|         pout = watt2dbm(sum(spectral_info.signal)) | ||||
|         estimated_loss = pin - pout | ||||
|         estimated_gain = node.loss - estimated_loss | ||||
|         node.estimated_gain = estimated_gain | ||||
|         SimParams.set_params(save_sim_params) | ||||
|         return round(estimated_gain, 2) | ||||
|     else: | ||||
|         return 0.0 | ||||
|  | ||||
|  | ||||
| def span_loss(network, node, equipment, input_power=None): | ||||
|     """Total loss of a span (Fiber and Fused nodes) which contains the given node | ||||
|     Do not recompute, if it was already computed: records it in design_span_loss""" | ||||
|     if hasattr(node, "design_span_loss"): | ||||
|         return node.design_span_loss | ||||
|     loss = node.loss if node.passive else 0 | ||||
|     loss += sum(n.loss for n in prev_node_generator(network, node)) | ||||
|     loss += sum(n.loss for n in next_node_generator(network, node)) | ||||
|     return loss | ||||
|     # add the possible Raman gain | ||||
|     gain = estimate_raman_gain(node, equipment, input_power) | ||||
|     gain += sum(estimate_raman_gain(n, equipment, input_power) for n in prev_node_generator(network, node)) | ||||
|     gain += sum(estimate_raman_gain(n, equipment, input_power) for n in next_node_generator(network, node)) | ||||
|     return loss - gain | ||||
|  | ||||
|  | ||||
| def find_first_node(network, node): | ||||
| @@ -236,21 +290,28 @@ def set_amplifier_voa(amp, power_target, power_mode): | ||||
|         amp.out_voa = voa | ||||
|  | ||||
|  | ||||
| def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_db): | ||||
|     """this node can be a transceiver or a ROADM (same function called in both cases)""" | ||||
| def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_db, verbose): | ||||
|     """This node can be a transceiver or a ROADM (same function called in both cases). | ||||
|     go through each link staring from this_node until next Roadm or Transceiver and | ||||
|     set gain and delta_p according to configurations set by user. | ||||
|     power_mode = True, set amplifiers delta_p and effective_gain | ||||
|     power_mode = False, set amplifiers effective_gain and ignore delta_p config: set it to None | ||||
|     """ | ||||
|     power_mode = equipment['Span']['default'].power_mode | ||||
|     ref_carrier = ReferenceCarrier(baud_rate=equipment['SI']['default'].baud_rate, | ||||
|                                    slot_width=equipment['SI']['default'].spacing) | ||||
|     next_oms = (n for n in network.successors(this_node) if not isinstance(n, elements.Transceiver)) | ||||
|     for oms in next_oms: | ||||
|         # go through all the OMS departing from the ROADM | ||||
|         prev_node = this_node | ||||
|         node = oms | ||||
|         if isinstance(this_node, elements.Transceiver): | ||||
|             this_node_out_power = 0.0     # default value if this_node is a transceiver | ||||
|             # todo change pref to a ref channel | ||||
|             if equipment['SI']['default'].tx_power_dbm is not None: | ||||
|                 this_node_out_power = equipment['SI']['default'].tx_power_dbm | ||||
|             else: | ||||
|                 this_node_out_power = pref_ch_db | ||||
|         if isinstance(this_node, elements.Roadm): | ||||
|             # get target power out from ROADM for the reference carrier based on equalization settings | ||||
|             this_node_out_power = this_node.get_per_degree_ref_power(degree=node.uid, ref_carrier=ref_carrier) | ||||
|             this_node_out_power = this_node.get_per_degree_ref_power(degree=node.uid) | ||||
|         # use the target power on this degree | ||||
|         prev_dp = this_node_out_power - pref_ch_db | ||||
|         dp = prev_dp | ||||
| @@ -259,20 +320,18 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | ||||
|         visited_nodes = [] | ||||
|         while not (isinstance(node, elements.Roadm) or isinstance(node, elements.Transceiver)): | ||||
|             # go through all nodes in the OMS (loop until next Roadm instance) | ||||
|             try: | ||||
|                 next_node = next(network.successors(node)) | ||||
|             except StopIteration: | ||||
|                 raise NetworkTopologyError(f'{type(node).__name__} {node.uid} is not properly connected, please check network topology') | ||||
|             next_node = get_next_node(node, network) | ||||
|             visited_nodes.append(node) | ||||
|             if next_node in visited_nodes: | ||||
|                 raise NetworkTopologyError(f'Loop detected for {type(node).__name__} {node.uid}, please check network topology') | ||||
|                 raise NetworkTopologyError(f'Loop detected for {type(node).__name__} {node.uid}, ' | ||||
|                                            + 'please check network topology') | ||||
|             if isinstance(node, elements.Edfa): | ||||
|                 node_loss = span_loss(network, prev_node) | ||||
|                 node_loss = span_loss(network, prev_node, equipment) | ||||
|                 voa = node.out_voa if node.out_voa else 0 | ||||
|                 if node.delta_p is None: | ||||
|                 if node.operational.delta_p is None: | ||||
|                     dp = target_power(network, next_node, equipment) + voa | ||||
|                 else: | ||||
|                     dp = node.delta_p | ||||
|                     dp = node.operational.delta_p | ||||
|                 if node.effective_gain is None or power_mode: | ||||
|                     gain_target = node_loss + dp - prev_dp + prev_voa | ||||
|                 else:  # gain mode with effective_gain | ||||
| @@ -299,12 +358,22 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | ||||
|                         restrictions = next_node.restrictions['preamp_variety_list'] | ||||
|                     else: | ||||
|                         restrictions = None | ||||
|                     edfa_variety, power_reduction = select_edfa(raman_allowed, gain_target, power_target, equipment, node.uid, restrictions) | ||||
|                     edfa_variety, power_reduction = select_edfa(raman_allowed, gain_target, power_target, equipment, | ||||
|                                                                 node.uid, restrictions, verbose) | ||||
|                     extra_params = equipment['Edfa'][edfa_variety] | ||||
|                     node.params.update_params(extra_params.__dict__) | ||||
|                     dp += power_reduction | ||||
|                     gain_target += power_reduction | ||||
|                 else: | ||||
|                     # Check power saturation also in this case | ||||
|                     p_max = equipment['Edfa'][node.params.type_variety].p_max | ||||
|                     if power_mode: | ||||
|                         power_reduction = min(0, p_max - (pref_total_db + dp)) | ||||
|                     else: | ||||
|                         pout = pref_total_db + prev_dp - node_loss - prev_voa + gain_target | ||||
|                         power_reduction = min(0, p_max - pout) | ||||
|                     dp += power_reduction | ||||
|                     gain_target += power_reduction | ||||
|                     if node.params.raman and not raman_allowed: | ||||
|                         if isinstance(prev_node, elements.Fiber): | ||||
|                             logger.warning(f'\n\tWARNING: raman is used in node {node.uid}\n ' | ||||
| @@ -315,24 +384,47 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d | ||||
|                     # if variety is imposed by user, and if the gain_target (computed or imposed) is also above | ||||
|                     # variety max gain + extended range, then warn that gain > max_gain + extended range | ||||
|                     if gain_target - equipment['Edfa'][node.params.type_variety].gain_flatmax - \ | ||||
|                             equipment['Span']['default'].target_extended_gain > 1e-2: | ||||
|                             equipment['Span']['default'].target_extended_gain > 1e-2 and verbose: | ||||
|                         # 1e-2 to allow a small margin according to round2float min step | ||||
|                         logger.warning(f'\n\tWARNING: effective gain in Node {node.uid}\n' | ||||
|                                        + f'\tis above user specified amplifier {node.params.type_variety}\n' | ||||
|                                        + '\tmax flat gain: ' | ||||
|                                        + f'{equipment["Edfa"][node.params.type_variety].gain_flatmax}dB ; ' | ||||
|                                        + f'required gain: {gain_target}dB. Please check amplifier type.\n') | ||||
|                                        + f'required gain: {round(gain_target, 2)}dB. Please check amplifier type.\n') | ||||
|  | ||||
|                 node.delta_p = dp if power_mode else None | ||||
|                 node.effective_gain = gain_target | ||||
|                 # if voa is not set, then set it and possibly optimize it with gain and update delta_p and | ||||
|                 # effective_gain values | ||||
|                 set_amplifier_voa(node, power_target, power_mode) | ||||
|                 # set_amplifier_voa may change delta_p in power_mode | ||||
|                 node._delta_p = node.delta_p if power_mode else dp | ||||
|  | ||||
|                 # target_pch_out_dbm records target power for design: If user defines one, then this is displayed, | ||||
|                 # else display the one computed during design | ||||
|                 if node.delta_p is not None and node.operational.delta_p is not None: | ||||
|                     # use the user defined target | ||||
|                     node.target_pch_out_dbm = round(node.operational.delta_p + pref_ch_db, 2) | ||||
|                 elif node.delta_p is not None: | ||||
|                     # use the design target if no target were set | ||||
|                     node.target_pch_out_dbm = round(node.delta_p + pref_ch_db, 2) | ||||
|                 elif node.delta_p is None: | ||||
|                     node.target_pch_out_dbm = None | ||||
|             elif isinstance(node, elements.RamanFiber): | ||||
|                 _ = span_loss(network, node, equipment, input_power=pref_ch_db + dp) | ||||
|             prev_dp = dp | ||||
|             prev_voa = voa | ||||
|             prev_node = node | ||||
|             node = next_node | ||||
|  | ||||
|  | ||||
| def set_roadm_ref_carrier(roadm, equipment): | ||||
|     """ref_carrier records carrier information used for design and usefull for equalization | ||||
|     """ | ||||
|     roadm.ref_carrier = ReferenceCarrier(baud_rate=equipment['SI']['default'].baud_rate, | ||||
|                                          slot_width=equipment['SI']['default'].spacing) | ||||
|  | ||||
|  | ||||
| def set_roadm_per_degree_targets(roadm, network): | ||||
|     """Set target powers/PSD on all degrees | ||||
|     This is needed to populate per_degree_pch_out_dbm or per_degree_pch_psd or per_degree_pch_psw dicts when | ||||
| @@ -355,15 +447,157 @@ def set_roadm_per_degree_targets(roadm, network): | ||||
|                 raise ConfigurationError(roadm.uid, 'needs an equalization target') | ||||
|  | ||||
|  | ||||
| def set_roadm_input_powers(network, roadm, equipment, pref_ch_db): | ||||
|     """Set reference powers at ROADM input for a reference channel and based on the adjacent OMS. | ||||
|     This supposes that there is no dependency on path. For example, the succession: | ||||
|     node                             power out of element | ||||
|     roadm A (target power -10dBm)   -10dBm | ||||
|     fiber A (16 dB loss)            -26dBm | ||||
|     roadm B (target power -12dBm)   -26dBm | ||||
|     fiber B (10 dB loss)            -36dBm | ||||
|     roadm C (target power -14dBm)   -36dBm | ||||
|     is not consistent because target powers in roadm B and roadm C can not be met. | ||||
|     input power for the reference channel will be set -26 dBm in roadm B and -22dBm in roadm C, | ||||
|     because at design time we can not know about path. | ||||
|     The function raises a warning if target powers can not be met with the design. | ||||
|     User should be aware that design was not successfull and that power reduction was applied. | ||||
|     Note that this value is only used for visualisation purpose (to compute ROADM loss in elements). | ||||
|     """ | ||||
|     previous_elements = [n for n in network.predecessors(roadm)] | ||||
|     roadm.ref_pch_in_dbm = {} | ||||
|     for element in previous_elements: | ||||
|         node = element | ||||
|         loss = 0.0 | ||||
|         while isinstance(node, (elements.Fiber, elements.Fused, elements.RamanFiber)): | ||||
|             # go through all predecessors until a power target is found either in an amplifier, a ROADM or a transceiver | ||||
|             # then deduce power at ROADM input from this degree based on this target and crossed losses | ||||
|             loss += node.loss | ||||
|             previous_node = node | ||||
|             node = next(network.predecessors(node)) | ||||
|         if isinstance(node, elements.Edfa): | ||||
|             roadm.ref_pch_in_dbm[element.uid] = pref_ch_db + node._delta_p - node.out_voa - loss | ||||
|         elif isinstance(node, elements.Roadm): | ||||
|             roadm.ref_pch_in_dbm[element.uid] = \ | ||||
|                 node.get_per_degree_ref_power(degree=previous_node.uid) - loss | ||||
|         elif isinstance(node, elements.Transceiver): | ||||
|             roadm.ref_pch_in_dbm[element.uid] = pref_ch_db - loss | ||||
|     # check if target power can be met | ||||
|     temp = [] | ||||
|     if roadm.per_degree_pch_out_dbm: | ||||
|         temp.append(max([p for p in roadm.per_degree_pch_out_dbm.values()])) | ||||
|     if roadm.per_degree_pch_psd: | ||||
|         temp.append(max([psd2powerdbm(p, roadm.ref_carrier.baud_rate) for p in roadm.per_degree_pch_psd.values()])) | ||||
|     if roadm.per_degree_pch_psw: | ||||
|         temp.append(max([psd2powerdbm(p, roadm.ref_carrier.slot_width) for p in roadm.per_degree_pch_psw.values()])) | ||||
|     if roadm.params.target_pch_out_db: | ||||
|         temp.append(roadm.params.target_pch_out_db) | ||||
|     if roadm.params.target_psd_out_mWperGHz: | ||||
|         temp.append(psd2powerdbm(roadm.params.target_psd_out_mWperGHz, roadm.ref_carrier.baud_rate)) | ||||
|     if roadm.params.target_out_mWperSlotWidth: | ||||
|         temp.append(psd2powerdbm(roadm.params.target_out_mWperSlotWidth, roadm.ref_carrier.slot_width)) | ||||
|     if not temp: | ||||
|         raise ConfigurationError(f'Could not find target power/PSD/PSW in ROADM "{roadm.uid}"') | ||||
|     target_to_be_supported = max(temp) | ||||
|     for from_degree, in_power in roadm.ref_pch_in_dbm.items(): | ||||
|         if in_power < target_to_be_supported: | ||||
|             logger.warning( | ||||
|                 f'WARNING: maximum target power {target_to_be_supported}dBm ' | ||||
|                 + f'in ROADM "{roadm.uid}" can not be met for at least one crossing path. Min input power ' | ||||
|                 + f'from "{from_degree}" direction is {round(in_power, 2)}dBm. Please correct input topology.' | ||||
|             ) | ||||
|  | ||||
|  | ||||
| def set_fiber_input_power(network, fiber, equipment, pref_ch_db): | ||||
|     """Set reference powers at fiber input for a reference channel. | ||||
|     Supposes that target power out of ROADMs and amplifiers are consistent. | ||||
|     This is only for visualisation purpose | ||||
|     """ | ||||
|     loss = 0.0 | ||||
|     node = next(network.predecessors(fiber)) | ||||
|     while isinstance(node, elements.Fused): | ||||
|         loss += node.loss | ||||
|         previous_node = node | ||||
|         node = next(network.predecessors(node)) | ||||
|     if isinstance(node, (elements.Fiber, elements.RamanFiber)) and node.ref_pch_in_dbm is not None: | ||||
|         fiber.ref_pch_in_dbm = node.ref_pch_in_dbm - loss - node.loss | ||||
|     if isinstance(node, (elements.Fiber, elements.RamanFiber)) and node.ref_pch_in_dbm is None: | ||||
|         set_fiber_input_power(network, node, equipment, pref_ch_db) | ||||
|         fiber.ref_pch_in_dbm = node.ref_pch_in_dbm - loss - node.loss | ||||
|     elif isinstance(node, elements.Roadm): | ||||
|         fiber.ref_pch_in_dbm = \ | ||||
|             node.get_per_degree_ref_power(degree=previous_node.uid) - loss | ||||
|     elif isinstance(node, elements.Edfa): | ||||
|         fiber.ref_pch_in_dbm = pref_ch_db + node._delta_p - node.out_voa - loss | ||||
|     elif isinstance(node, elements.Transceiver): | ||||
|         fiber.ref_pch_in_dbm = pref_ch_db - loss | ||||
|  | ||||
|  | ||||
| def set_roadm_internal_paths(roadm, network): | ||||
|     """Set ROADM path types (express, add, drop) | ||||
|  | ||||
|     Uses implicit guess if no information is set in ROADM | ||||
|     """ | ||||
|     next_oms = [n.uid for n in network.successors(roadm) if not isinstance(n, elements.Transceiver)] | ||||
|     previous_oms = [n.uid for n in network.predecessors(roadm) if not isinstance(n, elements.Transceiver)] | ||||
|     drop_port = [n.uid for n in network.successors(roadm) if isinstance(n, elements.Transceiver)] | ||||
|     add_port = [n.uid for n in network.predecessors(roadm) if isinstance(n, elements.Transceiver)] | ||||
|  | ||||
|     default_express = 'express' | ||||
|     default_add = 'add' | ||||
|     default_drop = 'drop' | ||||
|     # take user defined element impairment id if it exists | ||||
|     correct_from_degrees = [] | ||||
|     correct_add = [] | ||||
|     correct_to_degrees = [] | ||||
|     correct_drop = [] | ||||
|     for from_degree in previous_oms: | ||||
|         correct_from_degrees.append(from_degree) | ||||
|         for to_degree in next_oms: | ||||
|             correct_to_degrees.append(to_degree) | ||||
|             impairment_id = roadm.get_per_degree_impairment_id(from_degree, to_degree) | ||||
|             roadm.set_roadm_paths(from_degree=from_degree, to_degree=to_degree, path_type=default_express, | ||||
|                                   impairment_id=impairment_id) | ||||
|         for drop in drop_port: | ||||
|             correct_drop.append(drop) | ||||
|             impairment_id = roadm.get_per_degree_impairment_id(from_degree, drop) | ||||
|             path_type = roadm.get_path_type_per_id(impairment_id) | ||||
|             # a degree connected to a transceiver MUST be add or drop | ||||
|             # but a degree connected  to something else could be an express, add or drop | ||||
|             # (for example case of external shelves) | ||||
|             if path_type and path_type != 'drop': | ||||
|                 msg = f'Roadm {roadm.uid} path_type is defined as {path_type} but it should be drop' | ||||
|                 raise NetworkTopologyError(msg) | ||||
|             roadm.set_roadm_paths(from_degree=from_degree, to_degree=drop, path_type=default_drop, | ||||
|                                   impairment_id=impairment_id) | ||||
|     for to_degree in next_oms: | ||||
|         for add in add_port: | ||||
|             correct_add.append(add) | ||||
|             impairment_id = roadm.get_per_degree_impairment_id(add, to_degree) | ||||
|             path_type = roadm.get_path_type_per_id(impairment_id) | ||||
|             if path_type and path_type != 'add': | ||||
|                 msg = f'Roadm {roadm.uid} path_type is defined as {path_type} but it should be add' | ||||
|                 raise NetworkTopologyError(msg) | ||||
|             roadm.set_roadm_paths(from_degree=add, to_degree=to_degree, path_type=default_add, | ||||
|                                   impairment_id=impairment_id) | ||||
|     # sanity check: raise an error if per_degree from or to degrees are not in the correct list | ||||
|     # raise an error if user defined path_type is not consistent with inferred path_type: | ||||
|     for item in roadm.per_degree_impairments.values(): | ||||
|         if item['from_degree'] not in correct_from_degrees + correct_add or \ | ||||
|                 item['to_degree'] not in correct_to_degrees + correct_drop: | ||||
|             msg = f'Roadm {roadm.uid} has wrong from-to degree uid {item["from_degree"]} - {item["to_degree"]}' | ||||
|             raise NetworkTopologyError(msg) | ||||
|  | ||||
|  | ||||
| def add_roadm_booster(network, roadm): | ||||
|     next_nodes = [n for n in network.successors(roadm) | ||||
|                   if not (isinstance(n, elements.Transceiver) or isinstance(n, elements.Fused) or isinstance(n, elements.Edfa))] | ||||
|                   if not (isinstance(n, elements.Transceiver) or isinstance(n, elements.Fused) | ||||
|                   or isinstance(n, elements.Edfa))] | ||||
|     # no amplification for fused spans or TRX | ||||
|     for next_node in next_nodes: | ||||
|         network.remove_edge(roadm, next_node) | ||||
|         amp = elements.Edfa( | ||||
|             uid=f'Edfa_booster_{roadm.uid}_to_{next_node.uid}', | ||||
|             params=Amp.default_values, | ||||
|             params=EdfaParams.default_values, | ||||
|             metadata={ | ||||
|                 'location': { | ||||
|                     'latitude': roadm.lat, | ||||
| @@ -389,7 +623,7 @@ def add_roadm_preamp(network, roadm): | ||||
|         network.remove_edge(prev_node, roadm) | ||||
|         amp = elements.Edfa( | ||||
|             uid=f'Edfa_preamp_{roadm.uid}_from_{prev_node.uid}', | ||||
|             params=Amp.default_values, | ||||
|             params=EdfaParams.default_values, | ||||
|             metadata={ | ||||
|                 'location': { | ||||
|                     'latitude': roadm.lat, | ||||
| @@ -412,13 +646,13 @@ def add_roadm_preamp(network, roadm): | ||||
|  | ||||
|  | ||||
| def add_inline_amplifier(network, fiber): | ||||
|     next_node = next(network.successors(fiber)) | ||||
|     next_node = get_next_node(fiber, network) | ||||
|     if isinstance(next_node, elements.Fiber) or isinstance(next_node, elements.RamanFiber): | ||||
|         # no amplification for fused spans or TRX | ||||
|         network.remove_edge(fiber, next_node) | ||||
|         amp = elements.Edfa( | ||||
|             uid=f'Edfa_{fiber.uid}', | ||||
|             params=Amp.default_values, | ||||
|             params=EdfaParams.default_values, | ||||
|             metadata={ | ||||
|                 'location': { | ||||
|                     'latitude': (fiber.lat + next_node.lat) / 2, | ||||
| @@ -437,6 +671,9 @@ def add_inline_amplifier(network, fiber): | ||||
|  | ||||
|  | ||||
| def calculate_new_length(fiber_length, bounds, target_length): | ||||
|     """If fiber is over boundary, then assume this is a link "intent" and computes the set of | ||||
|     identical fiber spans this link should be composed of. | ||||
|     """ | ||||
|     if fiber_length < bounds.stop: | ||||
|         return fiber_length, 1 | ||||
|  | ||||
| @@ -456,7 +693,21 @@ def calculate_new_length(fiber_length, bounds, target_length): | ||||
|         return (length1, n_spans1) | ||||
|  | ||||
|  | ||||
| def split_fiber(network, fiber, bounds, target_length, equipment): | ||||
| def get_next_node(node, network): | ||||
|     """get_next node else raise tha appropriate error | ||||
|     """ | ||||
|     try: | ||||
|         next_node = next(network.successors(node)) | ||||
|         return next_node | ||||
|     except StopIteration: | ||||
|         raise NetworkTopologyError( | ||||
|             f'{type(node).__name__} {node.uid} is not properly connected, please check network topology') | ||||
|  | ||||
|  | ||||
| def split_fiber(network, fiber, bounds, target_length): | ||||
|     """If fiber length exceeds boundary then assume this is a link "intent", and replace this one-span link | ||||
|     with an n_spans link, with identical fiber types. | ||||
|     """ | ||||
|     new_length, n_spans = calculate_new_length(fiber.params.length, bounds, target_length) | ||||
|     if n_spans == 1: | ||||
|         return | ||||
| @@ -499,11 +750,10 @@ def split_fiber(network, fiber, bounds, target_length, equipment): | ||||
|  | ||||
|  | ||||
| def add_connector_loss(network, fibers, default_con_in, default_con_out, EOL): | ||||
|     """Add default connector loss if no loss are defined. EOL repair margin is added as a connector loss | ||||
|     """ | ||||
|     for fiber in fibers: | ||||
|         try: | ||||
|             next_node = next(network.successors(fiber)) | ||||
|         except StopIteration: | ||||
|             raise NetworkTopologyError(f'Fiber {fiber.uid} is not properly connected, please check network topology') | ||||
|         next_node = get_next_node(fiber, network) | ||||
|         if fiber.params.con_in is None: | ||||
|             fiber.params.con_in = default_con_in | ||||
|         if fiber.params.con_out is None: | ||||
| @@ -512,19 +762,18 @@ def add_connector_loss(network, fibers, default_con_in, default_con_out, EOL): | ||||
|             fiber.params.con_out += EOL | ||||
|  | ||||
|  | ||||
| def add_fiber_padding(network, fibers, padding): | ||||
|     """last_fibers = (fiber for n in network.nodes() | ||||
|                          if not (isinstance(n, elements.Fiber) or isinstance(n, elements.Fused)) | ||||
|                          for fiber in network.predecessors(n) | ||||
|                          if isinstance(fiber, elements.Fiber))""" | ||||
| def add_fiber_padding(network, fibers, padding, equipment): | ||||
|     """Add a padding att_in at the input of the 1st fiber of a succession of fibers and fused | ||||
|     """ | ||||
|     for fiber in fibers: | ||||
|         try: | ||||
|             next_node = next(network.successors(fiber)) | ||||
|         except StopIteration: | ||||
|             raise NetworkTopologyError(f'Fiber {fiber.uid} is not properly connected, please check network topology') | ||||
|         next_node = get_next_node(fiber, network) | ||||
|         if isinstance(next_node, elements.Fused): | ||||
|             continue | ||||
|         this_span_loss = span_loss(network, fiber) | ||||
|         # do not pad if this is a Raman Fiber | ||||
|         if isinstance(fiber, elements.RamanFiber): | ||||
|             continue | ||||
|         this_span_loss = span_loss(network, fiber, equipment) | ||||
|         fiber.design_span_loss = this_span_loss | ||||
|         if this_span_loss < padding: | ||||
|             # add a padding att_in at the input of the 1st fiber: | ||||
|             # address the case when several fibers are spliced together | ||||
| @@ -533,43 +782,69 @@ def add_fiber_padding(network, fibers, padding): | ||||
|             # just after a roadm: need to check that first_fiber is really a fiber | ||||
|             if isinstance(first_fiber, elements.Fiber): | ||||
|                 first_fiber.params.att_in = first_fiber.params.att_in + padding - this_span_loss | ||||
|                 fiber.design_span_loss += first_fiber.params.att_in | ||||
|  | ||||
|  | ||||
| def build_network(network, equipment, pref_ch_db, pref_total_db, no_insert_edfas=False): | ||||
| def add_missing_elements_in_network(network, equipment): | ||||
|     """Autodesign network: add missing elements. split fibers if their length is too big | ||||
|     add ROADM preamp or booster and inline amplifiers between fibers | ||||
|     """ | ||||
|     default_span_data = equipment['Span']['default'] | ||||
|     max_length = int(convert_length(default_span_data.max_length, default_span_data.length_units)) | ||||
|     min_length = max(int(default_span_data.padding / 0.2 * 1e3), 50_000) | ||||
|     bounds = range(min_length, max_length) | ||||
|     target_length = max(min_length, min(max_length, 90_000)) | ||||
|     fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)] | ||||
|     for fiber in fibers: | ||||
|         split_fiber(network, fiber, bounds, target_length) | ||||
|     roadms = [r for r in network.nodes() if isinstance(r, elements.Roadm)] | ||||
|     for roadm in roadms: | ||||
|         add_roadm_preamp(network, roadm) | ||||
|         add_roadm_booster(network, roadm) | ||||
|     fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)] | ||||
|     for fiber in fibers: | ||||
|         add_inline_amplifier(network, fiber) | ||||
|  | ||||
|     # set roadm loss for gain_mode before to build network | ||||
|  | ||||
| def add_missing_fiber_attributes(network, equipment): | ||||
|     """Fill in connector loss with default values. Add the padding loss is required. | ||||
|     EOL is added as a connector loss | ||||
|     """ | ||||
|     default_span_data = equipment['Span']['default'] | ||||
|     fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)] | ||||
|     add_connector_loss(network, fibers, default_span_data.con_in, default_span_data.con_out, default_span_data.EOL) | ||||
|     # don't group split fiber and add amp in the same loop | ||||
|     # =>for code clarity (at the expense of speed): | ||||
|     add_fiber_padding(network, fibers, default_span_data.padding, equipment) | ||||
|  | ||||
|  | ||||
| def build_network(network, equipment, pref_ch_db, pref_total_db, set_connector_losses=True, verbose=True): | ||||
|     """Set roadm equalization target and amplifier gain and power | ||||
|     """ | ||||
|     roadms = [r for r in network.nodes() if isinstance(r, elements.Roadm)] | ||||
|     transceivers = [t for t in network.nodes() if isinstance(t, elements.Transceiver)] | ||||
|  | ||||
|     if not no_insert_edfas: | ||||
|         for fiber in fibers: | ||||
|             split_fiber(network, fiber, bounds, target_length, equipment) | ||||
|  | ||||
|         for roadm in roadms: | ||||
|             add_roadm_preamp(network, roadm) | ||||
|             add_roadm_booster(network, roadm) | ||||
|  | ||||
|         fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)] | ||||
|         for fiber in fibers: | ||||
|             add_inline_amplifier(network, fiber) | ||||
|  | ||||
|     add_fiber_padding(network, fibers, default_span_data.padding) | ||||
|  | ||||
|     if set_connector_losses: | ||||
|         add_missing_fiber_attributes(network, equipment) | ||||
|     # set roadm equalization targets first | ||||
|     for roadm in roadms: | ||||
|         set_roadm_ref_carrier(roadm, equipment) | ||||
|         set_roadm_per_degree_targets(roadm, network) | ||||
|         set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db) | ||||
|     # then set amplifiers gain, delta_p and out_voa on each OMS | ||||
|     for roadm in roadms + transceivers: | ||||
|         set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db, verbose) | ||||
|     for roadm in roadms: | ||||
|         set_roadm_input_powers(network, roadm, equipment, pref_ch_db) | ||||
|         set_roadm_internal_paths(roadm, network) | ||||
|     for fiber in [f for f in network.nodes() if isinstance(f, (elements.Fiber, elements.RamanFiber))]: | ||||
|         set_fiber_input_power(network, fiber, equipment, pref_ch_db) | ||||
|  | ||||
|     trx = [t for t in network.nodes() if isinstance(t, elements.Transceiver)] | ||||
|     for t in trx: | ||||
|         next_node = next(network.successors(t), None) | ||||
|         if next_node and not isinstance(next_node, elements.Roadm): | ||||
|             set_egress_amplifier(network, t, equipment, 0, pref_total_db) | ||||
|  | ||||
| def design_network(reference_channel, network, equipment, set_connector_losses=True, verbose=True): | ||||
|     """Network is designed according to reference channel. Verbose indicate if the function should | ||||
|     print all warnings or not | ||||
|     """ | ||||
|     pref_ch_db = watt2dbm(reference_channel.power)  # reference channel power | ||||
|     pref_total_db = pref_ch_db + lin2db(reference_channel.nb_channel)  # reference total power | ||||
|     build_network(network, equipment, pref_ch_db, pref_total_db, set_connector_losses=set_connector_losses, | ||||
|                   verbose=verbose) | ||||
|   | ||||
| @@ -46,21 +46,36 @@ class RamanParams(Parameters): | ||||
|         self.result_spatial_resolution = result_spatial_resolution  # [m] | ||||
|         self.solver_spatial_resolution = solver_spatial_resolution  # [m] | ||||
|  | ||||
|     def to_json(self): | ||||
|         return {"flag": self.flag, | ||||
|                 "result_spatial_resolution": self.result_spatial_resolution, | ||||
|                 "solver_spatial_resolution": self.solver_spatial_resolution} | ||||
|  | ||||
|  | ||||
| class NLIParams(Parameters): | ||||
|     def __init__(self, method='gn_model_analytic', dispersion_tolerance=1, phase_shift_tolerance=0.1, | ||||
|                  computed_channels=None): | ||||
|                  computed_channels=None, computed_number_of_channels=None): | ||||
|         """Simulation parameters used within the Nli Solver | ||||
|  | ||||
|         :params method: formula for NLI calculation | ||||
|         :params dispersion_tolerance: tuning parameter for ggn model solution | ||||
|         :params phase_shift_tolerance: tuning parameter for ggn model solution | ||||
|         :params computed_channels: the NLI is evaluated for these channels and extrapolated for the others | ||||
|         :params computed_number_of_channels: the NLI is evaluated for this number of channels equally distributed | ||||
|         in the spectrum and extrapolated for the others | ||||
|         """ | ||||
|         self.method = method.lower() | ||||
|         self.dispersion_tolerance = dispersion_tolerance | ||||
|         self.phase_shift_tolerance = phase_shift_tolerance | ||||
|         self.computed_channels = computed_channels | ||||
|         self.computed_number_of_channels = computed_number_of_channels | ||||
|  | ||||
|     def to_json(self): | ||||
|         return {"method": self.method, | ||||
|                 "dispersion_tolerance": self.dispersion_tolerance, | ||||
|                 "phase_shift_tolerance": self.phase_shift_tolerance, | ||||
|                 "computed_channels": self.computed_channels, | ||||
|                 "computed_number_of_channels": self.computed_number_of_channels} | ||||
|  | ||||
|  | ||||
| class SimParams(Parameters): | ||||
| @@ -98,8 +113,68 @@ class RoadmParams(Parameters): | ||||
|             self.pmd = kwargs['pmd'] | ||||
|             self.pdl = kwargs['pdl'] | ||||
|             self.restrictions = kwargs['restrictions'] | ||||
|             self.roadm_path_impairments = self.get_roadm_path_impairments(kwargs['roadm-path-impairments']) | ||||
|         except KeyError as e: | ||||
|             raise ParametersError(f'ROADM configurations must include {e}. Configuration: {kwargs}') | ||||
|         self.per_degree_impairments = kwargs.get('per_degree_impairments', []) | ||||
|  | ||||
|     def get_roadm_path_impairments(self, path_impairments_list): | ||||
|         """Get the ROADM list of profiles for impairments definition | ||||
|  | ||||
|         transform the ietf model into gnpy internal model: add a path-type in the attributes | ||||
|         """ | ||||
|         if not path_impairments_list: | ||||
|             return {} | ||||
|         authorized_path_types = { | ||||
|             'roadm-express-path': 'express', | ||||
|             'roadm-add-path': 'add', | ||||
|             'roadm-drop-path': 'drop', | ||||
|         } | ||||
|         roadm_path_impairments = {} | ||||
|         for path_impairment in path_impairments_list: | ||||
|             index = path_impairment['roadm-path-impairments-id'] | ||||
|             path_type = next(key for key in path_impairment if key in authorized_path_types.keys()) | ||||
|             impairment_dict = dict({'path-type': authorized_path_types[path_type]}, **path_impairment[path_type][0]) | ||||
|             roadm_path_impairments[index] = RoadmImpairment(impairment_dict) | ||||
|         return roadm_path_impairments | ||||
|  | ||||
|  | ||||
| class RoadmPath: | ||||
|     def __init__(self, from_degree, to_degree, path_type, impairment_id=None, impairment=None): | ||||
|         """Records roadm internal paths, types and impairment | ||||
|  | ||||
|         path_type must be in "express", "add", "drop" | ||||
|         impairment_id must be one of the id detailed in equipement | ||||
|         """ | ||||
|         self.from_degree = from_degree | ||||
|         self.to_degree = to_degree | ||||
|         self.path_type = path_type | ||||
|         self.impairment_id = impairment_id | ||||
|         self.impairment = impairment | ||||
|  | ||||
|  | ||||
| class RoadmImpairment: | ||||
|     """Generic definition of impairments for express, add and drop""" | ||||
|     def __init__(self, params): | ||||
|         """Records roadm internal paths and types""" | ||||
|         self.path_type = params.get('path-type') | ||||
|         self.pmd = params.get('roadm-pmd') | ||||
|         self.cd = params.get('roadm-cd') | ||||
|         self.pdl = params.get('roadm-pdl') | ||||
|         self.inband_crosstalk = params.get('roadm-inband-crosstalk') | ||||
|         self.maxloss = params.get('roadm-maxloss', 0) | ||||
|         if params.get('frequency-range') is not None: | ||||
|             self.fmin = params.get('frequency-range')['lower-frequency'] | ||||
|             self.fmax = params.get('frequency-range')['upper-frequency'] | ||||
|         else: | ||||
|             self.fmin, self.fmax = None, None | ||||
|         self.osnr = params.get('roadm-osnr', None) | ||||
|         self.pmax = params.get('roadm-pmax', None) | ||||
|         self.nf = params.get('roadm-noise-figure', None) | ||||
|         self.minloss = params.get('minloss', None) | ||||
|         self.typloss = params.get('typloss', None) | ||||
|         self.pmin = params.get('pmin', None) | ||||
|         self.ptyp = params.get('ptyp', None) | ||||
|  | ||||
|  | ||||
| class FusedParams(Parameters): | ||||
| @@ -108,7 +183,33 @@ class FusedParams(Parameters): | ||||
|  | ||||
|  | ||||
| DEFAULT_RAMAN_COEFFICIENT = { | ||||
|     # SSMF Raman coefficient profile normalized with respect to the effective area overlap (g0 * A_eff(f_probe, f_pump)) | ||||
|     # SSMF Raman coefficient profile in terms of mode intensity (g0 * A_ff_overlap) | ||||
|     'gamma_raman': array( | ||||
|         [0.0, 8.524419934705497e-16, 2.643567866245371e-15, 4.410548410941305e-15, 6.153422961291078e-15, | ||||
|          7.484924703044943e-15, 8.452060808349209e-15, 9.101549322698156e-15, 9.57837595158966e-15, | ||||
|          1.0008642675474562e-14, 1.0865773569905647e-14, 1.1300776305865833e-14, 1.2143238647099625e-14, | ||||
|          1.3231065750676068e-14, 1.4624900971525384e-14, 1.6013330554840492e-14, 1.7458119359310242e-14, | ||||
|          1.9320241330434762e-14, 2.1720395392873534e-14, 2.4137337406734775e-14, 2.628163218460466e-14, | ||||
|          2.8041019963285974e-14, 2.9723155447089933e-14, 3.129353531005888e-14, 3.251796163324624e-14, | ||||
|          3.3198839487612773e-14, 3.329527690685666e-14, 3.313155691238456e-14, 3.289013852154548e-14, | ||||
|          3.2458917188506916e-14, 3.060684277937575e-14, 3.2660349473783173e-14, 2.957419109657689e-14, | ||||
|          2.518894321396672e-14, 1.734560485857344e-14, 9.902860761605233e-15, 7.219176385099358e-15, | ||||
|          6.079565990401311e-15, 5.828373065963427e-15, 7.20580801091692e-15, 7.561924351387493e-15, | ||||
|          7.621152352332206e-15, 6.8859886780643254e-15, 5.629181047471162e-15, 3.679727598966185e-15, | ||||
|          2.7555869742500355e-15, 2.4810133942597675e-15, 2.2160080532403624e-15, 2.1440626024765557e-15, | ||||
|          2.33873070799544e-15, 2.557317929858713e-15, 3.039839048226572e-15, 4.8337165515610065e-15, | ||||
|          5.4647431818257436e-15, 5.229187813711269e-15, 4.510768525811313e-15, 3.3213473130607794e-15, | ||||
|          2.2602577027996455e-15, 1.969576495866441e-15, 1.5179853954188527e-15, 1.2953988551200156e-15, | ||||
|          1.1304672156251838e-15, 9.10004390675213e-16, 8.432919922183503e-16, 7.849224069008326e-16, | ||||
|          7.827568196032024e-16, 9.000514440646232e-16, 1.3025926460013665e-15, 1.5444108938497558e-15, | ||||
|          1.8795594063060786e-15, 1.7796130169921014e-15, 1.5938159865046653e-15, 1.1585522355108287e-15, | ||||
|          8.507044444633358e-16, 7.625404663756823e-16, 8.14510750925789e-16, 9.047944693473188e-16, | ||||
|          9.636431901702084e-16, 9.298633899602105e-16, 8.349739503637023e-16, 7.482901278066085e-16, | ||||
|          6.240794767134268e-16, 5.00652535687506e-16, 3.553373263685851e-16, 2.0344217706119682e-16, | ||||
|          1.4267522642294203e-16, 8.980016576743517e-17, 2.9829068181832594e-17, 1.4861959129014824e-17, | ||||
|          7.404482113326137e-18] | ||||
|     ),  # m/W | ||||
|     # SSMF Raman coefficient profile | ||||
|     'g0': array( | ||||
|         [0.00000000e+00, 1.12351610e-05, 3.47838074e-05, 5.79356636e-05, 8.06921680e-05, 9.79845709e-05, 1.10454361e-04, | ||||
|          1.18735302e-04, 1.24736889e-04, 1.30110053e-04, 1.41001273e-04, 1.46383247e-04, 1.57011792e-04, 1.70765865e-04, | ||||
| @@ -123,22 +224,21 @@ DEFAULT_RAMAN_COEFFICIENT = { | ||||
|          2.03744008e-05, 1.81939341e-05, 1.31862121e-05, 9.65352116e-06, 8.62698322e-06, 9.18688016e-06, 1.01737784e-05, | ||||
|          1.08017817e-05, 1.03903588e-05, 9.30040333e-06, 8.30809173e-06, 6.90650401e-06, 5.52238029e-06, 3.90648708e-06, | ||||
|          2.22908227e-06, 1.55796177e-06, 9.77218716e-07, 3.23477236e-07, 1.60602454e-07, 7.97306386e-08] | ||||
|     ),  # [m/W] | ||||
|     ),  # [1 / (W m)] | ||||
|  | ||||
|     # Note the non-uniform spacing of this range; this is required for properly capturing the Raman peak shape. | ||||
|     'frequency_offset': array([ | ||||
|         0., 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 5.5, 6., 6.5, 7., 7.5, 8., 8.5, 9., 9.5, 10., 10.5, 11., 11.5, | ||||
|         12., | ||||
|         12.5, 12.75, 13., 13.25, 13.5, 14., 14.5, 14.75, 15., 15.5, 16., 16.5, 17., 17.5, 18., 18.25, 18.5, 18.75, 19., | ||||
|         19.5, 20., 20.5, 21., 21.5, 22., 22.5, 23., 23.5, 24., 24.5, 25., 25.5, 26., 26.5, 27., 27.5, 28., 28.5, 29., | ||||
|         29.5, | ||||
|         30., 30.5, 31., 31.5, 32., 32.5, 33., 33.5, 34., 34.5, 35., 35.5, 36., 36.5, 37., 37.5, 38., 38.5, 39., 39.5, | ||||
|         40., | ||||
|         40.5, 41., 41.5, 42.] | ||||
|     ) * 1e12,  # [Hz] | ||||
|         12., 12.5, 12.75, 13., 13.25, 13.5, 14., 14.5, 14.75, 15., 15.5, 16., 16.5, 17., 17.5, 18., 18.25, 18.5, 18.75, | ||||
|         19., 19.5, 20., 20.5, 21., 21.5, 22., 22.5, 23., 23.5, 24., 24.5, 25., 25.5, 26., 26.5, 27., 27.5, 28., 28.5, | ||||
|         29., 29.5, 30., 30.5, 31., 31.5, 32., 32.5, 33., 33.5, 34., 34.5, 35., 35.5, 36., 36.5, 37., 37.5, 38., 38.5, | ||||
|         39., 39.5, 40., 40.5, 41., 41.5, 42.]) * 1e12,  # [Hz] | ||||
|  | ||||
|     # Raman profile reference frequency | ||||
|     'reference_frequency': 206184634112792  # [Hz] (1454 nm)} | ||||
|     'reference_frequency': 206.184634112792e12,  # [Hz] (1454 nm) | ||||
|  | ||||
|     # Raman profile reference effective area | ||||
|     'reference_effective_area': 75.74659443542413e-12  # [m^2] (@1454 nm) | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -179,8 +279,8 @@ class FiberParams(Parameters): | ||||
|             # Chromatic Dispersion | ||||
|             if 'dispersion_per_frequency' in kwargs: | ||||
|                 # Frequency-dependent dispersion | ||||
|                 self._dispersion = asarray(kwargs['dispersion']['value'])  # s/m/m | ||||
|                 self._f_dispersion_ref = asarray(kwargs['dispersion']['frequency'])  # Hz | ||||
|                 self._dispersion = asarray(kwargs['dispersion_per_frequency']['value'])  # s/m/m | ||||
|                 self._f_dispersion_ref = asarray(kwargs['dispersion_per_frequency']['frequency'])  # Hz | ||||
|                 self._dispersion_slope = None | ||||
|             elif 'dispersion' in kwargs: | ||||
|                 # Single value dispersion | ||||
| @@ -211,14 +311,21 @@ class FiberParams(Parameters): | ||||
|                 pi * self._core_radius ** 2 / self._effective_area)) ** 2 | ||||
|  | ||||
|             # Raman Gain Coefficient | ||||
|             raman_coefficient = kwargs.get('raman_coefficient', DEFAULT_RAMAN_COEFFICIENT) | ||||
|             self._g0 = asarray(raman_coefficient['g0']) | ||||
|             raman_reference_frequency = raman_coefficient['reference_frequency'] | ||||
|             frequency_offset = asarray(raman_coefficient['frequency_offset']) | ||||
|             stokes_wave = raman_reference_frequency - frequency_offset | ||||
|             gamma_raman = self._g0 * self.effective_area_overlap(stokes_wave, raman_reference_frequency) | ||||
|             normalized_gamma_raman = gamma_raman / raman_reference_frequency  # 1 / m / W / Hz | ||||
|             self._raman_reference_frequency = raman_reference_frequency | ||||
|             raman_coefficient = kwargs.get('raman_coefficient') | ||||
|             if raman_coefficient is None: | ||||
|                 self._raman_reference_frequency = DEFAULT_RAMAN_COEFFICIENT['reference_frequency'] | ||||
|                 frequency_offset = asarray(DEFAULT_RAMAN_COEFFICIENT['frequency_offset']) | ||||
|                 gamma_raman = asarray(DEFAULT_RAMAN_COEFFICIENT['gamma_raman']) | ||||
|                 stokes_wave = self._raman_reference_frequency - frequency_offset | ||||
|                 normalized_gamma_raman = gamma_raman / self._raman_reference_frequency  # 1 / m / W / Hz | ||||
|                 self._g0 = gamma_raman / self.effective_area_overlap(stokes_wave, self._raman_reference_frequency) | ||||
|             else: | ||||
|                 self._raman_reference_frequency = raman_coefficient['reference_frequency'] | ||||
|                 frequency_offset = asarray(raman_coefficient['frequency_offset']) | ||||
|                 stokes_wave = self._raman_reference_frequency - frequency_offset | ||||
|                 self._g0 = asarray(raman_coefficient['g0']) | ||||
|                 gamma_raman = self._g0 * self.effective_area_overlap(stokes_wave, self._raman_reference_frequency) | ||||
|                 normalized_gamma_raman = gamma_raman / self._raman_reference_frequency  # 1 / m / W / Hz | ||||
|  | ||||
|             # Raman gain coefficient array of the frequency offset constructed such that positive frequency values | ||||
|             # represent a positive power transfer from higher frequency and vice versa | ||||
| @@ -355,6 +462,38 @@ class FiberParams(Parameters): | ||||
|  | ||||
|  | ||||
| class EdfaParams: | ||||
|     default_values = { | ||||
|         'f_min': 191.3e12, | ||||
|         'f_max': 196.1e12, | ||||
|         'multi_band': None, | ||||
|         'bands': [], | ||||
|         'type_variety': '', | ||||
|         'type_def': '', | ||||
|         'gain_flatmax': None, | ||||
|         'gain_min': None, | ||||
|         'p_max': None, | ||||
|         'nf_model': None, | ||||
|         'dual_stage_model': None, | ||||
|         'preamp_variety': None, | ||||
|         'booster_variety': None, | ||||
|         'nf_min': None, | ||||
|         'nf_max': None, | ||||
|         'nf_coef': None, | ||||
|         'nf0': None, | ||||
|         'nf_fit_coeff': None, | ||||
|         'nf_ripple': 0, | ||||
|         'dgt': None, | ||||
|         'gain_ripple': 0, | ||||
|         'tilt_ripple': 0, | ||||
|         'f_ripple_ref': None, | ||||
|         'out_voa_auto': False, | ||||
|         'allowed_for_design': False, | ||||
|         'raman': False, | ||||
|         'pmd': 0, | ||||
|         'pdl': 0, | ||||
|         'advance_configurations_from_json': None | ||||
|     } | ||||
|  | ||||
|     def __init__(self, **params): | ||||
|         try: | ||||
|             self.type_variety = params['type_variety'] | ||||
|   | ||||
| @@ -305,6 +305,10 @@ class NliSolver: | ||||
|         elif 'ggn_spectrally_separated' in sim_params.nli_params.method: | ||||
|             if sim_params.nli_params.computed_channels is not None: | ||||
|                 cut_indices = array(sim_params.nli_params.computed_channels) - 1 | ||||
|             elif sim_params.nli_params.computed_number_of_channels is not None: | ||||
|                 nb_ch_computed = sim_params.nli_params.computed_number_of_channels | ||||
|                 nb_ch = len(spectral_info.channel_number) | ||||
|                 cut_indices = array([round(i * (nb_ch - 1) / (nb_ch_computed - 1)) for i in range(0, nb_ch_computed)]) | ||||
|             else: | ||||
|                 cut_indices = array(spectral_info.channel_number) - 1 | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ This module contains utility functions that are used with gnpy. | ||||
| """ | ||||
|  | ||||
| from csv import writer | ||||
| from numpy import pi, cos, sqrt, log10, linspace, zeros, shape, where, logical_and, mean | ||||
| from numpy import pi, cos, sqrt, log10, linspace, zeros, shape, where, logical_and, mean, array | ||||
| from scipy import constants | ||||
| from copy import deepcopy | ||||
|  | ||||
| @@ -213,17 +213,6 @@ wavelength2freq = constants.lambda2nu | ||||
| freq2wavelength = constants.nu2lambda | ||||
|  | ||||
|  | ||||
| def freq2wavelength(value): | ||||
|     """Converts frequency units to wavelength units. | ||||
|  | ||||
|     >>> round(freq2wavelength(191.35e12) * 1e9, 3) | ||||
|     1566.723 | ||||
|     >>> round(freq2wavelength(196.1e12) * 1e9, 3) | ||||
|     1528.773 | ||||
|     """ | ||||
|     return constants.c / value | ||||
|  | ||||
|  | ||||
| def snr_sum(snr, bw, snr_added, bw_added=12.5e9): | ||||
|     snr_added = snr_added - lin2db(bw / bw_added) | ||||
|     snr = -lin2db(db2lin(-snr) + db2lin(-snr_added)) | ||||
| @@ -452,3 +441,20 @@ def restore_order(elements, order): | ||||
|     [3, 2, 7] | ||||
|     """ | ||||
|     return [elements[i[0]] for i in sorted(enumerate(order), key=lambda x:x[1]) if elements[i[0]] is not None] | ||||
|  | ||||
|  | ||||
| def calculate_absolute_min_or_zero(x: array) -> array: | ||||
|     """Calculates the element-wise absolute minimum between the x and zero. | ||||
|  | ||||
|     Parameters: | ||||
|     x (array): The first input array. | ||||
|  | ||||
|     Returns: | ||||
|     array: The element-wise absolute minimum between x and zero. | ||||
|  | ||||
|     Example: | ||||
|     >>> x = array([-1, 2, -3]) | ||||
|     >>> calculate_absolute_min_or_zero(x) | ||||
|     array([1., 0., 3.]) | ||||
|     """ | ||||
|     return (abs(x) - x) / 2 | ||||
|   | ||||
| @@ -1,160 +1,160 @@ | ||||
| { | ||||
|     "nf_fit_coeff": [ | ||||
|         0.0008, | ||||
|         0.0272, | ||||
|         -0.2249, | ||||
|         6.4902 | ||||
|     ], | ||||
|     "f_min": 191.4e12, | ||||
|     "f_max": 196.1e12, | ||||
|     "nf_ripple": [ | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0, | ||||
|         0.0 | ||||
|     ], | ||||
|     "gain_ripple": [ | ||||
|         -0.15656302345061, | ||||
|         -0.22244242043552, | ||||
|         -0.25188965661642, | ||||
|         -0.23575900335007, | ||||
|         -0.20897508375209, | ||||
|         -0.19440221943049, | ||||
|         -0.18324644053602, | ||||
|         -0.18053287269681, | ||||
|         -0.17113588777219, | ||||
|         -0.15460322445561, | ||||
|         -0.13550774706866, | ||||
|         -0.10606051088777, | ||||
|         -0.0765630234506, | ||||
|         -0.04962835008375, | ||||
|         -0.01319618927973, | ||||
|         0.01027114740367, | ||||
|         0.03378873534338, | ||||
|         0.04961788107202, | ||||
|         0.04494451423784, | ||||
|         0.0399193886097, | ||||
|         0.01584903685091, | ||||
|         -0.00420121440538, | ||||
|         -0.01847257118928, | ||||
|         -0.02475397822447, | ||||
|         -0.01053287269681, | ||||
|         0.01509526800668, | ||||
|         0.05921587102177, | ||||
|         0.1191656197655, | ||||
|         0.18147717755444, | ||||
|         0.23579878559464, | ||||
|         0.26941687604691, | ||||
|         0.27836159966498, | ||||
|         0.26956762981574, | ||||
|         0.23826109715241, | ||||
|         0.18936662479061, | ||||
|         0.1204721524288, | ||||
|         0.0453465242881, | ||||
|         -0.00877407872698, | ||||
|         -0.02199015912898, | ||||
|         0.00107516750419, | ||||
|         0.02795958961474, | ||||
|         0.02740682579566, | ||||
|         -0.01028161641541, | ||||
|         -0.05982935510889, | ||||
|         -0.06701528475711, | ||||
|         0.00223094639866, | ||||
|         0.14157768006701, | ||||
|         0.15017064489112 | ||||
|     ], | ||||
|     "dgt": [ | ||||
|         1.0, | ||||
|         1.03941448941778, | ||||
|         1.07773189112355, | ||||
|         1.11575888725852, | ||||
|         1.15209185089701, | ||||
|         1.18632744096844, | ||||
|         1.21911100318577, | ||||
|         1.24931318255134, | ||||
|         1.27657903892303, | ||||
|         1.30069883494415, | ||||
|         1.32210817897091, | ||||
|         1.3405812000038, | ||||
|         1.35690844654118, | ||||
|         1.3710092503689, | ||||
|         1.38430337205545, | ||||
|         1.3966294751726, | ||||
|         1.40864903907609, | ||||
|         1.42089447397912, | ||||
|         1.43476940680732, | ||||
|         1.44977369463316, | ||||
|         1.46637521309853, | ||||
|         1.48420288841848, | ||||
|         1.50335352244996, | ||||
|         1.5242627235492, | ||||
|         1.54578500307573, | ||||
|         1.56750088631614, | ||||
|         1.58973304612691, | ||||
|         1.61073904908309, | ||||
|         1.63068023161292, | ||||
|         1.64799163036252, | ||||
|         1.66286684904577, | ||||
|         1.6761448370895, | ||||
|         1.68845480656382, | ||||
|         1.70379790088896, | ||||
|         1.72461030013125, | ||||
|         1.75428006928365, | ||||
|         1.79748596476494, | ||||
|         1.85543800978691, | ||||
|         1.92915262384742, | ||||
|         2.01414465424155, | ||||
|         2.10336369905543, | ||||
|         2.19013043016015, | ||||
|         2.26678136721453, | ||||
|         2.33147727493671, | ||||
|         2.38192717604575, | ||||
|         2.41879254989742, | ||||
|         2.44342862248888, | ||||
|         2.4553191172498 | ||||
|     ] | ||||
|   "nf_fit_coeff": [ | ||||
|     0.0008, | ||||
|     0.0272, | ||||
|     -0.2249, | ||||
|     6.4902 | ||||
|   ], | ||||
|   "f_min": 191.4e12, | ||||
|   "f_max": 196.1e12, | ||||
|   "nf_ripple": [ | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0, | ||||
|     0.0 | ||||
|   ], | ||||
|   "gain_ripple": [ | ||||
|     -0.15656302345061, | ||||
|     -0.22244242043552, | ||||
|     -0.25188965661642, | ||||
|     -0.23575900335007, | ||||
|     -0.20897508375209, | ||||
|     -0.19440221943049, | ||||
|     -0.18324644053602, | ||||
|     -0.18053287269681, | ||||
|     -0.17113588777219, | ||||
|     -0.15460322445561, | ||||
|     -0.13550774706866, | ||||
|     -0.10606051088777, | ||||
|     -0.0765630234506, | ||||
|     -0.04962835008375, | ||||
|     -0.01319618927973, | ||||
|     0.01027114740367, | ||||
|     0.03378873534338, | ||||
|     0.04961788107202, | ||||
|     0.04494451423784, | ||||
|     0.0399193886097, | ||||
|     0.01584903685091, | ||||
|     -0.00420121440538, | ||||
|     -0.01847257118928, | ||||
|     -0.02475397822447, | ||||
|     -0.01053287269681, | ||||
|     0.01509526800668, | ||||
|     0.05921587102177, | ||||
|     0.1191656197655, | ||||
|     0.18147717755444, | ||||
|     0.23579878559464, | ||||
|     0.26941687604691, | ||||
|     0.27836159966498, | ||||
|     0.26956762981574, | ||||
|     0.23826109715241, | ||||
|     0.18936662479061, | ||||
|     0.1204721524288, | ||||
|     0.0453465242881, | ||||
|     -0.00877407872698, | ||||
|     -0.02199015912898, | ||||
|     0.00107516750419, | ||||
|     0.02795958961474, | ||||
|     0.02740682579566, | ||||
|     -0.01028161641541, | ||||
|     -0.05982935510889, | ||||
|     -0.06701528475711, | ||||
|     0.00223094639866, | ||||
|     0.14157768006701, | ||||
|     0.15017064489112 | ||||
|   ], | ||||
|   "dgt": [ | ||||
|     1.0, | ||||
|     1.03941448941778, | ||||
|     1.07773189112355, | ||||
|     1.11575888725852, | ||||
|     1.15209185089701, | ||||
|     1.18632744096844, | ||||
|     1.21911100318577, | ||||
|     1.24931318255134, | ||||
|     1.27657903892303, | ||||
|     1.30069883494415, | ||||
|     1.32210817897091, | ||||
|     1.3405812000038, | ||||
|     1.35690844654118, | ||||
|     1.3710092503689, | ||||
|     1.38430337205545, | ||||
|     1.3966294751726, | ||||
|     1.40864903907609, | ||||
|     1.42089447397912, | ||||
|     1.43476940680732, | ||||
|     1.44977369463316, | ||||
|     1.46637521309853, | ||||
|     1.48420288841848, | ||||
|     1.50335352244996, | ||||
|     1.5242627235492, | ||||
|     1.54578500307573, | ||||
|     1.56750088631614, | ||||
|     1.58973304612691, | ||||
|     1.61073904908309, | ||||
|     1.63068023161292, | ||||
|     1.64799163036252, | ||||
|     1.66286684904577, | ||||
|     1.6761448370895, | ||||
|     1.68845480656382, | ||||
|     1.70379790088896, | ||||
|     1.72461030013125, | ||||
|     1.75428006928365, | ||||
|     1.79748596476494, | ||||
|     1.85543800978691, | ||||
|     1.92915262384742, | ||||
|     2.01414465424155, | ||||
|     2.10336369905543, | ||||
|     2.19013043016015, | ||||
|     2.26678136721453, | ||||
|     2.33147727493671, | ||||
|     2.38192717604575, | ||||
|     2.41879254989742, | ||||
|     2.44342862248888, | ||||
|     2.4553191172498 | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,106 +1,108 @@ | ||||
| { | ||||
|     "nf_ripple": [ | ||||
|         0.0 | ||||
|     ], | ||||
|     "gain_ripple": [ | ||||
|         0.0 | ||||
|     ], | ||||
|     "dgt": [ | ||||
|         1.0, | ||||
|         1.017807767853702, | ||||
|         1.0356155337864215, | ||||
|         1.0534217504465226, | ||||
|         1.0712204022764056, | ||||
|         1.0895983485572227, | ||||
|         1.108555289615659, | ||||
|         1.1280891949729075, | ||||
|         1.1476135933863398, | ||||
|         1.1672278304018044, | ||||
|         1.1869318618366975, | ||||
|         1.2067249615595257, | ||||
|         1.2264996957264114, | ||||
|         1.2428104897182262, | ||||
|         1.2556591482982988, | ||||
|         1.2650555289898042, | ||||
|         1.2744470198196236, | ||||
|         1.2838336236692311, | ||||
|         1.2932153453410835, | ||||
|         1.3040618749785347, | ||||
|         1.316383926863083, | ||||
|         1.3301807335621048, | ||||
|         1.3439818461440451, | ||||
|         1.3598972673004606, | ||||
|         1.3779439775587023, | ||||
|         1.3981208704326855, | ||||
|         1.418273806730323, | ||||
|         1.4340878115214444, | ||||
|         1.445565137158368, | ||||
|         1.45273959485914, | ||||
|         1.4599103316162523, | ||||
|         1.4670307626366115, | ||||
|         1.474100442252211, | ||||
|         1.48111939735681, | ||||
|         1.488134243479226, | ||||
|         1.495145456062699, | ||||
|         1.502153039909686, | ||||
|         1.5097346239790443, | ||||
|         1.5178910621476225, | ||||
|         1.5266220576235803, | ||||
|         1.5353620432989845, | ||||
|         1.545374152761467, | ||||
|         1.5566577309558969, | ||||
|         1.569199764184379, | ||||
|         1.5817353179379183, | ||||
|         1.5986915141218316, | ||||
|         1.6201194134191075, | ||||
|         1.6460167077689267, | ||||
|         1.6719047669939942, | ||||
|         1.6918150918099673, | ||||
|         1.7057507692361864, | ||||
|         1.7137640932265894, | ||||
|         1.7217732861435076, | ||||
|         1.7297783508684146, | ||||
|         1.737780757913635, | ||||
|         1.7459181197626403, | ||||
|         1.7541903672600494, | ||||
|         1.7625959636196327, | ||||
|         1.7709972329654864, | ||||
|         1.7793941781790852, | ||||
|         1.7877868031023945, | ||||
|         1.7961751115773796, | ||||
|         1.8045606557581335, | ||||
|         1.8139629377087627, | ||||
|         1.824381436842932, | ||||
|         1.835814081380705, | ||||
|         1.847275503201129, | ||||
|         1.862235672444246, | ||||
|         1.8806927939516411, | ||||
|         1.9026104247588487, | ||||
|         1.9245345552113182, | ||||
|         1.9482128147680253, | ||||
|         1.9736443063300082, | ||||
|         2.0008103857988204, | ||||
|         2.0279625371819305, | ||||
|         2.055100772005235, | ||||
|         2.082225099873648, | ||||
|         2.1183028432496016, | ||||
|         2.16337565384239, | ||||
|         2.2174389328192197, | ||||
|         2.271520771371253, | ||||
|         2.322373696229342, | ||||
|         2.3699990328716107, | ||||
|         2.414398437185221, | ||||
|         2.4587748041127506, | ||||
|         2.499446286796604, | ||||
|         2.5364027376452056, | ||||
|         2.5696460593920065, | ||||
|         2.602860350286428, | ||||
|         2.630396440815385, | ||||
|         2.6521732021128046, | ||||
|         2.6681935771243177, | ||||
|         2.6841217449620203, | ||||
|         2.6947834587664494, | ||||
|         2.705443819238505, | ||||
|         2.714526681131686 | ||||
|     ] | ||||
|   "nf_ripple": [ | ||||
|     0.0 | ||||
|   ], | ||||
|   "gain_ripple": [ | ||||
|     0.0 | ||||
|   ], | ||||
|   "f_min": 191.35e12, | ||||
|   "f_max": 196.1e12, | ||||
|   "dgt": [ | ||||
|     1.0, | ||||
|     1.017807767853702, | ||||
|     1.0356155337864215, | ||||
|     1.0534217504465226, | ||||
|     1.0712204022764056, | ||||
|     1.0895983485572227, | ||||
|     1.108555289615659, | ||||
|     1.1280891949729075, | ||||
|     1.1476135933863398, | ||||
|     1.1672278304018044, | ||||
|     1.1869318618366975, | ||||
|     1.2067249615595257, | ||||
|     1.2264996957264114, | ||||
|     1.2428104897182262, | ||||
|     1.2556591482982988, | ||||
|     1.2650555289898042, | ||||
|     1.2744470198196236, | ||||
|     1.2838336236692311, | ||||
|     1.2932153453410835, | ||||
|     1.3040618749785347, | ||||
|     1.316383926863083, | ||||
|     1.3301807335621048, | ||||
|     1.3439818461440451, | ||||
|     1.3598972673004606, | ||||
|     1.3779439775587023, | ||||
|     1.3981208704326855, | ||||
|     1.418273806730323, | ||||
|     1.4340878115214444, | ||||
|     1.445565137158368, | ||||
|     1.45273959485914, | ||||
|     1.4599103316162523, | ||||
|     1.4670307626366115, | ||||
|     1.474100442252211, | ||||
|     1.48111939735681, | ||||
|     1.488134243479226, | ||||
|     1.495145456062699, | ||||
|     1.502153039909686, | ||||
|     1.5097346239790443, | ||||
|     1.5178910621476225, | ||||
|     1.5266220576235803, | ||||
|     1.5353620432989845, | ||||
|     1.545374152761467, | ||||
|     1.5566577309558969, | ||||
|     1.569199764184379, | ||||
|     1.5817353179379183, | ||||
|     1.5986915141218316, | ||||
|     1.6201194134191075, | ||||
|     1.6460167077689267, | ||||
|     1.6719047669939942, | ||||
|     1.6918150918099673, | ||||
|     1.7057507692361864, | ||||
|     1.7137640932265894, | ||||
|     1.7217732861435076, | ||||
|     1.7297783508684146, | ||||
|     1.737780757913635, | ||||
|     1.7459181197626403, | ||||
|     1.7541903672600494, | ||||
|     1.7625959636196327, | ||||
|     1.7709972329654864, | ||||
|     1.7793941781790852, | ||||
|     1.7877868031023945, | ||||
|     1.7961751115773796, | ||||
|     1.8045606557581335, | ||||
|     1.8139629377087627, | ||||
|     1.824381436842932, | ||||
|     1.835814081380705, | ||||
|     1.847275503201129, | ||||
|     1.862235672444246, | ||||
|     1.8806927939516411, | ||||
|     1.9026104247588487, | ||||
|     1.9245345552113182, | ||||
|     1.9482128147680253, | ||||
|     1.9736443063300082, | ||||
|     2.0008103857988204, | ||||
|     2.0279625371819305, | ||||
|     2.055100772005235, | ||||
|     2.082225099873648, | ||||
|     2.1183028432496016, | ||||
|     2.16337565384239, | ||||
|     2.2174389328192197, | ||||
|     2.271520771371253, | ||||
|     2.322373696229342, | ||||
|     2.3699990328716107, | ||||
|     2.414398437185221, | ||||
|     2.4587748041127506, | ||||
|     2.499446286796604, | ||||
|     2.5364027376452056, | ||||
|     2.5696460593920065, | ||||
|     2.602860350286428, | ||||
|     2.630396440815385, | ||||
|     2.6521732021128046, | ||||
|     2.6681935771243177, | ||||
|     2.6841217449620203, | ||||
|     2.6947834587664494, | ||||
|     2.705443819238505, | ||||
|     2.714526681131686 | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,80 +1,80 @@ | ||||
| { | ||||
|     "network_name": "EDFA Example Network - P2P", | ||||
|     "elements": [{ | ||||
|             "uid": "Site_A", | ||||
|             "type": "Transceiver", | ||||
|             "metadata": { | ||||
|                 "location": { | ||||
|                     "city": "Site A", | ||||
|                     "region": "", | ||||
|                     "latitude": 0, | ||||
|                     "longitude": 0 | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             "uid": "Span1", | ||||
|             "type": "Fiber", | ||||
|             "type_variety": "SSMF", | ||||
|             "params": { | ||||
|                 "length": 80, | ||||
|                 "loss_coef": 0.2, | ||||
|                 "length_units": "km", | ||||
|                 "att_in": 0, | ||||
|                 "con_in": 0.5, | ||||
|                 "con_out": 0.5                 | ||||
|                 }, | ||||
|             "metadata": { | ||||
|                 "location": { | ||||
|                     "region": "", | ||||
|                     "latitude": 1, | ||||
|                     "longitude": 0 | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             "uid": "Edfa1", | ||||
|             "type": "Edfa", | ||||
|             "type_variety": "std_low_gain",             | ||||
|             "operational": { | ||||
|                 "gain_target": 17, | ||||
|                 "tilt_target": 0, | ||||
|                 "out_voa": 0 | ||||
|             }, | ||||
|             "metadata": { | ||||
|                 "location": { | ||||
|                     "region": "", | ||||
|                     "latitude": 2, | ||||
|                     "longitude": 0 | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             "uid": "Site_B", | ||||
|             "type": "Transceiver", | ||||
|             "metadata": { | ||||
|                 "location": { | ||||
|                     "city": "Site B", | ||||
|                     "region": "", | ||||
|                     "latitude": 2, | ||||
|                     "longitude": 0 | ||||
|                 } | ||||
|             } | ||||
|   "network_name": "EDFA Example Network - P2P", | ||||
|   "elements": [ | ||||
|     { | ||||
|       "uid": "Site_A", | ||||
|       "type": "Transceiver", | ||||
|       "metadata": { | ||||
|         "location": { | ||||
|           "city": "Site A", | ||||
|           "region": "", | ||||
|           "latitude": 0, | ||||
|           "longitude": 0 | ||||
|         } | ||||
|  | ||||
|     ], | ||||
|     "connections": [{ | ||||
|             "from_node": "Site_A", | ||||
|             "to_node": "Span1" | ||||
|         }, | ||||
|         { | ||||
|             "from_node": "Span1", | ||||
|             "to_node": "Edfa1" | ||||
|         }, | ||||
|         { | ||||
|             "from_node": "Edfa1", | ||||
|             "to_node": "Site_B" | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "uid": "Span1", | ||||
|       "type": "Fiber", | ||||
|       "type_variety": "SSMF", | ||||
|       "params": { | ||||
|         "length": 80, | ||||
|         "loss_coef": 0.2, | ||||
|         "length_units": "km", | ||||
|         "att_in": 0, | ||||
|         "con_in": 0.5, | ||||
|         "con_out": 0.5 | ||||
|       }, | ||||
|       "metadata": { | ||||
|         "location": { | ||||
|           "region": "", | ||||
|           "latitude": 1, | ||||
|           "longitude": 0 | ||||
|         } | ||||
|  | ||||
|     ] | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "uid": "Edfa1", | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_low_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 17, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
|       }, | ||||
|       "metadata": { | ||||
|         "location": { | ||||
|           "region": "", | ||||
|           "latitude": 2, | ||||
|           "longitude": 0 | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "uid": "Site_B", | ||||
|       "type": "Transceiver", | ||||
|       "metadata": { | ||||
|         "location": { | ||||
|           "city": "Site B", | ||||
|           "region": "", | ||||
|           "latitude": 2, | ||||
|           "longitude": 0 | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   ], | ||||
|   "connections": [ | ||||
|     { | ||||
|       "from_node": "Site_A", | ||||
|       "to_node": "Span1" | ||||
|     }, | ||||
|     { | ||||
|       "from_node": "Span1", | ||||
|       "to_node": "Edfa1" | ||||
|     }, | ||||
|     { | ||||
|       "from_node": "Edfa1", | ||||
|       "to_node": "Site_B" | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,323 +1,443 @@ | ||||
| {     "Edfa":[{ | ||||
|             "type_variety": "high_detail_model_example", | ||||
|             "type_def": "advanced_model", | ||||
|             "gain_flatmax": 25, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "advanced_config_from_json": "std_medium_gain_advanced_config.json", | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": false | ||||
|             },                  { | ||||
|             "type_variety": "Juniper_BoosterHG", | ||||
|             "type_def": "advanced_model", | ||||
|             "gain_flatmax": 25, | ||||
|             "gain_min": 10, | ||||
|             "p_max": 21, | ||||
|             "advanced_config_from_json": "Juniper-BoosterHG.json", | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": false | ||||
|             },  | ||||
|             { | ||||
|             "type_variety": "operator_model_example", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 26, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 23, | ||||
|             "nf_min": 6, | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": false            | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "openroadm_ila_low_noise", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-8.104e-4,-6.221e-2,-5.889e-1,37.62], | ||||
|             "allowed_for_design": false | ||||
|             },           | ||||
|             { | ||||
|             "type_variety": "openroadm_ila_standard", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,28.99], | ||||
|             "allowed_for_design": false | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "openroadm_mw_mw_preamp", | ||||
|             "type_def": "openroadm_preamp", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "allowed_for_design": false | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "openroadm_mw_mw_preamp_typical_ver5", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,28.99], | ||||
|             "allowed_for_design": false | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "openroadm_mw_mw_preamp_worstcase_ver5", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4,-6.250e-2,-1.071,27.99], | ||||
|             "allowed_for_design": false | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "openroadm_mw_mw_booster", | ||||
|             "type_def": "openroadm_booster", | ||||
|             "gain_flatmax": 32, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "allowed_for_design": false | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "std_high_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 35, | ||||
|             "gain_min": 25, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 5.5, | ||||
|             "nf_max": 7, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             },             | ||||
|             { | ||||
|             "type_variety": "std_medium_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 26, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 23, | ||||
|             "nf_min": 6, | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "std_low_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 16, | ||||
|             "gain_min": 8, | ||||
|             "p_max": 23, | ||||
|             "nf_min": 6.5, | ||||
|             "nf_max": 11, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "high_power", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 16, | ||||
|             "gain_min": 8, | ||||
|             "p_max": 25, | ||||
|             "nf_min": 9, | ||||
|             "nf_max": 15, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": false | ||||
|             },             | ||||
|             { | ||||
|             "type_variety": "std_fixed_gain", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
|             "gain_min": 20, | ||||
|             "p_max": 21, | ||||
|             "nf0": 5.5, | ||||
|             "allowed_for_design": false | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "4pumps_raman", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 12, | ||||
|             "gain_min": 12, | ||||
|             "p_max": 21, | ||||
|             "nf0": -1, | ||||
|             "allowed_for_design": false | ||||
|             },    | ||||
|             { | ||||
|             "type_variety": "hybrid_4pumps_lowgain", | ||||
|             "type_def": "dual_stage", | ||||
|             "raman": true, | ||||
|             "gain_min": 25, | ||||
|             "preamp_variety": "4pumps_raman", | ||||
|             "booster_variety": "std_low_gain", | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "hybrid_4pumps_mediumgain", | ||||
|             "type_def": "dual_stage", | ||||
|             "raman": true, | ||||
|             "gain_min": 25, | ||||
|             "preamp_variety": "4pumps_raman", | ||||
|             "booster_variety": "std_medium_gain", | ||||
|             "allowed_for_design": true | ||||
|             },             | ||||
|             { | ||||
|             "type_variety": "medium+low_gain", | ||||
|             "type_def": "dual_stage", | ||||
|             "gain_min": 25, | ||||
|             "preamp_variety": "std_medium_gain", | ||||
|             "booster_variety": "std_low_gain", | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "medium+high_power", | ||||
|             "type_def": "dual_stage", | ||||
|             "gain_min": 25, | ||||
|             "preamp_variety": "std_medium_gain", | ||||
|             "booster_variety": "high_power", | ||||
|             "allowed_for_design": false | ||||
|             }                                   | ||||
| { | ||||
|   "Edfa": [ | ||||
|     { | ||||
|       "type_variety": "high_detail_model_example", | ||||
|       "type_def": "advanced_model", | ||||
|       "gain_flatmax": 25, | ||||
|       "gain_min": 15, | ||||
|       "p_max": 21, | ||||
|       "advanced_config_from_json": "std_medium_gain_advanced_config.json", | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "Juniper_BoosterHG", | ||||
|       "type_def": "advanced_model", | ||||
|       "gain_flatmax": 25, | ||||
|       "gain_min": 10, | ||||
|       "p_max": 21, | ||||
|       "advanced_config_from_json": "Juniper-BoosterHG.json", | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "operator_model_example", | ||||
|       "type_def": "variable_gain", | ||||
|       "gain_flatmax": 26, | ||||
|       "gain_min": 15, | ||||
|       "p_max": 23, | ||||
|       "nf_min": 6, | ||||
|       "nf_max": 10, | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_ila_low_noise", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -8.104e-4, | ||||
|         -6.221e-2, | ||||
|         -5.889e-1, | ||||
|         37.62 | ||||
|       ], | ||||
|       "Fiber":[{ | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "NZDF", | ||||
|             "dispersion": 0.5e-05, | ||||
|             "effective_area": 72e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "LOF", | ||||
|             "dispersion": 2.2e-05, | ||||
|             "effective_area": 125e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|             } | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_ila_standard", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         28.99 | ||||
|       ], | ||||
|       "RamanFiber":[{ | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|             } | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_preamp", | ||||
|       "type_def": "openroadm_preamp", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_preamp_typical_ver5", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         28.99 | ||||
|       ], | ||||
|       "Span":[{ | ||||
|             "power_mode":true, | ||||
|             "delta_power_range_db": [-2,3,0.5], | ||||
|             "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|             "target_extended_gain": 2.5, | ||||
|             "max_length": 150, | ||||
|             "length_units": "km", | ||||
|             "max_loss": 28, | ||||
|             "padding": 10, | ||||
|             "EOL": 0, | ||||
|             "con_in": 0, | ||||
|             "con_out": 0 | ||||
|             } | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_preamp_worstcase_ver5", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         27.99 | ||||
|       ], | ||||
|       "Roadm":[{ | ||||
|             "target_pch_out_db": -20, | ||||
|             "add_drop_osnr": 38, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "restrictions": { | ||||
|                             "preamp_variety_list":[], | ||||
|                             "booster_variety_list":[] | ||||
|                             }             | ||||
|             }], | ||||
|       "SI":[{ | ||||
|             "f_min": 191.3e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "f_max":195.1e12, | ||||
|             "spacing": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "power_range_db": [0,0,1], | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40, | ||||
|             "sys_margins": 2 | ||||
|             }], | ||||
|       "Transceiver":[ | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_booster", | ||||
|       "type_def": "openroadm_booster", | ||||
|       "gain_flatmax": 32, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "std_high_gain", | ||||
|       "type_def": "variable_gain", | ||||
|       "gain_flatmax": 35, | ||||
|       "gain_min": 25, | ||||
|       "p_max": 21, | ||||
|       "nf_min": 5.5, | ||||
|       "nf_max": 7, | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "type_def": "variable_gain", | ||||
|       "gain_flatmax": 26, | ||||
|       "gain_min": 15, | ||||
|       "p_max": 23, | ||||
|       "nf_min": 6, | ||||
|       "nf_max": 10, | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "std_low_gain", | ||||
|       "type_def": "variable_gain", | ||||
|       "gain_flatmax": 16, | ||||
|       "gain_min": 8, | ||||
|       "p_max": 23, | ||||
|       "nf_min": 6.5, | ||||
|       "nf_max": 11, | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "high_power", | ||||
|       "type_def": "variable_gain", | ||||
|       "gain_flatmax": 16, | ||||
|       "gain_min": 8, | ||||
|       "p_max": 25, | ||||
|       "nf_min": 9, | ||||
|       "nf_max": 15, | ||||
|       "out_voa_auto": false, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "std_fixed_gain", | ||||
|       "type_def": "fixed_gain", | ||||
|       "gain_flatmax": 21, | ||||
|       "gain_min": 20, | ||||
|       "p_max": 21, | ||||
|       "nf0": 5.5, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "4pumps_raman", | ||||
|       "type_def": "fixed_gain", | ||||
|       "gain_flatmax": 12, | ||||
|       "gain_min": 12, | ||||
|       "p_max": 21, | ||||
|       "nf0": -1, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "hybrid_4pumps_lowgain", | ||||
|       "type_def": "dual_stage", | ||||
|       "raman": true, | ||||
|       "gain_min": 25, | ||||
|       "preamp_variety": "4pumps_raman", | ||||
|       "booster_variety": "std_low_gain", | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "hybrid_4pumps_mediumgain", | ||||
|       "type_def": "dual_stage", | ||||
|       "raman": true, | ||||
|       "gain_min": 25, | ||||
|       "preamp_variety": "4pumps_raman", | ||||
|       "booster_variety": "std_medium_gain", | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "medium+low_gain", | ||||
|       "type_def": "dual_stage", | ||||
|       "gain_min": 25, | ||||
|       "preamp_variety": "std_medium_gain", | ||||
|       "booster_variety": "std_low_gain", | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "medium+high_power", | ||||
|       "type_def": "dual_stage", | ||||
|       "gain_min": 25, | ||||
|       "preamp_variety": "std_medium_gain", | ||||
|       "booster_variety": "high_power", | ||||
|       "allowed_for_design": false | ||||
|     } | ||||
|   ], | ||||
|   "Fiber": [ | ||||
|     { | ||||
|       "type_variety": "SSMF", | ||||
|       "dispersion": 1.67e-05, | ||||
|       "effective_area": 83e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "NZDF", | ||||
|       "dispersion": 0.5e-05, | ||||
|       "effective_area": 72e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "LOF", | ||||
|       "dispersion": 2.2e-05, | ||||
|       "effective_area": 125e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     } | ||||
|   ], | ||||
|   "RamanFiber": [ | ||||
|     { | ||||
|       "type_variety": "SSMF", | ||||
|       "dispersion": 1.67e-05, | ||||
|       "effective_area": 83e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     } | ||||
|   ], | ||||
|   "Span": [ | ||||
|     { | ||||
|       "power_mode": true, | ||||
|       "delta_power_range_db": [ | ||||
|         -2, | ||||
|         3, | ||||
|         0.5 | ||||
|       ], | ||||
|       "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|       "target_extended_gain": 2.5, | ||||
|       "max_length": 150, | ||||
|       "length_units": "km", | ||||
|       "max_loss": 28, | ||||
|       "padding": 10, | ||||
|       "EOL": 0, | ||||
|       "con_in": 0, | ||||
|       "con_out": 0 | ||||
|     } | ||||
|   ], | ||||
|   "Roadm": [ | ||||
|     { | ||||
|       "target_pch_out_db": -20, | ||||
|       "add_drop_osnr": 38, | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "restrictions": { | ||||
|         "preamp_variety_list": [], | ||||
|         "booster_variety_list": [] | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "roadm_type_1", | ||||
|       "target_pch_out_db": -18, | ||||
|       "add_drop_osnr": 35, | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "restrictions": { | ||||
|         "preamp_variety_list": [], | ||||
|         "booster_variety_list": [] | ||||
|       }, | ||||
|       "roadm-path-impairments": [] | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "detailed_impairments", | ||||
|       "target_pch_out_db": -20, | ||||
|       "add_drop_osnr": 38, | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "restrictions": { | ||||
|         "preamp_variety_list": [], | ||||
|         "booster_variety_list": [] | ||||
|       }, | ||||
|       "roadm-path-impairments": [ | ||||
|         { | ||||
|           "roadm-path-impairments-id": 0, | ||||
|           "roadm-express-path": [ | ||||
|             { | ||||
|             "type_variety": "vendorA_trx-type1", | ||||
|             "frequency":{ | ||||
|                         "min": 191.35e12, | ||||
|                         "max": 196.1e12 | ||||
|                         }, | ||||
|             "mode":[ | ||||
|                        { | ||||
|  | ||||
|                        "format": "mode 1", | ||||
|                        "baud_rate": 32e9, | ||||
|                        "OSNR": 11, | ||||
|                        "bit_rate": 100e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 40, | ||||
|                        "min_spacing": 37.5e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 2", | ||||
|                        "baud_rate": 66e9, | ||||
|                        "OSNR": 15, | ||||
|                        "bit_rate": 200e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 40, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1 | ||||
|                        } | ||||
|                    ] | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "Voyager", | ||||
|             "frequency":{ | ||||
|                         "min": 191.35e12, | ||||
|                         "max": 196.1e12 | ||||
|                         }, | ||||
|             "mode":[ | ||||
|                        { | ||||
|                        "format": "mode 1", | ||||
|                        "baud_rate": 32e9, | ||||
|                        "OSNR": 12, | ||||
|                        "bit_rate": 100e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 40, | ||||
|                        "min_spacing": 37.5e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 3", | ||||
|                        "baud_rate": 44e9, | ||||
|                        "OSNR": 18, | ||||
|                        "bit_rate": 300e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 40, | ||||
|                        "min_spacing": 62.5e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 2", | ||||
|                        "baud_rate": 66e9, | ||||
|                        "OSNR": 21, | ||||
|                        "bit_rate": 400e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 40, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 4", | ||||
|                        "baud_rate": 66e9, | ||||
|                        "OSNR": 16, | ||||
|                        "bit_rate": 200e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 40, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1 | ||||
|                        } | ||||
|                    ] | ||||
|               "frequency-range": { | ||||
|                 "lower-frequency": 191.3e12, | ||||
|                 "upper-frequency": 196.1e12 | ||||
|               }, | ||||
|               "roadm-pmd": 0, | ||||
|               "roadm-cd": 0, | ||||
|               "roadm-pdl": 0, | ||||
|               "roadm-inband-crosstalk": 0, | ||||
|               "roadm-maxloss": 16.5 | ||||
|             } | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           "roadm-path-impairments-id": 1, | ||||
|           "roadm-add-path": [ | ||||
|             { | ||||
|               "frequency-range": { | ||||
|                 "lower-frequency": 191.3e12, | ||||
|                 "upper-frequency": 196.1e12 | ||||
|               }, | ||||
|               "roadm-pmd": 0, | ||||
|               "roadm-cd": 0, | ||||
|               "roadm-pdl": 0, | ||||
|               "roadm-inband-crosstalk": 0, | ||||
|               "roadm-maxloss": 11.5, | ||||
|               "roadm-pmax": 2.5, | ||||
|               "roadm-osnr": 41, | ||||
|               "roadm-noise-figure": 23 | ||||
|             } | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           "roadm-path-impairments-id": 2, | ||||
|           "roadm-drop-path": [ | ||||
|             { | ||||
|               "frequency-range": { | ||||
|                 "lower-frequency": 191.3e12, | ||||
|                 "upper-frequency": 196.1e12 | ||||
|               }, | ||||
|               "roadm-pmd": 0, | ||||
|               "roadm-cd": 0, | ||||
|               "roadm-pdl": 0, | ||||
|               "roadm-inband-crosstalk": 0, | ||||
|               "roadm-maxloss": 11.5, | ||||
|               "roadm-minloss": 7.5, | ||||
|               "roadm-typloss": 10, | ||||
|               "roadm-pmin": -13.5, | ||||
|               "roadm-pmax": -9.5, | ||||
|               "roadm-ptyp": -12, | ||||
|               "roadm-osnr": 41, | ||||
|               "roadm-noise-figure": 15 | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|  | ||||
|     } | ||||
|   ], | ||||
|   "SI": [ | ||||
|     { | ||||
|       "f_min": 191.3e12, | ||||
|       "baud_rate": 32e9, | ||||
|       "f_max": 195.1e12, | ||||
|       "spacing": 50e9, | ||||
|       "power_dbm": 0, | ||||
|       "power_range_db": [ | ||||
|         0, | ||||
|         0, | ||||
|         1 | ||||
|       ], | ||||
|       "tx_power_dbm": 0, | ||||
|       "roll_off": 0.15, | ||||
|       "tx_osnr": 40, | ||||
|       "sys_margins": 2 | ||||
|     } | ||||
|   ], | ||||
|   "Transceiver": [ | ||||
|     { | ||||
|       "type_variety": "vendorA_trx-type1", | ||||
|       "frequency": { | ||||
|         "min": 191.35e12, | ||||
|         "max": 196.1e12 | ||||
|       }, | ||||
|       "mode": [ | ||||
|         { | ||||
|           "format": "mode 1", | ||||
|           "baud_rate": 32e9, | ||||
|           "OSNR": 11, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 40, | ||||
|           "min_spacing": 37.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "mode 2", | ||||
|           "baud_rate": 66e9, | ||||
|           "OSNR": 15, | ||||
|           "bit_rate": 200e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 40, | ||||
|           "min_spacing": 75e9, | ||||
|           "cost": 1 | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "Voyager", | ||||
|       "frequency": { | ||||
|         "min": 191.35e12, | ||||
|         "max": 196.1e12 | ||||
|       }, | ||||
|       "mode": [ | ||||
|         { | ||||
|           "format": "mode 1", | ||||
|           "baud_rate": 32e9, | ||||
|           "OSNR": 12, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 40, | ||||
|           "min_spacing": 37.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "mode 3", | ||||
|           "baud_rate": 44e9, | ||||
|           "OSNR": 18, | ||||
|           "bit_rate": 300e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 40, | ||||
|           "min_spacing": 62.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "mode 2", | ||||
|           "baud_rate": 66e9, | ||||
|           "OSNR": 21, | ||||
|           "bit_rate": 400e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 40, | ||||
|           "min_spacing": 75e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "mode 4", | ||||
|           "baud_rate": 66e9, | ||||
|           "OSNR": 16, | ||||
|           "bit_rate": 200e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 40, | ||||
|           "min_spacing": 75e9, | ||||
|           "cost": 1 | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,349 +1,371 @@ | ||||
| { | ||||
|     "Edfa": [ | ||||
|   "Edfa": [ | ||||
|     { | ||||
|       "type_variety": "openroadm_ila_low_noise", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -8.104e-4, | ||||
|         -6.221e-2, | ||||
|         -5.889e-1, | ||||
|         37.62 | ||||
|       ], | ||||
|       "pmd": 3e-12, | ||||
|       "pdl": 0.7, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_ila_standard", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         28.99 | ||||
|       ], | ||||
|       "pmd": 3e-12, | ||||
|       "pdl": 0.7, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_preamp", | ||||
|       "type_def": "openroadm_preamp", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_booster", | ||||
|       "type_def": "openroadm_booster", | ||||
|       "gain_flatmax": 32, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "allowed_for_design": false | ||||
|     } | ||||
|   ], | ||||
|   "Fiber": [ | ||||
|     { | ||||
|       "type_variety": "SSMF", | ||||
|       "dispersion": 1.67e-05, | ||||
|       "effective_area": 83e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "NZDF", | ||||
|       "dispersion": 0.5e-05, | ||||
|       "effective_area": 72e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "LOF", | ||||
|       "dispersion": 2.2e-05, | ||||
|       "effective_area": 125e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     } | ||||
|   ], | ||||
|   "RamanFiber": [ | ||||
|     { | ||||
|       "type_variety": "SSMF", | ||||
|       "dispersion": 1.67e-05, | ||||
|       "effective_area": 83e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     } | ||||
|   ], | ||||
|   "Span": [ | ||||
|     { | ||||
|       "power_mode": true, | ||||
|       "delta_power_range_db": [ | ||||
|         0, | ||||
|         0, | ||||
|         0 | ||||
|       ], | ||||
|       "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|       "target_extended_gain": 0, | ||||
|       "max_length": 135, | ||||
|       "length_units": "km", | ||||
|       "max_loss": 28, | ||||
|       "padding": 11, | ||||
|       "EOL": 0, | ||||
|       "con_in": 0, | ||||
|       "con_out": 0 | ||||
|     } | ||||
|   ], | ||||
|   "Roadm": [ | ||||
|     { | ||||
|       "target_pch_out_db": -20, | ||||
|       "add_drop_osnr": 30, | ||||
|       "pmd": 3e-12, | ||||
|       "pdl": 1.5, | ||||
|       "restrictions": { | ||||
|         "preamp_variety_list": [ | ||||
|           "openroadm_mw_mw_preamp" | ||||
|         ], | ||||
|         "booster_variety_list": [ | ||||
|           "openroadm_mw_mw_booster" | ||||
|         ] | ||||
|       } | ||||
|     } | ||||
|   ], | ||||
|   "SI": [ | ||||
|     { | ||||
|       "f_min": 191.3e12, | ||||
|       "baud_rate": 31.57e9, | ||||
|       "f_max": 196.1e12, | ||||
|       "spacing": 50e9, | ||||
|       "power_dbm": 2, | ||||
|       "power_range_db": [ | ||||
|         0, | ||||
|         0, | ||||
|         1 | ||||
|       ], | ||||
|       "roll_off": 0.15, | ||||
|       "tx_osnr": 35, | ||||
|       "sys_margins": 2 | ||||
|     } | ||||
|   ], | ||||
|   "Transceiver": [ | ||||
|     { | ||||
|       "type_variety": "OpenROADM MSA ver. 4.0", | ||||
|       "frequency": { | ||||
|         "min": 191.35e12, | ||||
|         "max": 196.1e12 | ||||
|       }, | ||||
|       "mode": [ | ||||
|         { | ||||
|             "type_variety": "openroadm_ila_low_noise", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-8.104e-4, -6.221e-2, -5.889e-1, 37.62], | ||||
|             "pmd": 3e-12, | ||||
|             "pdl": 0.7, | ||||
|             "allowed_for_design": true | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_ila_standard", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 28.99], | ||||
|             "pmd": 3e-12, | ||||
|             "pdl": 0.7, | ||||
|             "allowed_for_design": true | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_mw_mw_preamp", | ||||
|             "type_def": "openroadm_preamp", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "allowed_for_design": false | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_mw_mw_booster", | ||||
|             "type_def": "openroadm_booster", | ||||
|             "gain_flatmax": 32, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "allowed_for_design": false | ||||
|         } | ||||
|     ], | ||||
|     "Fiber": [ | ||||
|         { | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "NZDF", | ||||
|             "dispersion": 0.5e-05, | ||||
|             "effective_area": 72e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "LOF", | ||||
|             "dispersion": 2.2e-05, | ||||
|             "effective_area": 125e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         } | ||||
|     ], | ||||
|     "RamanFiber": [ | ||||
|         { | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         } | ||||
|     ], | ||||
|     "Span": [ | ||||
|         { | ||||
|             "power_mode": true, | ||||
|             "delta_power_range_db": [0, 0, 0], | ||||
|             "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|             "target_extended_gain": 0, | ||||
|             "max_length": 135, | ||||
|             "length_units": "km", | ||||
|             "max_loss": 28, | ||||
|             "padding": 11, | ||||
|             "EOL": 0, | ||||
|             "con_in": 0, | ||||
|             "con_out": 0 | ||||
|         } | ||||
|     ], | ||||
|     "Roadm": [ | ||||
|         { | ||||
|             "target_pch_out_db": -20, | ||||
|             "add_drop_osnr": 30, | ||||
|             "pmd": 3e-12, | ||||
|             "pdl": 1.5, | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": ["openroadm_mw_mw_preamp"], | ||||
|                 "booster_variety_list": ["openroadm_mw_mw_booster"] | ||||
|             } | ||||
|         } | ||||
|     ], | ||||
|     "SI": [ | ||||
|         { | ||||
|             "f_min": 191.3e12, | ||||
|             "baud_rate": 31.57e9, | ||||
|             "f_max": 196.1e12, | ||||
|             "spacing": 50e9, | ||||
|             "power_dbm": 2, | ||||
|             "power_range_db": [0, 0, 1], | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 35, | ||||
|             "sys_margins": 2 | ||||
|         } | ||||
|     ], | ||||
|     "Transceiver": [ | ||||
|         { | ||||
|             "type_variety": "OpenROADM MSA ver. 4.0", | ||||
|             "frequency": { | ||||
|                 "min": 191.35e12, | ||||
|                 "max": 196.1e12 | ||||
|           "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", | ||||
|           "baud_rate": 27.95e9, | ||||
|           "OSNR": 17, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": null, | ||||
|           "tx_osnr": 33, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             "mode": [ | ||||
|                 { | ||||
|                     "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", | ||||
|                     "baud_rate": 27.95e9, | ||||
|                     "OSNR": 17, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": null, | ||||
|                     "tx_osnr": 33, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 18e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 30, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 6, | ||||
|                             "penalty_value": 4 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", | ||||
|                     "baud_rate": 31.57e9, | ||||
|                     "OSNR": 12, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 35, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 40e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 30, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 6, | ||||
|                             "penalty_value": 4 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "200 Gbit/s, DP-QPSK", | ||||
|                     "baud_rate": 63.1e9, | ||||
|                     "OSNR": 17, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 24e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 25, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 87.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "300 Gbit/s, DP-8QAM", | ||||
|                     "baud_rate": 63.1e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 300e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 18e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 25, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 87.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "400 Gbit/s, DP-16QAM", | ||||
|                     "baud_rate": 63.1e9, | ||||
|                     "OSNR": 24, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 12e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 20, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 87.5e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|             { | ||||
|               "chromatic_dispersion": 18e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 30, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 6, | ||||
|               "penalty_value": 4 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 50e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", | ||||
|           "baud_rate": 31.57e9, | ||||
|           "OSNR": 12, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 35, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 40e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 30, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 6, | ||||
|               "penalty_value": 4 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 50e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "200 Gbit/s, DP-QPSK", | ||||
|           "baud_rate": 63.1e9, | ||||
|           "OSNR": 17, | ||||
|           "bit_rate": 200e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 24e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 25, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 87.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "300 Gbit/s, DP-8QAM", | ||||
|           "baud_rate": 63.1e9, | ||||
|           "OSNR": 21, | ||||
|           "bit_rate": 300e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 18e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 25, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 87.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "400 Gbit/s, DP-16QAM", | ||||
|           "baud_rate": 63.1e9, | ||||
|           "OSNR": 24, | ||||
|           "bit_rate": 400e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 12e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 20, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 87.5e9, | ||||
|           "cost": 1 | ||||
|         } | ||||
|     ] | ||||
|       ] | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,409 +1,441 @@ | ||||
| { | ||||
|     "Edfa": [ | ||||
|   "Edfa": [ | ||||
|     { | ||||
|       "type_variety": "openroadm_ila_low_noise", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -8.104e-4, | ||||
|         -6.221e-2, | ||||
|         -5.889e-1, | ||||
|         37.62 | ||||
|       ], | ||||
|       "pmd": 3e-12, | ||||
|       "pdl": 0.7, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_ila_standard", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         28.99 | ||||
|       ], | ||||
|       "pmd": 3e-12, | ||||
|       "pdl": 0.7, | ||||
|       "allowed_for_design": true | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_preamp_typical_ver5", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         28.99 | ||||
|       ], | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_preamp_worstcase_ver5", | ||||
|       "type_def": "openroadm", | ||||
|       "gain_flatmax": 27, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "nf_coef": [ | ||||
|         -5.952e-4, | ||||
|         -6.250e-2, | ||||
|         -1.071, | ||||
|         27.99 | ||||
|       ], | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "allowed_for_design": false | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "openroadm_mw_mw_booster", | ||||
|       "type_def": "openroadm_booster", | ||||
|       "gain_flatmax": 32, | ||||
|       "gain_min": 0, | ||||
|       "p_max": 22, | ||||
|       "pmd": 0, | ||||
|       "pdl": 0, | ||||
|       "allowed_for_design": false | ||||
|     } | ||||
|   ], | ||||
|   "Fiber": [ | ||||
|     { | ||||
|       "type_variety": "SSMF", | ||||
|       "dispersion": 1.67e-05, | ||||
|       "effective_area": 83e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "NZDF", | ||||
|       "dispersion": 0.5e-05, | ||||
|       "effective_area": 72e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     }, | ||||
|     { | ||||
|       "type_variety": "LOF", | ||||
|       "dispersion": 2.2e-05, | ||||
|       "effective_area": 125e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     } | ||||
|   ], | ||||
|   "RamanFiber": [ | ||||
|     { | ||||
|       "type_variety": "SSMF", | ||||
|       "dispersion": 1.67e-05, | ||||
|       "effective_area": 83e-12, | ||||
|       "pmd_coef": 1.265e-15 | ||||
|     } | ||||
|   ], | ||||
|   "Span": [ | ||||
|     { | ||||
|       "power_mode": true, | ||||
|       "delta_power_range_db": [ | ||||
|         0, | ||||
|         0, | ||||
|         0 | ||||
|       ], | ||||
|       "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|       "target_extended_gain": 0, | ||||
|       "max_length": 135, | ||||
|       "length_units": "km", | ||||
|       "max_loss": 28, | ||||
|       "padding": 11, | ||||
|       "EOL": 0, | ||||
|       "con_in": 0, | ||||
|       "con_out": 0 | ||||
|     } | ||||
|   ], | ||||
|   "Roadm": [ | ||||
|     { | ||||
|       "target_pch_out_db": -20, | ||||
|       "add_drop_osnr": 33, | ||||
|       "pmd": 3e-12, | ||||
|       "pdl": 1.5, | ||||
|       "restrictions": { | ||||
|         "preamp_variety_list": [ | ||||
|           "openroadm_mw_mw_preamp_worstcase_ver5" | ||||
|         ], | ||||
|         "booster_variety_list": [ | ||||
|           "openroadm_mw_mw_booster" | ||||
|         ] | ||||
|       } | ||||
|     } | ||||
|   ], | ||||
|   "SI": [ | ||||
|     { | ||||
|       "f_min": 191.3e12, | ||||
|       "baud_rate": 31.57e9, | ||||
|       "f_max": 196.1e12, | ||||
|       "spacing": 50e9, | ||||
|       "power_dbm": 2, | ||||
|       "power_range_db": [ | ||||
|         0, | ||||
|         0, | ||||
|         1 | ||||
|       ], | ||||
|       "roll_off": 0.15, | ||||
|       "tx_osnr": 35, | ||||
|       "sys_margins": 2 | ||||
|     } | ||||
|   ], | ||||
|   "Transceiver": [ | ||||
|     { | ||||
|       "type_variety": "OpenROADM MSA ver. 5.0", | ||||
|       "frequency": { | ||||
|         "min": 191.35e12, | ||||
|         "max": 196.1e12 | ||||
|       }, | ||||
|       "mode": [ | ||||
|         { | ||||
|             "type_variety": "openroadm_ila_low_noise", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-8.104e-4, -6.221e-2, -5.889e-1, 37.62], | ||||
|             "pmd": 3e-12, | ||||
|             "pdl": 0.7, | ||||
|             "allowed_for_design": true | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_ila_standard", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 28.99], | ||||
|             "pmd": 3e-12, | ||||
|             "pdl": 0.7, | ||||
|             "allowed_for_design": true | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_mw_mw_preamp_typical_ver5", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 28.99], | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "allowed_for_design": false | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_mw_mw_preamp_worstcase_ver5", | ||||
|             "type_def": "openroadm", | ||||
|             "gain_flatmax": 27, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "nf_coef": [-5.952e-4, -6.250e-2, -1.071, 27.99], | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "allowed_for_design": false | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "openroadm_mw_mw_booster", | ||||
|             "type_def": "openroadm_booster", | ||||
|             "gain_flatmax": 32, | ||||
|             "gain_min": 0, | ||||
|             "p_max": 22, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "allowed_for_design": false | ||||
|         } | ||||
|     ], | ||||
|     "Fiber": [ | ||||
|         { | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "NZDF", | ||||
|             "dispersion": 0.5e-05, | ||||
|             "effective_area": 72e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         }, | ||||
|         { | ||||
|             "type_variety": "LOF", | ||||
|             "dispersion": 2.2e-05, | ||||
|             "effective_area": 125e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         } | ||||
|     ], | ||||
|     "RamanFiber": [ | ||||
|         { | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         } | ||||
|     ], | ||||
|     "Span": [ | ||||
|         { | ||||
|             "power_mode": true, | ||||
|             "delta_power_range_db": [0, 0, 0], | ||||
|             "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|             "target_extended_gain": 0, | ||||
|             "max_length": 135, | ||||
|             "length_units": "km", | ||||
|             "max_loss": 28, | ||||
|             "padding": 11, | ||||
|             "EOL": 0, | ||||
|             "con_in": 0, | ||||
|             "con_out": 0 | ||||
|         } | ||||
|     ], | ||||
|     "Roadm": [ | ||||
|         { | ||||
|             "target_pch_out_db": -20, | ||||
|             "add_drop_osnr": 33, | ||||
|             "pmd": 3e-12, | ||||
|             "pdl": 1.5, | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": ["openroadm_mw_mw_preamp_worstcase_ver5"], | ||||
|                 "booster_variety_list": ["openroadm_mw_mw_booster"] | ||||
|             } | ||||
|         } | ||||
|     ], | ||||
|     "SI": [ | ||||
|         { | ||||
|             "f_min": 191.3e12, | ||||
|             "baud_rate": 31.57e9, | ||||
|             "f_max": 196.1e12, | ||||
|             "spacing": 50e9, | ||||
|             "power_dbm": 2, | ||||
|             "power_range_db": [0, 0, 1], | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 35, | ||||
|             "sys_margins": 2 | ||||
|         } | ||||
|     ], | ||||
|     "Transceiver": [ | ||||
|         { | ||||
|             "type_variety": "OpenROADM MSA ver. 5.0", | ||||
|             "frequency": { | ||||
|                 "min": 191.35e12, | ||||
|                 "max": 196.1e12 | ||||
|           "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", | ||||
|           "baud_rate": 27.95e9, | ||||
|           "OSNR": 17, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": null, | ||||
|           "tx_osnr": 33, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             "mode": [ | ||||
|                 { | ||||
|                     "format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK", | ||||
|                     "baud_rate": 27.95e9, | ||||
|                     "OSNR": 17, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": null, | ||||
|                     "tx_osnr": 33, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 18e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 30, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 6, | ||||
|                             "penalty_value": 4 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", | ||||
|                     "baud_rate": 31.57e9, | ||||
|                     "OSNR": 12, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 48e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 30, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 6, | ||||
|                             "penalty_value": 4 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "200 Gbit/s, 31.57 Gbaud, DP-16QAM", | ||||
|                     "baud_rate": 31.57e9, | ||||
|                     "OSNR": 20.5, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 24e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 30, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 6, | ||||
|                             "penalty_value": 4 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "200 Gbit/s, DP-QPSK", | ||||
|                     "baud_rate": 63.1e9, | ||||
|                     "OSNR": 17, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 24e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 25, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 87.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "300 Gbit/s, DP-8QAM", | ||||
|                     "baud_rate": 63.1e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 300e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 18e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 25, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 87.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, | ||||
|                 { | ||||
|                     "format": "400 Gbit/s, DP-16QAM", | ||||
|                     "baud_rate": 63.1e9, | ||||
|                     "OSNR": 24, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 36, | ||||
|                     "penalties": [ | ||||
|                         { | ||||
|                             "chromatic_dispersion": -1e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 4e3, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "chromatic_dispersion": 12e3, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 10, | ||||
|                             "penalty_value": 0 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pmd": 20, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 1, | ||||
|                             "penalty_value": 0.5 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 2, | ||||
|                             "penalty_value": 1 | ||||
|                         }, | ||||
|                         { | ||||
|                             "pdl": 4, | ||||
|                             "penalty_value": 2.5 | ||||
|                         } | ||||
|                     ], | ||||
|                     "min_spacing": 87.5e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|             { | ||||
|               "chromatic_dispersion": 18e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 30, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 6, | ||||
|               "penalty_value": 4 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 50e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "100 Gbit/s, 31.57 Gbaud, DP-QPSK", | ||||
|           "baud_rate": 31.57e9, | ||||
|           "OSNR": 12, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 48e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 30, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 6, | ||||
|               "penalty_value": 4 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 50e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "200 Gbit/s, 31.57 Gbaud, DP-16QAM", | ||||
|           "baud_rate": 31.57e9, | ||||
|           "OSNR": 20.5, | ||||
|           "bit_rate": 100e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 24e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 30, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 6, | ||||
|               "penalty_value": 4 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 50e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "200 Gbit/s, DP-QPSK", | ||||
|           "baud_rate": 63.1e9, | ||||
|           "OSNR": 17, | ||||
|           "bit_rate": 200e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 24e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 25, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 87.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "300 Gbit/s, DP-8QAM", | ||||
|           "baud_rate": 63.1e9, | ||||
|           "OSNR": 21, | ||||
|           "bit_rate": 300e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 18e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 25, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 87.5e9, | ||||
|           "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|           "format": "400 Gbit/s, DP-16QAM", | ||||
|           "baud_rate": 63.1e9, | ||||
|           "OSNR": 24, | ||||
|           "bit_rate": 400e9, | ||||
|           "roll_off": 0.15, | ||||
|           "tx_osnr": 36, | ||||
|           "penalties": [ | ||||
|             { | ||||
|               "chromatic_dispersion": -1e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 4e3, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "chromatic_dispersion": 12e3, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 10, | ||||
|               "penalty_value": 0 | ||||
|             }, | ||||
|             { | ||||
|               "pmd": 20, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 1, | ||||
|               "penalty_value": 0.5 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 2, | ||||
|               "penalty_value": 1 | ||||
|             }, | ||||
|             { | ||||
|               "pdl": 4, | ||||
|               "penalty_value": 2.5 | ||||
|             } | ||||
|           ], | ||||
|           "min_spacing": 87.5e9, | ||||
|           "cost": 1 | ||||
|         } | ||||
|     ] | ||||
|       ] | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,12 +1,12 @@ | ||||
| { | ||||
|       "spectrum":[ | ||||
|             { | ||||
|             "f_min": 191.35e12, | ||||
|             "f_max": 195.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40 | ||||
|             } | ||||
|       ] | ||||
|   "spectrum": [ | ||||
|     { | ||||
|       "f_min": 191.35e12, | ||||
|       "f_max": 195.1e12, | ||||
|       "baud_rate": 32e9, | ||||
|       "slot_width": 50e9, | ||||
|       "roll_off": 0.15, | ||||
|       "tx_osnr": 40 | ||||
|     } | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -1,23 +1,23 @@ | ||||
| { | ||||
|       "spectrum":[ | ||||
|             { | ||||
|             "f_min": 191.4e12, | ||||
|             "f_max":193.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "delta_pdb": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40, | ||||
|             "label": "mode_1" | ||||
|             }, | ||||
|             { | ||||
|             "f_min": 193.1625e12, | ||||
|             "f_max":195e12, | ||||
|             "baud_rate": 64e9, | ||||
|             "slot_width": 75e9, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40, | ||||
|             "label": "mode_2" | ||||
|             } | ||||
|       ] | ||||
|   "spectrum": [ | ||||
|     { | ||||
|       "f_min": 191.4e12, | ||||
|       "f_max": 193.1e12, | ||||
|       "baud_rate": 32e9, | ||||
|       "slot_width": 50e9, | ||||
|       "delta_pdb": 0, | ||||
|       "roll_off": 0.15, | ||||
|       "tx_osnr": 40, | ||||
|       "label": "mode_1" | ||||
|     }, | ||||
|     { | ||||
|       "f_min": 193.1625e12, | ||||
|       "f_max": 195e12, | ||||
|       "baud_rate": 64e9, | ||||
|       "slot_width": 75e9, | ||||
|       "roll_off": 0.15, | ||||
|       "tx_osnr": 40, | ||||
|       "label": "mode_2" | ||||
|     } | ||||
|   ] | ||||
| } | ||||
| @@ -8,6 +8,12 @@ | ||||
|     "method": "ggn_spectrally_separated", | ||||
|     "dispersion_tolerance": 1, | ||||
|     "phase_shift_tolerance": 0.1, | ||||
|     "computed_channels": [1, 18, 37, 56, 75] | ||||
|     "computed_channels": [ | ||||
|       1, | ||||
|       18, | ||||
|       37, | ||||
|       56, | ||||
|       75 | ||||
|     ] | ||||
|   } | ||||
| } | ||||
| @@ -1,304 +1,304 @@ | ||||
| { | ||||
|     "nf_fit_coeff": [ | ||||
|         0.000168241, | ||||
|         0.0469961, | ||||
|         0.0359549, | ||||
|         5.82851 | ||||
|     ], | ||||
|     "f_min": 191.35e12, | ||||
|     "f_max": 196.1e12, | ||||
|     "nf_ripple": [ | ||||
|         0.4372876328262819, | ||||
|         0.4372876328262819, | ||||
|         0.41270842850729195, | ||||
|         0.38814205928193013, | ||||
|         0.36358851509924695, | ||||
|         0.3390191214858807, | ||||
|         0.30474360397422756, | ||||
|         0.27048596623174515, | ||||
|         0.23624619427167134, | ||||
|         0.202035284929368, | ||||
|         0.1694483010211072, | ||||
|         0.13687829834471027, | ||||
|         0.1043252636301016, | ||||
|         0.07184040799914815, | ||||
|         0.061288823415841555, | ||||
|         0.050742731588695494, | ||||
|         0.04020212822983975, | ||||
|         0.029667009055877668, | ||||
|         0.01913736978785662, | ||||
|         0.00861320615127981, | ||||
|         -0.010157321677553965, | ||||
|         -0.028982516728038848, | ||||
|         -0.04779792991567815, | ||||
|         -0.06660356886269536, | ||||
|         -0.06256260169582961, | ||||
|         -0.05832916277634124, | ||||
|         -0.05409792133358102, | ||||
|         -0.04990610405914272, | ||||
|         -0.05078533294804249, | ||||
|         -0.05166410580536087, | ||||
|         -0.05254242298580185, | ||||
|         -0.05342028484370278, | ||||
|         -0.051742390657545205, | ||||
|         -0.050039429413028365, | ||||
|         -0.048337350303318156, | ||||
|         -0.04663615264317309, | ||||
|         -0.04493583574805963, | ||||
|         -0.043236398934156144, | ||||
|         -0.035622012697103154, | ||||
|         -0.027999803010447587, | ||||
|         -0.02038153550619876, | ||||
|         -0.012779471908040341, | ||||
|         -0.006436207679519103, | ||||
|         -9.622162373026585e-05, | ||||
|         0.006240488799898697, | ||||
|         0.012573926129294415, | ||||
|         0.021418708618354456, | ||||
|         0.030289222542492025, | ||||
|         0.03915515813685565, | ||||
|         0.047899419704645264, | ||||
|         0.04256372893215024, | ||||
|         0.03723078993416436, | ||||
|         0.03190060058247842, | ||||
|         0.02657315875107553, | ||||
|         0.021248462316134083, | ||||
|         0.01605877647020772, | ||||
|         0.02326948274513522, | ||||
|         0.03047647598902483, | ||||
|         0.037679759069084225, | ||||
|         0.044883315610536455, | ||||
|         0.052470799141237305, | ||||
|         0.06005437964543287, | ||||
|         0.0676340601339394, | ||||
|         0.07521193198077789, | ||||
|         0.08415906712621996, | ||||
|         0.09310160456603413, | ||||
|         0.1020395478432815, | ||||
|         0.11079585523492333, | ||||
|         0.1018180306253394, | ||||
|         0.09284481475528361, | ||||
|         0.0838762040768461, | ||||
|         0.07482015390297145, | ||||
|         0.05670549786742816, | ||||
|         0.03860013139908377, | ||||
|         0.020504047353947653, | ||||
|         0.0024172385953583004, | ||||
|         -0.015660302006048, | ||||
|         -0.03372858157230583, | ||||
|         -0.07037375788020579, | ||||
|         -0.10709599992470213, | ||||
|         -0.14379944379052215, | ||||
|         -0.18048410390821285, | ||||
|         -0.20911178784023846, | ||||
|         -0.23772399031437283, | ||||
|         -0.26632156113294336, | ||||
|         -0.2949045115165272, | ||||
|         -0.30206775396360075, | ||||
|         -0.30915729645781326, | ||||
|         -0.31624321721895354, | ||||
|         -0.3233255190215882, | ||||
|         -0.32037911876162584, | ||||
|         -0.3172854168606314, | ||||
|         -0.31419329378173544, | ||||
|         -0.31110274831665313, | ||||
|         -0.3110761646066259, | ||||
|         -0.3110761646066259 | ||||
|     ], | ||||
|     "dgt": [ | ||||
|         1.0, | ||||
|         1.017807767853702, | ||||
|         1.0356155337864215, | ||||
|         1.0534217504465226, | ||||
|         1.0712204022764056, | ||||
|         1.0895983485572227, | ||||
|         1.108555289615659, | ||||
|         1.1280891949729075, | ||||
|         1.1476135933863398, | ||||
|         1.1672278304018044, | ||||
|         1.1869318618366975, | ||||
|         1.2067249615595257, | ||||
|         1.2264996957264114, | ||||
|         1.2428104897182262, | ||||
|         1.2556591482982988, | ||||
|         1.2650555289898042, | ||||
|         1.2744470198196236, | ||||
|         1.2838336236692311, | ||||
|         1.2932153453410835, | ||||
|         1.3040618749785347, | ||||
|         1.316383926863083, | ||||
|         1.3301807335621048, | ||||
|         1.3439818461440451, | ||||
|         1.3598972673004606, | ||||
|         1.3779439775587023, | ||||
|         1.3981208704326855, | ||||
|         1.418273806730323, | ||||
|         1.4340878115214444, | ||||
|         1.445565137158368, | ||||
|         1.45273959485914, | ||||
|         1.4599103316162523, | ||||
|         1.4670307626366115, | ||||
|         1.474100442252211, | ||||
|         1.48111939735681, | ||||
|         1.488134243479226, | ||||
|         1.495145456062699, | ||||
|         1.502153039909686, | ||||
|         1.5097346239790443, | ||||
|         1.5178910621476225, | ||||
|         1.5266220576235803, | ||||
|         1.5353620432989845, | ||||
|         1.545374152761467, | ||||
|         1.5566577309558969, | ||||
|         1.569199764184379, | ||||
|         1.5817353179379183, | ||||
|         1.5986915141218316, | ||||
|         1.6201194134191075, | ||||
|         1.6460167077689267, | ||||
|         1.6719047669939942, | ||||
|         1.6918150918099673, | ||||
|         1.7057507692361864, | ||||
|         1.7137640932265894, | ||||
|         1.7217732861435076, | ||||
|         1.7297783508684146, | ||||
|         1.737780757913635, | ||||
|         1.7459181197626403, | ||||
|         1.7541903672600494, | ||||
|         1.7625959636196327, | ||||
|         1.7709972329654864, | ||||
|         1.7793941781790852, | ||||
|         1.7877868031023945, | ||||
|         1.7961751115773796, | ||||
|         1.8045606557581335, | ||||
|         1.8139629377087627, | ||||
|         1.824381436842932, | ||||
|         1.835814081380705, | ||||
|         1.847275503201129, | ||||
|         1.862235672444246, | ||||
|         1.8806927939516411, | ||||
|         1.9026104247588487, | ||||
|         1.9245345552113182, | ||||
|         1.9482128147680253, | ||||
|         1.9736443063300082, | ||||
|         2.0008103857988204, | ||||
|         2.0279625371819305, | ||||
|         2.055100772005235, | ||||
|         2.082225099873648, | ||||
|         2.1183028432496016, | ||||
|         2.16337565384239, | ||||
|         2.2174389328192197, | ||||
|         2.271520771371253, | ||||
|         2.322373696229342, | ||||
|         2.3699990328716107, | ||||
|         2.414398437185221, | ||||
|         2.4587748041127506, | ||||
|         2.499446286796604, | ||||
|         2.5364027376452056, | ||||
|         2.5696460593920065, | ||||
|         2.602860350286428, | ||||
|         2.630396440815385, | ||||
|         2.6521732021128046, | ||||
|         2.6681935771243177, | ||||
|         2.6841217449620203, | ||||
|         2.6947834587664494, | ||||
|         2.705443819238505, | ||||
|         2.714526681131686 | ||||
|     ], | ||||
|     "gain_ripple": [ | ||||
|         0.07704745697916238, | ||||
|         0.06479749697916048, | ||||
|         0.05257029697916238, | ||||
|         0.040326236979161934, | ||||
|         0.028098946979159933, | ||||
|         0.01393231697916164, | ||||
|         -0.0021726530208390216, | ||||
|         -0.01819858302084043, | ||||
|         -0.03218106302083967, | ||||
|         -0.042428283020839785, | ||||
|         -0.05095282302083959, | ||||
|         -0.05947139302083926, | ||||
|         -0.06968090302083851, | ||||
|         -0.07844600302084004, | ||||
|         -0.08407607302083875, | ||||
|         -0.0865687230208394, | ||||
|         -0.08906007302083907, | ||||
|         -0.0913487130208388, | ||||
|         -0.09343261302083761, | ||||
|         -0.09717347302083823, | ||||
|         -0.1027863830208382, | ||||
|         -0.11089282302084058, | ||||
|         -0.11963431302083904, | ||||
|         -0.1279646530208396, | ||||
|         -0.13525493302083902, | ||||
|         -0.1409032730208395, | ||||
|         -0.14591937302083835, | ||||
|         -0.14823350302084037, | ||||
|         -0.1484450830208388, | ||||
|         -0.1455411330208385, | ||||
|         -0.14160178302083892, | ||||
|         -0.1353792530208402, | ||||
|         -0.12789859302083784, | ||||
|         -0.11916081302083725, | ||||
|         -0.11041488302083735, | ||||
|         -0.10103437302083762, | ||||
|         -0.09101254302083817, | ||||
|         -0.07868024302083754, | ||||
|         -0.06468462302083822, | ||||
|         -0.051112303020840244, | ||||
|         -0.039618433020837784, | ||||
|         -0.028748483020837767, | ||||
|         -0.016475303020840215, | ||||
|         -0.006936193020838033, | ||||
|         -0.0015763130208377163, | ||||
|         0.0007104669791608842, | ||||
|         0.0040435869791615175, | ||||
|         0.006965146979162284, | ||||
|         0.00842583697916055, | ||||
|         0.00874012697916271, | ||||
|         0.00936596697916059, | ||||
|         0.01030063697916006, | ||||
|         0.011234826979162449, | ||||
|         0.013321846979160057, | ||||
|         0.01659282697915998, | ||||
|         0.023488786979161347, | ||||
|         0.03285456697916089, | ||||
|         0.04072968697916224, | ||||
|         0.04467697697916151, | ||||
|         0.04551704697916037, | ||||
|         0.04717897697916129, | ||||
|         0.04946107697915991, | ||||
|         0.05154489697916276, | ||||
|         0.05447361697916264, | ||||
|         0.05848224697916038, | ||||
|         0.06916723697916183, | ||||
|         0.08548825697916129, | ||||
|         0.10802383697916085, | ||||
|         0.13114358697916018, | ||||
|         0.15216302697916007, | ||||
|         0.17037189697916233, | ||||
|         0.1767381569791624, | ||||
|         0.1739275269791598, | ||||
|         0.15945681697916214, | ||||
|         0.14239527697916188, | ||||
|         0.12276252697916235, | ||||
|         0.10313984697916112, | ||||
|         0.08731066697916035, | ||||
|         0.07533675697916209, | ||||
|         0.07114372697916238, | ||||
|         0.07094413697916124, | ||||
|         0.07091459697916136, | ||||
|         0.0670723869791594, | ||||
|         0.054956336979159914, | ||||
|         0.038328296979159404, | ||||
|         0.017572956979162058, | ||||
|         -0.0028138630208403015, | ||||
|         -0.016792253020838643, | ||||
|         -0.0246928330208398, | ||||
|         -0.018326963020840026, | ||||
|         -0.0036199830208403228, | ||||
|         0.02602813697916062, | ||||
|         0.06245819697916133, | ||||
|         0.09542181697916163, | ||||
|         0.11822862697916037, | ||||
|         0.1359703369791596 | ||||
|     ] | ||||
|   "nf_fit_coeff": [ | ||||
|     0.000168241, | ||||
|     0.0469961, | ||||
|     0.0359549, | ||||
|     5.82851 | ||||
|   ], | ||||
|   "f_min": 191.35e12, | ||||
|   "f_max": 196.1e12, | ||||
|   "nf_ripple": [ | ||||
|     0.4372876328262819, | ||||
|     0.4372876328262819, | ||||
|     0.41270842850729195, | ||||
|     0.38814205928193013, | ||||
|     0.36358851509924695, | ||||
|     0.3390191214858807, | ||||
|     0.30474360397422756, | ||||
|     0.27048596623174515, | ||||
|     0.23624619427167134, | ||||
|     0.202035284929368, | ||||
|     0.1694483010211072, | ||||
|     0.13687829834471027, | ||||
|     0.1043252636301016, | ||||
|     0.07184040799914815, | ||||
|     0.061288823415841555, | ||||
|     0.050742731588695494, | ||||
|     0.04020212822983975, | ||||
|     0.029667009055877668, | ||||
|     0.01913736978785662, | ||||
|     0.00861320615127981, | ||||
|     -0.010157321677553965, | ||||
|     -0.028982516728038848, | ||||
|     -0.04779792991567815, | ||||
|     -0.06660356886269536, | ||||
|     -0.06256260169582961, | ||||
|     -0.05832916277634124, | ||||
|     -0.05409792133358102, | ||||
|     -0.04990610405914272, | ||||
|     -0.05078533294804249, | ||||
|     -0.05166410580536087, | ||||
|     -0.05254242298580185, | ||||
|     -0.05342028484370278, | ||||
|     -0.051742390657545205, | ||||
|     -0.050039429413028365, | ||||
|     -0.048337350303318156, | ||||
|     -0.04663615264317309, | ||||
|     -0.04493583574805963, | ||||
|     -0.043236398934156144, | ||||
|     -0.035622012697103154, | ||||
|     -0.027999803010447587, | ||||
|     -0.02038153550619876, | ||||
|     -0.012779471908040341, | ||||
|     -0.006436207679519103, | ||||
|     -9.622162373026585e-05, | ||||
|     0.006240488799898697, | ||||
|     0.012573926129294415, | ||||
|     0.021418708618354456, | ||||
|     0.030289222542492025, | ||||
|     0.03915515813685565, | ||||
|     0.047899419704645264, | ||||
|     0.04256372893215024, | ||||
|     0.03723078993416436, | ||||
|     0.03190060058247842, | ||||
|     0.02657315875107553, | ||||
|     0.021248462316134083, | ||||
|     0.01605877647020772, | ||||
|     0.02326948274513522, | ||||
|     0.03047647598902483, | ||||
|     0.037679759069084225, | ||||
|     0.044883315610536455, | ||||
|     0.052470799141237305, | ||||
|     0.06005437964543287, | ||||
|     0.0676340601339394, | ||||
|     0.07521193198077789, | ||||
|     0.08415906712621996, | ||||
|     0.09310160456603413, | ||||
|     0.1020395478432815, | ||||
|     0.11079585523492333, | ||||
|     0.1018180306253394, | ||||
|     0.09284481475528361, | ||||
|     0.0838762040768461, | ||||
|     0.07482015390297145, | ||||
|     0.05670549786742816, | ||||
|     0.03860013139908377, | ||||
|     0.020504047353947653, | ||||
|     0.0024172385953583004, | ||||
|     -0.015660302006048, | ||||
|     -0.03372858157230583, | ||||
|     -0.07037375788020579, | ||||
|     -0.10709599992470213, | ||||
|     -0.14379944379052215, | ||||
|     -0.18048410390821285, | ||||
|     -0.20911178784023846, | ||||
|     -0.23772399031437283, | ||||
|     -0.26632156113294336, | ||||
|     -0.2949045115165272, | ||||
|     -0.30206775396360075, | ||||
|     -0.30915729645781326, | ||||
|     -0.31624321721895354, | ||||
|     -0.3233255190215882, | ||||
|     -0.32037911876162584, | ||||
|     -0.3172854168606314, | ||||
|     -0.31419329378173544, | ||||
|     -0.31110274831665313, | ||||
|     -0.3110761646066259, | ||||
|     -0.3110761646066259 | ||||
|   ], | ||||
|   "dgt": [ | ||||
|     1.0, | ||||
|     1.017807767853702, | ||||
|     1.0356155337864215, | ||||
|     1.0534217504465226, | ||||
|     1.0712204022764056, | ||||
|     1.0895983485572227, | ||||
|     1.108555289615659, | ||||
|     1.1280891949729075, | ||||
|     1.1476135933863398, | ||||
|     1.1672278304018044, | ||||
|     1.1869318618366975, | ||||
|     1.2067249615595257, | ||||
|     1.2264996957264114, | ||||
|     1.2428104897182262, | ||||
|     1.2556591482982988, | ||||
|     1.2650555289898042, | ||||
|     1.2744470198196236, | ||||
|     1.2838336236692311, | ||||
|     1.2932153453410835, | ||||
|     1.3040618749785347, | ||||
|     1.316383926863083, | ||||
|     1.3301807335621048, | ||||
|     1.3439818461440451, | ||||
|     1.3598972673004606, | ||||
|     1.3779439775587023, | ||||
|     1.3981208704326855, | ||||
|     1.418273806730323, | ||||
|     1.4340878115214444, | ||||
|     1.445565137158368, | ||||
|     1.45273959485914, | ||||
|     1.4599103316162523, | ||||
|     1.4670307626366115, | ||||
|     1.474100442252211, | ||||
|     1.48111939735681, | ||||
|     1.488134243479226, | ||||
|     1.495145456062699, | ||||
|     1.502153039909686, | ||||
|     1.5097346239790443, | ||||
|     1.5178910621476225, | ||||
|     1.5266220576235803, | ||||
|     1.5353620432989845, | ||||
|     1.545374152761467, | ||||
|     1.5566577309558969, | ||||
|     1.569199764184379, | ||||
|     1.5817353179379183, | ||||
|     1.5986915141218316, | ||||
|     1.6201194134191075, | ||||
|     1.6460167077689267, | ||||
|     1.6719047669939942, | ||||
|     1.6918150918099673, | ||||
|     1.7057507692361864, | ||||
|     1.7137640932265894, | ||||
|     1.7217732861435076, | ||||
|     1.7297783508684146, | ||||
|     1.737780757913635, | ||||
|     1.7459181197626403, | ||||
|     1.7541903672600494, | ||||
|     1.7625959636196327, | ||||
|     1.7709972329654864, | ||||
|     1.7793941781790852, | ||||
|     1.7877868031023945, | ||||
|     1.7961751115773796, | ||||
|     1.8045606557581335, | ||||
|     1.8139629377087627, | ||||
|     1.824381436842932, | ||||
|     1.835814081380705, | ||||
|     1.847275503201129, | ||||
|     1.862235672444246, | ||||
|     1.8806927939516411, | ||||
|     1.9026104247588487, | ||||
|     1.9245345552113182, | ||||
|     1.9482128147680253, | ||||
|     1.9736443063300082, | ||||
|     2.0008103857988204, | ||||
|     2.0279625371819305, | ||||
|     2.055100772005235, | ||||
|     2.082225099873648, | ||||
|     2.1183028432496016, | ||||
|     2.16337565384239, | ||||
|     2.2174389328192197, | ||||
|     2.271520771371253, | ||||
|     2.322373696229342, | ||||
|     2.3699990328716107, | ||||
|     2.414398437185221, | ||||
|     2.4587748041127506, | ||||
|     2.499446286796604, | ||||
|     2.5364027376452056, | ||||
|     2.5696460593920065, | ||||
|     2.602860350286428, | ||||
|     2.630396440815385, | ||||
|     2.6521732021128046, | ||||
|     2.6681935771243177, | ||||
|     2.6841217449620203, | ||||
|     2.6947834587664494, | ||||
|     2.705443819238505, | ||||
|     2.714526681131686 | ||||
|   ], | ||||
|   "gain_ripple": [ | ||||
|     0.07704745697916238, | ||||
|     0.06479749697916048, | ||||
|     0.05257029697916238, | ||||
|     0.040326236979161934, | ||||
|     0.028098946979159933, | ||||
|     0.01393231697916164, | ||||
|     -0.0021726530208390216, | ||||
|     -0.01819858302084043, | ||||
|     -0.03218106302083967, | ||||
|     -0.042428283020839785, | ||||
|     -0.05095282302083959, | ||||
|     -0.05947139302083926, | ||||
|     -0.06968090302083851, | ||||
|     -0.07844600302084004, | ||||
|     -0.08407607302083875, | ||||
|     -0.0865687230208394, | ||||
|     -0.08906007302083907, | ||||
|     -0.0913487130208388, | ||||
|     -0.09343261302083761, | ||||
|     -0.09717347302083823, | ||||
|     -0.1027863830208382, | ||||
|     -0.11089282302084058, | ||||
|     -0.11963431302083904, | ||||
|     -0.1279646530208396, | ||||
|     -0.13525493302083902, | ||||
|     -0.1409032730208395, | ||||
|     -0.14591937302083835, | ||||
|     -0.14823350302084037, | ||||
|     -0.1484450830208388, | ||||
|     -0.1455411330208385, | ||||
|     -0.14160178302083892, | ||||
|     -0.1353792530208402, | ||||
|     -0.12789859302083784, | ||||
|     -0.11916081302083725, | ||||
|     -0.11041488302083735, | ||||
|     -0.10103437302083762, | ||||
|     -0.09101254302083817, | ||||
|     -0.07868024302083754, | ||||
|     -0.06468462302083822, | ||||
|     -0.051112303020840244, | ||||
|     -0.039618433020837784, | ||||
|     -0.028748483020837767, | ||||
|     -0.016475303020840215, | ||||
|     -0.006936193020838033, | ||||
|     -0.0015763130208377163, | ||||
|     0.0007104669791608842, | ||||
|     0.0040435869791615175, | ||||
|     0.006965146979162284, | ||||
|     0.00842583697916055, | ||||
|     0.00874012697916271, | ||||
|     0.00936596697916059, | ||||
|     0.01030063697916006, | ||||
|     0.011234826979162449, | ||||
|     0.013321846979160057, | ||||
|     0.01659282697915998, | ||||
|     0.023488786979161347, | ||||
|     0.03285456697916089, | ||||
|     0.04072968697916224, | ||||
|     0.04467697697916151, | ||||
|     0.04551704697916037, | ||||
|     0.04717897697916129, | ||||
|     0.04946107697915991, | ||||
|     0.05154489697916276, | ||||
|     0.05447361697916264, | ||||
|     0.05848224697916038, | ||||
|     0.06916723697916183, | ||||
|     0.08548825697916129, | ||||
|     0.10802383697916085, | ||||
|     0.13114358697916018, | ||||
|     0.15216302697916007, | ||||
|     0.17037189697916233, | ||||
|     0.1767381569791624, | ||||
|     0.1739275269791598, | ||||
|     0.15945681697916214, | ||||
|     0.14239527697916188, | ||||
|     0.12276252697916235, | ||||
|     0.10313984697916112, | ||||
|     0.08731066697916035, | ||||
|     0.07533675697916209, | ||||
|     0.07114372697916238, | ||||
|     0.07094413697916124, | ||||
|     0.07091459697916136, | ||||
|     0.0670723869791594, | ||||
|     0.054956336979159914, | ||||
|     0.038328296979159404, | ||||
|     0.017572956979162058, | ||||
|     -0.0028138630208403015, | ||||
|     -0.016792253020838643, | ||||
|     -0.0246928330208398, | ||||
|     -0.018326963020840026, | ||||
|     -0.0036199830208403228, | ||||
|     0.02602813697916062, | ||||
|     0.06245819697916133, | ||||
|     0.09542181697916163, | ||||
|     0.11822862697916037, | ||||
|     0.1359703369791596 | ||||
|   ] | ||||
| } | ||||
|   | ||||
| @@ -19,9 +19,9 @@ import gnpy.core.ansi_escapes as ansi_escapes | ||||
| from gnpy.core.elements import Transceiver, Fiber, RamanFiber | ||||
| from gnpy.core.equipment import trx_mode_params | ||||
| import gnpy.core.exceptions as exceptions | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.core.network import add_missing_elements_in_network, design_network | ||||
| from gnpy.core.parameters import SimParams | ||||
| from gnpy.core.utils import db2lin, lin2db, automatic_nch | ||||
| from gnpy.core.utils import db2lin, lin2db, automatic_nch, watt2dbm, dbm2watt | ||||
| from gnpy.topology.request import (ResultElement, jsontocsv, compute_path_dsjctn, requests_aggregation, | ||||
|                                    BLOCKING_NOPATH, correct_json_route_list, | ||||
|                                    deduplicate_disjunctions, compute_path_with_disjunction, | ||||
| @@ -193,41 +193,44 @@ def transmission_main_example(args=None): | ||||
|     params['path_bandwidth'] = 0 | ||||
|     params['effective_freq_slot'] = None | ||||
|     trx_params = trx_mode_params(equipment) | ||||
|     trx_params['power'] = dbm2watt(equipment['SI']['default'].power_dbm) | ||||
|     trx_params['tx_power'] = dbm2watt(equipment['SI']['default'].power_dbm) | ||||
|     if args.power: | ||||
|         trx_params['power'] = db2lin(float(args.power)) * 1e-3 | ||||
|         trx_params['power'] = dbm2watt(float(args.power)) | ||||
|         trx_params['tx_power'] = dbm2watt(float(args.power)) | ||||
|     params.update(trx_params) | ||||
|     initial_spectrum = None | ||||
|     nb_channels = automatic_nch(trx_params['f_min'], trx_params['f_max'], trx_params['spacing']) | ||||
|     params['nb_channel'] = automatic_nch(trx_params['f_min'], trx_params['f_max'], trx_params['spacing']) | ||||
|     # use ref_req to hold reference channel used for design and req for the propagation | ||||
|     # and req to hold channels to be propagated | ||||
|     # apply power sweep on the design and on the channels | ||||
|     ref_req = PathRequest(**params) | ||||
|     pref_ch_db = watt2dbm(ref_req.power) | ||||
|     if args.spectrum: | ||||
|         # use the spectrum defined by user for the propagation. | ||||
|         # the nb of channel for design remains the one of the reference channel | ||||
|         initial_spectrum = load_initial_spectrum(args.spectrum) | ||||
|         nb_channels = len(initial_spectrum) | ||||
|         params['nb_channel'] = len(initial_spectrum) | ||||
|         print('User input for spectrum used for propagation instead of SI') | ||||
|     params['nb_channel'] = nb_channels | ||||
|     req = PathRequest(**params) | ||||
|     p_ch_db = watt2dbm(req.power) | ||||
|     req.initial_spectrum = initial_spectrum | ||||
|     print(f'There are {nb_channels} channels propagating') | ||||
|     print(f'There are {req.nb_channel} channels propagating') | ||||
|     power_mode = equipment['Span']['default'].power_mode | ||||
|     print('\n'.join([f'Power mode is set to {power_mode}', | ||||
|                      f'=> it can be modified in eqpt_config.json - Span'])) | ||||
|                      '=> it can be modified in eqpt_config.json - Span'])) | ||||
|     if not args.no_insert_edfas: | ||||
|         try: | ||||
|             add_missing_elements_in_network(network, equipment) | ||||
|         except exceptions.NetworkTopologyError as e: | ||||
|             print(f'{ansi_escapes.red}Invalid network definition:{ansi_escapes.reset} {e}') | ||||
|             sys.exit(1) | ||||
|         except exceptions.ConfigurationError as e: | ||||
|             print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}') | ||||
|             sys.exit(1) | ||||
|  | ||||
|     # Keep the reference channel for design: the one from SI, with full load same channels | ||||
|     pref_ch_db = lin2db(req.power * 1e3)  # reference channel power / span (SL=20dB) | ||||
|     pref_total_db = pref_ch_db + lin2db(req.nb_channel)  # reference total power / span (SL=20dB) | ||||
|     try: | ||||
|         build_network(network, equipment, pref_ch_db, pref_total_db, args.no_insert_edfas) | ||||
|     except exceptions.NetworkTopologyError as e: | ||||
|         print(f'{ansi_escapes.red}Invalid network definition:{ansi_escapes.reset} {e}') | ||||
|         sys.exit(1) | ||||
|     except exceptions.ConfigurationError as e: | ||||
|         print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}') | ||||
|         sys.exit(1) | ||||
|     path = compute_constrained_path(network, req) | ||||
|  | ||||
|     spans = [s.params.length for s in path if isinstance(s, RamanFiber) or isinstance(s, Fiber)] | ||||
|     print(f'\nThere are {len(spans)} fiber spans over {sum(spans)/1000:.0f} km between {source.uid} ' | ||||
|           f'and {destination.uid}') | ||||
|     print(f'\nNow propagating between {source.uid} and {destination.uid}:') | ||||
|  | ||||
|     power_range = [0] | ||||
|     if power_mode: | ||||
|         # power cannot be changed in gain mode | ||||
| @@ -237,15 +240,32 @@ def transmission_main_example(args=None): | ||||
|             power_range = list(linspace(p_start, p_stop, p_num)) | ||||
|         except TypeError: | ||||
|             print('invalid power range definition in eqpt_config, should be power_range_db: [lower, upper, step]') | ||||
|     # initial network is designed using req.power. that is that any missing information (amp gain or delta_p) is filled | ||||
|     # using this req.power, previous to any sweep requested later on. | ||||
|     try: | ||||
|         design_network(ref_req, network, equipment, set_connector_losses=True, verbose=True) | ||||
|     except exceptions.NetworkTopologyError as e: | ||||
|         print(f'{ansi_escapes.red}Invalid network definition:{ansi_escapes.reset} {e}') | ||||
|         sys.exit(1) | ||||
|     except exceptions.ConfigurationError as e: | ||||
|         print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}') | ||||
|         sys.exit(1) | ||||
|  | ||||
|     print(f'\nThere are {len(spans)} fiber spans over {sum(spans)/1000:.0f} km between {source.uid} ' | ||||
|           f'and {destination.uid}') | ||||
|     print(f'\nNow propagating between {source.uid} and {destination.uid}:') | ||||
|     for dp_db in power_range: | ||||
|         req.power = db2lin(pref_ch_db + dp_db) * 1e-3 | ||||
|         ref_req.power = dbm2watt(pref_ch_db + dp_db) | ||||
|         req.power = dbm2watt(p_ch_db + dp_db) | ||||
|         design_network(ref_req, network, equipment, set_connector_losses=False, verbose=False) | ||||
|         # if initial spectrum did not contain any power, now we need to use this one. | ||||
|         # note the initial power defines a differential wrt req.power so that if req.power is set to 2mW (3dBm) | ||||
|         # and initial spectrum was set to 0, this sets a initial per channel delta power to -3dB, so that | ||||
|         # whatever the equalization, -3 dB is applied on all channels (ie initial power in initial spectrum pre-empts | ||||
|         # "--power" option) | ||||
|         if power_mode: | ||||
|             print(f'\nPropagating with input power = {ansi_escapes.cyan}{lin2db(req.power*1e3):.2f} dBm{ansi_escapes.reset}:') | ||||
|             print(f'\nPropagating with input power = {ansi_escapes.cyan}{watt2dbm(req.power):.2f} ' | ||||
|                   + f'dBm{ansi_escapes.reset}:') | ||||
|         else: | ||||
|             print(f'\nPropagating in {ansi_escapes.cyan}gain mode{ansi_escapes.reset}: power cannot be set manually') | ||||
|         infos = propagate(path, req, equipment) | ||||
| @@ -330,17 +350,45 @@ def path_requests_run(args=None): | ||||
|     # 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 | ||||
|     p_db = equipment['SI']['default'].power_dbm | ||||
|     p_total_db = p_db + lin2db(automatic_nch(equipment['SI']['default'].f_min, | ||||
|                                              equipment['SI']['default'].f_max, equipment['SI']['default'].spacing)) | ||||
|     if not args.no_insert_edfas: | ||||
|         try: | ||||
|             add_missing_elements_in_network(network, equipment) | ||||
|         except exceptions.NetworkTopologyError as e: | ||||
|             print(f'{ansi_escapes.red}Invalid network definition:{ansi_escapes.reset} {e}') | ||||
|             sys.exit(1) | ||||
|         except exceptions.ConfigurationError as e: | ||||
|             print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}') | ||||
|             sys.exit(1) | ||||
|  | ||||
|     params = { | ||||
|         'request_id': 'reference', | ||||
|         'trx_type': '', | ||||
|         'trx_mode': '', | ||||
|         'source': None, | ||||
|         'destination': None, | ||||
|         'bidir': False, | ||||
|         'nodes_list': [], | ||||
|         'loose_list': [], | ||||
|         'format': '', | ||||
|         'path_bandwidth': 0, | ||||
|         'effective_freq_slot': None, | ||||
|         'nb_channel': automatic_nch(equipment['SI']['default'].f_min, equipment['SI']['default'].f_max, | ||||
|                                     equipment['SI']['default'].spacing), | ||||
|         'power': dbm2watt(equipment['SI']['default'].power_dbm), | ||||
|         'tx_power': dbm2watt(equipment['SI']['default'].power_dbm) | ||||
|     } | ||||
|     trx_params = trx_mode_params(equipment) | ||||
|     params.update(trx_params) | ||||
|     reference_channel = PathRequest(**params) | ||||
|     try: | ||||
|         build_network(network, equipment, p_db, p_total_db, args.no_insert_edfas) | ||||
|         design_network(reference_channel, network, equipment, verbose=True) | ||||
|     except exceptions.NetworkTopologyError as e: | ||||
|         print(f'{ansi_escapes.red}Invalid network definition:{ansi_escapes.reset} {e}') | ||||
|         sys.exit(1) | ||||
|     except exceptions.ConfigurationError as e: | ||||
|         print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}') | ||||
|         sys.exit(1) | ||||
|  | ||||
|     if args.save_network is not None: | ||||
|         save_network(network, args.save_network) | ||||
|         print(f'{ansi_escapes.blue}Network (after autodesign) saved to {args.save_network}{ansi_escapes.reset}') | ||||
|   | ||||
| @@ -122,7 +122,7 @@ class Eqpt(object): | ||||
|         'east_att_in': 0, | ||||
|         'east_amp_gain': None, | ||||
|         'east_amp_dp': None, | ||||
|         'east_tilt': 0, | ||||
|         'east_tilt_vs_wavelength': 0, | ||||
|         'east_att_out': None | ||||
|     } | ||||
|  | ||||
| @@ -345,13 +345,13 @@ def create_east_eqpt_element(node): | ||||
|         eqpt['type_variety'] = f'{node.east_amp_type}' | ||||
|         eqpt['operational'] = {'gain_target': node.east_amp_gain, | ||||
|                                'delta_p':     node.east_amp_dp, | ||||
|                                'tilt_target': node.east_tilt, | ||||
|                                'tilt_target': node.east_tilt_vs_wavelength, | ||||
|                                'out_voa':     node.east_att_out} | ||||
|     elif node.east_amp_type.lower() == '': | ||||
|         eqpt['type'] = 'Edfa' | ||||
|         eqpt['operational'] = {'gain_target': node.east_amp_gain, | ||||
|                                'delta_p':     node.east_amp_dp, | ||||
|                                'tilt_target': node.east_tilt, | ||||
|                                'tilt_target': node.east_tilt_vs_wavelength, | ||||
|                                'out_voa':     node.east_att_out} | ||||
|     elif node.east_amp_type.lower() == 'fused': | ||||
|         # fused edfa variety is a hack to indicate that there should not be | ||||
| @@ -378,12 +378,12 @@ def create_west_eqpt_element(node): | ||||
|         eqpt['type_variety'] = f'{node.west_amp_type}' | ||||
|         eqpt['operational'] = {'gain_target': node.west_amp_gain, | ||||
|                                'delta_p':     node.west_amp_dp, | ||||
|                                'tilt_target': node.west_tilt, | ||||
|                                'tilt_target': node.west_tilt_vs_wavelength, | ||||
|                                'out_voa':     node.west_att_out} | ||||
|     elif node.west_amp_type.lower() == '': | ||||
|         eqpt['operational'] = {'gain_target': node.west_amp_gain, | ||||
|                                'delta_p':     node.west_amp_dp, | ||||
|                                'tilt_target': node.west_tilt, | ||||
|                                'tilt_target': node.west_tilt_vs_wavelength, | ||||
|                                'out_voa':     node.west_att_out} | ||||
|     elif node.west_amp_type.lower() == 'fused': | ||||
|         eqpt['type'] = 'Fused' | ||||
|   | ||||
| @@ -20,8 +20,8 @@ from gnpy.core.equipment import trx_mode_params | ||||
| from gnpy.core.exceptions import ConfigurationError, EquipmentConfigError, NetworkTopologyError, ServiceError | ||||
| from gnpy.core.science_utils import estimate_nf_model | ||||
| from gnpy.core.info import Carrier | ||||
| from gnpy.core.utils import automatic_nch, automatic_fmax, merge_amplifier_restrictions | ||||
| from gnpy.core.parameters import DEFAULT_RAMAN_COEFFICIENT | ||||
| from gnpy.core.utils import automatic_nch, automatic_fmax, merge_amplifier_restrictions, dbm2watt | ||||
| from gnpy.core.parameters import DEFAULT_RAMAN_COEFFICIENT, EdfaParams | ||||
| from gnpy.topology.request import PathRequest, Disjunction, compute_spectrum_slot_vs_bandwidth | ||||
| from gnpy.topology.spectrum_assignment import mvalue_to_slots | ||||
| from gnpy.tools.convert import xls_to_json_data | ||||
| @@ -51,9 +51,10 @@ class _JsonThing: | ||||
|         clean_kwargs = {k: v for k, v in kwargs.items() if v != ''} | ||||
|         for k, v in default_values.items(): | ||||
|             setattr(self, k, clean_kwargs.get(k, v)) | ||||
|             if k not in clean_kwargs and name != 'Amp': | ||||
|                 msg = f'\n WARNING missing {k} attribute in eqpt_config.json[{name}]' \ | ||||
|                     + f'\n default value is {k} = {v}' | ||||
|             if k not in clean_kwargs and name != 'Amp' and v is not None and v != []: | ||||
|                 # do not show this warning if the default value is None | ||||
|                 msg = f'\n\tWARNING missing {k} attribute in eqpt_config.json[{name}]' \ | ||||
|                     + f'\n\tdefault value is {k} = {v}\n' | ||||
|                 _logger.warning(msg) | ||||
|  | ||||
|  | ||||
| @@ -67,7 +68,8 @@ class SI(_JsonThing): | ||||
|         "power_range_db": [0, 0, 0.5], | ||||
|         "roll_off": 0.15, | ||||
|         "tx_osnr": 45, | ||||
|         "sys_margins": 0 | ||||
|         "sys_margins": 0, | ||||
|         "tx_power_dbm": None  # optional value in SI | ||||
|     } | ||||
|  | ||||
|     def __init__(self, **kwargs): | ||||
| @@ -95,13 +97,15 @@ class Span(_JsonThing): | ||||
|  | ||||
| class Roadm(_JsonThing): | ||||
|     default_values = { | ||||
|         'type_variety': 'default', | ||||
|         'add_drop_osnr': 100, | ||||
|         'pmd': 0, | ||||
|         'pdl': 0, | ||||
|         'restrictions': { | ||||
|             'preamp_variety_list': [], | ||||
|             'booster_variety_list': [] | ||||
|         } | ||||
|         }, | ||||
|         'roadm-path-impairments': [] | ||||
|     } | ||||
|  | ||||
|     def __init__(self, **kwargs): | ||||
| @@ -180,35 +184,7 @@ class RamanFiber(Fiber): | ||||
|  | ||||
|  | ||||
| class Amp(_JsonThing): | ||||
|     default_values = { | ||||
|         'f_min': 191.35e12, | ||||
|         'f_max': 196.1e12, | ||||
|         'type_variety': '', | ||||
|         'type_def': '', | ||||
|         'gain_flatmax': None, | ||||
|         'gain_min': None, | ||||
|         'p_max': None, | ||||
|         'nf_model': None, | ||||
|         'dual_stage_model': None, | ||||
|         'preamp_variety': None, | ||||
|         'booster_variety': None, | ||||
|         'nf_min': None, | ||||
|         'nf_max': None, | ||||
|         'nf_coef': None, | ||||
|         'nf0': None, | ||||
|         'nf_fit_coeff': None, | ||||
|         'nf_ripple': 0, | ||||
|         'dgt': None, | ||||
|         'gain_ripple': 0, | ||||
|         'tilt_ripple': 0, | ||||
|         'f_ripple_ref': None, | ||||
|         'out_voa_auto': False, | ||||
|         'allowed_for_design': False, | ||||
|         'raman': False, | ||||
|         'pmd': 0, | ||||
|         'pdl': 0, | ||||
|         'advance_configurations_from_json': None | ||||
|     } | ||||
|     default_values = EdfaParams.default_values | ||||
|  | ||||
|     def __init__(self, **kwargs): | ||||
|         self.update_attr(self.default_values, kwargs, 'Amp') | ||||
| @@ -294,7 +270,7 @@ def _spectrum_from_json(json_data): | ||||
|     label should be different for each partition | ||||
|     >>> json_data = {'spectrum': \ | ||||
|         [{'f_min': 193.2e12, 'f_max': 193.4e12, 'slot_width': 50e9, 'baud_rate': 32e9, 'roll_off': 0.15, \ | ||||
|             'delta_pdb': 1, 'tx_osnr': 45},\ | ||||
|             'delta_pdb': 1, 'tx_osnr': 45, 'tx_power_dbm': -7},\ | ||||
|         {'f_min': 193.4625e12, 'f_max': 193.9875e12, 'slot_width': 75e9, 'baud_rate': 64e9, 'roll_off': 0.15},\ | ||||
|         {'f_min': 194.075e12, 'f_max': 194.075e12, 'slot_width': 100e9, 'baud_rate': 90e9, 'roll_off': 0.15},\ | ||||
|         {'f_min': 194.2e12, 'f_max': 194.35e12, 'slot_width': 50e9, 'baud_rate': 32e9, 'roll_off': 0.15}]} | ||||
| @@ -302,24 +278,24 @@ def _spectrum_from_json(json_data): | ||||
|     >>> for k, v in spectrum.items(): | ||||
|     ...     print(f'{k}: {v}') | ||||
|     ... | ||||
|     193200000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, label='0-32.00G') | ||||
|     193250000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, label='0-32.00G') | ||||
|     193300000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, label='0-32.00G') | ||||
|     193350000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, label='0-32.00G') | ||||
|     193400000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, label='0-32.00G') | ||||
|     193462500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193537500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193612500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193687500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193762500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193837500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193912500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     193987500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, label='1-64.00G') | ||||
|     194075000000000.0: Carrier(delta_pdb=0, baud_rate=90000000000.0, slot_width=100000000000.0, roll_off=0.15, tx_osnr=40, label='2-90.00G') | ||||
|     194200000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, label='3-32.00G') | ||||
|     194250000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, label='3-32.00G') | ||||
|     194300000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, label='3-32.00G') | ||||
|     194350000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, label='3-32.00G') | ||||
|     193200000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, tx_power=0.00019952623149688798, label='0-32.00G') | ||||
|     193250000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, tx_power=0.00019952623149688798, label='0-32.00G') | ||||
|     193300000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, tx_power=0.00019952623149688798, label='0-32.00G') | ||||
|     193350000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, tx_power=0.00019952623149688798, label='0-32.00G') | ||||
|     193400000000000.0: Carrier(delta_pdb=1, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=45, tx_power=0.00019952623149688798, label='0-32.00G') | ||||
|     193462500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193537500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193612500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193687500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193762500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193837500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193912500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     193987500000000.0: Carrier(delta_pdb=0, baud_rate=64000000000.0, slot_width=75000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='1-64.00G') | ||||
|     194075000000000.0: Carrier(delta_pdb=0, baud_rate=90000000000.0, slot_width=100000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='2-90.00G') | ||||
|     194200000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='3-32.00G') | ||||
|     194250000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='3-32.00G') | ||||
|     194300000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='3-32.00G') | ||||
|     194350000000000.0: Carrier(delta_pdb=0, baud_rate=32000000000.0, slot_width=50000000000.0, roll_off=0.15, tx_osnr=40, tx_power=0.001, label='3-32.00G') | ||||
|     """ | ||||
|     spectrum = {} | ||||
|     json_data = sorted(json_data, key=lambda x: x['f_min']) | ||||
| @@ -335,6 +311,9 @@ def _spectrum_from_json(json_data): | ||||
|         # default tx_osnr is set to 40 dB | ||||
|         if 'tx_osnr' not in part: | ||||
|             part['tx_osnr'] = 40 | ||||
|         # default tx_power_dbm is set to 0 dBn | ||||
|         if 'tx_power_dbm' not in part: | ||||
|             part['tx_power_dbm'] = 0 | ||||
|         # starting freq is exactly f_min to be consistent with utils.automatic_nch | ||||
|         # first partition min occupation is f_min - slot_width / 2 (central_frequency is f_min) | ||||
|         # supposes that carriers are centered on frequency | ||||
| @@ -353,7 +332,8 @@ def _spectrum_from_json(json_data): | ||||
|                                    part['slot_width']): | ||||
|             spectrum[current_freq] = Carrier(delta_pdb=part['delta_pdb'], baud_rate=part['baud_rate'], | ||||
|                                              slot_width=part['slot_width'], roll_off=part['roll_off'], | ||||
|                                              tx_osnr=part['tx_osnr'], label=part['label']) | ||||
|                                              tx_osnr=part['tx_osnr'], tx_power=dbm2watt(part['tx_power_dbm']), | ||||
|                                              label=part['label']) | ||||
|         previous_part_max_freq = current_freq + part['slot_width'] / 2 | ||||
|     return spectrum | ||||
|  | ||||
| @@ -389,11 +369,13 @@ def _update_dual_stage(equipment): | ||||
|  | ||||
| def _roadm_restrictions_sanity_check(equipment): | ||||
|     """verifies that booster and preamp restrictions specified in roadm equipment are listed in the edfa.""" | ||||
|     restrictions = equipment['Roadm']['default'].restrictions['booster_variety_list'] + \ | ||||
|         equipment['Roadm']['default'].restrictions['preamp_variety_list'] | ||||
|     for amp_name in restrictions: | ||||
|         if amp_name not in equipment['Edfa']: | ||||
|             raise EquipmentConfigError(f'ROADM restriction {amp_name} does not refer to a defined EDFA name') | ||||
|     for roadm_type, roadm_eqpt in equipment['Roadm'].items(): | ||||
|         restrictions = roadm_eqpt.restrictions['booster_variety_list'] + \ | ||||
|             roadm_eqpt.restrictions['preamp_variety_list'] | ||||
|         for amp_name in restrictions: | ||||
|             if amp_name not in equipment['Edfa']: | ||||
|                 raise EquipmentConfigError(f'ROADM {roadm_type} restriction {amp_name} does not refer to a ' | ||||
|                                            + 'defined EDFA name') | ||||
|  | ||||
|  | ||||
| def _check_fiber_vs_raman_fiber(equipment): | ||||
| @@ -434,6 +416,9 @@ def _equipment_from_json(json_data, filename): | ||||
|             elif key == 'Roadm': | ||||
|                 equipment[key][subkey] = Roadm(**entry) | ||||
|             elif key == 'SI': | ||||
|                 # use power_dbm value for tx_power_dbm if the key is not in 'SI' | ||||
|                 # if 'tx_power_dbm' not in entry.keys(): | ||||
|                 #     entry['tx_power_dbm'] = entry['power_dbm'] | ||||
|                 equipment[key][subkey] = SI(**entry) | ||||
|             elif key == 'Transceiver': | ||||
|                 equipment[key][subkey] = Transceiver(**entry) | ||||
| @@ -509,7 +494,7 @@ def network_from_json(json_data, equipment): | ||||
|             temp = merge_amplifier_restrictions(temp, extra_params) | ||||
|             el_config['params'] = temp | ||||
|             el_config['type_variety'] = variety | ||||
|         elif (typ in ['Fiber', 'RamanFiber']): | ||||
|         elif (typ in ['Fiber', 'RamanFiber', 'Roadm']): | ||||
|             raise ConfigurationError(f'The {typ} of variety type {variety} was not recognized:' | ||||
|                                      '\nplease check it is properly defined in the eqpt_config json file') | ||||
|         elif typ == 'Edfa': | ||||
| @@ -600,7 +585,6 @@ def requests_from_json(json_data, equipment): | ||||
|         params['nodes_list'] = [n['num-unnum-hop']['node-id'] for n in nd_list] | ||||
|         params['loose_list'] = [n['num-unnum-hop']['hop-type'] for n in nd_list] | ||||
|         # recover trx physical param (baudrate, ...) from type and mode | ||||
|         # in trx_mode_params optical power is read from equipment['SI']['default'] and | ||||
|         # nb_channel is computed based on min max frequency and spacing | ||||
|         try: | ||||
|             trx_params = trx_mode_params(equipment, params['trx_type'], params['trx_mode'], True) | ||||
| @@ -608,13 +592,11 @@ def requests_from_json(json_data, equipment): | ||||
|             msg = f'Equipment Config error in {req["request-id"]}: {e}' | ||||
|             raise EquipmentConfigError(msg) from e | ||||
|         params.update(trx_params) | ||||
|         # optical power might be set differently in the request. if it is indicated then the | ||||
|         # params['power'] is updated | ||||
|         try: | ||||
|             if req['path-constraints']['te-bandwidth']['output-power']: | ||||
|                 params['power'] = req['path-constraints']['te-bandwidth']['output-power'] | ||||
|         except KeyError: | ||||
|             pass | ||||
|         params['power'] = req['path-constraints']['te-bandwidth'].get('output-power') | ||||
|         # params must not be None, but user can set to None: catch this case | ||||
|         if params['power'] is None: | ||||
|             params['power'] = dbm2watt(equipment['SI']['default'].power_dbm) | ||||
|  | ||||
|         # same process for nb-channel | ||||
|         f_min = params['f_min'] | ||||
|         f_max_from_si = params['f_max'] | ||||
| @@ -634,6 +616,14 @@ def requests_from_json(json_data, equipment): | ||||
|             params['path_bandwidth'] = req['path-constraints']['te-bandwidth']['path_bandwidth'] | ||||
|         except KeyError: | ||||
|             pass | ||||
|         params['tx_power'] = req['path-constraints']['te-bandwidth'].get('tx_power') | ||||
|         default_tx_power_dbm = equipment['SI']['default'].tx_power_dbm | ||||
|         if params['tx_power'] is None: | ||||
|             # use request's input power in span instead | ||||
|             params['tx_power'] = params['power'] | ||||
|             if default_tx_power_dbm is not None: | ||||
|                 # use default tx power | ||||
|                 params['tx_power'] = dbm2watt(default_tx_power_dbm) | ||||
|         _check_one_request(params, f_max_from_si) | ||||
|         requests_list.append(PathRequest(**params)) | ||||
|     return requests_list | ||||
|   | ||||
| @@ -23,7 +23,8 @@ from networkx.utils import pairwise | ||||
| from numpy import mean, argmin | ||||
| from gnpy.core.elements import Transceiver, Roadm | ||||
| from gnpy.core.utils import lin2db | ||||
| from gnpy.core.info import create_input_spectral_information, carriers_to_spectral_information, ReferenceCarrier | ||||
| from gnpy.core.info import create_input_spectral_information, carriers_to_spectral_information | ||||
| from gnpy.core import network as network_module | ||||
| from gnpy.core.exceptions import ServiceError, DisjunctionError | ||||
| from copy import deepcopy | ||||
| from csv import writer | ||||
| @@ -35,7 +36,7 @@ RequestParams = namedtuple('RequestParams', 'request_id source destination bidir | ||||
|                            ' trx_mode nodes_list loose_list spacing power nb_channel f_min' | ||||
|                            ' f_max format baud_rate OSNR penalties bit_rate' | ||||
|                            ' roll_off tx_osnr min_spacing cost path_bandwidth effective_freq_slot' | ||||
|                            ' equalization_offset_db') | ||||
|                            ' equalization_offset_db, tx_power') | ||||
| DisjunctionParams = namedtuple('DisjunctionParams', 'disjunction_id relaxable link_diverse' | ||||
|                                ' node_diverse disjunctions_req') | ||||
|  | ||||
| @@ -64,6 +65,7 @@ class PathRequest: | ||||
|         self.bit_rate = params.bit_rate | ||||
|         self.roll_off = params.roll_off | ||||
|         self.tx_osnr = params.tx_osnr | ||||
|         self.tx_power = params.tx_power | ||||
|         self.min_spacing = params.min_spacing | ||||
|         self.cost = params.cost | ||||
|         self.path_bandwidth = params.path_bandwidth | ||||
| @@ -94,7 +96,8 @@ class PathRequest: | ||||
|                             f'baud_rate:\t{temp} Gbaud', | ||||
|                             f'bit_rate:\t{temp2} Gb/s', | ||||
|                             f'spacing:\t{self.spacing * 1e-9} GHz', | ||||
|                             f'power:  \t{round(lin2db(self.power)+30, 2)} dBm', | ||||
|                             f'power:  \t{round(lin2db(self.power) + 30, 2)} dBm', | ||||
|                             f'tx_power_dbm:  \t{round(lin2db(self.tx_power) + 30, 2)} dBm', | ||||
|                             f'nb channels: \t{self.nb_channel}', | ||||
|                             f'path_bandwidth: \t{round(self.path_bandwidth * 1e-9, 2)} Gbit/s', | ||||
|                             f'nodes-list:\t{self.nodes_list}', | ||||
| @@ -329,36 +332,25 @@ def compute_constrained_path(network, req): | ||||
|     return total_path | ||||
|  | ||||
|  | ||||
| def ref_carrier(equipment): | ||||
|     """Create a reference carier based SI information with the specified request's power: | ||||
|     req_power records the power in W that the user has defined for a given request | ||||
|     (which might be different from the one used for the design). | ||||
|     """ | ||||
|     return ReferenceCarrier(baud_rate=equipment['SI']['default'].baud_rate, | ||||
|                             slot_width=equipment['SI']['default'].spacing) | ||||
|  | ||||
|  | ||||
| def propagate(path, req, equipment): | ||||
|     """propagates signals in each element according to initial spectrum set by user""" | ||||
|     if req.initial_spectrum is not None: | ||||
|         si = carriers_to_spectral_information(initial_spectrum=req.initial_spectrum, | ||||
|                                               power=req.power, ref_carrier=ref_carrier(equipment)) | ||||
|         si = carriers_to_spectral_information(initial_spectrum=req.initial_spectrum, power=req.power) | ||||
|     else: | ||||
|         si = create_input_spectral_information( | ||||
|             f_min=req.f_min, f_max=req.f_max, roll_off=req.roll_off, baud_rate=req.baud_rate, | ||||
|             power=req.power, spacing=req.spacing, tx_osnr=req.tx_osnr, delta_pdb=req.offset_db, | ||||
|             ref_carrier=ref_carrier(equipment)) | ||||
|             spacing=req.spacing, tx_osnr=req.tx_osnr, tx_power=req.tx_power, delta_pdb=req.offset_db) | ||||
|     roadm_osnr = [] | ||||
|     for i, el in enumerate(path): | ||||
|         if isinstance(el, Roadm): | ||||
|             si = el(si, degree=path[i+1].uid) | ||||
|             si = el(si, degree=path[i + 1].uid, from_degree=path[i - 1].uid) | ||||
|             roadm_osnr.append(el.get_roadm_path(from_degree=path[i - 1].uid, to_degree=path[i + 1].uid).impairment.osnr) | ||||
|         else: | ||||
|             si = el(si) | ||||
|     path[0].update_snr(si.tx_osnr) | ||||
|     path[0].calc_penalties(req.penalties) | ||||
|     if any(isinstance(el, Roadm) for el in path): | ||||
|         path[-1].update_snr(si.tx_osnr, equipment['Roadm']['default'].add_drop_osnr) | ||||
|     else: | ||||
|         path[-1].update_snr(si.tx_osnr) | ||||
|     roadm_osnr.append(si.tx_osnr) | ||||
|     path[-1].update_snr(*roadm_osnr) | ||||
|     path[-1].calc_penalties(req.penalties) | ||||
|     return si | ||||
|  | ||||
| @@ -390,22 +382,24 @@ def propagate_and_optimize_mode(path, req, equipment): | ||||
|                 raise ServiceError(msg) | ||||
|             spc_info = create_input_spectral_information(f_min=req.f_min, f_max=req.f_max, | ||||
|                                                          roll_off=equipment['SI']['default'].roll_off, | ||||
|                                                          baud_rate=this_br, power=req.power, spacing=req.spacing, | ||||
|                                                          delta_pdb=this_offset, | ||||
|                                                          tx_osnr=req.tx_osnr, ref_carrier=ref_carrier(equipment)) | ||||
|                                                          baud_rate=this_br, spacing=req.spacing, | ||||
|                                                          delta_pdb=this_offset, tx_osnr=req.tx_osnr, | ||||
|                                                          tx_power=req.tx_power) | ||||
|             roadm_osnr = [] | ||||
|             for i, el in enumerate(path): | ||||
|                 if isinstance(el, Roadm): | ||||
|                     spc_info = el(spc_info, degree=path[i+1].uid) | ||||
|                     spc_info = el(spc_info, degree=path[i + 1].uid, from_degree=path[i - 1].uid) | ||||
|                     roadm_osnr.append(el.get_roadm_path(from_degree=path[i - 1].uid, to_degree=path[i + 1].uid).impairment.osnr) | ||||
|                 else: | ||||
|                     spc_info = el(spc_info) | ||||
|             for this_mode in modes_to_explore: | ||||
|                 if path[-1].snr is not None: | ||||
|                     path[0].update_snr(this_mode['tx_osnr']) | ||||
|                     path[0].calc_penalties(this_mode['penalties']) | ||||
|                     if any(isinstance(el, Roadm) for el in path): | ||||
|                         path[-1].update_snr(this_mode['tx_osnr'], equipment['Roadm']['default'].add_drop_osnr) | ||||
|                     else: | ||||
|                         path[-1].update_snr(this_mode['tx_osnr']) | ||||
|                     roadm_osnr.append(this_mode['tx_osnr']) | ||||
|                     path[-1].update_snr(*roadm_osnr) | ||||
|                     # remove the tx_osnr from roadm_osnr list for the next iteration | ||||
|                     del roadm_osnr[-1] | ||||
|                     path[-1].calc_penalties(this_mode['penalties']) | ||||
|                     if round(min(path[-1].snr_01nm - path[-1].total_penalty), 2) \ | ||||
|                             > this_mode['OSNR'] + equipment['SI']['default'].sys_margins: | ||||
| @@ -977,6 +971,7 @@ def compare_reqs(req1, req2, disjlist): | ||||
|             req1.format == req2.format and \ | ||||
|             req1.OSNR == req2.OSNR and \ | ||||
|             req1.roll_off == req2.roll_off and \ | ||||
|             req1.tx_power == req2.tx_power and \ | ||||
|             same_disj: | ||||
|         return True | ||||
|     else: | ||||
| @@ -1102,6 +1097,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist): | ||||
|         # elements to simulate performance, several demands having the same destination | ||||
|         # may use the same transponder for the performance simulation. This is why | ||||
|         # we use deepcopy: to ensure that each propagation is recorded and not overwritten | ||||
|         network_module.design_network(pathreq, network, equipment, set_connector_losses=False, verbose=False) | ||||
|         total_path = deepcopy(pathlist[i]) | ||||
|         msg = msg + f'\n\tComputed path (roadms):{[e.uid for e in total_path  if isinstance(e, Roadm)]}' | ||||
|         LOGGER.info(msg) | ||||
|   | ||||
| @@ -1,11 +0,0 @@ | ||||
| # matplotlib 3.8 removed support for Python 3.8 | ||||
| matplotlib>=3.7.3,<4 | ||||
| # networkx 3.2 removed support for Python 3.8 | ||||
| networkx>=3.1,<4 | ||||
| # numpy 1.25 removed support for Python 3.8 | ||||
| numpy>=1.24.4,<2 | ||||
| pbr>=6.0.0,<7 | ||||
| # scipy 1.11 removed support for Python 3.8 | ||||
| scipy>=1.10.1,<2 | ||||
| # xlrd 2.x removed support for .xlsx, it's only .xls now | ||||
| xlrd>=1.2.0,<2 | ||||
							
								
								
									
										32
									
								
								setup.cfg
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								setup.cfg
									
									
									
									
									
								
							| @@ -49,3 +49,35 @@ console_scripts = | ||||
|     gnpy-transmission-example = gnpy.tools.cli_examples:transmission_main_example | ||||
|     gnpy-path-request = gnpy.tools.cli_examples:path_requests_run | ||||
|     gnpy-convert-xls = gnpy.tools.convert:_do_convert | ||||
|  | ||||
| [options] | ||||
| install_requires = | ||||
| 	# matplotlib 3.8 removed support for Python 3.8 | ||||
| 	matplotlib>=3.7.3,<4 | ||||
| 	# networkx 3.2 removed support for Python 3.8 | ||||
| 	networkx>=3.1,<4 | ||||
| 	# numpy 1.25 removed support for Python 3.8 | ||||
| 	numpy>=1.24.4,<2 | ||||
| 	pbr>=6.0.0,<7 | ||||
| 	# scipy 1.11 removed support for Python 3.8 | ||||
| 	scipy>=1.10.1,<2 | ||||
| 	# xlrd 2.x removed support for .xlsx, it's only .xls now | ||||
| 	xlrd>=1.2.0,<2 | ||||
|  | ||||
| [options.extras_require] | ||||
| tests = | ||||
| 	build>=1.0.3,<2 | ||||
| 	pytest>=7.4.3,<8 | ||||
| 	# pandas 2.1 removed support for Python 3.8 | ||||
| 	pandas>=2.0.3,<3 | ||||
| 	# flake v6 killed the --diff option | ||||
| 	flake8>=5.0.4,<6 | ||||
|  | ||||
| docs = | ||||
| 	alabaster>=0.7.12,<1 | ||||
| 	docutils>=0.17.1,<1 | ||||
| 	myst-parser>=0.16.1,<1 | ||||
| 	Pygments>=2.11.2,<3 | ||||
| 	rstcheck | ||||
| 	Sphinx>=5.3.0,<6 | ||||
| 	sphinxcontrib-bibtex>=2.4.1,<3 | ||||
|   | ||||
| @@ -1203,6 +1203,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Abilene", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1226,6 +1227,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Albany", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1249,6 +1251,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Albuquerque", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1274,6 +1277,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Atlanta", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1298,6 +1302,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Austin", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1321,6 +1326,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Baltimore", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1345,6 +1351,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Baton_Rouge", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1368,6 +1375,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Billings", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1392,6 +1400,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Birmingham", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1416,6 +1425,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Bismarck", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1439,6 +1449,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Boston", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1462,6 +1473,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Buffalo", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1485,6 +1497,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Charleston", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1508,6 +1521,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Charlotte", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1531,6 +1545,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Chicago", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1555,6 +1570,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Cincinnati", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1579,6 +1595,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Cleveland", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1603,6 +1620,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Columbus", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1627,6 +1645,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Dallas", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1653,6 +1672,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Denver", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1678,6 +1698,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Detroit", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1701,6 +1722,7 @@ | ||||
|     { | ||||
|       "uid": "roadm El_Paso", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1726,6 +1748,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Fresno", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1750,6 +1773,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Greensboro", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1775,6 +1799,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Hartford", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1798,6 +1823,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Houston", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1822,6 +1848,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Jacksonville", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1846,6 +1873,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Kansas_City", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1870,6 +1898,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Las_Vegas", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1895,6 +1924,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Little_Rock", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1918,6 +1948,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Long_Island", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1941,6 +1972,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Los_Angeles", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1966,6 +1998,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Louisville", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1991,6 +2024,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Memphis", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2014,6 +2048,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Miami", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2038,6 +2073,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Milwaukee", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2061,6 +2097,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Minneapolis", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2085,6 +2122,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Nashville", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2109,6 +2147,7 @@ | ||||
|     { | ||||
|       "uid": "roadm New_Orleans", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2133,6 +2172,7 @@ | ||||
|     { | ||||
|       "uid": "roadm New_York", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2159,6 +2199,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Newark", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2182,6 +2223,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Norfolk", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2205,6 +2247,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Oakland", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2231,6 +2274,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Oklahoma_City", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2254,6 +2298,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Omaha", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2278,6 +2323,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Orlando", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2301,6 +2347,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Philadelphia", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2325,6 +2372,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Phoenix", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2349,6 +2397,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Pittsburgh", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2373,6 +2422,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Portland", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2398,6 +2448,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Providence", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2421,6 +2472,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Raleigh", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2445,6 +2497,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Richmond", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2468,6 +2521,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Rochester", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2491,6 +2545,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Sacramento", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2514,6 +2569,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Salt_Lake_City", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2539,6 +2595,7 @@ | ||||
|     { | ||||
|       "uid": "roadm San_Antonio", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2562,6 +2619,7 @@ | ||||
|     { | ||||
|       "uid": "roadm San_Diego", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2585,6 +2643,7 @@ | ||||
|     { | ||||
|       "uid": "roadm San_Francisco", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2608,6 +2667,7 @@ | ||||
|     { | ||||
|       "uid": "roadm San_Jose", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2631,6 +2691,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Santa_Barbara", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2654,6 +2715,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Scranton", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2679,6 +2741,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Seattle", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2702,6 +2765,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Spokane", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2725,6 +2789,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Springfield", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2748,6 +2813,7 @@ | ||||
|     { | ||||
|       "uid": "roadm St_Louis", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2772,6 +2838,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Syracuse", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2796,6 +2863,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Tallahassee", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2819,6 +2887,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Tampa", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2842,6 +2911,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Toledo", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2865,6 +2935,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Tucson", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2888,6 +2959,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Tulsa", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2911,6 +2983,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Washington_DC", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2936,6 +3009,7 @@ | ||||
|     { | ||||
|       "uid": "roadm West_Palm_Beach", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2959,6 +3033,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Wilmington", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -2982,6 +3057,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Amsterdam", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3007,6 +3083,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Berlin", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3030,6 +3107,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Brussels", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3053,6 +3131,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Bucharest", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3076,6 +3155,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Frankfurt", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3099,6 +3179,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Istanbul", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3123,6 +3204,7 @@ | ||||
|     { | ||||
|       "uid": "roadm London", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3147,6 +3229,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Madrid", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3170,6 +3253,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Paris", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3194,6 +3278,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Rome", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3219,6 +3304,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Vienna", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3243,6 +3329,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Warsaw", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3267,6 +3354,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Zurich", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3290,6 +3378,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Bangkok", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3313,6 +3402,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Beijing", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3336,6 +3426,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Delhi", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3360,6 +3451,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Hong_Kong", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3385,6 +3477,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Honolulu", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3409,6 +3502,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Mumbai", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3433,6 +3527,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Seoul", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3456,6 +3551,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Shanghai", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3479,6 +3575,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Singapore", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3502,6 +3599,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Sydney", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3526,6 +3624,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Taipei", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -3551,6 +3650,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Tokyo", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -83375,7 +83475,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 28.5006, | ||||
|         "gain_target": 28.5, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -88752,7 +88852,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 28.5032, | ||||
|         "gain_target": 28.5, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -89037,7 +89137,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 28.5006, | ||||
|         "gain_target": 28.5, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -89721,7 +89821,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 28.502, | ||||
|         "gain_target": 28.5, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -89797,7 +89897,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 28.502, | ||||
|         "gain_target": 28.5, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -89911,7 +90011,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 28.5032, | ||||
|         "gain_target": 28.5, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
|   | ||||
| @@ -1,4 +1,6 @@ | ||||
| { | ||||
|     "f_min": 191.35e12, | ||||
|     "f_max": 196.1e12, | ||||
|     "nf_ripple": [ | ||||
|         0.0, | ||||
|         0.0, | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| {     "Edfa":[{ | ||||
| { | ||||
|     "Edfa": [{ | ||||
|             "type_variety": "CienaDB_medium_gain", | ||||
|             "type_def": "advanced_model", | ||||
|             "gain_flatmax": 25, | ||||
| @@ -7,8 +8,7 @@ | ||||
|             "advanced_config_from_json": "std_medium_gain_advanced_config.json", | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|         }, { | ||||
|             "type_variety": "std_medium_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 26, | ||||
| @@ -18,8 +18,7 @@ | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|         }, { | ||||
|             "type_variety": "std_low_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 16, | ||||
| @@ -29,8 +28,7 @@ | ||||
|             "nf_max": 11, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|         }, { | ||||
|             "type_variety": "test", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 25, | ||||
| @@ -40,8 +38,7 @@ | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|         }, { | ||||
|             "type_variety": "test_fixed_gain", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
| @@ -49,8 +46,7 @@ | ||||
|             "p_max": 21, | ||||
|             "nf0": 5, | ||||
|             "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|         }, { | ||||
|             "type_variety": "std_booster", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
| @@ -58,18 +54,18 @@ | ||||
|             "p_max": 21, | ||||
|             "nf0": 5, | ||||
|             "allowed_for_design": false | ||||
|             }             | ||||
|       ], | ||||
|       "Fiber":[{ | ||||
|         } | ||||
|     ], | ||||
|     "Fiber": [{ | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|             } | ||||
|       ], | ||||
|       "Span":[{ | ||||
|             "power_mode":true, | ||||
|             "delta_power_range_db": [0,0,0.5], | ||||
|         } | ||||
|     ], | ||||
|     "Span": [{ | ||||
|             "power_mode": true, | ||||
|             "delta_power_range_db": [0, 0, 0.5], | ||||
|             "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|             "target_extended_gain": 2.5, | ||||
|             "max_length": 150, | ||||
| @@ -79,25 +75,99 @@ | ||||
|             "EOL": 0, | ||||
|             "con_in": 0, | ||||
|             "con_out": 0 | ||||
|             } | ||||
|       ], | ||||
|       "Roadm":[{ | ||||
|         } | ||||
|     ], | ||||
|     "Roadm": [{ | ||||
|             "type_variety": "example_test", | ||||
|             "target_pch_out_db": -18, | ||||
|             "add_drop_osnr": 35, | ||||
|             "pmd": 1e-12, | ||||
|             "pdl": 0.5, | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             }, | ||||
|             "roadm-path-impairments": [] | ||||
|         }, { | ||||
|             "type_variety": "example_detailed_impairments", | ||||
|             "target_pch_out_db": -20, | ||||
|             "add_drop_osnr": 35, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list":[], | ||||
|                 "booster_variety_list":[] | ||||
|                             }, | ||||
|             "roadm-path-impairments": [ | ||||
|                   { | ||||
|                     "roadm-path-impairments-id": 0, | ||||
|                     "roadm-express-path": [{ | ||||
|                         "frequency-range": { | ||||
|                             "lower-frequency": 191.3e12, | ||||
|                             "upper-frequency": 196.1e12 | ||||
|                             }, | ||||
|                         "roadm-pmd": 0, | ||||
|                         "roadm-cd": 0, | ||||
|                         "roadm-pdl": 0, | ||||
|                         "roadm-inband-crosstalk": 0, | ||||
|                         "roadm-maxloss": 16.5 | ||||
|                         } | ||||
|                     ] | ||||
|                 }, { | ||||
|                     "roadm-path-impairments-id": 1, | ||||
|                     "roadm-add-path": [{ | ||||
|                         "frequency-range": { | ||||
|                             "lower-frequency": 191.3e12, | ||||
|                             "upper-frequency": 196.1e12 | ||||
|                         }, | ||||
|                         "roadm-pmd": 0, | ||||
|                         "roadm-cd": 0, | ||||
|                         "roadm-pdl": 0, | ||||
|                         "roadm-inband-crosstalk": 0, | ||||
|                         "roadm-maxloss": 11.5, | ||||
|                         "roadm-pmax": 2.5, | ||||
|                         "roadm-osnr": 41, | ||||
|                         "roadm-noise-figure": 23 | ||||
|                     }] | ||||
|                 }, { | ||||
|                     "roadm-path-impairments-id": 2, | ||||
|                     "roadm-drop-path": [{ | ||||
|                         "frequency-range": { | ||||
|                             "lower-frequency": 191.3e12, | ||||
|                             "upper-frequency": 196.1e12 | ||||
|                             }, | ||||
|                         "roadm-pmd": 0, | ||||
|                         "roadm-cd": 0, | ||||
|                         "roadm-pdl": 0, | ||||
|                         "roadm-inband-crosstalk": 0, | ||||
|                         "roadm-maxloss": 11.5, | ||||
|                         "roadm-minloss": 7.5, | ||||
|                         "roadm-typloss": 10, | ||||
|                         "roadm-pmin": -13.5, | ||||
|                         "roadm-pmax": -9.5, | ||||
|                         "roadm-ptyp": -12, | ||||
|                         "roadm-osnr": 41, | ||||
|                         "roadm-noise-figure": 15 | ||||
|                     }] | ||||
|                 }] | ||||
|         }, { | ||||
|             "target_pch_out_db": -20, | ||||
|             "add_drop_osnr": 38, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "restrictions": { | ||||
|                             "preamp_variety_list":[], | ||||
|                             "booster_variety_list":[] | ||||
|                             }     | ||||
|             }], | ||||
|       "SI":[{ | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|         } | ||||
|     ], | ||||
|     "SI": [{ | ||||
|             "f_min": 191.3e12, | ||||
|             "f_max":196.1e12, | ||||
|             "f_max": 196.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "spacing": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "power_range_db": [0,0,0.5], | ||||
|             "power_range_db": [0, 0, 0.5], | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 100, | ||||
|             "sys_margins": 0 | ||||
| @@ -105,131 +175,118 @@ | ||||
|       "Transceiver":[ | ||||
|             { | ||||
|             "type_variety": "vendorA_trx-type1", | ||||
|             "frequency":{ | ||||
|                         "min": 191.35e12, | ||||
|                         "max": 196.1e12 | ||||
|                         }, | ||||
|             "mode":[ | ||||
|                        { | ||||
|                        "format": "PS_SP64_1", | ||||
|                        "baud_rate": 32e9, | ||||
|                        "OSNR": 11, | ||||
|                        "bit_rate": 100e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 100, | ||||
|                        "min_spacing": 50e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "PS_SP64_2", | ||||
|                        "baud_rate": 64e9, | ||||
|                        "OSNR": 15, | ||||
|                        "bit_rate": 200e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 100, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1                        | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 1", | ||||
|                        "baud_rate": 32e9, | ||||
|                        "OSNR": 11, | ||||
|                        "bit_rate": 100e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 100, | ||||
|                        "min_spacing": 50e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 2", | ||||
|                        "baud_rate": 64e9, | ||||
|                        "OSNR": 15, | ||||
|                        "bit_rate": 200e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 100, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1                        | ||||
|                        }                        | ||||
|                    ] | ||||
|             "frequency": { | ||||
|                 "min": 191.35e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             { | ||||
|             "mode": [{ | ||||
|                     "format": "PS_SP64_1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 11, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "PS_SP64_2", | ||||
|                     "baud_rate": 64e9, | ||||
|                     "OSNR": 15, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 11, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2", | ||||
|                     "baud_rate": 64e9, | ||||
|                     "OSNR": 15, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         }, { | ||||
|             "type_variety": "Voyager_16QAM", | ||||
|             "frequency":{ | ||||
|                         "min": 191.35e12, | ||||
|                         "max": 196.1e12 | ||||
|                         }, | ||||
|             "mode":[ | ||||
|                        { | ||||
|                        "format": "16QAM", | ||||
|                        "baud_rate": 32e9, | ||||
|                        "OSNR": 19, | ||||
|                        "bit_rate": 200e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 100, | ||||
|                        "min_spacing": 50e9, | ||||
|                        "cost":1 | ||||
|                        } | ||||
|                    ] | ||||
|             "frequency": { | ||||
|                 "min": 191.35e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             { | ||||
|             "mode": [{ | ||||
|                     "format": "16QAM", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 19, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         }, { | ||||
|             "type_variety": "Voyager", | ||||
|             "frequency":{ | ||||
|                         "min": 191.35e12, | ||||
|                         "max": 196.1e12 | ||||
|                         }, | ||||
|             "mode":[ | ||||
|                        { | ||||
|                        "format": "mode 1", | ||||
|                        "baud_rate": 32e9, | ||||
|                        "OSNR": 12, | ||||
|                        "bit_rate": 100e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 45, | ||||
|                        "min_spacing": 50e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 3", | ||||
|                        "baud_rate": 44e9, | ||||
|                        "OSNR": 18, | ||||
|                        "bit_rate": 300e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 45, | ||||
|                        "min_spacing": 62.5e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 2", | ||||
|                        "baud_rate": 66e9, | ||||
|                        "OSNR": 21, | ||||
|                        "bit_rate": 400e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 45, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 2 - fake", | ||||
|                        "baud_rate": 66e9, | ||||
|                        "OSNR": 21, | ||||
|                        "bit_rate": 400e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 45, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1 | ||||
|                        }, | ||||
|                        { | ||||
|                        "format": "mode 4", | ||||
|                        "baud_rate": 66e9, | ||||
|                        "OSNR": 16, | ||||
|                        "bit_rate": 200e9, | ||||
|                        "roll_off": 0.15, | ||||
|                        "tx_osnr": 45, | ||||
|                        "min_spacing": 75e9, | ||||
|                        "cost":1 | ||||
|                        } | ||||
|                    ] | ||||
|             } | ||||
|       ] | ||||
|  | ||||
|             "frequency": { | ||||
|                 "min": 191.35e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "mode 1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 12, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 3", | ||||
|                     "baud_rate": 44e9, | ||||
|                     "OSNR": 18, | ||||
|                     "bit_rate": 300e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 62.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2 - fake", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 4", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 16, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         } | ||||
|     ] | ||||
| } | ||||
|   | ||||
							
								
								
									
										220
									
								
								tests/data/eqpt_config_psd.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										220
									
								
								tests/data/eqpt_config_psd.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,220 @@ | ||||
| { | ||||
|     "Edfa": [{ | ||||
|             "type_variety": "CienaDB_medium_gain", | ||||
|             "type_def": "advanced_model", | ||||
|             "gain_flatmax": 25, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "advanced_config_from_json": "std_medium_gain_advanced_config.json", | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "std_medium_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 26, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 6, | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "std_low_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 16, | ||||
|             "gain_min": 8, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 7, | ||||
|             "nf_max": 11, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "test", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 25, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 5.8, | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "test_fixed_gain", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
|             "gain_min": 20, | ||||
|             "p_max": 21, | ||||
|             "nf0": 5, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "std_booster", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
|             "gain_min": 20, | ||||
|             "p_max": 21, | ||||
|             "nf0": 5, | ||||
|             "allowed_for_design": false | ||||
|         } | ||||
|     ], | ||||
|     "Fiber": [{ | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         } | ||||
|     ], | ||||
|     "Span": [{ | ||||
|             "power_mode": true, | ||||
|             "delta_power_range_db": [0, 0, 0.5], | ||||
|             "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|             "target_extended_gain": 2.5, | ||||
|             "max_length": 150, | ||||
|             "length_units": "km", | ||||
|             "max_loss": 28, | ||||
|             "padding": 10, | ||||
|             "EOL": 0, | ||||
|             "con_in": 0, | ||||
|             "con_out": 0 | ||||
|         } | ||||
|     ], | ||||
|     "Roadm": [{ | ||||
|             "target_psd_out_mWperGHz": 3.125e-4, | ||||
|             "add_drop_osnr": 38, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|         } | ||||
|     ], | ||||
|     "SI": [{ | ||||
|             "f_min": 191.35e12, | ||||
|             "f_max": 196.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "spacing": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "power_range_db": [0, 0, 0.5], | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 100, | ||||
|             "sys_margins": 0 | ||||
|         } | ||||
|     ], | ||||
|     "Transceiver": [{ | ||||
|             "type_variety": "vendorA_trx-type1", | ||||
|             "frequency": { | ||||
|                 "min": 191.4e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "PS_SP64_1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 11, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "PS_SP64_2", | ||||
|                     "baud_rate": 64e9, | ||||
|                     "OSNR": 15, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 11, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2", | ||||
|                     "baud_rate": 64e9, | ||||
|                     "OSNR": 15, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         }, { | ||||
|             "type_variety": "Voyager_16QAM", | ||||
|             "frequency": { | ||||
|                 "min": 191.4e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "16QAM", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 19, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         }, { | ||||
|             "type_variety": "Voyager", | ||||
|             "frequency": { | ||||
|                 "min": 191.4e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "mode 1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 12, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 3", | ||||
|                     "baud_rate": 44e9, | ||||
|                     "OSNR": 18, | ||||
|                     "bit_rate": 300e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 62.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2 - fake", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 4", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 16, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         } | ||||
|     ] | ||||
|  | ||||
| } | ||||
							
								
								
									
										220
									
								
								tests/data/eqpt_config_psw.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										220
									
								
								tests/data/eqpt_config_psw.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,220 @@ | ||||
| { | ||||
|     "Edfa": [{ | ||||
|             "type_variety": "CienaDB_medium_gain", | ||||
|             "type_def": "advanced_model", | ||||
|             "gain_flatmax": 25, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "advanced_config_from_json": "std_medium_gain_advanced_config.json", | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "std_medium_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 26, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 6, | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "std_low_gain", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 16, | ||||
|             "gain_min": 8, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 7, | ||||
|             "nf_max": 11, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "test", | ||||
|             "type_def": "variable_gain", | ||||
|             "gain_flatmax": 25, | ||||
|             "gain_min": 15, | ||||
|             "p_max": 21, | ||||
|             "nf_min": 5.8, | ||||
|             "nf_max": 10, | ||||
|             "out_voa_auto": false, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "test_fixed_gain", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
|             "gain_min": 20, | ||||
|             "p_max": 21, | ||||
|             "nf0": 5, | ||||
|             "allowed_for_design": true | ||||
|         }, { | ||||
|             "type_variety": "std_booster", | ||||
|             "type_def": "fixed_gain", | ||||
|             "gain_flatmax": 21, | ||||
|             "gain_min": 20, | ||||
|             "p_max": 21, | ||||
|             "nf0": 5, | ||||
|             "allowed_for_design": false | ||||
|         } | ||||
|     ], | ||||
|     "Fiber": [{ | ||||
|             "type_variety": "SSMF", | ||||
|             "dispersion": 1.67e-05, | ||||
|             "effective_area": 83e-12, | ||||
|             "pmd_coef": 1.265e-15 | ||||
|         } | ||||
|     ], | ||||
|     "Span": [{ | ||||
|             "power_mode": true, | ||||
|             "delta_power_range_db": [0, 0, 0.5], | ||||
|             "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|             "target_extended_gain": 2.5, | ||||
|             "max_length": 150, | ||||
|             "length_units": "km", | ||||
|             "max_loss": 28, | ||||
|             "padding": 10, | ||||
|             "EOL": 0, | ||||
|             "con_in": 0, | ||||
|             "con_out": 0 | ||||
|         } | ||||
|     ], | ||||
|     "Roadm": [{ | ||||
|             "target_out_mWperSlotWidth": 2.0e-4, | ||||
|             "add_drop_osnr": 38, | ||||
|             "pmd": 0, | ||||
|             "pdl": 0, | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|         } | ||||
|     ], | ||||
|     "SI": [{ | ||||
|             "f_min": 191.35e12, | ||||
|             "f_max": 196.1e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "spacing": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "power_range_db": [0, 0, 0.5], | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 100, | ||||
|             "sys_margins": 0 | ||||
|         } | ||||
|     ], | ||||
|     "Transceiver": [{ | ||||
|             "type_variety": "vendorA_trx-type1", | ||||
|             "frequency": { | ||||
|                 "min": 191.4e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "PS_SP64_1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 11, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "PS_SP64_2", | ||||
|                     "baud_rate": 64e9, | ||||
|                     "OSNR": 15, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 11, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2", | ||||
|                     "baud_rate": 64e9, | ||||
|                     "OSNR": 15, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         }, { | ||||
|             "type_variety": "Voyager_16QAM", | ||||
|             "frequency": { | ||||
|                 "min": 191.4e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "16QAM", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 19, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 100, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         }, { | ||||
|             "type_variety": "Voyager", | ||||
|             "frequency": { | ||||
|                 "min": 191.4e12, | ||||
|                 "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [{ | ||||
|                     "format": "mode 1", | ||||
|                     "baud_rate": 32e9, | ||||
|                     "OSNR": 12, | ||||
|                     "bit_rate": 100e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 50e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 3", | ||||
|                     "baud_rate": 44e9, | ||||
|                     "OSNR": 18, | ||||
|                     "bit_rate": 300e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 62.5e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 2 - fake", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 21, | ||||
|                     "bit_rate": 400e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 }, { | ||||
|                     "format": "mode 4", | ||||
|                     "baud_rate": 66e9, | ||||
|                     "OSNR": 16, | ||||
|                     "bit_rate": 200e9, | ||||
|                     "roll_off": 0.15, | ||||
|                     "tx_osnr": 45, | ||||
|                     "min_spacing": 75e9, | ||||
|                     "cost": 1 | ||||
|                 } | ||||
|             ] | ||||
|         } | ||||
|     ] | ||||
|  | ||||
| } | ||||
							
								
								
									
										238
									
								
								tests/data/eqpt_config_sweep.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										238
									
								
								tests/data/eqpt_config_sweep.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,238 @@ | ||||
| { | ||||
|       "Edfa": [{ | ||||
|                   "type_variety": "CienaDB_medium_gain", | ||||
|                   "type_def": "advanced_model", | ||||
|                   "gain_flatmax": 25, | ||||
|                   "gain_min": 15, | ||||
|                   "p_max": 21, | ||||
|                   "advanced_config_from_json": "std_medium_gain_advanced_config.json", | ||||
|                   "out_voa_auto": false, | ||||
|                   "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|                   "type_variety": "std_medium_gain", | ||||
|                   "type_def": "variable_gain", | ||||
|                   "gain_flatmax": 26, | ||||
|                   "gain_min": 15, | ||||
|                   "p_max": 21, | ||||
|                   "nf_min": 6, | ||||
|                   "nf_max": 10, | ||||
|                   "out_voa_auto": false, | ||||
|                   "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|                   "type_variety": "std_low_gain", | ||||
|                   "type_def": "variable_gain", | ||||
|                   "gain_flatmax": 16, | ||||
|                   "gain_min": 8, | ||||
|                   "p_max": 21, | ||||
|                   "nf_min": 7, | ||||
|                   "nf_max": 11, | ||||
|                   "out_voa_auto": false, | ||||
|                   "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|                   "type_variety": "test", | ||||
|                   "type_def": "variable_gain", | ||||
|                   "gain_flatmax": 25, | ||||
|                   "gain_min": 15, | ||||
|                   "p_max": 21, | ||||
|                   "nf_min": 5.8, | ||||
|                   "nf_max": 10, | ||||
|                   "out_voa_auto": false, | ||||
|                   "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|                   "type_variety": "test_fixed_gain", | ||||
|                   "type_def": "fixed_gain", | ||||
|                   "gain_flatmax": 21, | ||||
|                   "gain_min": 20, | ||||
|                   "p_max": 21, | ||||
|                   "nf0": 5, | ||||
|                   "allowed_for_design": true | ||||
|             }, | ||||
|             { | ||||
|                   "type_variety": "std_booster", | ||||
|                   "type_def": "fixed_gain", | ||||
|                   "gain_flatmax": 21, | ||||
|                   "gain_min": 20, | ||||
|                   "p_max": 21, | ||||
|                   "nf0": 5, | ||||
|                   "allowed_for_design": false | ||||
|             } | ||||
|       ], | ||||
|       "Fiber": [{ | ||||
|                   "type_variety": "SSMF", | ||||
|                   "dispersion": 1.67e-05, | ||||
|                   "effective_area": 83e-12, | ||||
|                   "pmd_coef": 1.265e-15 | ||||
|             } | ||||
|       ], | ||||
|       "Span": [{ | ||||
|                   "power_mode":true, | ||||
|                   "delta_power_range_db": [0,0,0.5], | ||||
|                   "max_fiber_lineic_loss_for_raman": 0.25, | ||||
|                   "target_extended_gain": 2.5, | ||||
|                   "max_length": 150, | ||||
|                   "length_units": "km", | ||||
|                   "max_loss": 28, | ||||
|                   "padding": 10, | ||||
|                   "EOL": 0, | ||||
|                   "con_in": 0, | ||||
|                   "con_out": 0 | ||||
|             } | ||||
|       ], | ||||
|       "Roadm": [{ | ||||
|                   "target_pch_out_db": -20, | ||||
|                   "add_drop_osnr": 38, | ||||
|                   "pmd": 0, | ||||
|                   "pdl": 0, | ||||
|                   "restrictions": { | ||||
|                                   "preamp_variety_list":[], | ||||
|                                   "booster_variety_list":[] | ||||
|                   } | ||||
|             } | ||||
|       ], | ||||
|       "SI": [{ | ||||
|                   "f_min": 191.35e12, | ||||
|                   "f_max": 196.1e12, | ||||
|                   "baud_rate": 32e9, | ||||
|                   "spacing": 50e9, | ||||
|                   "power_dbm": 0, | ||||
|                   "power_range_db": [-6,0,0.5], | ||||
|                   "roll_off": 0.15, | ||||
|                   "tx_osnr": 100, | ||||
|                   "sys_margins": 0 | ||||
|             } | ||||
|       ], | ||||
|       "Transceiver":[ | ||||
|             { | ||||
|             "type_variety": "vendorA_trx-type1", | ||||
|             "frequency":{ | ||||
|                   "min": 191.4e12, | ||||
|                   "max": 196.1e12 | ||||
|             }, | ||||
|             "mode":[ | ||||
|                        { | ||||
|                              "format": "PS_SP64_1", | ||||
|                              "baud_rate": 32e9, | ||||
|                              "OSNR": 11, | ||||
|                              "bit_rate": 100e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 100, | ||||
|                              "min_spacing": 50e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "PS_SP64_2", | ||||
|                              "baud_rate": 64e9, | ||||
|                              "OSNR": 15, | ||||
|                              "bit_rate": 200e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 100, | ||||
|                              "min_spacing": 75e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "mode 1", | ||||
|                              "baud_rate": 32e9, | ||||
|                              "OSNR": 11, | ||||
|                              "bit_rate": 100e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 100, | ||||
|                              "min_spacing": 50e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "mode 2", | ||||
|                              "baud_rate": 64e9, | ||||
|                              "OSNR": 15, | ||||
|                              "bit_rate": 200e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 100, | ||||
|                              "min_spacing": 75e9, | ||||
|                              "cost": 1 | ||||
|                        } | ||||
|                   ] | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "Voyager_16QAM", | ||||
|             "frequency": { | ||||
|                   "min": 191.4e12, | ||||
|                   "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [ | ||||
|                        { | ||||
|                              "format": "16QAM", | ||||
|                              "baud_rate": 32e9, | ||||
|                              "OSNR": 19, | ||||
|                              "bit_rate": 200e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 100, | ||||
|                              "min_spacing": 50e9, | ||||
|                              "cost": 1 | ||||
|                        } | ||||
|                   ] | ||||
|             }, | ||||
|             { | ||||
|             "type_variety": "Voyager", | ||||
|             "frequency": { | ||||
|                   "min": 191.4e12, | ||||
|                   "max": 196.1e12 | ||||
|             }, | ||||
|             "mode": [ | ||||
|                        { | ||||
|                              "format": "mode 1", | ||||
|                              "baud_rate": 32e9, | ||||
|                              "OSNR": 12, | ||||
|                              "bit_rate": 100e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 45, | ||||
|                              "min_spacing": 50e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "mode 3", | ||||
|                              "baud_rate": 44e9, | ||||
|                              "OSNR": 18, | ||||
|                              "bit_rate": 300e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 45, | ||||
|                              "min_spacing": 62.5e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "mode 2", | ||||
|                              "baud_rate": 66e9, | ||||
|                              "OSNR": 21, | ||||
|                              "bit_rate": 400e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 45, | ||||
|                              "min_spacing": 75e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "mode 2 - fake", | ||||
|                              "baud_rate": 66e9, | ||||
|                              "OSNR": 21, | ||||
|                              "bit_rate": 400e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 45, | ||||
|                              "min_spacing": 75e9, | ||||
|                              "cost": 1 | ||||
|                        }, | ||||
|                        { | ||||
|                              "format": "mode 4", | ||||
|                              "baud_rate": 66e9, | ||||
|                              "OSNR": 16, | ||||
|                              "bit_rate": 200e9, | ||||
|                              "roll_off": 0.15, | ||||
|                              "tx_osnr": 45, | ||||
|                              "min_spacing": 75e9, | ||||
|                              "cost": 1 | ||||
|                        } | ||||
|                   ] | ||||
|             } | ||||
|       ] | ||||
|  | ||||
| } | ||||
| @@ -63,6 +63,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Lannion_CAS", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -18.6, | ||||
|         "restrictions": { | ||||
| @@ -87,6 +88,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Lorient_KMA", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -111,6 +113,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Vannes_KBE", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -134,6 +137,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Rennes_STA", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -157,6 +161,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Brest_KLA", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
|   | ||||
| @@ -159,6 +159,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Lannion_CAS", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -183,6 +184,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Lorient_KMA", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -207,6 +209,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Vannes_KBE", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -230,6 +233,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Rennes_STA", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -240,7 +244,6 @@ | ||||
|           "east edfa in Rennes_STA to Stbrieuc": -20, | ||||
|           "east edfa in Rennes_STA to Ploermel": -20 | ||||
|         } | ||||
|  | ||||
|       }, | ||||
|       "metadata": { | ||||
|         "location": { | ||||
| @@ -254,6 +257,7 @@ | ||||
|     { | ||||
|       "uid": "roadm Brest_KLA", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -277,6 +281,7 @@ | ||||
|     { | ||||
|       "uid": "roadm a", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -302,6 +307,7 @@ | ||||
|     { | ||||
|       "uid": "roadm b", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -310,7 +316,7 @@ | ||||
|           ], | ||||
|           "booster_variety_list": [] | ||||
|         }, | ||||
|         "per_degree_pch_out_db":{ | ||||
|         "per_degree_pch_out_db": { | ||||
|           "east edfa in b to a": -20, | ||||
|           "east edfa in b to f": -20 | ||||
|         } | ||||
| @@ -327,13 +333,14 @@ | ||||
|     { | ||||
|       "uid": "roadm c", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
|           "preamp_variety_list": [], | ||||
|           "booster_variety_list": [] | ||||
|         }, | ||||
|         "per_degree_pch_out_db":{ | ||||
|         "per_degree_pch_out_db": { | ||||
|           "east edfa in c to a": -20, | ||||
|           "east edfa in c to d": -20, | ||||
|           "east edfa in c to f": -20 | ||||
| @@ -351,6 +358,7 @@ | ||||
|     { | ||||
|       "uid": "roadm d", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -374,6 +382,7 @@ | ||||
|     { | ||||
|       "uid": "roadm e", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -397,6 +406,7 @@ | ||||
|     { | ||||
|       "uid": "roadm f", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -421,6 +431,7 @@ | ||||
|     { | ||||
|       "uid": "roadm g", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -430,7 +441,7 @@ | ||||
|         "per_degree_pch_out_db": { | ||||
|           "east edfa in g to e": -20, | ||||
|           "east edfa in g to h": -20 | ||||
|          } | ||||
|         } | ||||
|       }, | ||||
|       "metadata": { | ||||
|         "location": { | ||||
| @@ -444,6 +455,7 @@ | ||||
|     { | ||||
|       "uid": "roadm h", | ||||
|       "type": "Roadm", | ||||
|       "type_variety": "default", | ||||
|       "params": { | ||||
|         "target_pch_out_db": -20, | ||||
|         "restrictions": { | ||||
| @@ -1593,7 +1605,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_medium_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 18.5, | ||||
|         "gain_target": 13.177288, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -2235,7 +2247,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_low_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 6.5, | ||||
|         "gain_target": 11.822712, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -2292,7 +2304,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "std_low_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 13.82, | ||||
|         "gain_target": 13.822712, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
| @@ -2311,7 +2323,7 @@ | ||||
|       "type": "Edfa", | ||||
|       "type_variety": "test_fixed_gain", | ||||
|       "operational": { | ||||
|         "gain_target": 15.18, | ||||
|         "gain_target": 15.177288, | ||||
|         "delta_p": null, | ||||
|         "tilt_target": 0, | ||||
|         "out_voa": 0 | ||||
|   | ||||
| @@ -1,4 +1,8 @@ | ||||
| INFO     gnpy.tools.cli_examples:cli_examples.py Computing path requests meshTopologyExampleV2.xls into JSON format | ||||
| WARNING  gnpy.tools.json_io:json_io.py  | ||||
| 	WARNING missing type_variety attribute in eqpt_config.json[Roadm] | ||||
| 	default value is type_variety = default | ||||
|  | ||||
| INFO     gnpy.tools.json_io:json_io.py Automatically converting requests from XLS to JSON | ||||
| INFO     gnpy.topology.request:request.py  | ||||
| 	request 0 | ||||
|   | ||||
| @@ -1,4 +1,8 @@ | ||||
| INFO     gnpy.tools.cli_examples:cli_examples.py Computing path requests CORONET_services.json into JSON format | ||||
| WARNING  gnpy.tools.json_io:json_io.py  | ||||
| 	WARNING missing type_variety attribute in eqpt_config.json[Roadm] | ||||
| 	default value is type_variety = default | ||||
|  | ||||
| INFO     gnpy.topology.request:request.py  | ||||
| 	request 0 | ||||
| 	Computing path from trx Abilene to trx Albany | ||||
|   | ||||
							
								
								
									
										311
									
								
								tests/invocation/logs_power_sweep_example
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										311
									
								
								tests/invocation/logs_power_sweep_example
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,311 @@ | ||||
| WARNING  gnpy.tools.json_io:json_io.py  | ||||
| 	WARNING missing type_variety attribute in eqpt_config.json[Roadm] | ||||
| 	default value is type_variety = default | ||||
|  | ||||
| INFO     gnpy.tools.cli_examples:cli_examples.py source = 'brest' | ||||
| INFO     gnpy.tools.cli_examples:cli_examples.py destination = 'rennes' | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Lorient_KMA to Loudeac | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node east edfa in Lannion_CAS to Stbrieuc | ||||
| 	is above user specified amplifier std_low_gain | ||||
| 	max flat gain: 16dB ; required gain: 21.22dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Rennes_STA to Stbrieuc | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node east edfa in Lannion_CAS to Morlaix | ||||
| 	is above user specified amplifier std_low_gain | ||||
| 	max flat gain: 16dB ; required gain: 21.22dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Brest_KLA to Morlaix | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Lorient_KMA to Loudeac | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node west edfa in Lannion_CAS to Corlay | ||||
| 	is above user specified amplifier test | ||||
| 	max flat gain: 25dB ; required gain: 28.0dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Lorient_KMA to Vannes_KBE | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Vannes_KBE to Lorient_KMA | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Lorient_KMA to Quimper | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Quimper to Lorient_KMA | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Brest_KLA to Quimper | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Vannes_KBE to Lorient_KMA | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Lorient_KMA to Vannes_KBE | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Vannes_KBE to Ploermel | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Ploermel to Vannes_KBE | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Rennes_STA to Ploermel | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Rennes_STA to Stbrieuc | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Stbrieuc to Rennes_STA | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Lannion_CAS to Stbrieuc | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Rennes_STA to Ploermel | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Vannes_KBE to Ploermel | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Brest_KLA to Morlaix | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node east edfa in Brest_KLA to Quimper | ||||
| 	is above user specified amplifier std_low_gain | ||||
| 	max flat gain: 16dB ; required gain: 21.22dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Quimper to Lorient_KMA | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Lorient_KMA to Quimper | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in a to b | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in b to a | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in a to c | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in c to a | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in b to a | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in a to b | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in b to f | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in f to b | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in c to a | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in a to c | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in d to c | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in c to f | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in f to c | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in d to c | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in c to d | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in d to e | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in e to d | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in e to d | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in d to e | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in e to g | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in g to e | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in f to c | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in c to f | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in f to b | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in b to f | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in f to h | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in h to f | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in g to e | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in e to g | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in g to h | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in h to g | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in h to f | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in f to h | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in h to g | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in g to h | ||||
| 	is beyond all available amplifiers capabilities and/or extended_gain_range: | ||||
| 	a power reduction of -1.78 is applied | ||||
|  | ||||
| @@ -1,3 +1,7 @@ | ||||
| WARNING  gnpy.tools.json_io:json_io.py  | ||||
| 	WARNING missing type_variety attribute in eqpt_config.json[Roadm] | ||||
| 	default value is type_variety = default | ||||
|  | ||||
| INFO     gnpy.tools.cli_examples:cli_examples.py source = 'lannion' | ||||
| INFO     gnpy.tools.cli_examples:cli_examples.py destination = 'lorient' | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| @@ -8,7 +12,7 @@ WARNING  gnpy.core.network:network.py | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node east edfa in Lannion_CAS to Stbrieuc | ||||
| 	is above user specified amplifier std_low_gain | ||||
| 	max flat gain: 16dB ; required gain: 23.0dB. Please check amplifier type. | ||||
| 	max flat gain: 16dB ; required gain: 21.18dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Rennes_STA to Stbrieuc | ||||
| @@ -18,7 +22,7 @@ WARNING  gnpy.core.network:network.py | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node east edfa in Lannion_CAS to Morlaix | ||||
| 	is above user specified amplifier std_low_gain | ||||
| 	max flat gain: 16dB ; required gain: 23.5dB. Please check amplifier type. | ||||
| 	max flat gain: 16dB ; required gain: 21.18dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node west edfa in Brest_KLA to Morlaix | ||||
| @@ -33,7 +37,7 @@ WARNING  gnpy.core.network:network.py | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node west edfa in Lannion_CAS to Corlay | ||||
| 	is above user specified amplifier test | ||||
| 	max flat gain: 25dB ; required gain: 29.82dB. Please check amplifier type. | ||||
| 	max flat gain: 25dB ; required gain: 28.0dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Lorient_KMA to Vannes_KBE | ||||
| @@ -118,7 +122,7 @@ WARNING  gnpy.core.network:network.py | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: effective gain in Node east edfa in Brest_KLA to Quimper | ||||
| 	is above user specified amplifier std_low_gain | ||||
| 	max flat gain: 16dB ; required gain: 23.0dB. Please check amplifier type. | ||||
| 	max flat gain: 16dB ; required gain: 21.18dB. Please check amplifier type. | ||||
|  | ||||
| WARNING  gnpy.core.network:network.py  | ||||
| 	WARNING: target gain and power in node east edfa in Quimper to Lorient_KMA | ||||
|   | ||||
| @@ -16,10 +16,13 @@ Transceiver trx_Stockholm | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      2.00 | ||||
| Roadm roadm_Stockholm | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -31,7 +34,6 @@ Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Stockholm → Norrköping)_(1/2) | ||||
| @@ -54,8 +56,7 @@ Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2) | ||||
|   Power Out (dBm):        21.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.02 | ||||
|   actual pch out (dBm):   2.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Stockholm → Norrköping)_(2/2) | ||||
|   type_variety:                SSMF | ||||
| @@ -65,7 +66,7 @@ Fiber          fiber (Stockholm → Norrköping)_(2/2) | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -14.33 | ||||
|   actual pch out (dBm):        -14.29 | ||||
|   actual pch out (dBm):        -14.30 | ||||
| Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2) | ||||
|   type_variety:           openroadm_mw_mw_preamp | ||||
|   effective gain(dB):     16.33 | ||||
| @@ -73,17 +74,18 @@ Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2) | ||||
|   noise figure (dB):      12.59 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         5.53 | ||||
|   Power Out (dBm):        21.87 | ||||
|   Power In (dBm):         5.52 | ||||
|   Power Out (dBm):        21.86 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.04 | ||||
|   actual pch out (dBm):   2.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Norrköping | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.03 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -95,7 +97,6 @@ Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Norrköping → Linköping) | ||||
| @@ -118,13 +119,14 @@ Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping) | ||||
|   Power Out (dBm):        21.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Linköping | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.01 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -136,7 +138,6 @@ Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Linköping → Jönköping) | ||||
| @@ -156,16 +157,17 @@ Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping) | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -4.97 | ||||
|   Power Out (dBm):        21.86 | ||||
|   Power Out (dBm):        21.87 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.04 | ||||
|   actual pch out (dBm):   2.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Jönköping | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.05 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -177,7 +179,6 @@ Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Jönköping → Borås) | ||||
| @@ -200,13 +201,14 @@ Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås) | ||||
|   Power Out (dBm):        21.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Borås | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.02 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -218,7 +220,6 @@ Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Borås → Gothenburg) | ||||
| @@ -241,13 +242,14 @@ Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg) | ||||
|   Power Out (dBm):        21.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Gothenburg | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.02 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Transceiver trx_Gothenburg | ||||
|   GSNR (0.1nm, dB):          18.89 | ||||
|   GSNR (signal bw, dB):      14.86 | ||||
| @@ -257,6 +259,7 @@ Transceiver trx_Gothenburg | ||||
|   PMD (ps):                  7.99 | ||||
|   PDL (dB):                  3.74 | ||||
|   Latency (ms):              2.45 | ||||
|   Actual pch out (dBm):      2.00 | ||||
|  | ||||
| Transmission result for input power = 2.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m18.89 dB[0m | ||||
|   | ||||
| @@ -16,10 +16,13 @@ Transceiver trx_Stockholm | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      2.00 | ||||
| Roadm roadm_Stockholm | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -31,7 +34,6 @@ Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Stockholm → Norrköping)_(1/2) | ||||
| @@ -54,8 +56,7 @@ Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2) | ||||
|   Power Out (dBm):        21.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.02 | ||||
|   actual pch out (dBm):   2.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Stockholm → Norrköping)_(2/2) | ||||
|   type_variety:                SSMF | ||||
| @@ -65,25 +66,26 @@ Fiber          fiber (Stockholm → Norrköping)_(2/2) | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -14.33 | ||||
|   actual pch out (dBm):        -14.29 | ||||
|   actual pch out (dBm):        -14.30 | ||||
| Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2) | ||||
|   type_variety:           openroadm_mw_mw_preamp_worstcase_ver5 | ||||
|   effective gain(dB):     16.33 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      11.44 | ||||
|   noise figure (dB):      11.43 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         5.53 | ||||
|   Power Out (dBm):        21.86 | ||||
|   Power In (dBm):         5.52 | ||||
|   Power Out (dBm):        21.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.04 | ||||
|   actual pch out (dBm):   2.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Norrköping | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.03 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -95,7 +97,6 @@ Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Norrköping → Linköping) | ||||
| @@ -118,13 +119,14 @@ Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping) | ||||
|   Power Out (dBm):        21.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Linköping | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.01 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -136,7 +138,6 @@ Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Linköping → Jönköping) | ||||
| @@ -156,16 +157,17 @@ Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping) | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -4.97 | ||||
|   Power Out (dBm):        21.86 | ||||
|   Power Out (dBm):        21.87 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Jönköping | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.04 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -177,7 +179,6 @@ Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Jönköping → Borås) | ||||
| @@ -200,13 +201,14 @@ Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås) | ||||
|   Power Out (dBm):        21.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.01 | ||||
|   actual pch out (dBm):   2.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Borås | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.02 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg) | ||||
|   type_variety:           openroadm_mw_mw_booster | ||||
|   effective gain(dB):     22.00 | ||||
| @@ -218,7 +220,6 @@ Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg) | ||||
|   Power Out (dBm):        21.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.00 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Borås → Gothenburg) | ||||
| @@ -241,13 +242,14 @@ Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg) | ||||
|   Power Out (dBm):        21.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       2.00 | ||||
|   effective pch (dBm):    2.00 | ||||
|   actual pch out (dBm):   2.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm_Gothenburg | ||||
|   effective loss (dB):     22.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     22.00 | ||||
|   Actual loss (dB):        22.02 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Transceiver trx_Gothenburg | ||||
|   GSNR (0.1nm, dB):          19.25 | ||||
|   GSNR (signal bw, dB):      15.23 | ||||
| @@ -257,6 +259,7 @@ Transceiver trx_Gothenburg | ||||
|   PMD (ps):                  7.99 | ||||
|   PDL (dB):                  3.74 | ||||
|   Latency (ms):              2.45 | ||||
|   Actual pch out (dBm):      2.00 | ||||
|  | ||||
| Transmission result for input power = 2.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m19.25 dB[0m | ||||
|   | ||||
| @@ -21,6 +21,7 @@ | ||||
| 	bit_rate:	None Gb/s | ||||
| 	spacing:	50.0 GHz | ||||
| 	power:  	1.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	80 | ||||
| 	path_bandwidth: 	100.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
| @@ -34,6 +35,7 @@ | ||||
| 	bit_rate:	100.0 Gb/s | ||||
| 	spacing:	50.0 GHz | ||||
| 	power:  	1.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	95 | ||||
| 	path_bandwidth: 	200.0 Gbit/s | ||||
| 	nodes-list:	['roadm Brest_KLA', 'roadm Lannion_CAS', 'roadm Lorient_KMA', 'roadm Vannes_KBE'] | ||||
| @@ -47,6 +49,7 @@ | ||||
| 	bit_rate:	100.0 Gb/s | ||||
| 	spacing:	50.0 GHz | ||||
| 	power:  	0.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	95 | ||||
| 	path_bandwidth: 	60.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
| @@ -60,6 +63,7 @@ | ||||
| 	bit_rate:	None Gb/s | ||||
| 	spacing:	75.0 GHz | ||||
| 	power:  	3.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	63 | ||||
| 	path_bandwidth: 	150.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
| @@ -73,6 +77,7 @@ | ||||
| 	bit_rate:	200.0 Gb/s | ||||
| 	spacing:	75.0 GHz | ||||
| 	power:  	3.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	63 | ||||
| 	path_bandwidth: 	20.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
| @@ -86,6 +91,7 @@ | ||||
| 	bit_rate:	100.0 Gb/s | ||||
| 	spacing:	50.0 GHz | ||||
| 	power:  	0.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	76 | ||||
| 	path_bandwidth: 	700.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
| @@ -99,6 +105,7 @@ | ||||
| 	bit_rate:	100.0 Gb/s | ||||
| 	spacing:	75.0 GHz | ||||
| 	power:  	0.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	50 | ||||
| 	path_bandwidth: 	400.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
|   | ||||
| @@ -11,6 +11,7 @@ | ||||
| 	bit_rate:	300.0 Gb/s | ||||
| 	spacing:	62.50000000000001 GHz | ||||
| 	power:  	0.0 dBm | ||||
| 	tx_power_dbm:  	0.0 dBm | ||||
| 	nb channels: 	76 | ||||
| 	path_bandwidth: 	100.0 Gbit/s | ||||
| 	nodes-list:	[] | ||||
|   | ||||
							
								
								
									
										167
									
								
								tests/invocation/power_sweep_example
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								tests/invocation/power_sweep_example
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,167 @@ | ||||
| There are 95 channels propagating | ||||
| Power mode is set to True | ||||
| => it can be modified in eqpt_config.json - Span | ||||
|  | ||||
| There are 4 fiber spans over 200 km between trx Brest_KLA and trx Rennes_STA | ||||
|  | ||||
| Now propagating between trx Brest_KLA and trx Rennes_STA: | ||||
|  | ||||
| Propagating with input power = [1;36;40m-3.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          23.73 | ||||
|   GSNR (signal bw, dB):      19.65 | ||||
|   OSNR ASE (0.1nm, dB):      23.99 | ||||
|   OSNR ASE (signal bw, dB):  19.91 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m-2.50 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.01 | ||||
|   GSNR (signal bw, dB):      19.93 | ||||
|   OSNR ASE (0.1nm, dB):      24.37 | ||||
|   OSNR ASE (signal bw, dB):  20.29 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m-2.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.25 | ||||
|   GSNR (signal bw, dB):      20.17 | ||||
|   OSNR ASE (0.1nm, dB):      24.74 | ||||
|   OSNR ASE (signal bw, dB):  20.66 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m-1.50 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.44 | ||||
|   GSNR (signal bw, dB):      20.36 | ||||
|   OSNR ASE (0.1nm, dB):      25.10 | ||||
|   OSNR ASE (signal bw, dB):  21.01 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m-1.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.57 | ||||
|   GSNR (signal bw, dB):      20.49 | ||||
|   OSNR ASE (0.1nm, dB):      25.44 | ||||
|   OSNR ASE (signal bw, dB):  21.36 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m-0.50 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.63 | ||||
|   GSNR (signal bw, dB):      20.55 | ||||
|   OSNR ASE (0.1nm, dB):      25.77 | ||||
|   OSNR ASE (signal bw, dB):  21.69 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m-0.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.60 | ||||
|   GSNR (signal bw, dB):      20.52 | ||||
|   OSNR ASE (0.1nm, dB):      26.09 | ||||
|   OSNR ASE (signal bw, dB):  22.00 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m0.50 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.42 | ||||
|   GSNR (signal bw, dB):      20.34 | ||||
|   OSNR ASE (0.1nm, dB):      26.29 | ||||
|   OSNR ASE (signal bw, dB):  22.20 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m1.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.16 | ||||
|   GSNR (signal bw, dB):      20.08 | ||||
|   OSNR ASE (0.1nm, dB):      26.47 | ||||
|   OSNR ASE (signal bw, dB):  22.39 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m1.50 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.02 | ||||
|   GSNR (signal bw, dB):      19.93 | ||||
|   OSNR ASE (0.1nm, dB):      26.55 | ||||
|   OSNR ASE (signal bw, dB):  22.47 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m2.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.02 | ||||
|   GSNR (signal bw, dB):      19.93 | ||||
|   OSNR ASE (0.1nm, dB):      26.55 | ||||
|   OSNR ASE (signal bw, dB):  22.47 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m2.50 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.02 | ||||
|   GSNR (signal bw, dB):      19.93 | ||||
|   OSNR ASE (0.1nm, dB):      26.55 | ||||
|   OSNR ASE (signal bw, dB):  22.47 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Propagating with input power = [1;36;40m3.00 dBm[0m: | ||||
| Transceiver trx Rennes_STA | ||||
|   GSNR (0.1nm, dB):          24.02 | ||||
|   GSNR (signal bw, dB):      19.93 | ||||
|   OSNR ASE (0.1nm, dB):      26.55 | ||||
|   OSNR ASE (signal bw, dB):  22.47 | ||||
|   CD (ps/nm):                3340.00 | ||||
|   PMD (ps):                  0.57 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.98 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| (Invalid source node 'brest' replaced with trx Brest_KLA) | ||||
|  | ||||
| (Invalid destination node 'rennes' replaced with trx Rennes_STA) | ||||
| @@ -17,10 +17,13 @@ Transceiver trx Lannion_CAS | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      0.00 | ||||
| Roadm roadm Lannion_CAS | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        20.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa east edfa in Lannion_CAS to Corlay | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     21.00 | ||||
| @@ -32,7 +35,6 @@ Edfa east edfa in Lannion_CAS to Corlay | ||||
|   Power Out (dBm):        19.82 | ||||
|   Delta_P (dB):           1.00 | ||||
|   target pch (dBm):       1.00 | ||||
|   effective pch (dBm):    1.00 | ||||
|   actual pch out (dBm):   1.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Lannion_CAS → Corlay)-F061 | ||||
| @@ -77,13 +79,14 @@ Edfa west edfa in Lorient_KMA to Loudeac | ||||
|   Power Out (dBm):        19.85 | ||||
|   Delta_P (dB):           1.00 | ||||
|   target pch (dBm):       1.00 | ||||
|   effective pch (dBm):    1.00 | ||||
|   actual pch out (dBm):   1.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Lorient_KMA | ||||
|   effective loss (dB):     21.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     21.00 | ||||
|   Actual loss (dB):        21.05 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Transceiver trx Lorient_KMA | ||||
|   GSNR (0.1nm, dB):          23.61 | ||||
|   GSNR (signal bw, dB):      19.53 | ||||
| @@ -93,6 +96,7 @@ Transceiver trx Lorient_KMA | ||||
|   PMD (ps):                  0.46 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.64 | ||||
|   Actual pch out (dBm):      0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m23.61 dB[0m | ||||
|   | ||||
| @@ -17,10 +17,13 @@ Transceiver trx Lannion_CAS | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
| Roadm roadm Lannion_CAS | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.00, mode_2: 20.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Edfa east edfa in Lannion_CAS to Corlay | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     21.00 | ||||
| @@ -32,7 +35,6 @@ Edfa east edfa in Lannion_CAS to Corlay | ||||
|   Power Out (dBm):        18.79 | ||||
|   Delta_P (dB):           1.00 | ||||
|   target pch (dBm):       1.00 | ||||
|   effective pch (dBm):    1.00 | ||||
|   actual pch out (dBm):   mode_1: 1.01, mode_2: 1.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Lannion_CAS → Corlay)-F061 | ||||
| @@ -77,13 +79,14 @@ Edfa west edfa in Lorient_KMA to Loudeac | ||||
|   Power Out (dBm):        18.84 | ||||
|   Delta_P (dB):           1.00 | ||||
|   target pch (dBm):       1.00 | ||||
|   effective pch (dBm):    1.00 | ||||
|   actual pch out (dBm):   mode_1: 1.04, mode_2: 1.09 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Lorient_KMA | ||||
|   effective loss (dB):     21.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     21.00 | ||||
|   Actual loss (dB):        mode_1: 21.04, mode_2: 21.09 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Transceiver trx Lorient_KMA | ||||
|   GSNR (0.1nm, dB):          mode_1: 23.66, mode_2: 23.81 | ||||
|   GSNR (signal bw, dB):      mode_1: 19.58, mode_2: 16.72 | ||||
| @@ -93,6 +96,7 @@ Transceiver trx Lorient_KMA | ||||
|   PMD (ps):                  0.46 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.64 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m23.72 dB[0m | ||||
|   | ||||
							
								
								
									
										449
									
								
								tests/invocation/transmission_long_pow
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										449
									
								
								tests/invocation/transmission_long_pow
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,449 @@ | ||||
| User input for spectrum used for propagation instead of SI | ||||
| There are 60 channels propagating | ||||
| Power mode is set to True | ||||
| => it can be modified in eqpt_config.json - Span | ||||
|  | ||||
| There are 15 fiber spans over 1200 km between Site_A and Site_B | ||||
|  | ||||
| Now propagating between Site_A and Site_B: | ||||
|  | ||||
| Propagating with input power = [1;36;40m0.00 dBm[0m: | ||||
| Transceiver Site_A | ||||
|   GSNR (0.1nm, dB):          mode_1: 40.00, mode_2: 40.00 | ||||
|   GSNR (signal bw, dB):      mode_1: 35.92, mode_2: 32.91 | ||||
|   OSNR ASE (0.1nm, dB):      mode_1: 40.00, mode_2: 40.00 | ||||
|   OSNR ASE (signal bw, dB):  mode_1: 35.92, mode_2: 32.91 | ||||
|   CD (ps/nm):                0.00 | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
| Roadm roadm Site A | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.00, mode_2: 20.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Edfa booster A | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -2.22 | ||||
|   Power Out (dBm):        17.79 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span1 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -15.98 | ||||
| Edfa Edfa1 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.80 | ||||
|   Power Out (dBm):        17.80 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span2 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -15.97 | ||||
| Edfa Edfa2 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.81 | ||||
|   Power Out (dBm):        17.81 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span3 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -15.96 | ||||
| Edfa Edfa3 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.82 | ||||
|   Power Out (dBm):        17.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 0.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span4 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.96, mode_2: -15.94 | ||||
| Edfa Edfa4 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.83 | ||||
|   Power Out (dBm):        17.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 0.07 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span5 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.95, mode_2: -15.93 | ||||
| Edfa Edfa5 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.84 | ||||
|   Power Out (dBm):        17.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 0.08 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site C | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.05, mode_2: 20.08 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Edfa booster C | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -2.22 | ||||
|   Power Out (dBm):        17.79 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span6 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -15.98 | ||||
| Edfa Edfa6 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.80 | ||||
|   Power Out (dBm):        17.80 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span7 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -15.97 | ||||
| Edfa Edfa7 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.81 | ||||
|   Power Out (dBm):        17.81 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span8 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -15.96 | ||||
| Edfa Edfa8 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.82 | ||||
|   Power Out (dBm):        17.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 0.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span9 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.96, mode_2: -15.94 | ||||
| Edfa Edfa9 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.83 | ||||
|   Power Out (dBm):        17.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 0.07 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span10 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.95, mode_2: -15.93 | ||||
| Edfa Edfa10 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.84 | ||||
|   Power Out (dBm):        17.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 0.08 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site D | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.05, mode_2: 20.08 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Edfa booster D | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -2.22 | ||||
|   Power Out (dBm):        17.79 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span11 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -15.98 | ||||
| Edfa Edfa11 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.80 | ||||
|   Power Out (dBm):        17.80 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span12 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -15.97 | ||||
| Edfa Edfa12 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.81 | ||||
|   Power Out (dBm):        17.81 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site E | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.03, mode_2: 20.04 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Edfa booster E | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -2.22 | ||||
|   Power Out (dBm):        17.79 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span13 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -15.98 | ||||
| Edfa Edfa13 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.80 | ||||
|   Power Out (dBm):        17.80 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span14 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -15.97 | ||||
| Edfa Edfa14 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         1.81 | ||||
|   Power Out (dBm):        17.81 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span15 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -15.96 | ||||
| Edfa Edfa15 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         1.82 | ||||
|   Power Out (dBm):        17.82 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 0.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site B | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.03, mode_2: 20.05 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -20.00 | ||||
| Transceiver Site_B | ||||
|   GSNR (0.1nm, dB):          mode_1: 18.11, mode_2: 19.18 | ||||
|   GSNR (signal bw, dB):      mode_1: 14.02, mode_2: 12.09 | ||||
|   OSNR ASE (0.1nm, dB):      mode_1: 19.69, mode_2: 19.62 | ||||
|   OSNR ASE (signal bw, dB):  mode_1: 15.61, mode_2: 12.53 | ||||
|   CD (ps/nm):                20040.00 | ||||
|   PMD (ps):                  1.39 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              5.88 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m18.56 dB[0m | ||||
|  | ||||
| (No source node specified: picked Site_A) | ||||
|  | ||||
| (No destination node specified: picked Site_B) | ||||
							
								
								
									
										449
									
								
								tests/invocation/transmission_long_psd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										449
									
								
								tests/invocation/transmission_long_psd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,449 @@ | ||||
| User input for spectrum used for propagation instead of SI | ||||
| There are 60 channels propagating | ||||
| Power mode is set to True | ||||
| => it can be modified in eqpt_config.json - Span | ||||
|  | ||||
| There are 15 fiber spans over 1200 km between Site_A and Site_B | ||||
|  | ||||
| Now propagating between Site_A and Site_B: | ||||
|  | ||||
| Propagating with input power = [1;36;40m0.00 dBm[0m: | ||||
| Transceiver Site_A | ||||
|   GSNR (0.1nm, dB):          mode_1: 40.00, mode_2: 40.00 | ||||
|   GSNR (signal bw, dB):      mode_1: 35.92, mode_2: 32.91 | ||||
|   OSNR ASE (0.1nm, dB):      mode_1: 40.00, mode_2: 40.00 | ||||
|   OSNR ASE (signal bw, dB):  mode_1: 35.92, mode_2: 32.91 | ||||
|   CD (ps/nm):                0.00 | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
| Roadm roadm Site A | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.00, mode_2: 16.99 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -16.99 | ||||
| Edfa booster A | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -0.71 | ||||
|   Power Out (dBm):        19.30 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 3.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span1 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -12.98 | ||||
| Edfa Edfa1 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.31 | ||||
|   Power Out (dBm):        19.31 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 3.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span2 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -12.97 | ||||
| Edfa Edfa2 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.32 | ||||
|   Power Out (dBm):        19.32 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 3.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span3 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -12.95 | ||||
| Edfa Edfa3 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.33 | ||||
|   Power Out (dBm):        19.33 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 3.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span4 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.96, mode_2: -12.94 | ||||
| Edfa Edfa4 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.34 | ||||
|   Power Out (dBm):        19.34 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 3.06 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span5 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.95, mode_2: -12.93 | ||||
| Edfa Edfa5 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.35 | ||||
|   Power Out (dBm):        19.35 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.06, mode_2: 3.07 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site C | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.06, mode_2: 20.06 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -16.99 | ||||
| Edfa booster C | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -0.71 | ||||
|   Power Out (dBm):        19.30 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 3.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span6 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -12.98 | ||||
| Edfa Edfa6 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.31 | ||||
|   Power Out (dBm):        19.31 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 3.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span7 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -12.97 | ||||
| Edfa Edfa7 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.32 | ||||
|   Power Out (dBm):        19.32 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 3.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span8 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -12.95 | ||||
| Edfa Edfa8 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.33 | ||||
|   Power Out (dBm):        19.33 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 3.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span9 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.96, mode_2: -12.94 | ||||
| Edfa Edfa9 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.34 | ||||
|   Power Out (dBm):        19.34 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 3.06 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span10 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.95, mode_2: -12.93 | ||||
| Edfa Edfa10 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.35 | ||||
|   Power Out (dBm):        19.35 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.06, mode_2: 3.07 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site D | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.06, mode_2: 20.06 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -16.99 | ||||
| Edfa booster D | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -0.71 | ||||
|   Power Out (dBm):        19.30 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 3.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span11 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -12.98 | ||||
| Edfa Edfa11 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.31 | ||||
|   Power Out (dBm):        19.31 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 3.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span12 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -12.97 | ||||
| Edfa Edfa12 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.32 | ||||
|   Power Out (dBm):        19.32 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 3.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site E | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.03, mode_2: 20.03 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -16.99 | ||||
| Edfa booster E | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -0.71 | ||||
|   Power Out (dBm):        19.30 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 3.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span13 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -12.98 | ||||
| Edfa Edfa13 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.31 | ||||
|   Power Out (dBm):        19.31 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 3.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span14 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -12.97 | ||||
| Edfa Edfa14 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         3.32 | ||||
|   Power Out (dBm):        19.32 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 3.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span15 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -12.96 | ||||
| Edfa Edfa15 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         3.33 | ||||
|   Power Out (dBm):        19.33 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 3.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site B | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.04, mode_2: 20.04 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -16.99 | ||||
| Transceiver Site_B | ||||
|   GSNR (0.1nm, dB):          mode_1: 17.91, mode_2: 20.37 | ||||
|   GSNR (signal bw, dB):      mode_1: 13.83, mode_2: 13.28 | ||||
|   OSNR ASE (0.1nm, dB):      mode_1: 19.69, mode_2: 22.55 | ||||
|   OSNR ASE (signal bw, dB):  mode_1: 15.61, mode_2: 15.46 | ||||
|   CD (ps/nm):                20040.00 | ||||
|   PMD (ps):                  1.39 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              5.88 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m18.94 dB[0m | ||||
|  | ||||
| (No source node specified: picked Site_A) | ||||
|  | ||||
| (No destination node specified: picked Site_B) | ||||
							
								
								
									
										449
									
								
								tests/invocation/transmission_long_psw
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										449
									
								
								tests/invocation/transmission_long_psw
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,449 @@ | ||||
| User input for spectrum used for propagation instead of SI | ||||
| There are 60 channels propagating | ||||
| Power mode is set to True | ||||
| => it can be modified in eqpt_config.json - Span | ||||
|  | ||||
| There are 15 fiber spans over 1200 km between Site_A and Site_B | ||||
|  | ||||
| Now propagating between Site_A and Site_B: | ||||
|  | ||||
| Propagating with input power = [1;36;40m0.00 dBm[0m: | ||||
| Transceiver Site_A | ||||
|   GSNR (0.1nm, dB):          mode_1: 40.00, mode_2: 40.00 | ||||
|   GSNR (signal bw, dB):      mode_1: 35.92, mode_2: 32.91 | ||||
|   OSNR ASE (0.1nm, dB):      mode_1: 40.00, mode_2: 40.00 | ||||
|   OSNR ASE (signal bw, dB):  mode_1: 35.92, mode_2: 32.91 | ||||
|   CD (ps/nm):                0.00 | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
| Roadm roadm Site A | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.00, mode_2: 18.24 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -18.24 | ||||
| Edfa booster A | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -1.40 | ||||
|   Power Out (dBm):        18.61 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 1.77 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span1 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -14.22 | ||||
| Edfa Edfa1 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.62 | ||||
|   Power Out (dBm):        18.62 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 1.78 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span2 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -14.21 | ||||
| Edfa Edfa2 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.63 | ||||
|   Power Out (dBm):        18.63 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 1.79 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span3 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -14.20 | ||||
| Edfa Edfa3 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.64 | ||||
|   Power Out (dBm):        18.64 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 1.80 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span4 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.96, mode_2: -14.19 | ||||
| Edfa Edfa4 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.65 | ||||
|   Power Out (dBm):        18.65 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 1.81 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span5 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.95, mode_2: -14.18 | ||||
| Edfa Edfa5 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.66 | ||||
|   Power Out (dBm):        18.66 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 1.82 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site C | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.05, mode_2: 20.06 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -18.24 | ||||
| Edfa booster C | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -1.40 | ||||
|   Power Out (dBm):        18.61 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 1.77 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span6 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -14.23 | ||||
| Edfa Edfa6 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.62 | ||||
|   Power Out (dBm):        18.62 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 1.78 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span7 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -14.21 | ||||
| Edfa Edfa7 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.63 | ||||
|   Power Out (dBm):        18.63 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 1.79 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span8 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -14.20 | ||||
| Edfa Edfa8 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.64 | ||||
|   Power Out (dBm):        18.64 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 1.80 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span9 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.96, mode_2: -14.19 | ||||
| Edfa Edfa9 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.65 | ||||
|   Power Out (dBm):        18.65 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.04, mode_2: 1.81 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span10 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.95, mode_2: -14.18 | ||||
| Edfa Edfa10 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.66 | ||||
|   Power Out (dBm):        18.66 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.05, mode_2: 1.82 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site D | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.05, mode_2: 20.06 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -18.24 | ||||
| Edfa booster D | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -1.40 | ||||
|   Power Out (dBm):        18.61 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 1.77 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span11 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -14.23 | ||||
| Edfa Edfa11 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.62 | ||||
|   Power Out (dBm):        18.62 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 1.78 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span12 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -14.21 | ||||
| Edfa Edfa12 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.63 | ||||
|   Power Out (dBm):        18.63 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 1.79 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site E | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.03, mode_2: 20.03 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -18.24 | ||||
| Edfa booster E | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      6.58 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -1.40 | ||||
|   Power Out (dBm):        18.61 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.01, mode_2: 1.77 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span13 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.99, mode_2: -14.23 | ||||
| Edfa Edfa13 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.62 | ||||
|   Power Out (dBm):        18.62 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.02, mode_2: 1.78 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span14 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.98, mode_2: -14.22 | ||||
| Edfa Edfa14 | ||||
|   type_variety:           test_fixed_gain | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      9.00 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        4.00 | ||||
|   Power In (dBm):         2.63 | ||||
|   Power Out (dBm):        18.63 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 1.79 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span15 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
|   pad att_in (dB):             0.00 | ||||
|   total loss (dB):             16.00 | ||||
|   (includes conn loss (dB) in: 0.00 out: 0.00) | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -16.00 | ||||
|   actual pch out (dBm):        mode_1: -15.97, mode_2: -14.20 | ||||
| Edfa Edfa15 | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     16.00 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      8.86 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         2.64 | ||||
|   Power Out (dBm):        18.64 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   actual pch out (dBm):   mode_1: 0.03, mode_2: 1.80 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site B | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        mode_1: 20.03, mode_2: 20.04 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    mode_1: -20.00, mode_2: -18.24 | ||||
| Transceiver Site_B | ||||
|   GSNR (0.1nm, dB):          mode_1: 18.02, mode_2: 20.22 | ||||
|   GSNR (signal bw, dB):      mode_1: 13.94, mode_2: 13.12 | ||||
|   OSNR ASE (0.1nm, dB):      mode_1: 19.69, mode_2: 21.35 | ||||
|   OSNR ASE (signal bw, dB):  mode_1: 15.61, mode_2: 14.26 | ||||
|   CD (ps/nm):                20040.00 | ||||
|   PMD (ps):                  1.39 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              5.88 | ||||
|   Actual pch out (dBm):      mode_1: 0.00, mode_2: 0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m18.94 dB[0m | ||||
|  | ||||
| (No source node specified: picked Site_A) | ||||
|  | ||||
| (No destination node specified: picked Site_B) | ||||
| @@ -16,6 +16,7 @@ Transceiver Site_A | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      0.00 | ||||
| Fiber          Span1 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
| @@ -36,7 +37,6 @@ Edfa Edfa1 | ||||
|   Power Out (dBm):        16.82 | ||||
|   Delta_P (dB):           -2.00 | ||||
|   target pch (dBm):       -2.00 | ||||
|   effective pch (dBm):    -2.00 | ||||
|   actual pch out (dBm):   -1.99 | ||||
|   output VOA (dB):        0.00 | ||||
| Transceiver Site_B | ||||
| @@ -48,6 +48,7 @@ Transceiver Site_B | ||||
|   PMD (ps):                  0.36 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.39 | ||||
|   Actual pch out (dBm):      0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m31.18 dB[0m | ||||
|   | ||||
| @@ -16,6 +16,7 @@ Transceiver Site_A | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      0.00 | ||||
| RamanFiber          Span1 | ||||
|   type_variety:                SSMF | ||||
|   length (km):                 80.00 | ||||
| @@ -25,113 +26,115 @@ RamanFiber          Span1 | ||||
|   (conn loss out includes EOL margin defined in eqpt_config.json) | ||||
|   reference pch out (dBm):     -7.20 | ||||
|   actual pch out (dBm):        -7.47 | ||||
|   reference gain (dB):         9.74 | ||||
|   actual gain (dB):            9.8 | ||||
| Fused Fused1 | ||||
|   loss (dB): 0.00 | ||||
| Edfa Edfa1 | ||||
|   type_variety:           std_low_gain | ||||
|   effective gain(dB):     5.20 | ||||
|   effective gain(dB):     5.26 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      13.80 | ||||
|   noise figure (dB):      13.74 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        2.80 | ||||
|   pad att_in (dB):        2.74 | ||||
|   Power In (dBm):         11.61 | ||||
|   Power Out (dBm):        16.81 | ||||
|   Power Out (dBm):        16.87 | ||||
|   Delta_P (dB):           -2.00 | ||||
|   target pch (dBm):       -2.00 | ||||
|   effective pch (dBm):    -2.00 | ||||
|   actual pch out (dBm):   -2.26 | ||||
|   actual pch out (dBm):   -2.21 | ||||
|   output VOA (dB):        0.00 | ||||
| Transceiver Site_B | ||||
|   GSNR (0.1nm, dB):          31.42 | ||||
|   GSNR (signal bw, dB):      27.34 | ||||
|   OSNR ASE (0.1nm, dB):      34.21 | ||||
|   OSNR ASE (signal bw, dB):  30.13 | ||||
|   GSNR (0.1nm, dB):          31.44 | ||||
|   GSNR (signal bw, dB):      27.35 | ||||
|   OSNR ASE (0.1nm, dB):      34.24 | ||||
|   OSNR ASE (signal bw, dB):  30.16 | ||||
|   CD (ps/nm):                1336.00 | ||||
|   PMD (ps):                  0.36 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.39 | ||||
|   Actual pch out (dBm):      0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m31.42 dB[0m | ||||
|   Final GSNR (0.1 nm): [1;36;40m31.44 dB[0m | ||||
|  | ||||
| The GSNR per channel at the end of the line is: | ||||
| Ch. #   Channel frequency (THz)       Channel power (dBm)    OSNR ASE (signal bw, dB)     SNR NLI (signal bw, dB)        GSNR (signal bw, dB) | ||||
|     1                 191.35000                      0.22                       31.64                       31.55                       28.58 | ||||
|     2                 191.40000                      0.18                       31.62                       31.46                       28.53 | ||||
|     3                 191.45000                      0.15                       31.60                       31.37                       28.47 | ||||
|     4                 191.50000                      0.11                       31.58                       31.28                       28.42 | ||||
|     5                 191.55000                      0.05                       31.54                       31.20                       28.36 | ||||
|     6                 191.60000                     -0.01                       31.51                       31.11                       28.30 | ||||
|     7                 191.65000                     -0.07                       31.48                       31.03                       28.24 | ||||
|     8                 191.70000                     -0.12                       31.45                       30.95                       28.18 | ||||
|     9                 191.75000                     -0.18                       31.42                       30.87                       28.13 | ||||
|    10                 191.80000                     -0.25                       31.38                       30.79                       28.07 | ||||
|    11                 191.85000                     -0.31                       31.35                       30.72                       28.01 | ||||
|    12                 191.90000                     -0.38                       31.31                       30.64                       27.95 | ||||
|    13                 191.95000                     -0.44                       31.27                       30.57                       27.90 | ||||
|    14                 192.00000                     -0.51                       31.24                       30.50                       27.84 | ||||
|    15                 192.05000                     -0.58                       31.20                       30.42                       27.78 | ||||
|    16                 192.10000                     -0.64                       31.16                       30.35                       27.73 | ||||
|    17                 192.15000                     -0.71                       31.12                       30.29                       27.67 | ||||
|    18                 192.20000                     -0.78                       31.08                       30.22                       27.62 | ||||
|    19                 192.25000                     -0.85                       31.04                       30.22                       27.60 | ||||
|    20                 192.30000                     -0.93                       31.00                       30.22                       27.58 | ||||
|    21                 192.35000                     -1.00                       30.96                       30.23                       27.57 | ||||
|    22                 192.40000                     -1.08                       30.91                       30.23                       27.55 | ||||
|    23                 192.45000                     -1.16                       30.87                       30.23                       27.53 | ||||
|    24                 192.50000                     -1.23                       30.82                       30.24                       27.51 | ||||
|    25                 192.55000                     -1.30                       30.78                       30.24                       27.49 | ||||
|    26                 192.60000                     -1.37                       30.74                       30.24                       27.47 | ||||
|    27                 192.65000                     -1.44                       30.70                       30.25                       27.46 | ||||
|    28                 192.70000                     -1.52                       30.65                       30.25                       27.44 | ||||
|    29                 192.75000                     -1.59                       30.61                       30.25                       27.42 | ||||
|    30                 192.80000                     -1.66                       30.57                       30.26                       27.40 | ||||
|    31                 192.85000                     -1.73                       30.52                       30.26                       27.38 | ||||
|    32                 192.90000                     -1.80                       30.48                       30.26                       27.36 | ||||
|    33                 192.95000                     -1.87                       30.43                       30.27                       27.34 | ||||
|    34                 193.00000                     -1.94                       30.39                       30.27                       27.32 | ||||
|    35                 193.05000                     -2.01                       30.35                       30.27                       27.30 | ||||
|    36                 193.10000                     -2.08                       30.30                       30.28                       27.28 | ||||
|    37                 193.15000                     -2.15                       30.26                       30.28                       27.26 | ||||
|    38                 193.20000                     -2.22                       30.22                       30.29                       27.24 | ||||
|    39                 193.25000                     -2.29                       30.17                       30.31                       27.23 | ||||
|    40                 193.30000                     -2.36                       30.13                       30.32                       27.21 | ||||
|    41                 193.35000                     -2.43                       30.08                       30.33                       27.19 | ||||
|    42                 193.40000                     -2.50                       30.04                       30.35                       27.18 | ||||
|    43                 193.45000                     -2.56                       29.99                       30.36                       27.16 | ||||
|    44                 193.50000                     -2.63                       29.95                       30.37                       27.14 | ||||
|    45                 193.55000                     -2.71                       29.90                       30.39                       27.12 | ||||
|    46                 193.60000                     -2.78                       29.85                       30.40                       27.11 | ||||
|    47                 193.65000                     -2.85                       29.80                       30.41                       27.09 | ||||
|    48                 193.70000                     -2.93                       29.75                       30.43                       27.07 | ||||
|    49                 193.75000                     -3.00                       29.70                       30.44                       27.05 | ||||
|    50                 193.80000                     -3.07                       29.65                       30.45                       27.02 | ||||
|    51                 193.85000                     -3.15                       29.60                       30.47                       27.00 | ||||
|    52                 193.90000                     -3.22                       29.55                       30.48                       26.98 | ||||
|    53                 193.95000                     -3.29                       29.50                       30.50                       26.96 | ||||
|    54                 194.00000                     -3.37                       29.45                       30.51                       26.94 | ||||
|    55                 194.05000                     -3.44                       29.40                       30.52                       26.92 | ||||
|    56                 194.10000                     -3.52                       29.35                       30.54                       26.89 | ||||
|    57                 194.15000                     -3.59                       29.30                       30.59                       26.89 | ||||
|    58                 194.20000                     -3.66                       29.25                       30.64                       26.88 | ||||
|    59                 194.25000                     -3.74                       29.19                       30.70                       26.87 | ||||
|    60                 194.30000                     -3.81                       29.14                       30.75                       26.86 | ||||
|    61                 194.35000                     -3.89                       29.09                       30.81                       26.86 | ||||
|    62                 194.40000                     -3.96                       29.04                       30.87                       26.85 | ||||
|    63                 194.45000                     -4.04                       28.98                       30.93                       26.84 | ||||
|    64                 194.50000                     -4.11                       28.93                       30.98                       26.83 | ||||
|    65                 194.55000                     -4.18                       28.88                       31.04                       26.82 | ||||
|    66                 194.60000                     -4.25                       28.83                       31.10                       26.81 | ||||
|    67                 194.65000                     -4.31                       28.78                       31.17                       26.80 | ||||
|    68                 194.70000                     -4.38                       28.74                       31.23                       26.79 | ||||
|    69                 194.75000                     -4.45                       28.69                       31.29                       26.79 | ||||
|    70                 194.80000                     -4.51                       28.64                       31.35                       26.78 | ||||
|    71                 194.85000                     -4.58                       28.59                       31.42                       26.77 | ||||
|    72                 194.90000                     -4.65                       28.54                       31.48                       26.76 | ||||
|    73                 194.95000                     -4.71                       28.49                       31.55                       26.74 | ||||
|    74                 195.00000                     -4.78                       28.44                       31.62                       26.73 | ||||
|    75                 195.05000                     -4.85                       28.39                       31.69                       26.72 | ||||
|    76                 195.10000                     -4.91                       28.34                       31.69                       26.69 | ||||
|     1                 191.35000                      0.27                       31.66                       31.55                       28.60 | ||||
|     2                 191.40000                      0.24                       31.64                       31.46                       28.54 | ||||
|     3                 191.45000                      0.20                       31.62                       31.37                       28.48 | ||||
|     4                 191.50000                      0.17                       31.60                       31.28                       28.43 | ||||
|     5                 191.55000                      0.11                       31.57                       31.20                       28.37 | ||||
|     6                 191.60000                      0.05                       31.54                       31.11                       28.31 | ||||
|     7                 191.65000                     -0.01                       31.51                       31.03                       28.25 | ||||
|     8                 191.70000                     -0.07                       31.47                       30.95                       28.20 | ||||
|     9                 191.75000                     -0.13                       31.44                       30.87                       28.14 | ||||
|    10                 191.80000                     -0.19                       31.41                       30.79                       28.08 | ||||
|    11                 191.85000                     -0.26                       31.37                       30.72                       28.02 | ||||
|    12                 191.90000                     -0.32                       31.34                       30.64                       27.97 | ||||
|    13                 191.95000                     -0.39                       31.30                       30.57                       27.91 | ||||
|    14                 192.00000                     -0.45                       31.26                       30.50                       27.85 | ||||
|    15                 192.05000                     -0.52                       31.23                       30.42                       27.80 | ||||
|    16                 192.10000                     -0.59                       31.19                       30.35                       27.74 | ||||
|    17                 192.15000                     -0.66                       31.15                       30.29                       27.69 | ||||
|    18                 192.20000                     -0.72                       31.11                       30.22                       27.63 | ||||
|    19                 192.25000                     -0.79                       31.07                       30.22                       27.62 | ||||
|    20                 192.30000                     -0.87                       31.03                       30.22                       27.60 | ||||
|    21                 192.35000                     -0.95                       30.99                       30.23                       27.58 | ||||
|    22                 192.40000                     -1.02                       30.94                       30.23                       27.56 | ||||
|    23                 192.45000                     -1.10                       30.90                       30.23                       27.54 | ||||
|    24                 192.50000                     -1.18                       30.85                       30.24                       27.52 | ||||
|    25                 192.55000                     -1.25                       30.81                       30.24                       27.51 | ||||
|    26                 192.60000                     -1.32                       30.77                       30.24                       27.49 | ||||
|    27                 192.65000                     -1.39                       30.73                       30.25                       27.47 | ||||
|    28                 192.70000                     -1.46                       30.68                       30.25                       27.45 | ||||
|    29                 192.75000                     -1.53                       30.64                       30.25                       27.43 | ||||
|    30                 192.80000                     -1.60                       30.60                       30.26                       27.41 | ||||
|    31                 192.85000                     -1.67                       30.55                       30.26                       27.39 | ||||
|    32                 192.90000                     -1.74                       30.51                       30.26                       27.37 | ||||
|    33                 192.95000                     -1.81                       30.47                       30.27                       27.35 | ||||
|    34                 193.00000                     -1.89                       30.42                       30.27                       27.33 | ||||
|    35                 193.05000                     -1.95                       30.38                       30.27                       27.32 | ||||
|    36                 193.10000                     -2.02                       30.34                       30.28                       27.30 | ||||
|    37                 193.15000                     -2.09                       30.29                       30.28                       27.28 | ||||
|    38                 193.20000                     -2.16                       30.25                       30.29                       27.26 | ||||
|    39                 193.25000                     -2.23                       30.20                       30.31                       27.24 | ||||
|    40                 193.30000                     -2.30                       30.16                       30.32                       27.23 | ||||
|    41                 193.35000                     -2.37                       30.11                       30.33                       27.21 | ||||
|    42                 193.40000                     -2.44                       30.07                       30.35                       27.20 | ||||
|    43                 193.45000                     -2.51                       30.02                       30.36                       27.18 | ||||
|    44                 193.50000                     -2.58                       29.98                       30.37                       27.16 | ||||
|    45                 193.55000                     -2.65                       29.93                       30.39                       27.14 | ||||
|    46                 193.60000                     -2.72                       29.88                       30.40                       27.12 | ||||
|    47                 193.65000                     -2.80                       29.83                       30.41                       27.10 | ||||
|    48                 193.70000                     -2.87                       29.79                       30.43                       27.08 | ||||
|    49                 193.75000                     -2.94                       29.74                       30.44                       27.06 | ||||
|    50                 193.80000                     -3.02                       29.69                       30.45                       27.04 | ||||
|    51                 193.85000                     -3.09                       29.64                       30.47                       27.02 | ||||
|    52                 193.90000                     -3.16                       29.59                       30.48                       27.00 | ||||
|    53                 193.95000                     -3.24                       29.54                       30.50                       26.98 | ||||
|    54                 194.00000                     -3.31                       29.49                       30.51                       26.96 | ||||
|    55                 194.05000                     -3.38                       29.44                       30.52                       26.94 | ||||
|    56                 194.10000                     -3.46                       29.39                       30.54                       26.91 | ||||
|    57                 194.15000                     -3.53                       29.33                       30.59                       26.91 | ||||
|    58                 194.20000                     -3.61                       29.28                       30.64                       26.90 | ||||
|    59                 194.25000                     -3.68                       29.23                       30.70                       26.89 | ||||
|    60                 194.30000                     -3.76                       29.18                       30.75                       26.89 | ||||
|    61                 194.35000                     -3.83                       29.13                       30.81                       26.88 | ||||
|    62                 194.40000                     -3.91                       29.07                       30.87                       26.87 | ||||
|    63                 194.45000                     -3.98                       29.02                       30.93                       26.86 | ||||
|    64                 194.50000                     -4.05                       28.97                       30.98                       26.85 | ||||
|    65                 194.55000                     -4.12                       28.92                       31.04                       26.84 | ||||
|    66                 194.60000                     -4.19                       28.87                       31.10                       26.84 | ||||
|    67                 194.65000                     -4.26                       28.82                       31.17                       26.83 | ||||
|    68                 194.70000                     -4.32                       28.77                       31.23                       26.82 | ||||
|    69                 194.75000                     -4.39                       28.72                       31.29                       26.81 | ||||
|    70                 194.80000                     -4.46                       28.68                       31.35                       26.80 | ||||
|    71                 194.85000                     -4.52                       28.63                       31.42                       26.79 | ||||
|    72                 194.90000                     -4.59                       28.58                       31.48                       26.78 | ||||
|    73                 194.95000                     -4.66                       28.53                       31.55                       26.77 | ||||
|    74                 195.00000                     -4.72                       28.48                       31.62                       26.76 | ||||
|    75                 195.05000                     -4.79                       28.43                       31.69                       26.75 | ||||
|    76                 195.10000                     -4.86                       28.38                       31.69                       26.71 | ||||
|  | ||||
| (No source node specified: picked Site_A) | ||||
|  | ||||
|   | ||||
| @@ -16,10 +16,13 @@ Transceiver Site_A | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      0.00 | ||||
| Roadm roadm Site A | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        20.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa booster A | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
| @@ -31,7 +34,6 @@ Edfa booster A | ||||
|   Power Out (dBm):        19.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span1 | ||||
| @@ -54,7 +56,6 @@ Edfa Edfa1 | ||||
|   Power Out (dBm):        19.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span2 | ||||
| @@ -77,7 +78,6 @@ Edfa Edfa2 | ||||
|   Power Out (dBm):        19.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span3 | ||||
| @@ -100,7 +100,6 @@ Edfa Edfa3 | ||||
|   Power Out (dBm):        19.86 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span4 | ||||
| @@ -123,7 +122,6 @@ Edfa Edfa4 | ||||
|   Power Out (dBm):        19.87 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span5 | ||||
| @@ -146,13 +144,14 @@ Edfa Edfa5 | ||||
|   Power Out (dBm):        19.88 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.06 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site C | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        20.06 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa booster C | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
| @@ -164,7 +163,6 @@ Edfa booster C | ||||
|   Power Out (dBm):        19.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span6 | ||||
| @@ -187,7 +185,6 @@ Edfa Edfa6 | ||||
|   Power Out (dBm):        19.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span7 | ||||
| @@ -210,7 +207,6 @@ Edfa Edfa7 | ||||
|   Power Out (dBm):        19.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span8 | ||||
| @@ -233,7 +229,6 @@ Edfa Edfa8 | ||||
|   Power Out (dBm):        19.86 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span9 | ||||
| @@ -256,7 +251,6 @@ Edfa Edfa9 | ||||
|   Power Out (dBm):        19.87 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.05 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span10 | ||||
| @@ -279,13 +273,14 @@ Edfa Edfa10 | ||||
|   Power Out (dBm):        19.88 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.06 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site D | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        20.06 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa booster D | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
| @@ -297,7 +292,6 @@ Edfa booster D | ||||
|   Power Out (dBm):        19.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span11 | ||||
| @@ -320,7 +314,6 @@ Edfa Edfa11 | ||||
|   Power Out (dBm):        19.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span12 | ||||
| @@ -343,13 +336,14 @@ Edfa Edfa12 | ||||
|   Power Out (dBm):        19.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site E | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        20.03 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa booster E | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     20.00 | ||||
| @@ -361,7 +355,6 @@ Edfa booster E | ||||
|   Power Out (dBm):        19.83 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.01 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span13 | ||||
| @@ -384,7 +377,6 @@ Edfa Edfa13 | ||||
|   Power Out (dBm):        19.84 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.02 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span14 | ||||
| @@ -407,7 +399,6 @@ Edfa Edfa14 | ||||
|   Power Out (dBm):        19.85 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.03 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          Span15 | ||||
| @@ -430,13 +421,14 @@ Edfa Edfa15 | ||||
|   Power Out (dBm):        19.86 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       0.00 | ||||
|   effective pch (dBm):    0.00 | ||||
|   actual pch out (dBm):   0.04 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Site B | ||||
|   effective loss (dB):     20.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     20.00 | ||||
|   Actual loss (dB):        20.04 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Transceiver Site_B | ||||
|   GSNR (0.1nm, dB):          17.84 | ||||
|   GSNR (signal bw, dB):      13.76 | ||||
| @@ -446,6 +438,7 @@ Transceiver Site_B | ||||
|   PMD (ps):                  1.39 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              5.88 | ||||
|   Actual pch out (dBm):      0.00 | ||||
|  | ||||
| Transmission result for input power = 0.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m17.84 dB[0m | ||||
|   | ||||
| @@ -16,10 +16,13 @@ Transceiver trx Lannion_CAS | ||||
|   PMD (ps):                  0.00 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.00 | ||||
|   Actual pch out (dBm):      3.00 | ||||
| Roadm roadm Lannion_CAS | ||||
|   effective loss (dB):     23.00 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     23.00 | ||||
|   Actual loss (dB):        23.00 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Edfa east edfa in Lannion_CAS to Corlay | ||||
|   type_variety:           test | ||||
|   effective gain(dB):     21.18 | ||||
| @@ -29,9 +32,8 @@ Edfa east edfa in Lannion_CAS to Corlay | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -0.18 | ||||
|   Power Out (dBm):        21.01 | ||||
|   Delta_P (dB):           0.00 | ||||
|   target pch (dBm):       3.00 | ||||
|   effective pch (dBm):    1.18 | ||||
|   Delta_P (dB):           -1.82 | ||||
|   target pch (dBm):       1.18 | ||||
|   actual pch out (dBm):   1.18 | ||||
|   output VOA (dB):        0.00 | ||||
| Fiber          fiber (Lannion_CAS → Corlay)-F061 | ||||
| @@ -66,35 +68,37 @@ Fiber          fiber (Loudeac → Lorient_KMA)-F054 | ||||
|   reference pch out (dBm):     -26.82 | ||||
|   actual pch out (dBm):        -26.81 | ||||
| Edfa west edfa in Lorient_KMA to Loudeac | ||||
|   type_variety:           test | ||||
|   type_variety:           std_medium_gain | ||||
|   effective gain(dB):     27.99 | ||||
|   (before att_in and before output VOA) | ||||
|   noise figure (dB):      5.76 | ||||
|   noise figure (dB):      5.98 | ||||
|   (including att_in) | ||||
|   pad att_in (dB):        0.00 | ||||
|   Power In (dBm):         -6.99 | ||||
|   Power Out (dBm):        21.03 | ||||
|   Delta_P (dB):           -1.82 | ||||
|   target pch (dBm):       1.18 | ||||
|   effective pch (dBm):    1.17 | ||||
|   actual pch out (dBm):   1.21 | ||||
|   output VOA (dB):        0.00 | ||||
| Roadm roadm Lorient_KMA | ||||
|   effective loss (dB):     21.17 | ||||
|   reference pch out (dBm): -20.00 | ||||
|   actual pch out (dBm):    -20.00 | ||||
|   Type_variety:            default | ||||
|   Reference loss (dB):     21.18 | ||||
|   Actual loss (dB):        21.21 | ||||
|   Reference pch out (dBm): -20.00 | ||||
|   Actual pch out (dBm):    -20.00 | ||||
| Transceiver trx Lorient_KMA | ||||
|   GSNR (0.1nm, dB):          23.93 | ||||
|   GSNR (signal bw, dB):      19.85 | ||||
|   OSNR ASE (0.1nm, dB):      24.29 | ||||
|   OSNR ASE (signal bw, dB):  20.20 | ||||
|   GSNR (0.1nm, dB):          23.77 | ||||
|   GSNR (signal bw, dB):      19.69 | ||||
|   OSNR ASE (0.1nm, dB):      24.11 | ||||
|   OSNR ASE (signal bw, dB):  20.03 | ||||
|   CD (ps/nm):                2171.00 | ||||
|   PMD (ps):                  0.46 | ||||
|   PDL (dB):                  0.00 | ||||
|   Latency (ms):              0.64 | ||||
|   Actual pch out (dBm):      3.00 | ||||
|  | ||||
| Transmission result for input power = 3.00 dBm: | ||||
|   Final GSNR (0.1 nm): [1;36;40m23.93 dB[0m | ||||
|   Final GSNR (0.1 nm): [1;36;40m23.77 dB[0m | ||||
|  | ||||
| (Invalid source node 'lannion' replaced with trx Lannion_CAS) | ||||
|  | ||||
|   | ||||
| @@ -1,7 +0,0 @@ | ||||
| build>=1.0.3,<2 | ||||
| pytest>=7.4.3,<8 | ||||
| # pandas 2.1 removed support for Python 3.8 | ||||
| pandas>=2.0.3,<3 | ||||
|  | ||||
| # flake v6 killed the --diff option | ||||
| flake8>=5.0.4,<6 | ||||
| @@ -4,11 +4,12 @@ | ||||
| # @Date:   2018-02-02 14:06:55 | ||||
|  | ||||
| from numpy import zeros, array | ||||
| from gnpy.core.elements import Transceiver, Edfa | ||||
| from gnpy.core.utils import automatic_fmax, lin2db, db2lin, merge_amplifier_restrictions | ||||
| from gnpy.core.info import create_input_spectral_information, ReferenceCarrier | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.tools.json_io import load_network, load_equipment | ||||
| from numpy.testing import assert_allclose | ||||
| from gnpy.core.elements import Transceiver, Edfa, Fiber | ||||
| from gnpy.core.utils import automatic_fmax, lin2db, db2lin, merge_amplifier_restrictions, dbm2watt, watt2dbm | ||||
| from gnpy.core.info import create_input_spectral_information, create_arbitrary_spectral_information | ||||
| from gnpy.core.network import build_network, set_amplifier_voa | ||||
| from gnpy.tools.json_io import load_network, load_equipment, network_from_json | ||||
| from pathlib import Path | ||||
| import pytest | ||||
|  | ||||
| @@ -73,9 +74,8 @@ def si(nch_and_spacing, bw): | ||||
|     nb_channel, spacing = nch_and_spacing | ||||
|     f_min = 191.3e12 | ||||
|     f_max = automatic_fmax(f_min, spacing, nb_channel) | ||||
|     return create_input_spectral_information(f_min=f_min, f_max=f_max, roll_off=0.15, baud_rate=bw, power=1e-3, | ||||
|                                              spacing=spacing, tx_osnr=40.0, | ||||
|                                              ref_carrier=ReferenceCarrier(baud_rate=32e9, slot_width=50e9)) | ||||
|     return create_input_spectral_information(f_min=f_min, f_max=f_max, roll_off=0.15, baud_rate=bw, | ||||
|                                              spacing=spacing, tx_osnr=40.0, tx_power=1e-3) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize("gain, nf_expected", [(10, 15), (15, 10), (25, 5.8)]) | ||||
| @@ -86,7 +86,7 @@ def test_variable_gain_nf(gain, nf_expected, setup_edfa_variable_gain, si): | ||||
|     si.nli /= db2lin(gain) | ||||
|     si.ase /= db2lin(gain) | ||||
|     edfa.operational.gain_target = gain | ||||
|     si.pref = si.pref._replace(p_span0=0, p_spani=-gain) | ||||
|     edfa.effective_gain = gain | ||||
|     edfa.interpol_params(si) | ||||
|     result = edfa.nf | ||||
|     assert pytest.approx(nf_expected, abs=0.01) == result[0] | ||||
| @@ -100,7 +100,7 @@ def test_fixed_gain_nf(gain, nf_expected, setup_edfa_fixed_gain, si): | ||||
|     si.nli /= db2lin(gain) | ||||
|     si.ase /= db2lin(gain) | ||||
|     edfa.operational.gain_target = gain | ||||
|     si.pref = si.pref._replace(p_span0=0, p_spani=-gain) | ||||
|     edfa.effective_gain = gain | ||||
|     edfa.interpol_params(si) | ||||
|     assert pytest.approx(nf_expected, abs=0.01) == edfa.nf[0] | ||||
|  | ||||
| @@ -124,8 +124,8 @@ def test_compare_nf_models(gain, setup_edfa_variable_gain, si): | ||||
|     si.nli /= db2lin(gain) | ||||
|     si.ase /= db2lin(gain) | ||||
|     edfa.operational.gain_target = gain | ||||
|     edfa.effective_gain = gain | ||||
|     # edfa is variable gain type | ||||
|     si.pref = si.pref._replace(p_span0=0, p_spani=-gain) | ||||
|     edfa.interpol_params(si) | ||||
|     nf_model = edfa.nf[0] | ||||
|  | ||||
| @@ -180,7 +180,6 @@ def test_ase_noise(gain, si, setup_trx, bw): | ||||
|     si = span(si) | ||||
|     print(span) | ||||
|  | ||||
|     si.pref = si.pref._replace(p_span0=0, p_spani=-gain) | ||||
|     edfa.interpol_params(si) | ||||
|     nf = edfa.nf | ||||
|     print('nf', nf) | ||||
| @@ -196,3 +195,173 @@ def test_ase_noise(gain, si, setup_trx, bw): | ||||
|     si = trx(si) | ||||
|     osnr = trx.osnr_ase_01nm[0] | ||||
|     assert pytest.approx(osnr_expected, abs=0.01) == osnr | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('delta_p', [0, None, 2]) | ||||
| @pytest.mark.parametrize('tilt_target', [0, -4]) | ||||
| def test_amp_behaviour(tilt_target, delta_p): | ||||
|     """Check that amp correctly applies saturation, when there is tilt | ||||
|     """ | ||||
|     json_data = { | ||||
|         "elements": [{ | ||||
|             "uid": "Edfa1", | ||||
|             "type": "Edfa", | ||||
|             "type_variety": "test", | ||||
|             "operational": { | ||||
|                 "delta_p": delta_p, | ||||
|                 "gain_target": 20 + delta_p if delta_p else 20, | ||||
|                 "tilt_target": tilt_target, | ||||
|                 "out_voa": 0 | ||||
|             } | ||||
|         }, { | ||||
|             "uid": "Span1", | ||||
|             "type": "Fiber", | ||||
|             "type_variety": "SSMF", | ||||
|             "params": { | ||||
|                 "length": 100, | ||||
|                 "loss_coef": 0.2, | ||||
|                 "length_units": "km" | ||||
|             } | ||||
|         }], | ||||
|         "connections": [] | ||||
|     } | ||||
|     equipment = load_equipment(eqpt_library) | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     edfa = [n for n in network.nodes() if isinstance(n, Edfa)][0] | ||||
|     fiber = [n for n in network.nodes() if isinstance(n, Fiber)][0] | ||||
|     fiber.params.con_in = 0 | ||||
|     fiber.params.con_out = 0 | ||||
|     fiber.ref_pch_in_dbm = 0.0 | ||||
|     si = create_input_spectral_information(f_min=191.3e12, f_max=196.05e12, roll_off=0.15, baud_rate=64e9, | ||||
|                                            spacing=75e9, tx_osnr=None, tx_power=1e-3) | ||||
|     si = fiber(si) | ||||
|     total_sig_powerin = sum(si.signal) | ||||
|     sig_in = lin2db(si.signal) | ||||
|     si = edfa(si) | ||||
|     sig_out = lin2db(si.signal) | ||||
|     total_sig_powerout = sum(si.signal) | ||||
|     gain = lin2db(total_sig_powerout / total_sig_powerin) | ||||
|     expected_total_power_out = total_sig_powerin * 100 * db2lin(delta_p) if delta_p else total_sig_powerin * 100 | ||||
|     assert pytest.approx(total_sig_powerout, abs=1e-6) == min(expected_total_power_out, dbm2watt(21)) | ||||
|     assert pytest.approx(edfa.effective_gain, 1e-5) == gain | ||||
|     assert watt2dbm(sum(si.signal + si.nli + si.ase)) <= 21.01 | ||||
|     # If there is no tilt on the amp: the gain is identical for all carriers | ||||
|     if tilt_target == 0: | ||||
|         assert_allclose(sig_in + gain, sig_out, rtol=1e-13) | ||||
|     else: | ||||
|         if delta_p != 2: | ||||
|             expected_sig_out = [ | ||||
|                 -32.00529182, -31.93540907, -31.86554231, -31.79417979, -31.71903263, | ||||
|                 -31.6424009, -31.56531159, -31.48775435, -31.41468382, -31.35973323, | ||||
|                 -31.32286555, -31.28602346, -31.2472908, -31.20086569, -31.14671746, | ||||
|                 -31.08702653, -31.01341963, -30.93430243, -30.87791656, -30.84413339, | ||||
|                 -30.81605918, -30.78824936, -30.76071036, -30.73319161, -30.70494101, | ||||
|                 -30.67368479, -30.63941012, -30.60178381, -30.55585766, -30.5066561, | ||||
|                 -30.43426575, -30.33848379, -30.24471112, -30.18220815, -30.15076699, | ||||
|                 -30.11934744, -30.08776718, -30.05548097, -30.02250068, -29.98954302, | ||||
|                 -29.95661362, -29.92370274, -29.8854762, -29.84193785, -29.79238328, | ||||
|                 -29.72452662, -29.6385071, -29.54788144, -29.44581202, -29.33924103, | ||||
|                 -29.23276107, -29.10289365, -28.91425473, -28.70204648, -28.50670713, | ||||
|                 -28.3282514, -28.15895225, -28.009065, -27.87864672, -27.76315964, | ||||
|                 -27.68523133, -27.62260405, -27.58076622] | ||||
|  | ||||
|         else: | ||||
|             expected_sig_out = [ | ||||
|                 -30.00529182, -29.93540907, -29.86554231, -29.79417979, -29.71903263, | ||||
|                 -29.6424009, -29.56531159, -29.48775435, -29.41468382, -29.35973323, | ||||
|                 -29.32286555, -29.28602346, -29.2472908, -29.20086569, -29.14671746, | ||||
|                 -29.08702653, -29.01341963, -28.93430243, -28.87791656, -28.84413339, | ||||
|                 -28.81605918, -28.78824936, -28.76071036, -28.73319161, -28.70494101, | ||||
|                 -28.67368479, -28.63941012, -28.60178381, -28.55585766, -28.5066561, | ||||
|                 -28.43426575, -28.33848379, -28.24471112, -28.18220815, -28.15076699, | ||||
|                 -28.11934744, -28.08776718, -28.05548097, -28.02250068, -27.98954302, | ||||
|                 -27.95661362, -27.92370274, -27.8854762, -27.84193785, -27.79238328, | ||||
|                 -27.72452662, -27.6385071, -27.54788144, -27.44581202, -27.33924103, | ||||
|                 -27.23276107, -27.10289365, -26.91425473, -26.70204648, -26.50670713, | ||||
|                 -26.3282514, -26.15895225, -26.009065, -25.87864672, -25.76315964, | ||||
|                 -25.68523133, -25.62260405, -25.58076622] | ||||
|  | ||||
|         print(sig_out) | ||||
|         assert_allclose(sig_out, expected_sig_out, rtol=1e-9) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('delta_p', [0, None, 20]) | ||||
| @pytest.mark.parametrize('base_power', [0, 20]) | ||||
| @pytest.mark.parametrize('delta_pdb_per_channel', | ||||
|                          [[0, 1, 3, 0.5, -2], | ||||
|                           [0, 0, 0, 0, 0], | ||||
|                           [-2, -2, -2, -2, -2], | ||||
|                           [0, 2, -2, -5, 4], | ||||
|                           [0, 1, 3, 0.5, -2], ]) | ||||
| def test_amp_saturation(delta_pdb_per_channel, base_power, delta_p): | ||||
|     """Check that amp correctly applies saturation | ||||
|     """ | ||||
|     json_data = { | ||||
|         "elements": [{ | ||||
|             "uid": "Edfa1", | ||||
|             "type": "Edfa", | ||||
|             "type_variety": "test", | ||||
|             "operational": { | ||||
|                 "delta_p": delta_p, | ||||
|                 "gain_target": 20, | ||||
|                 "tilt_target": 0, | ||||
|                 "out_voa": 0 | ||||
|             } | ||||
|         }], | ||||
|         "connections": [] | ||||
|     } | ||||
|     equipment = load_equipment(eqpt_library) | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     edfa = [n for n in network.nodes()][0] | ||||
|     frequency = 193e12 + array([0, 50e9, 150e9, 225e9, 275e9]) | ||||
|     slot_width = array([37.5e9, 50e9, 75e9, 50e9, 37.5e9]) | ||||
|     baud_rate = array([32e9, 42e9, 64e9, 42e9, 32e9]) | ||||
|     signal = dbm2watt(array([-20.0, -18.0, -22.0, -25.0, -16.0]) + array(delta_pdb_per_channel) + base_power) | ||||
|     si = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width, | ||||
|                                                signal=signal, baud_rate=baud_rate, roll_off=0.15, | ||||
|                                                delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                                tx_osnr=None, tx_power=None) | ||||
|     total_sig_powerin = sum(si.signal) | ||||
|     sig_in = lin2db(si.signal) | ||||
|     si = edfa(si) | ||||
|     sig_out = lin2db(si.signal) | ||||
|     total_sig_powerout = sum(si.signal) | ||||
|     gain = lin2db(total_sig_powerout / total_sig_powerin) | ||||
|     assert watt2dbm(sum(si.signal + si.nli + si.ase)) <= 21.02 | ||||
|     assert pytest.approx(edfa.effective_gain, 1e-13) == gain | ||||
|     assert_allclose(sig_in + gain, sig_out, rtol=1e-13) | ||||
|  | ||||
|  | ||||
| def test_set_out_voa(): | ||||
|     """Check that out_voa is correctly set if out_voa_auto is true | ||||
|     gain is maximized to obtain better NF: | ||||
|     if optimum input power in next span is -3 + pref_ch_db then total power at optimum is 19 -3 = 16dBm. | ||||
|     since amp has 21 dBm p_max, power out of amp can be set to 21dBm increasing out_voa by 5 to keep | ||||
|     same input power in the fiber. Since the optimisation contains a hard coded margin of 1 to account for | ||||
|     possible degradation on max power, the expected voa value is 4, and delta_p and gain are corrected | ||||
|     accordingly. | ||||
|     """ | ||||
|     json_data = { | ||||
|         "elements": [{ | ||||
|             "uid": "Edfa1", | ||||
|             "type": "Edfa", | ||||
|             "type_variety": "test", | ||||
|             "operational": { | ||||
|                 "delta_p": -3, | ||||
|                 "gain_target": 20, | ||||
|                 "tilt_target": 0 | ||||
|             } | ||||
|         }], | ||||
|         "connections": [] | ||||
|     } | ||||
|     equipment = load_equipment(eqpt_library) | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     amp = [n for n in network.nodes()][0] | ||||
|     print(amp.out_voa) | ||||
|     power_target = 19 + amp.delta_p | ||||
|     power_mode = True | ||||
|     amp.params.out_voa_auto = True | ||||
|     set_amplifier_voa(amp, power_target, power_mode) | ||||
|     assert amp.out_voa == 4.0 | ||||
|     assert amp.effective_gain == 20.0 + 4.0 | ||||
|     assert amp.delta_p == -3.0 + 4.0 | ||||
|   | ||||
| @@ -14,12 +14,17 @@ checks that empty info on mode, power, nbchannel in service file are supported | ||||
| """ | ||||
|  | ||||
| from pathlib import Path | ||||
| from logging import INFO | ||||
| from numpy.testing import assert_allclose | ||||
| import pytest | ||||
|  | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.core.utils import automatic_nch, lin2db | ||||
| from gnpy.core.utils import automatic_nch, lin2db, watt2dbm | ||||
| from gnpy.core.elements import Roadm | ||||
| from gnpy.topology.request import compute_path_dsjctn, propagate, propagate_and_optimize_mode, correct_json_route_list | ||||
| from gnpy.tools.json_io import load_network, load_equipment, requests_from_json, load_requests | ||||
| from gnpy.tools.json_io import load_network, load_equipment, requests_from_json, load_requests, load_json, \ | ||||
|     _equipment_from_json | ||||
|  | ||||
|  | ||||
| network_file_name = Path(__file__).parent.parent / 'tests/data/testTopology_expected.json' | ||||
| service_file_name = Path(__file__).parent.parent / 'tests/data/testTopology_testservices.json' | ||||
| @@ -30,7 +35,9 @@ eqpt_library_name = Path(__file__).parent.parent / 'tests/data/eqpt_config.json' | ||||
| @pytest.mark.parametrize("net", [network_file_name]) | ||||
| @pytest.mark.parametrize("eqpt", [eqpt_library_name]) | ||||
| @pytest.mark.parametrize("serv", [service_file_name]) | ||||
| @pytest.mark.parametrize("expected_mode", [['16QAM', 'PS_SP64_1', 'PS_SP64_1', 'PS_SP64_1', 'mode 2 - fake', 'mode 2', 'PS_SP64_1', 'mode 3', 'PS_SP64_1', 'PS_SP64_1', '16QAM', 'mode 1', 'PS_SP64_1', 'PS_SP64_1', 'mode 1', 'mode 2', 'mode 1', 'mode 2', 'nok']]) | ||||
| @pytest.mark.parametrize("expected_mode", [['16QAM', 'PS_SP64_1', 'PS_SP64_1', 'PS_SP64_1', 'mode 2 - fake', 'mode 2', | ||||
|                                             'PS_SP64_1', 'mode 3', 'PS_SP64_1', 'PS_SP64_1', '16QAM', 'mode 1', | ||||
|                                             'PS_SP64_1', 'PS_SP64_1', 'mode 1', 'mode 2', 'mode 1', 'mode 2', 'nok']]) | ||||
| def test_automaticmodefeature(net, eqpt, serv, expected_mode): | ||||
|     equipment = load_equipment(eqpt) | ||||
|     network = load_network(net, equipment) | ||||
| @@ -83,3 +90,89 @@ def test_automaticmodefeature(net, eqpt, serv, expected_mode): | ||||
|                 path_res_list.append('nok') | ||||
|     print(path_res_list) | ||||
|     assert path_res_list == expected_mode | ||||
|  | ||||
|  | ||||
| def test_propagate_and_optimize_mode(caplog): | ||||
|     """Checks that the automatic mode returns the last explored mode | ||||
|  | ||||
|     Mode are explored with descending baud_rate order and descending bitrate, so the last explored mode must be mode 1 | ||||
|     Mode 1 GSNR is OK but pdl penalty are not OK due to high ROADM PDL. so the last explored mode is not OK | ||||
|     Then the propagate_and_optimize_mode must return mode 1 and the blocking reason must be 'NO_FEASIBLE_MODE' | ||||
|     """ | ||||
|     caplog.set_level(INFO) | ||||
|     json_data = load_json(eqpt_library_name) | ||||
|     voyager = next(e for e in json_data['Transceiver'] if e['type_variety'] == 'Voyager') | ||||
|     # expected path min GSNR is 22.11 | ||||
|     # Change Voyager modes so that: | ||||
|     # - highest baud rate has min OSNR > path GSNR | ||||
|     # - lower baudrate with highest bitrate has min OSNR > path GSNR | ||||
|     # - lower baudrate with lower bitrate has has min OSNR < path GSNR but PDL penalty is infinite | ||||
|     voyager['mode'] = [ | ||||
|         { | ||||
|             "format": "mode 1", | ||||
|             "baud_rate": 32e9, | ||||
|             "OSNR": 12, | ||||
|             "bit_rate": 100e9, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 45, | ||||
|             "min_spacing": 50e9, | ||||
|             "penalties": [ | ||||
|                 { | ||||
|                     "chromatic_dispersion": 4e3, | ||||
|                     "penalty_value": 0 | ||||
|                 }, { | ||||
|                     "chromatic_dispersion": 40e3, | ||||
|                     "penalty_value": 0 | ||||
|                 }, { | ||||
|                     "pdl": 0.5, | ||||
|                     "penalty_value": 1 | ||||
|                 }, { | ||||
|                     "pmd": 30, | ||||
|                     "penalty_value": 0 | ||||
|                 }], | ||||
|             "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|             "format": "mode 3", | ||||
|             "baud_rate": 32e9, | ||||
|             "OSNR": 30, | ||||
|             "bit_rate": 300e9, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 45, | ||||
|             "min_spacing": 50e9, | ||||
|             "cost": 1 | ||||
|         }, | ||||
|         { | ||||
|             "format": "mode 2", | ||||
|             "baud_rate": 66e9, | ||||
|             "OSNR": 25, | ||||
|             "bit_rate": 400e9, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 45, | ||||
|             "min_spacing": 75e9, | ||||
|             "cost": 1 | ||||
|         }] | ||||
|     # change default ROADM PDL so that crossing 2 ROADMs leasd to inifinte penalty for mode 1 | ||||
|     eqpt_roadm = next(r for r in json_data['Roadm'] if 'type_variety' not in r) | ||||
|     eqpt_roadm['pdl'] = 0.5 | ||||
|     equipment = _equipment_from_json(json_data, eqpt_library_name) | ||||
|     network = load_network(network_file_name, equipment) | ||||
|     data = load_requests(filename=Path(__file__).parent.parent / 'tests/data/testTopology_services_expected.json', | ||||
|                          eqpt=eqpt_library_name, bidir=False, network=network, network_filename=network_file_name) | ||||
|     # remove the mode from request, change it to larger spacing | ||||
|     data['path-request'][1]['path-constraints']['te-bandwidth']['trx_mode'] = None | ||||
|     data['path-request'][1]['path-constraints']['te-bandwidth']['spacing'] = 75e9 | ||||
|     assert_allclose(watt2dbm(data['path-request'][1]['path-constraints']['te-bandwidth']['output-power']), 1, rtol=1e-9) | ||||
|     # use the request power for design, or there will be inconsistencies with the gain | ||||
|     build_network(network, equipment, 1, 21) | ||||
|  | ||||
|     rqs = requests_from_json(data, equipment) | ||||
|     rqs = correct_json_route_list(network, rqs) | ||||
|     [path] = compute_path_dsjctn(network, equipment, [rqs[1]], []) | ||||
|     total_path, mode = propagate_and_optimize_mode(path, rqs[1], equipment) | ||||
|     assert round(min(path[-1].snr_01nm), 2) == 22.22 | ||||
|     assert mode['format'] == 'mode 1' | ||||
|     assert rqs[1].blocking_reason == 'NO_FEASIBLE_MODE' | ||||
|     expected_mesg = '\tWarning! Request 1: no mode satisfies path SNR requirement.' | ||||
|     # Last log records mustcontain the message about the las explored mode | ||||
|     assert expected_mesg in caplog.records[-1].message | ||||
|   | ||||
| @@ -119,8 +119,9 @@ def create_rq(equipment, srce, dest, bdir, node_list, loose_list, rqid='test_req | ||||
|         'nodes_list': node_list, | ||||
|         'loose_list': loose_list, | ||||
|         'path_bandwidth': 100.0e9, | ||||
|         'power': 1.0, | ||||
|         'effective_freq_slot': None, | ||||
|         'power': 1.0e-3, | ||||
|         'tx_power': 1.0e-3, | ||||
|         'effective_freq_slot': None | ||||
|     } | ||||
|     params['format'] = params['trx_mode'] | ||||
|     trx_params = trx_mode_params(equipment, params['trx_type'], params['trx_mode'], True) | ||||
| @@ -258,7 +259,8 @@ def request_set(): | ||||
|         'f_min': 191.1e12, | ||||
|         'f_max': 196.3e12, | ||||
|         'nb_channel': None, | ||||
|         'power': 0, | ||||
|         'power': 1e-3, | ||||
|         'tx_power': 1e-3, | ||||
|         'path_bandwidth': 200e9} | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -17,13 +17,14 @@ from copy import deepcopy | ||||
| from gnpy.core.utils import lin2db, automatic_nch, dbm2watt, power_dbm_to_psd_mw_ghz, watt2dbm, psd2powerdbm | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.core.elements import Roadm | ||||
| from gnpy.core.info import create_input_spectral_information, Pref, create_arbitrary_spectral_information, \ | ||||
|     ReferenceCarrier | ||||
| from gnpy.core.info import create_input_spectral_information, create_arbitrary_spectral_information, ReferenceCarrier, \ | ||||
|     carriers_to_spectral_information | ||||
| from gnpy.core.equipment import trx_mode_params | ||||
| from gnpy.core.exceptions import ConfigurationError | ||||
| from gnpy.tools.json_io import network_from_json, load_equipment, load_network, _spectrum_from_json, load_json, \ | ||||
|     Transceiver, requests_from_json | ||||
| from gnpy.topology.request import PathRequest, compute_constrained_path, propagate, propagate_and_optimize_mode | ||||
| from gnpy.topology.spectrum_assignment import build_oms_list | ||||
|  | ||||
|  | ||||
| TEST_DIR = Path(__file__).parent | ||||
| @@ -55,6 +56,7 @@ def test_equalization_combination_degree(delta_pdb_per_channel, degree, equaliza | ||||
|  | ||||
|     roadm_config = { | ||||
|         "uid": "roadm Lannion_CAS", | ||||
|         "type_variety": "default", | ||||
|         "params": { | ||||
|             "per_degree_pch_out_db": { | ||||
|                 "east edfa in Lannion_CAS to Corlay": -16 | ||||
| @@ -69,23 +71,26 @@ def test_equalization_combination_degree(delta_pdb_per_channel, degree, equaliza | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|             }, | ||||
|             "roadm-path-impairments": [] | ||||
|         } | ||||
|     } | ||||
|     roadm = Roadm(**roadm_config) | ||||
|     roadm.set_roadm_paths(from_degree='tata', to_degree=degree, path_type='express') | ||||
|     roadm.ref_pch_in_dbm['tata'] = 0 | ||||
|     roadm.ref_carrier = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     frequency = 191e12 + array([0, 50e9, 150e9, 225e9, 275e9]) | ||||
|     slot_width = array([37.5e9, 50e9, 75e9, 50e9, 37.5e9]) | ||||
|     baud_rate = array([32e9, 42e9, 64e9, 42e9, 32e9]) | ||||
|     signal = dbm2watt(array([-20.0, -18.0, -22.0, -25.0, -16.0])) | ||||
|     ref_carrier = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     pref = Pref(p_span0=0, p_spani=0, ref_carrier=ref_carrier) | ||||
|     si = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width, | ||||
|                                                signal=signal, baud_rate=baud_rate, roll_off=0.15, | ||||
|                                                delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                                tx_osnr=None, ref_power=pref) | ||||
|                                                tx_osnr=None) | ||||
|     to_json_before_propagation = { | ||||
|         'uid': 'roadm Lannion_CAS', | ||||
|         'type': 'Roadm', | ||||
|         "type_variety": "default", | ||||
|         'params': { | ||||
|             equalization_type: target, | ||||
|             'restrictions': {'preamp_variety_list': [], 'booster_variety_list': []}, | ||||
| @@ -98,7 +103,7 @@ def test_equalization_combination_degree(delta_pdb_per_channel, degree, equaliza | ||||
|         'metadata': {'location': {'latitude': 0, 'longitude': 0, 'city': None, 'region': None}} | ||||
|     } | ||||
|     assert roadm.to_json == to_json_before_propagation | ||||
|     si = roadm(si, degree) | ||||
|     si = roadm(si, degree=degree, from_degree='tata') | ||||
|     assert roadm.ref_pch_out_dbm == pytest.approx(expected_pch_out_dbm, rel=1e-4) | ||||
|     assert_allclose(expected_si, roadm.get_per_degree_power(degree, spectral_info=si), rtol=1e-3) | ||||
|  | ||||
| @@ -215,12 +220,10 @@ def test_low_input_power(target_out, delta_pdb_per_channel, correction): | ||||
|     baud_rate = array([32e9, 42e9, 64e9, 42e9, 32e9]) | ||||
|     signal = dbm2watt(array([-20.0, -18.0, -22.0, -25.0, -16.0])) | ||||
|     target = target_out + array(delta_pdb_per_channel) | ||||
|     ref_carrier = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     pref = Pref(p_span0=0, p_spani=-20, ref_carrier=ref_carrier) | ||||
|     si = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width, | ||||
|                                                signal=signal, baud_rate=baud_rate, roll_off=0.15, | ||||
|                                                delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                                tx_osnr=None, ref_power=pref) | ||||
|                                                tx_osnr=None) | ||||
|     roadm_config = { | ||||
|         "uid": "roadm Brest_KLA", | ||||
|         "params": { | ||||
| @@ -232,7 +235,8 @@ def test_low_input_power(target_out, delta_pdb_per_channel, correction): | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|             }, | ||||
|             "roadm-path-impairments": [] | ||||
|         }, | ||||
|         "metadata": { | ||||
|             "location": { | ||||
| @@ -244,7 +248,10 @@ def test_low_input_power(target_out, delta_pdb_per_channel, correction): | ||||
|         } | ||||
|     } | ||||
|     roadm = Roadm(**roadm_config) | ||||
|     si = roadm(si, 'toto') | ||||
|     roadm.set_roadm_paths(from_degree='tata', to_degree='toto', path_type='express') | ||||
|     roadm.ref_pch_in_dbm['tata'] = 0 | ||||
|     roadm.ref_carrier = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     si = roadm(si, degree='toto', from_degree='tata') | ||||
|     assert_allclose(watt2dbm(si.signal), target - correction, rtol=1e-5) | ||||
|     # in other words check that if target is below input power, target is applied else power is unchanged | ||||
|     assert_allclose((watt2dbm(signal) >= target) * target + (watt2dbm(signal) < target) * watt2dbm(signal), | ||||
| @@ -267,12 +274,10 @@ def test_2low_input_power(target_out, delta_pdb_per_channel, correction): | ||||
|     baud_rate = array([32e9, 42e9, 64e9, 42e9, 32e9]) | ||||
|     signal = dbm2watt(array([-20.0, -18.0, -22.0, -25.0, -16.0])) | ||||
|     target = psd2powerdbm(target_out, baud_rate) + array(delta_pdb_per_channel) | ||||
|     ref_carrier = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     pref = Pref(p_span0=0, p_spani=-20, ref_carrier=ref_carrier) | ||||
|     si = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width, | ||||
|                                                signal=signal, baud_rate=baud_rate, roll_off=0.15, | ||||
|                                                delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                                tx_osnr=None, ref_power=pref) | ||||
|                                                tx_osnr=None) | ||||
|     roadm_config = { | ||||
|         "uid": "roadm Brest_KLA", | ||||
|         "params": { | ||||
| @@ -284,7 +289,8 @@ def test_2low_input_power(target_out, delta_pdb_per_channel, correction): | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|             }, | ||||
|             "roadm-path-impairments": [] | ||||
|         }, | ||||
|         "metadata": { | ||||
|             "location": { | ||||
| @@ -296,15 +302,18 @@ def test_2low_input_power(target_out, delta_pdb_per_channel, correction): | ||||
|         } | ||||
|     } | ||||
|     roadm = Roadm(**roadm_config) | ||||
|     si = roadm(si, 'toto') | ||||
|     roadm.set_roadm_paths(from_degree='tata', to_degree='toto', path_type='express') | ||||
|     roadm.ref_pch_in_dbm['tata'] = 0 | ||||
|     roadm.ref_carrier = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     si = roadm(si, degree='toto', from_degree='tata') | ||||
|     assert_allclose(watt2dbm(si.signal), target - correction, rtol=1e-5) | ||||
|  | ||||
|  | ||||
| def net_setup(equipment): | ||||
| def net_setup(equipment, deltap=0): | ||||
|     """common setup for tests: builds network, equipment and oms only once""" | ||||
|     network = load_network(NETWORK_FILENAME, equipment) | ||||
|     spectrum = equipment['SI']['default'] | ||||
|     p_db = spectrum.power_dbm | ||||
|     p_db = spectrum.power_dbm + deltap | ||||
|     p_total_db = p_db + lin2db(automatic_nch(spectrum.f_min, spectrum.f_max, spectrum.spacing)) | ||||
|     build_network(network, equipment, p_db, p_total_db) | ||||
|     return network | ||||
| @@ -323,10 +332,11 @@ def create_voyager_req(equipment, source, dest, bidir, nodes_list, loose_list, m | ||||
|               'nodes_list': nodes_list, | ||||
|               'loose_list': loose_list, | ||||
|               'path_bandwidth': 100.0e9, | ||||
|               'effective_freq_slot': None} | ||||
|               'effective_freq_slot': None, | ||||
|               'power': 1e-3, | ||||
|               'tx_power': 1e-3} | ||||
|     trx_params = trx_mode_params(equipment, params['trx_type'], params['trx_mode'], True) | ||||
|     params.update(trx_params) | ||||
|     params['power'] = dbm2watt(power_dbm) if power_dbm else dbm2watt(equipment['SI']['default'].power_dbm) | ||||
|     f_min = params['f_min'] | ||||
|     f_max_from_si = params['f_max'] | ||||
|     params['nb_channel'] = automatic_nch(f_min, f_max_from_si, params['spacing']) | ||||
| @@ -361,9 +371,9 @@ def test_initial_spectrum(mode, slot_width, power_dbm): | ||||
|     assert_array_equal(infos_expected.frequency, infos_actual.frequency) | ||||
|     assert_array_equal(infos_expected.baud_rate, infos_actual.baud_rate) | ||||
|     assert_array_equal(infos_expected.slot_width, infos_actual.slot_width) | ||||
|     assert_array_equal(infos_expected.signal, infos_actual.signal) | ||||
|     assert_array_equal(infos_expected.nli, infos_actual.nli) | ||||
|     assert_array_equal(infos_expected.ase, infos_actual.ase) | ||||
|     assert_allclose(infos_expected.signal, infos_actual.signal, rtol=1e-10) | ||||
|     assert_allclose(infos_expected.nli, infos_actual.nli, rtol=1e-10) | ||||
|     assert_allclose(infos_expected.ase, infos_actual.ase, rtol=1e-10) | ||||
|     assert_array_equal(infos_expected.roll_off, infos_actual.roll_off) | ||||
|     assert_array_equal(infos_expected.chromatic_dispersion, infos_actual.chromatic_dispersion) | ||||
|     assert_array_equal(infos_expected.pmd, infos_actual.pmd) | ||||
| @@ -447,14 +457,14 @@ def ref_network(): | ||||
|     return network | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('deltap', [0, +1.2, -0.5]) | ||||
| @pytest.mark.parametrize('deltap', [0, +1.18, -0.5]) | ||||
| def test_target_psd_out_mwperghz_deltap(deltap): | ||||
|     """checks that if target_psd_out_mWperGHz is defined, delta_p of amps is correctly updated | ||||
|  | ||||
|     Power over 1.2dBm saturate amp with this test: TODO add a test on this saturation | ||||
|     Power over 1.18dBm saturate amp with this test: TODO add a test on this saturation | ||||
|     """ | ||||
|     equipment = load_equipment(EQPT_FILENAME) | ||||
|     network = net_setup(equipment) | ||||
|     network = net_setup(equipment, deltap) | ||||
|     req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'], | ||||
|                              'mode 1', 50e9, deltap) | ||||
|     temp = [{ | ||||
| @@ -508,7 +518,6 @@ def test_equalization(case, deltap, target, mode, slot_width, equalization): | ||||
|     # boosters = ['east edfa in Brest_KLA to Quimper', 'east edfa in Lorient_KMA to Loudeac', | ||||
|     #             'east edfa in Lannion_CAS to Stbrieuc'] | ||||
|     target_psd = power_dbm_to_psd_mw_ghz(target, 32e9) | ||||
|     ref = ReferenceCarrier(baud_rate=32e9, slot_width=50e9) | ||||
|     if case == 'SI': | ||||
|         delattr(equipment['Roadm']['default'], 'target_pch_out_db') | ||||
|         setattr(equipment['Roadm']['default'], equalization, target_psd) | ||||
| @@ -533,11 +542,11 @@ def test_equalization(case, deltap, target, mode, slot_width, equalization): | ||||
|             assert getattr(roadm, equalization) == target_psd | ||||
|     path = compute_constrained_path(network, req) | ||||
|     si = create_input_spectral_information( | ||||
|         f_min=req.f_min, f_max=req.f_max, roll_off=req.roll_off, baud_rate=req.baud_rate, power=req.power, | ||||
|         spacing=req.spacing, tx_osnr=req.tx_osnr, ref_carrier=ref) | ||||
|         f_min=req.f_min, f_max=req.f_max, roll_off=req.roll_off, baud_rate=req.baud_rate, | ||||
|         spacing=req.spacing, tx_osnr=req.tx_osnr, tx_power=req.power) | ||||
|     for i, el in enumerate(path): | ||||
|         if isinstance(el, Roadm): | ||||
|             si = el(si, degree=path[i + 1].uid) | ||||
|             si = el(si, degree=path[i + 1].uid, from_degree=path[i - 1].uid) | ||||
|             if case in ['SI', 'nodes', 'degrees']: | ||||
|                 if equalization == 'target_psd_out_mWperGHz': | ||||
|                     assert_allclose(power_dbm_to_psd_mw_ghz(watt2dbm(si.signal + si.ase + si.nli), si.baud_rate), | ||||
| @@ -577,9 +586,9 @@ def test_power_option(req_power): | ||||
|     infos_actual = propagate(path2, req, equipment) | ||||
|     assert_array_equal(infos_expected.baud_rate, infos_actual.baud_rate) | ||||
|     assert_array_equal(infos_expected.slot_width, infos_actual.slot_width) | ||||
|     assert_array_equal(infos_expected.signal, infos_actual.signal) | ||||
|     assert_array_equal(infos_expected.nli, infos_actual.nli) | ||||
|     assert_array_equal(infos_expected.ase, infos_actual.ase) | ||||
|     assert_allclose(infos_expected.signal, infos_actual.signal, rtol=1e-10) | ||||
|     assert_allclose(infos_expected.nli, infos_actual.nli, rtol=1e-10) | ||||
|     assert_allclose(infos_expected.ase, infos_actual.ase, rtol=1e-10) | ||||
|     assert_array_equal(infos_expected.roll_off, infos_actual.roll_off) | ||||
|     assert_array_equal(infos_expected.chromatic_dispersion, infos_actual.chromatic_dispersion) | ||||
|     assert_array_equal(infos_expected.pmd, infos_actual.pmd) | ||||
| @@ -835,3 +844,103 @@ def test_power_offset_automatic_mode_selection(slot_width, value, equalization, | ||||
|     _, mode = propagate_and_optimize_mode(path, free_req, equipment) | ||||
|     assert mode['format'] == expected_mode | ||||
|     assert_allclose(path_expected[-1].snr_01nm, path[-1].snr_01nm, rtol=1e-5) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('tx_power_dbm', [-10, -8, 0, 10]) | ||||
| def test_tx_power(tx_power_dbm): | ||||
|     """If carrier add power is below equalization target + ROADM add max loss, then equalizatio | ||||
|     can not be applied. | ||||
|     """ | ||||
|     json_data = load_json(NETWORK_FILENAME) | ||||
|     for el in json_data['elements']: | ||||
|         if el['uid'] == 'roadm Lannion_CAS': | ||||
|             el['type_variety'] = 'example_detailed_impairments' | ||||
|     equipment = load_equipment(EQPT_FILENAME) | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     default_spectrum = equipment['SI']['default'] | ||||
|     p_db = default_spectrum.power_dbm | ||||
|     p_total_db = p_db + lin2db(automatic_nch(default_spectrum.f_min, default_spectrum.f_max, default_spectrum.spacing)) | ||||
|     build_network(network, equipment, p_db, p_total_db) | ||||
|     build_oms_list(network, equipment) | ||||
|     expected_roadm_lannion = { | ||||
|         "uid": "roadm Lannion_CAS", | ||||
|         "type": "Roadm", | ||||
|         "type_variety": "example_detailed_impairments", | ||||
|         "params": { | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             }, | ||||
|            'per_degree_pch_out_db': {'east edfa in Lannion_CAS to Corlay': -20, | ||||
|                                      'east edfa in Lannion_CAS to Morlaix': -20, | ||||
|                                      'east edfa in Lannion_CAS to Stbrieuc': -20}, | ||||
|             "target_pch_out_db": -20 | ||||
|         }, | ||||
|         'metadata': { | ||||
|             'location': { | ||||
|                 'city': 'Lannion_CAS', | ||||
|                 'latitude': 2.0, | ||||
|                 'longitude': 0.0, | ||||
|                 'region': 'RLD' | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     roadm = next(n for n in network.nodes() if n.uid == 'roadm Lannion_CAS') | ||||
|     assert roadm.to_json == expected_roadm_lannion | ||||
|     spectrum = _spectrum_from_json([ | ||||
|         { | ||||
|             "f_min": 191.35e12, | ||||
|             "f_max": 191.35e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40 | ||||
|         }, | ||||
|         { | ||||
|             "f_min": 193.15e12, | ||||
|             "f_max": 193.15e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40, | ||||
|             "tx_power_dbm": tx_power_dbm | ||||
|         }, | ||||
|         { | ||||
|             "f_min": 193.2e12, | ||||
|             "f_max": 193.2e12, | ||||
|             "baud_rate": 32e9, | ||||
|             "slot_width": 50e9, | ||||
|             "power_dbm": 0, | ||||
|             "roll_off": 0.15, | ||||
|             "tx_osnr": 40}]) | ||||
|     power = 1.0e-3 | ||||
|     si = carriers_to_spectral_information(initial_spectrum=spectrum, | ||||
|                                           power=power) | ||||
|     si = roadm(si, "east edfa in Lannion_CAS to Corlay", "trx Lannion_CAS") | ||||
|     # Checks that if tx_power on add port is below min required power, its equalization target can not be met | ||||
|     add_max_loss = next(e for e in getattr(equipment['Roadm']['example_detailed_impairments'], 'roadm-path-impairments') | ||||
|                         if 'roadm-add-path' in e)['roadm-add-path'][0]['roadm-maxloss'] | ||||
|     min_required_add_power = -20 + add_max_loss | ||||
|     power_reduction = max(0, min_required_add_power - tx_power_dbm) | ||||
|     assert_allclose(si.signal, dbm2watt(array([-20, -20 - power_reduction, -20])), rtol=1e-5) | ||||
|     path = ['trx Lannion_CAS', | ||||
|             'roadm Lannion_CAS', | ||||
|             'east edfa in Lannion_CAS to Stbrieuc', | ||||
|             'fiber (Lannion_CAS → Stbrieuc)-F056', | ||||
|             'east edfa in Stbrieuc to Rennes_STA', | ||||
|             'fiber (Stbrieuc → Rennes_STA)-F057', | ||||
|             'west edfa in Rennes_STA to Stbrieuc', | ||||
|             'roadm Rennes_STA', | ||||
|             'trx Rennes_STA'] | ||||
|  | ||||
|     si = carriers_to_spectral_information(initial_spectrum=spectrum, | ||||
|                                           power=power) | ||||
|     for i, uid in enumerate(path): | ||||
|         node = next(n for n in network.nodes() if n.uid == uid) | ||||
|         if isinstance(node, Roadm): | ||||
|             si = node(si, path[i + 1], path[i - 1]) | ||||
|         else: | ||||
|             si = node(si) | ||||
|     assert_allclose(watt2dbm(si.signal + si.ase + si.nli), array([-20, -20, -20]), rtol=1e-5) | ||||
|   | ||||
							
								
								
									
										98
									
								
								tests/test_gain_mode.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								tests/test_gain_mode.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | ||||
| # @Author: Esther Le Rouzic | ||||
| # @Date:   2019-05-22 | ||||
| """ | ||||
| @author: esther.lerouzic | ||||
| checks behaviour of gain mode | ||||
| - if all amps have their gains set, check that these gains are used, even if power_dbm or req_power change | ||||
| - check that saturation is correct in gain mode | ||||
|  | ||||
| """ | ||||
|  | ||||
| from pathlib import Path | ||||
| from numpy.testing import assert_array_equal, assert_allclose | ||||
|  | ||||
| import pytest | ||||
| from gnpy.core.utils import lin2db, automatic_nch, dbm2watt | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.tools.json_io import load_equipment, load_network | ||||
| from gnpy.core.equipment import trx_mode_params | ||||
| from gnpy.topology.request import PathRequest, compute_constrained_path, propagate | ||||
|  | ||||
|  | ||||
| TEST_DIR = Path(__file__).parent | ||||
| EQPT_FILENAME = TEST_DIR / 'data/eqpt_config.json' | ||||
| NETWORK_FILENAME = TEST_DIR / 'data/perdegreemeshTopologyExampleV2_auto_design_expected.json' | ||||
|  | ||||
|  | ||||
| def net_setup(equipment): | ||||
|     """Common setup for tests: builds network, equipment | ||||
|     """ | ||||
|     network = load_network(NETWORK_FILENAME, equipment) | ||||
|     spectrum = equipment['SI']['default'] | ||||
|     p_db = spectrum.power_dbm | ||||
|     p_total_db = p_db + lin2db(automatic_nch(spectrum.f_min, spectrum.f_max, spectrum.spacing)) | ||||
|     build_network(network, equipment, p_db, p_total_db) | ||||
|     return network | ||||
|  | ||||
|  | ||||
| def create_rq(equipment, srce, dest, bdir, nd_list, ls_list, mode, power_dbm): | ||||
|     """Create the usual request list according to parameters | ||||
|     """ | ||||
|     params = { | ||||
|         'request_id': 'test_request', | ||||
|         'source': srce, | ||||
|         'bidir': bdir, | ||||
|         'destination': dest, | ||||
|         'trx_type': 'Voyager', | ||||
|         'trx_mode': mode, | ||||
|         'format': mode, | ||||
|         'nodes_list': nd_list, | ||||
|         'loose_list': ls_list, | ||||
|         'effective_freq_slot': None, | ||||
|         'path_bandwidth': 100000000000.0, | ||||
|         'spacing': 50e9 if mode == 'mode 1' else 75e9, | ||||
|         'power': dbm2watt(power_dbm), | ||||
|         'tx_power': dbm2watt(power_dbm) | ||||
|     } | ||||
|     trx_params = trx_mode_params(equipment, params['trx_type'], params['trx_mode'], True) | ||||
|     params.update(trx_params) | ||||
|     f_min = params['f_min'] | ||||
|     f_max_from_si = params['f_max'] | ||||
|     params['nb_channel'] = automatic_nch(f_min, f_max_from_si, params['spacing']) | ||||
|     return PathRequest(**params) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize("power_dbm", [0, -2, 3]) | ||||
| @pytest.mark.parametrize("req_power", [1e-3, 0.5e-3, 2e-3]) | ||||
| def test_gain_mode(req_power, power_dbm): | ||||
|     """ Gains are all set on the selected path, so that since the design is made for 0dBm, | ||||
|     in gain mode, whatever the value of equipment power_dbm or request power, the network is unchanged | ||||
|     and the propagation remains the same as for power mode and 0dBm | ||||
|     """ | ||||
|     equipment = load_equipment(EQPT_FILENAME) | ||||
|     network = net_setup(equipment) | ||||
|     req = create_rq(equipment, 'trx Brest_KLA', 'trx Rennes_STA', False, | ||||
|                     ['Edfa0_roadm Brest_KLA', 'roadm Lannion_CAS', 'trx Rennes_STA'], | ||||
|                     ['STRICT', 'STRICT', 'STRICT'], 'mode 1', 0) | ||||
|     path = compute_constrained_path(network, req) | ||||
|     # Propagation in power_mode | ||||
|     infos_expected = propagate(path, req, equipment) | ||||
|     # Now set to gain mode | ||||
|     setattr(equipment['Span']['default'], 'power_mode', False) | ||||
|     setattr(equipment['SI']['default'], 'power_dbm', power_dbm) | ||||
|     req.power = req_power | ||||
|     network2 = net_setup(equipment) | ||||
|     path2 = compute_constrained_path(network2, req) | ||||
|     infos_actual = propagate(path2, req, equipment) | ||||
|  | ||||
|     assert_array_equal(infos_expected.baud_rate, infos_actual.baud_rate) | ||||
|     assert_allclose(infos_expected.signal, infos_actual.signal, rtol=1e-14) | ||||
|     assert_allclose(infos_expected.nli, infos_actual.nli, rtol=1e-14) | ||||
|     assert_allclose(infos_expected.ase, infos_actual.ase, rtol=1e-14) | ||||
|     assert_array_equal(infos_expected.roll_off, infos_actual.roll_off) | ||||
|     assert_array_equal(infos_expected.chromatic_dispersion, infos_actual.chromatic_dispersion) | ||||
|     assert_array_equal(infos_expected.pmd, infos_actual.pmd) | ||||
|     assert_array_equal(infos_expected.channel_number, infos_actual.channel_number) | ||||
|     assert_array_equal(infos_expected.number_of_channels, infos_actual.number_of_channels) | ||||
| @@ -4,7 +4,7 @@ | ||||
| import pytest | ||||
| from numpy import array, zeros, ones | ||||
| from numpy.testing import assert_array_equal | ||||
| from gnpy.core.info import create_arbitrary_spectral_information, Pref | ||||
| from gnpy.core.info import create_arbitrary_spectral_information | ||||
| from gnpy.core.exceptions import SpectrumError | ||||
|  | ||||
|  | ||||
| @@ -12,8 +12,7 @@ def test_create_arbitrary_spectral_information(): | ||||
|     si = create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], | ||||
|                                                baud_rate=32e9, signal=[1, 1, 1], | ||||
|                                                delta_pdb_per_channel=[1, 1, 1], | ||||
|                                                tx_osnr=40.0, | ||||
|                                                ref_power=Pref(1, 1, None)) | ||||
|                                                tx_osnr=40.0, tx_power=[1, 1, 1]) | ||||
|     assert_array_equal(si.baud_rate, array([32e9, 32e9, 32e9])) | ||||
|     assert_array_equal(si.slot_width, array([37.5e9, 37.5e9, 37.5e9])) | ||||
|     assert_array_equal(si.signal, ones(3)) | ||||
| @@ -34,8 +33,7 @@ def test_create_arbitrary_spectral_information(): | ||||
|     si = create_arbitrary_spectral_information(frequency=array([193.35e12, 193.3e12, 193.25e12]), | ||||
|                                                slot_width=array([50e9, 50e9, 50e9]), | ||||
|                                                baud_rate=32e9, signal=array([1, 2, 3]), | ||||
|                                                tx_osnr=40.0, | ||||
|                                                ref_power=Pref(1, 1, None)) | ||||
|                                                tx_osnr=40.0, tx_power=array([1, 2, 3])) | ||||
|  | ||||
|     assert_array_equal(si.signal, array([3, 2, 1])) | ||||
|  | ||||
| @@ -43,17 +41,16 @@ def test_create_arbitrary_spectral_information(): | ||||
|                                             r'larger than the slot width for channels: \[1, 3\].'): | ||||
|         create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], signal=1, | ||||
|                                               baud_rate=[64e9, 32e9, 64e9], slot_width=50e9, | ||||
|                                               tx_osnr=40.0, | ||||
|                                               ref_power=Pref(1, 1, None)) | ||||
|                                               tx_osnr=40.0, tx_power=1) | ||||
|     with pytest.raises(SpectrumError, match='Spectrum required slot widths larger than the frequency spectral ' | ||||
|                                             r'distances between channels: \[\(1, 2\), \(3, 4\)\].'): | ||||
|         create_arbitrary_spectral_information(frequency=[193.26e12, 193.3e12, 193.35e12, 193.39e12], signal=1, | ||||
|                                               tx_osnr=40.0, baud_rate=32e9, slot_width=50e9, ref_power=Pref(1, 1, None)) | ||||
|                                               tx_osnr=40.0, baud_rate=32e9, slot_width=50e9, tx_power=1) | ||||
|     with pytest.raises(SpectrumError, match='Spectrum required slot widths larger than the frequency spectral ' | ||||
|                                             r'distances between channels: \[\(1, 2\), \(2, 3\)\].'): | ||||
|         create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], signal=1, baud_rate=49e9, | ||||
|                                               tx_osnr=40.0, roll_off=0.1, ref_power=Pref(1, 1, None)) | ||||
|                                               tx_osnr=40.0, roll_off=0.1, tx_power=1) | ||||
|     with pytest.raises(SpectrumError, | ||||
|                        match='Dimension mismatch in input fields.'): | ||||
|         create_arbitrary_spectral_information(frequency=[193.25e12, 193.3e12, 193.35e12], signal=[1, 2], baud_rate=49e9, | ||||
|                                               tx_osnr=40.0, ref_power=Pref(1, 1, None)) | ||||
|                                               tx_osnr=40.0, tx_power=1) | ||||
|   | ||||
| @@ -29,6 +29,14 @@ SRC_ROOT = Path(__file__).parent.parent | ||||
|      ['--spectrum', 'gnpy/example-data/initial_spectrum2.json', 'gnpy/example-data/meshTopologyExampleV2.xls', '--show-channels', ]), | ||||
|     ('path_requests_run_CD_PMD_PDL_missing', 'logs_path_requests_run_CD_PMD_PDL_missing', path_requests_run, | ||||
|      ['tests/data/CORONET_Global_Topology_expected.json', 'tests/data/CORONET_services.json', '-v']), | ||||
|     ('power_sweep_example', 'logs_power_sweep_example', transmission_main_example, | ||||
|      ['tests/data/testTopology_expected.json', 'brest', 'rennes', '-e', 'tests/data/eqpt_config_sweep.json', '--pow', '3']), | ||||
|     ('transmission_long_pow', None, transmission_main_example, | ||||
|      ['-e', 'tests/data/eqpt_config.json', 'tests/data/test_long_network.json', '--spectrum', 'gnpy/example-data/initial_spectrum2.json']), | ||||
|     ('transmission_long_psd', None, transmission_main_example, | ||||
|      ['-e', 'tests/data/eqpt_config_psd.json', 'tests/data/test_long_network.json', '--spectrum', 'gnpy/example-data/initial_spectrum2.json', ]), | ||||
|     ('transmission_long_psw', None, transmission_main_example, | ||||
|      ['-e', 'tests/data/eqpt_config_psw.json', 'tests/data/test_long_network.json', '--spectrum', 'gnpy/example-data/initial_spectrum2.json', ]), | ||||
| )) | ||||
| def test_example_invocation(capfd, caplog, output, log, handler, args): | ||||
|     """Make sure that our examples produce useful output""" | ||||
|   | ||||
| @@ -34,7 +34,7 @@ def test_jsonthing(caplog): | ||||
|         "sys_margins": 2 | ||||
|     } | ||||
|     _ = SI(**json_data) | ||||
|     expected_msg = 'WARNING missing f_min attribute in eqpt_config.json[SI]\n ' \ | ||||
|     expected_msg = 'WARNING missing f_min attribute in eqpt_config.json[SI]\n\t' \ | ||||
|                    + 'default value is f_min = 191350000000000.0' | ||||
|     assert expected_msg in caplog.text | ||||
|  | ||||
| @@ -181,7 +181,7 @@ def wrong_requests(): | ||||
|             }] | ||||
|         }, | ||||
|         'expected_msg': 'Equipment Config error in imposed_mode: ' | ||||
|                         + 'Could not find transponder "test_offset" with mode "mode 3" in equipment library' | ||||
|                         + 'Could not find transponder "test_offset" in equipment library' | ||||
|     }) | ||||
|     data.append({ | ||||
|         'error': ServiceError, | ||||
|   | ||||
| @@ -7,8 +7,10 @@ | ||||
| from pathlib import Path | ||||
| import pytest | ||||
| from gnpy.core.exceptions import NetworkTopologyError | ||||
| from gnpy.core.network import span_loss | ||||
| from gnpy.tools.json_io import load_equipment, load_network | ||||
| from gnpy.core.network import span_loss, build_network | ||||
| from gnpy.tools.json_io import load_equipment, load_network, network_from_json | ||||
| from gnpy.core.utils import lin2db, automatic_nch | ||||
| from gnpy.core.elements import Fiber, Edfa | ||||
|  | ||||
|  | ||||
| TEST_DIR = Path(__file__).parent | ||||
| @@ -49,7 +51,7 @@ def test_span_loss(node, attenuation): | ||||
|     network = load_network(NETWORK_FILENAME, equipment) | ||||
|     for x in network.nodes(): | ||||
|         if x.uid == node: | ||||
|             assert attenuation == span_loss(network, x) | ||||
|             assert attenuation == span_loss(network, x, equipment) | ||||
|             return | ||||
|     assert not f'node "{node}" referenced from test but not found in the topology'  # pragma: no cover | ||||
|  | ||||
| @@ -61,4 +63,181 @@ def test_span_loss_unconnected(node): | ||||
|     network = load_network(NETWORK_FILENAME, equipment) | ||||
|     x = next(x for x in network.nodes() if x.uid == node) | ||||
|     with pytest.raises(NetworkTopologyError): | ||||
|         span_loss(network, x) | ||||
|         span_loss(network, x, equipment) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('typ, expected_loss', | ||||
|                          [('Edfa', [11, 11]), | ||||
|                           ('Fused', [11, 10])]) | ||||
| def test_eol(typ, expected_loss): | ||||
|     """Check that EOL is added only once on spans. One span can be one fiber or several fused fibers | ||||
|     EOL is then added on the first fiber only. | ||||
|     """ | ||||
|     json_data = { | ||||
|         "elements": [ | ||||
|             { | ||||
|                 "uid": "trx SITE1", | ||||
|                 "type": "Transceiver" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "trx SITE2", | ||||
|                 "type": "Transceiver" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "roadm SITE1", | ||||
|                 "type": "Roadm" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "roadm SITE2", | ||||
|                 "type": "Roadm" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "fiber (SITE1 → ILA1)", | ||||
|                 "type": "Fiber", | ||||
|                 "type_variety": "SSMF", | ||||
|                 "params": { | ||||
|                     "length": 50.0, | ||||
|                     "loss_coef": 0.2, | ||||
|                     "length_units": "km" | ||||
|                 } | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "fiber (ILA1 → SITE2)", | ||||
|                 "type": "Fiber", | ||||
|                 "type_variety": "SSMF", | ||||
|                 "params": { | ||||
|                     "length": 50.0, | ||||
|                     "loss_coef": 0.2, | ||||
|                     "length_units": "km" | ||||
|                 } | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "east edfa in SITE1 to ILA1", | ||||
|                 "type": "Edfa" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "west edfa in SITE2 to ILA1", | ||||
|                 "type": typ | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "east edfa in ILA1 to SITE2", | ||||
|                 "type": "Edfa" | ||||
|             } | ||||
|         ], | ||||
|         "connections": [ | ||||
|             { | ||||
|                 "from_node": "trx SITE1", | ||||
|                 "to_node": "roadm SITE1" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "roadm SITE1", | ||||
|                 "to_node": "east edfa in SITE1 to ILA1" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "east edfa in SITE1 to ILA1", | ||||
|                 "to_node": "fiber (SITE1 → ILA1)" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "fiber (SITE1 → ILA1)", | ||||
|                 "to_node": "east edfa in ILA1 to SITE2" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "east edfa in ILA1 to SITE2", | ||||
|                 "to_node": "fiber (ILA1 → SITE2)" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "fiber (ILA1 → SITE2)", | ||||
|                 "to_node": "west edfa in SITE2 to ILA1" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "west edfa in SITE2 to ILA1", | ||||
|                 "to_node": "roadm SITE2" | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": "roadm SITE2", | ||||
|                 "to_node": "trx SITE2" | ||||
|             } | ||||
|         ] | ||||
|     } | ||||
|     equipment = load_equipment(EQPT_FILENAME) | ||||
|     equipment['Span']['default'].EOL = 1 | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     p_db = equipment['SI']['default'].power_dbm | ||||
|     p_total_db = p_db + lin2db(automatic_nch(equipment['SI']['default'].f_min, | ||||
|                                              equipment['SI']['default'].f_max, equipment['SI']['default'].spacing)) | ||||
|  | ||||
|     build_network(network, equipment, p_db, p_total_db) | ||||
|     fibers = [f for f in network.nodes() if isinstance(f, Fiber)] | ||||
|     for i in range(2): | ||||
|         assert fibers[i].loss == expected_loss[i] | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('p_db, power_mode, elem1, elem2, expected_gain, expected_delta_p, expected_voa', [ | ||||
|     (-17, True, 'edfa', 'fiber', 15.0, 15, 15.0), | ||||
|     (-17, True, 'fiber', 'edfa', 15.0, 5.0, 5.0), | ||||
|     (-17, False, 'edfa', 'fiber', 0.0, None, 0.0), | ||||
|     (-17, False, 'fiber', 'edfa', 10.0, None, 0.0), | ||||
|     (10, True, 'edfa', 'fiber', -9.0, -9.0, 0.0), | ||||
|     (10, True, 'fiber', 'edfa', 1.0, -9.0, 0.0), | ||||
|     (10, False, 'edfa', 'fiber', -9.0, None, 0.0), | ||||
|     (10, False, 'fiber', 'edfa', 1.0, None, 0.0)]) | ||||
| def test_design_non_amplified_link(elem1, elem2, expected_gain, expected_delta_p, expected_voa, power_mode, p_db): | ||||
|     """Check that the delta_p, gain computed on an amplified link that starts from a transceiver are correct | ||||
|     """ | ||||
|     json_data = { | ||||
|         "elements": [ | ||||
|             { | ||||
|                 "uid": "trx SITE1", | ||||
|                 "type": "Transceiver" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "trx SITE2", | ||||
|                 "type": "Transceiver" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "edfa", | ||||
|                 "type": "Edfa", | ||||
|                 "type_variety": "std_low_gain" | ||||
|             }, | ||||
|             { | ||||
|                 "uid": "fiber", | ||||
|                 "type": "Fiber", | ||||
|                 "type_variety": "SSMF", | ||||
|                 "params": { | ||||
|                     "length": 50.0, | ||||
|                     "loss_coef": 0.2, | ||||
|                     "length_units": "km" | ||||
|                 } | ||||
|             } | ||||
|         ], | ||||
|         "connections": [ | ||||
|             { | ||||
|                 "from_node": "trx SITE1", | ||||
|                 "to_node": elem1 | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": elem1, | ||||
|                 "to_node": elem2 | ||||
|             }, | ||||
|             { | ||||
|                 "from_node": elem2, | ||||
|                 "to_node": "trx SITE2" | ||||
|             } | ||||
|         ] | ||||
|     } | ||||
|     equipment = load_equipment(EQPT_FILENAME) | ||||
|     equipment['Span']['default'].power_mode = power_mode | ||||
|     equipment['SI']['default'].power_dbm = p_db | ||||
|     equipment['SI']['default'].tx_power_dbm = p_db | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     edfa = next(a for a in network.nodes() if a.uid == 'edfa') | ||||
|     edfa.params.out_voa_auto = True | ||||
|     p_total_db = p_db + 20.0 | ||||
|  | ||||
|     build_network(network, equipment, p_db, p_total_db) | ||||
|     amps = [a for a in network.nodes() if isinstance(a, Edfa)] | ||||
|     for amp in amps: | ||||
|         assert amp.out_voa == expected_voa | ||||
|         assert amp.delta_p == expected_delta_p | ||||
|         # max power of std_low_gain is 21 dBm | ||||
|         assert amp.effective_gain == expected_gain | ||||
|   | ||||
| @@ -40,17 +40,18 @@ def test_fiber_parameters(): | ||||
|     fiber_dict_cr.update(Fiber(**fiber_dict_cr).__dict__) | ||||
|     fiber_params_cr = FiberParams(**fiber_dict_cr) | ||||
|  | ||||
|     raman_coefficient_explicit_g0 = fiber_params_explicit_g0.raman_coefficient | ||||
|     raman_coefficient_explicit_g0 =\ | ||||
|         raman_coefficient_explicit_g0.normalized_gamma_raman * fiber_params_explicit_g0._raman_reference_frequency | ||||
|     norm_gamma_raman_explicit_g0 = fiber_params_explicit_g0.raman_coefficient.normalized_gamma_raman | ||||
|     norm_gamma_raman_default_g0 = fiber_params_default_g0.raman_coefficient.normalized_gamma_raman | ||||
|  | ||||
|     raman_coefficient_default_g0 = fiber_params_default_g0.raman_coefficient | ||||
|     raman_coefficient_default_g0 = \ | ||||
|         raman_coefficient_default_g0.normalized_gamma_raman * fiber_params_default_g0._raman_reference_frequency | ||||
|     norm_gamma_raman_cr = fiber_params_cr.raman_coefficient.normalized_gamma_raman | ||||
|  | ||||
|     raman_coefficient_cr = fiber_params_cr.raman_coefficient | ||||
|     raman_coefficient_cr = \ | ||||
|         raman_coefficient_cr.normalized_gamma_raman * fiber_params_cr._raman_reference_frequency | ||||
|     assert_allclose(norm_gamma_raman_explicit_g0, norm_gamma_raman_default_g0, rtol=1e-10) | ||||
|     assert_allclose(norm_gamma_raman_explicit_g0, norm_gamma_raman_cr, rtol=1e-10) | ||||
|  | ||||
|     assert_allclose(raman_coefficient_explicit_g0, raman_coefficient_default_g0, rtol=1e-10) | ||||
|     assert_allclose(raman_coefficient_explicit_g0, raman_coefficient_cr, rtol=1e-10) | ||||
|     # Change Effective Area | ||||
|     fiber_dict_default_g0['effective_area'] = 100e-12 | ||||
|     no_ssmf_fiber_params = FiberParams(**fiber_dict_default_g0) | ||||
|  | ||||
|     norm_gamma_raman_default_g0_no_ssmf = no_ssmf_fiber_params.raman_coefficient.normalized_gamma_raman | ||||
|  | ||||
|     assert_allclose(norm_gamma_raman_explicit_g0, norm_gamma_raman_default_g0_no_ssmf, rtol=1e-10) | ||||
|   | ||||
| @@ -24,8 +24,8 @@ from xlrd import open_workbook | ||||
| import pytest | ||||
| from copy import deepcopy | ||||
| from gnpy.core.utils import automatic_nch, lin2db | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.core.exceptions import ServiceError | ||||
| from gnpy.core.network import build_network, add_missing_elements_in_network | ||||
| from gnpy.core.exceptions import ServiceError, ConfigurationError | ||||
| from gnpy.topology.request import (jsontocsv, requests_aggregation, compute_path_dsjctn, deduplicate_disjunctions, | ||||
|                                    compute_path_with_disjunction, ResultElement, PathRequest) | ||||
| from gnpy.topology.spectrum_assignment import build_oms_list, pth_assign_spectrum | ||||
| @@ -71,6 +71,7 @@ def test_auto_design_generation_fromxlsgainmode(tmpdir, xls_input, expected_json | ||||
|     """tests generation of topology json and that the build network gives correct results in gain mode""" | ||||
|     equipment = load_equipment(eqpt_filename) | ||||
|     network = load_network(xls_input, equipment) | ||||
|     add_missing_elements_in_network(network, equipment) | ||||
|     # in order to test the Eqpt sheet and load gain target, | ||||
|     # change the power-mode to False (to be in gain mode) | ||||
|     equipment['Span']['default'].power_mode = False | ||||
| @@ -109,6 +110,7 @@ def test_auto_design_generation_fromjson(tmpdir, json_input, power_mode): | ||||
|     p_db = equipment['SI']['default'].power_dbm | ||||
|     p_total_db = p_db + lin2db(automatic_nch(equipment['SI']['default'].f_min, | ||||
|                                              equipment['SI']['default'].f_max, equipment['SI']['default'].spacing)) | ||||
|     add_missing_elements_in_network(network, equipment) | ||||
|     build_network(network, equipment, p_db, p_total_db) | ||||
|     actual_json_output = tmpdir / json_input.with_name(json_input.stem + '_auto_design').with_suffix('.json').name | ||||
|     save_network(network, actual_json_output) | ||||
| @@ -350,6 +352,7 @@ def test_excel_ila_constraints(source, destination, route_list, hoptype, expecte | ||||
|         'cost': None, | ||||
|         'roll_off': 0, | ||||
|         'tx_osnr': 0, | ||||
|         'tx_power': 0, | ||||
|         'penalties': None, | ||||
|         'min_spacing': None, | ||||
|         'nb_channel': 0, | ||||
| @@ -563,3 +566,52 @@ def test_service_json_constraint_order(): | ||||
|     rqs = requests_from_json(data, equipment) | ||||
|     assert rqs[0].nodes_list == ['roadm Brest_KLA', 'roadm Lannion_CAS', 'roadm Lorient_KMA', 'roadm Vannes_KBE'] | ||||
|     assert rqs[0].loose_list == ['STRICT', 'LOOSE', 'STRICT', 'STRICT'] | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('type_variety, target_pch_out_db, correct_variety', [(None, -20, True), | ||||
|                                                                               ('example_test', -18, True), | ||||
|                                                                               ('example', None, False)]) | ||||
| def test_roadm_type_variety(type_variety, target_pch_out_db, correct_variety): | ||||
|     """Checks that if element has no variety, the default one is applied, and if it has one | ||||
|     that the type_variety is correctly applied | ||||
|     """ | ||||
|     json_data = { | ||||
|         "elements": [{ | ||||
|             "uid": "roadm Oakland", | ||||
|             "type": "Roadm", | ||||
|         }], | ||||
|         "connections": [] | ||||
|     } | ||||
|     expected_roadm = { | ||||
|         "uid": "roadm Oakland", | ||||
|         "type": "Roadm", | ||||
|         "params": { | ||||
|             "restrictions": { | ||||
|                 "preamp_variety_list": [], | ||||
|                 "booster_variety_list": [] | ||||
|             } | ||||
|         }, | ||||
|         'metadata': { | ||||
|             'location': { | ||||
|                 'city': None, | ||||
|                 'latitude': 0, | ||||
|                 'longitude': 0, | ||||
|                 'region': None | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     if type_variety is not None: | ||||
|         json_data['elements'][0]['type_variety'] = type_variety | ||||
|         expected_roadm['type_variety'] = type_variety | ||||
|     else: | ||||
|         # Do not add type variety in json_data to test that it creates a 'default' type_variety | ||||
|         expected_roadm['type_variety'] = 'default' | ||||
|     expected_roadm['params']['target_pch_out_db'] = target_pch_out_db | ||||
|     equipment = load_equipment(eqpt_filename) | ||||
|     if correct_variety: | ||||
|         network = network_from_json(json_data, equipment) | ||||
|         roadm = [n for n in network.nodes()][0] | ||||
|         assert roadm.to_json == expected_roadm | ||||
|     else: | ||||
|         with pytest.raises(ConfigurationError): | ||||
|             network = network_from_json(json_data, equipment) | ||||
|   | ||||
| @@ -4,14 +4,19 @@ | ||||
| # @Date:   2018-02-02 14:06:55 | ||||
|  | ||||
| import pytest | ||||
| from gnpy.core.elements import Transceiver, Fiber, Edfa, Roadm | ||||
| from gnpy.core.utils import db2lin | ||||
| from gnpy.core.info import create_input_spectral_information, ReferenceCarrier | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.tools.json_io import load_network, load_equipment | ||||
|  | ||||
| from pathlib import Path | ||||
| from networkx import dijkstra_path | ||||
| from numpy import mean, sqrt, ones | ||||
| import re | ||||
|  | ||||
| from gnpy.core.exceptions import SpectrumError | ||||
| from gnpy.core.elements import Transceiver, Fiber, Edfa, Roadm | ||||
| from gnpy.core.utils import db2lin | ||||
| from gnpy.core.info import create_input_spectral_information | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.tools.json_io import load_network, load_equipment, network_from_json | ||||
|  | ||||
|  | ||||
| network_file_name = Path(__file__).parent.parent / 'tests/LinkforTest.json' | ||||
| eqpt_library_name = Path(__file__).parent.parent / 'tests/data/eqpt_config.json' | ||||
| @@ -28,7 +33,6 @@ def nch_and_spacing(request): | ||||
| def propagation(input_power, con_in, con_out, dest): | ||||
|     equipment = load_equipment(eqpt_library_name) | ||||
|     network = load_network(network_file_name, equipment) | ||||
|     build_network(network, equipment, 0, 20) | ||||
|  | ||||
|     # parametrize the network elements with the con losses and adapt gain | ||||
|     # (assumes all spans are identical) | ||||
| @@ -40,14 +44,16 @@ def propagation(input_power, con_in, con_out, dest): | ||||
|         if isinstance(e, Edfa): | ||||
|             e.operational.gain_target = loss + con_in + con_out | ||||
|  | ||||
|     build_network(network, equipment, 0, 20) | ||||
|  | ||||
|     transceivers = {n.uid: n for n in network.nodes() if isinstance(n, Transceiver)} | ||||
|  | ||||
|     p = input_power | ||||
|     p = db2lin(p) * 1e-3 | ||||
|     spacing = 50e9  # THz | ||||
|     si = create_input_spectral_information(f_min=191.3e12, f_max=191.3e12 + 79 * spacing, roll_off=0.15, | ||||
|                                            baud_rate=32e9, power=p, spacing=spacing, tx_osnr=None, | ||||
|                                            ref_carrier=ReferenceCarrier(baud_rate=32e9, slot_width=50e9)) | ||||
|                                            baud_rate=32e9, spacing=spacing, tx_osnr=None, | ||||
|                                            tx_power=p) | ||||
|     source = next(transceivers[uid] for uid in transceivers if uid == 'trx A') | ||||
|     sink = next(transceivers[uid] for uid in transceivers if uid == dest) | ||||
|     path = dijkstra_path(network, source, sink) | ||||
| @@ -125,6 +131,62 @@ def test_dgd(dgd_test, dest): | ||||
|     assert pmd == pytest.approx(expected_pmd) | ||||
|  | ||||
|  | ||||
| def wrong_element_propagate(): | ||||
|     """ | ||||
|     """ | ||||
|     data = [] | ||||
|     data.append({ | ||||
|         "error": SpectrumError, | ||||
|         "json_data": { | ||||
|             "elements": [{ | ||||
|                 "uid": "Elem", | ||||
|                 "type": "Fiber", | ||||
|                 "type_variety": "SSMF", | ||||
|                 "params": { | ||||
|                     "dispersion_per_frequency": { | ||||
|                         "frequency": [ | ||||
|                             185.49234135667396e12, | ||||
|                             186.05251641137855e12, | ||||
|                             188.01312910284463e12, | ||||
|                             189.99124726477024e12], | ||||
|                         "value": [ | ||||
|                             1.60e-05, | ||||
|                             1.67e-05, | ||||
|                             1.7e-05, | ||||
|                             1.8e-05] | ||||
|                     }, | ||||
|                     "length": 1.02, | ||||
|                     "loss_coef": 2.85, | ||||
|                     "length_units": "km", | ||||
|                     "att_in": 0.0, | ||||
|                     "con_in": 0.0, | ||||
|                     "con_out": 0.0 | ||||
|                 } | ||||
|             }], | ||||
|             "connections": [] | ||||
|         }, | ||||
|         "expected_msg": 'The spectrum bandwidth exceeds the frequency interval used to define the fiber Chromatic ' | ||||
|                         + 'Dispersion in "Fiber Elem".\nSpectrum f_min-f_max: 191.35-196.1\nChromatic Dispersion ' | ||||
|                         + 'f_min-f_max: 185.49-189.99' | ||||
|     }) | ||||
|     return data | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('error, json_data, expected_msg', | ||||
|                          [(e['error'], e['json_data'], e['expected_msg']) for e in wrong_element_propagate()]) | ||||
| def test_json_element(error, json_data, expected_msg): | ||||
|     """ | ||||
|     Check that a missing key is correctly raisong the logger | ||||
|     """ | ||||
|     equipment = load_equipment(eqpt_library_name) | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     elem = next(e for e in network.nodes() if e.uid == 'Elem') | ||||
|     si = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15, | ||||
|                                            baud_rate=32e9, tx_power=1.0e-3, spacing=50.0e9, tx_osnr=45) | ||||
|     with pytest.raises(error, match=re.escape(expected_msg)): | ||||
|         _ = elem(si) | ||||
|  | ||||
|  | ||||
| if __name__ == '__main__': | ||||
|     from logging import getLogger, basicConfig, INFO | ||||
|     logger = getLogger(__name__) | ||||
|   | ||||
| @@ -13,15 +13,19 @@ checks that restrictions in roadms are correctly applied during autodesign | ||||
| from pathlib import Path | ||||
| import pytest | ||||
| from numpy.testing import assert_allclose | ||||
|  | ||||
| from numpy import ndarray, mean | ||||
| from copy import deepcopy | ||||
| from gnpy.core.utils import lin2db, automatic_nch | ||||
| from gnpy.core.elements import Fused, Roadm, Edfa | ||||
| from gnpy.core.network import build_network | ||||
| from gnpy.tools.json_io import network_from_json, load_equipment, load_json, Amp | ||||
| from gnpy.core.elements import Fused, Roadm, Edfa, Transceiver, EdfaOperational, EdfaParams, Fiber | ||||
| from gnpy.core.parameters import FiberParams, RoadmParams, FusedParams | ||||
| from gnpy.core.network import build_network, design_network | ||||
| from gnpy.tools.json_io import network_from_json, load_equipment, load_json, Amp, _equipment_from_json | ||||
| from gnpy.core.equipment import trx_mode_params | ||||
| from gnpy.topology.request import PathRequest, compute_constrained_path, ref_carrier | ||||
| from gnpy.core.info import create_input_spectral_information | ||||
| from gnpy.core.utils import db2lin | ||||
| from gnpy.topology.request import PathRequest, compute_constrained_path, propagate | ||||
| from gnpy.core.info import create_input_spectral_information, Carrier | ||||
| from gnpy.core.utils import db2lin, dbm2watt, merge_amplifier_restrictions | ||||
| from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError | ||||
|  | ||||
|  | ||||
| TEST_DIR = Path(__file__).parent | ||||
| EQPT_LIBRARY_NAME = TEST_DIR / 'data/eqpt_config.json' | ||||
| @@ -209,18 +213,23 @@ def test_restrictions(restrictions, equipment): | ||||
|                     raise AssertionError() | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('roadm_type_variety, roadm_b_maxloss', [('default', 0), | ||||
|                                                                  ('example_detailed_impairments', 16.5)]) | ||||
| @pytest.mark.parametrize('power_dbm', [0, +1, -2]) | ||||
| @pytest.mark.parametrize('prev_node_type, effective_pch_out_db', [('edfa', -20.0), ('fused', -22.0)]) | ||||
| def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm): | ||||
| def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm, roadm_type_variety, roadm_b_maxloss): | ||||
|     """Check that egress power of roadm is equal to target power if input power is greater | ||||
|     than target power else, that it is equal to input power. Use a simple two hops A-B-C topology | ||||
|     for the test where the prev_node in ROADM B is either an amplifier or a fused, so that the target | ||||
|     power can not be met in this last case. | ||||
|     """ | ||||
|     equipment = load_equipment(EQPT_LIBRARY_NAME) | ||||
|     equipment['SI']['default'].power_dbm = power_dbm | ||||
|     json_network = load_json(TEST_DIR / 'data/twohops_roadm_power_test.json') | ||||
|     prev_node = next(n for n in json_network['elements'] if n['uid'] == 'west edfa in node B to ila2') | ||||
|     json_network['elements'].remove(prev_node) | ||||
|     roadm_b = next(element for element in json_network['elements'] if element['uid'] == 'roadm node B') | ||||
|     roadm_b['type_variety'] = roadm_type_variety | ||||
|     if prev_node_type == 'edfa': | ||||
|         prev_node = {'uid': 'west edfa in node B to ila2', 'type': 'Edfa'} | ||||
|     elif prev_node_type == 'fused': | ||||
| @@ -245,7 +254,9 @@ def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm): | ||||
|               'format': '', | ||||
|               'path_bandwidth': 100e9, | ||||
|               'effective_freq_slot': None, | ||||
|               'nb_channel': nb_channel | ||||
|               'nb_channel': nb_channel, | ||||
|               'power': dbm2watt(power_dbm), | ||||
|               'tx_power': dbm2watt(power_dbm) | ||||
|               } | ||||
|     trx_params = trx_mode_params(equipment) | ||||
|     params.update(trx_params) | ||||
| @@ -254,32 +265,435 @@ def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm): | ||||
|     path = compute_constrained_path(network, req) | ||||
|     si = create_input_spectral_information( | ||||
|         f_min=req.f_min, f_max=req.f_max, roll_off=req.roll_off, baud_rate=req.baud_rate, | ||||
|         power=req.power, spacing=req.spacing, tx_osnr=req.tx_osnr, ref_carrier=ref_carrier(equipment)) | ||||
|         spacing=req.spacing, tx_osnr=req.tx_osnr, tx_power=req.tx_power) | ||||
|     for i, el in enumerate(path): | ||||
|         if isinstance(el, Roadm): | ||||
|             power_in_roadm = si.signal + si.ase + si.nli | ||||
|             si = el(si, degree=path[i + 1].uid) | ||||
|             si = el(si, degree=path[i + 1].uid, from_degree=path[i - 1].uid) | ||||
|             power_out_roadm = si.signal + si.ase + si.nli | ||||
|             if el.uid == 'roadm node B': | ||||
|                 # if previous was an EDFA, power level at ROADM input is enough for the ROADM to apply its | ||||
|                 # target power (as specified in equipment ie -20 dBm) | ||||
|                 # if it is a Fused, the input power to the ROADM is smaller than the target power, and the | ||||
|                 # ROADM cannot apply this target. In this case, it is assumed that the ROADM has 0 dB loss | ||||
|                 # so the output power will be the same as the input power, which for this particular case | ||||
|                 # corresponds to -22dBm + power_dbm | ||||
|                 # next step (for ROADM modelling) will be to apply a minimum loss for ROADMs ! | ||||
|                 # ROADM cannot apply this target. If the ROADM has 0 dB loss the output power will be the same | ||||
|                 # as the input power, which for this particular case corresponds to -22dBm + power_dbm. | ||||
|                 # If ROADM has a minimum losss, then output power will be -22dBm + power_dbm - ROADM loss. ! | ||||
|                 if prev_node_type == 'edfa': | ||||
|                     # edfa prev_node sets input power to roadm to a high enough value: | ||||
|                     # check that target power is correctly set in the ROADM | ||||
|                     assert_allclose(el.ref_pch_out_dbm, effective_pch_out_db, rtol=1e-3) | ||||
|                     # Check that egress power of roadm is equal to target power | ||||
|                     assert_allclose(power_out_roadm, db2lin(effective_pch_out_db - 30), rtol=1e-3) | ||||
|                 elif prev_node_type == 'fused': | ||||
|                     # fused prev_node does reamplfy power after fiber propagation, so input power | ||||
|                 if prev_node_type == 'fused': | ||||
|                     # fused prev_node does not reamplify power after fiber propagation, so input power | ||||
|                     # to roadm is low. | ||||
|                     # check that target power correctly reports power_dbm from previous propagation | ||||
|                     assert_allclose(el.ref_pch_out_dbm, effective_pch_out_db + power_dbm, rtol=1e-3) | ||||
|                     # Check that egress power of roadm is not equalized power out is the same as power in. | ||||
|                     assert_allclose(power_out_roadm, power_in_roadm, rtol=1e-3) | ||||
|                     assert_allclose(el.ref_pch_out_dbm, effective_pch_out_db + power_dbm - roadm_b_maxloss, rtol=1e-3) | ||||
|                     # Check that egress power of roadm is not equalized: | ||||
|                     # power out is the same as power in minus the ROADM loss. | ||||
|                     assert_allclose(power_out_roadm, power_in_roadm / db2lin(roadm_b_maxloss), rtol=1e-3) | ||||
|                     assert effective_pch_out_db + power_dbm ==\ | ||||
|                         pytest.approx(lin2db(min(power_in_roadm) * 1e3), rel=1e-3) | ||||
|         else: | ||||
|             si = el(si) | ||||
|  | ||||
|  | ||||
| def create_per_oms_request(network, eqpt, req_power): | ||||
|     """Create requests between every adjacent ROADMs + one additional request crossing several ROADMs | ||||
|     """ | ||||
|     nb_channel = automatic_nch(eqpt['SI']['default'].f_min, eqpt['SI']['default'].f_max, | ||||
|                                eqpt['SI']['default'].spacing) | ||||
|     params = { | ||||
|         'trx_type': '', | ||||
|         'trx_mode': '', | ||||
|         'bidir': False, | ||||
|         'loose_list': ['strict', 'strict'], | ||||
|         'format': '', | ||||
|         'path_bandwidth': 100e9, | ||||
|         'effective_freq_slot': None, | ||||
|         'nb_channel': nb_channel, | ||||
|         'power': dbm2watt(req_power), | ||||
|         'tx_power': dbm2watt(req_power) | ||||
|     } | ||||
|     trx_params = trx_mode_params(eqpt) | ||||
|     params.update(trx_params) | ||||
|     trxs = [e for e in network if isinstance(e, Transceiver)] | ||||
|     req_list = [] | ||||
|     req_id = 0 | ||||
|     for trx in trxs: | ||||
|         source = trx.uid | ||||
|         roadm = next(n for n in network.successors(trx) if isinstance(n, Roadm)) | ||||
|         for degree in roadm.per_degree_pch_out_dbm.keys(): | ||||
|             node = next(n for n in network.nodes() if n.uid == degree) | ||||
|             # find next roadm | ||||
|             while not isinstance(node, Roadm): | ||||
|                 node = next(n for n in network.successors(node)) | ||||
|             next_roadm = node | ||||
|             destination = next(n.uid for n in network.successors(next_roadm) if isinstance(n, Transceiver)) | ||||
|             params['request_id'] = req_id | ||||
|             req_id += 1 | ||||
|             params['source'] = source | ||||
|             params['destination'] = destination | ||||
|             params['nodes_list'] = [degree, destination] | ||||
|             req = PathRequest(**params) | ||||
|             req.power = dbm2watt(req_power) | ||||
|             carrier = {key: getattr(req, key) for key in ['baud_rate', 'roll_off', 'tx_osnr']} | ||||
|             carrier['label'] = "" | ||||
|             carrier['slot_width'] = req.spacing | ||||
|             carrier['delta_pdb'] = 0 | ||||
|             carrier['tx_power'] = 1e-3 | ||||
|             req.initial_spectrum = {(req.f_min + req.spacing * f): Carrier(**carrier) | ||||
|                                     for f in range(1, req.nb_channel + 1)} | ||||
|             req_list.append(req) | ||||
|     # add one additional request crossing several roadms to have a complete view | ||||
|     params['source'] = 'trx Rennes_STA' | ||||
|     params['destination'] = 'trx Vannes_KBE' | ||||
|     params['nodes_list'] = ['roadm Lannion_CAS', 'trx Vannes_KBE'] | ||||
|     params['bidir'] = True | ||||
|     req = PathRequest(**params) | ||||
|     req.power = dbm2watt(req_power) | ||||
|     carrier = {key: getattr(req, key) for key in ['baud_rate', 'roll_off', 'tx_osnr']} | ||||
|     carrier['label'] = "" | ||||
|     carrier['slot_width'] = req.spacing | ||||
|     carrier['delta_pdb'] = 0 | ||||
|     carrier['tx_power'] = 1e-3 | ||||
|     req.initial_spectrum = {(req.f_min + req.spacing * f): Carrier(**carrier) for f in range(1, req.nb_channel + 1)} | ||||
|     req_list.append(req) | ||||
|     return req_list | ||||
|  | ||||
|  | ||||
| def list_element_attr(element): | ||||
|     """Return the list of keys to be checked depending on element type. List only the keys that are not | ||||
|     created upon element effective propagation | ||||
|     """ | ||||
|  | ||||
|     if isinstance(element, Roadm): | ||||
|         return ['uid', 'name', 'metadata', 'operational', 'type_variety', 'target_pch_out_dbm', | ||||
|                 'passive', 'restrictions', 'per_degree_pch_out_dbm', | ||||
|                 'target_psd_out_mWperGHz', 'per_degree_pch_psd'] | ||||
|         # Dynamically created: 'effective_loss', | ||||
|     if isinstance(element, RoadmParams): | ||||
|         return ['target_pch_out_dbm', 'target_psd_out_mWperGHz', 'per_degree_pch_out_db', 'per_degree_pch_psd', | ||||
|                 'add_drop_osnr', 'pmd', 'restrictions'] | ||||
|     if isinstance(element, Edfa): | ||||
|         return ['variety_list', 'uid', 'name', 'params', 'metadata', 'operational', | ||||
|                 'passive', 'effective_gain', 'delta_p', 'tilt_target', 'out_voa'] | ||||
|         # TODO this exhaustive test highlighted that type_variety is not correctly updated from EdfaParams to | ||||
|         # attributes in preamps | ||||
|         # Dynamically created only with channel propagation: 'att_in', 'channel_freq', 'effective_pch_out_db' | ||||
|         # 'gprofile', 'interpol_dgt', 'interpol_gain_ripple', 'interpol_nf_ripple', 'nch',  'nf', 'pin_db', 'pout_db', | ||||
|         # 'target_pch_out_db', | ||||
|     if isinstance(element, FusedParams): | ||||
|         return ['loss'] | ||||
|     if isinstance(element, EdfaOperational): | ||||
|         return ['delta_p', 'gain_target', 'out_voa', 'tilt_target'] | ||||
|     if isinstance(element, EdfaParams): | ||||
|         return ['f_min', 'f_max', 'type_variety', 'type_def', 'gain_flatmax', 'gain_min', 'p_max', 'nf_model', | ||||
|                 'dual_stage_model', 'nf_fit_coeff', 'nf_ripple', 'dgt', 'gain_ripple', 'out_voa_auto', | ||||
|                 'allowed_for_design', 'raman'] | ||||
|     if isinstance(element, Fiber): | ||||
|  | ||||
|         return ['uid', 'name', 'params', 'metadata', 'operational', 'type_variety', 'passive', | ||||
|                 'lumped_losses', 'z_lumped_losses'] | ||||
|         # Dynamically created 'output_total_power', 'pch_out_db' | ||||
|     if isinstance(element, FiberParams): | ||||
|         return ['_length', '_att_in', '_con_in', '_con_out', '_ref_frequency', '_ref_wavelength', | ||||
|                 '_dispersion', '_dispersion_slope', '_dispersion', '_f_dispersion_ref', | ||||
|                 '_gamma', '_pmd_coef', '_loss_coef', | ||||
|                 '_f_loss_ref', '_lumped_losses'] | ||||
|     if isinstance(element, Fused): | ||||
|         return ['uid', 'name', 'params', 'metadata', 'operational', 'loss', 'passive'] | ||||
|     if isinstance(element, FusedParams): | ||||
|         return ['loss'] | ||||
|     return ['should never come here'] | ||||
|  | ||||
|  | ||||
| # all initial delta_p are null in topo file, so add random places to change this value | ||||
| @pytest.mark.parametrize('amp_with_deltap_one', [[], | ||||
|                                                  ['east edfa in Lorient_KMA to Vannes_KBE', | ||||
|                                                   'east edfa in Stbrieuc to Rennes_STA', | ||||
|                                                   'west edfa in Lannion_CAS to Morlaix', | ||||
|                                                   'east edfa in a to b', | ||||
|                                                   'west edfa in b to a']]) | ||||
| @pytest.mark.parametrize('power_dbm, req_power', [(0, 0), (0, -3), (3, 3), (0, 3), (3, 0), | ||||
|                                                   (3, 1), (3, 5), (3, 2), (3, 4), (2, 4)]) | ||||
| def test_compare_design_propagation_settings(power_dbm, req_power, amp_with_deltap_one): | ||||
|     """Check that network design does not change after propagation except for gain in | ||||
|     case of power_saturation during design and/or during propagation: | ||||
|     - in power mode only: | ||||
|         expected behaviour: target power out of roadm does not change | ||||
|         so gain of booster should be reduced/augmented by the exact power difference; | ||||
|         the following amplifiers on the OMS have unchanged gain except if augmentation | ||||
|         of channel power on booster leads to total_power above amplifier max power, | ||||
|         ie if amplifier saturates. | ||||
|  | ||||
|                           roadm -----booster (pmax 21dBm, 96 channels= 19.82dB) | ||||
|         pdesign=0dBm pch= 0dBm,         ^ -20dBm  ^G=20dB, Pch=0dBm, Ptot=19.82dBm | ||||
|         pdesign=0dBm pch= -3dBm         ^ -20dBm  ^G=17dB, Pch=-3dBm, Ptot=16.82dBm | ||||
|         pdesign=3dBm pch= 3dBm          ^ -20dBm  ^G=23-1.82dB, Pch=1.18dBm, Ptot=21dBm | ||||
|             amplifier can not handle 96x3dBm channels, amplifier saturation is considered | ||||
|             for the choice of amplifier during design | ||||
|         pdesign=0dBm pch= 3dBm          ^ -20dBm  ^G=23-1.82dB, Pch=1.18dBm, Ptot=21dBm | ||||
|             amplifier can not handle 96x3dBm channels during propagation, amplifier selection | ||||
|             has been done for 0dBm. Saturation is applied for all amps only during propagation | ||||
|  | ||||
|         Design applies a saturation verification on amplifiers. | ||||
|         This saturation leads to a power reduction to the max power in the amp library, which | ||||
|         is also applied on the amp delta_p and independantly from propagation. | ||||
|  | ||||
|         After design, upon propagation, the amplifier gain and applied delta_p may also change | ||||
|         if total power exceeds max power (eg not the same nb of channels, not the same power per channel | ||||
|         compared to design). | ||||
|  | ||||
|         This test also checks all the possible combinations and expected before/after propagation | ||||
|         gain differences. It also checks delta_p applied due to saturation during design. | ||||
|     """ | ||||
|     eqpt = load_equipment(EQPT_LIBRARY_NAME) | ||||
|     eqpt['SI']['default'].power_dbm = power_dbm | ||||
|     json_network = load_json(NETWORK_FILE_NAME) | ||||
|     for element in json_network['elements']: | ||||
|         # Initialize a value for delta_p | ||||
|         if element['type'] == 'Edfa': | ||||
|             element['operational']['delta_p'] = 0 + element['operational']['out_voa'] \ | ||||
|                 if element['operational']['out_voa'] is not None else 0 | ||||
|             # apply a 1 dB delta_p on the set of amps | ||||
|             if element['uid'] in amp_with_deltap_one: | ||||
|                 element['operational']['delta_p'] = 1 | ||||
|  | ||||
|     network = network_from_json(json_network, eqpt) | ||||
|     # Build the network once using the default power defined in SI in eqpt config | ||||
|     p_db = power_dbm | ||||
|     p_total_db = p_db + lin2db(automatic_nch(eqpt['SI']['default'].f_min, | ||||
|                                              eqpt['SI']['default'].f_max, | ||||
|                                              eqpt['SI']['default'].spacing)) | ||||
|     build_network(network, eqpt, p_db, p_total_db, verbose=False) | ||||
|     # record network settings before propagating | ||||
|     # propagate on each oms | ||||
|     req_list = create_per_oms_request(network, eqpt, req_power) | ||||
|     paths = [compute_constrained_path(network, r) for r in req_list] | ||||
|  | ||||
|     # systematic comparison of elements settings before and after propagation | ||||
|     # all amps have 21 dBm max power | ||||
|     pch_max = 21 - lin2db(96) | ||||
|     for path, req in zip(paths, req_list): | ||||
|         # check all elements except source and destination trx | ||||
|         # in order to have clean initialization, use deecopy of paths | ||||
|         design_network(req, network, eqpt, verbose=False) | ||||
|         network_copy = deepcopy(network) | ||||
|         pth = deepcopy(path) | ||||
|         _ = propagate(pth, req, eqpt) | ||||
|         for i, element in enumerate(pth[1:-1]): | ||||
|             element_is_first_amp = False | ||||
|             # index of previous element in path is i | ||||
|             if (isinstance(element, Edfa) and isinstance(pth[i], Roadm)) or element.uid == 'west edfa in d to c': | ||||
|                 # oms c to d has no booster but one preamp: the power difference is hold there | ||||
|                 element_is_first_amp = True | ||||
|             # find the element with the same id in the network_copy | ||||
|             element_copy = next(n for n in network_copy.nodes() if n.uid == element.uid) | ||||
|             for key in list_element_attr(element): | ||||
|                 if not isinstance(getattr(element, key), | ||||
|                                   (EdfaOperational, EdfaParams, FiberParams, RoadmParams, FusedParams)): | ||||
|                     if not key == 'effective_gain': | ||||
|                         # for all keys, before and after design should be the same except for gain (in power mode) | ||||
|                         if isinstance(getattr(element, key), ndarray): | ||||
|                             if len(getattr(element, key)) > 0: | ||||
|                                 assert getattr(element, key) == getattr(element_copy, key) | ||||
|                             else: | ||||
|                                 assert len(getattr(element_copy, key)) == 0 | ||||
|                         else: | ||||
|                             assert getattr(element, key) == getattr(element_copy, key) | ||||
|                     else: | ||||
|                         dp = element.out_voa if element.uid not in amp_with_deltap_one else element.out_voa + 1 | ||||
|                         # check that target power is correctly set | ||||
|                         assert element.target_pch_out_dbm == req_power + dp | ||||
|                         # check that designed gain is exactly applied except if target power exceeds max power, then | ||||
|                         # gain is slightly less than the one computed during design for the noiseless reference, | ||||
|                         # because during propagation, noise has accumulated, additing to signal. | ||||
|                         # check that delta_p is unchanged unless for saturation | ||||
|                         if element.target_pch_out_dbm > pch_max: | ||||
|                             assert element.effective_gain == pytest.approx(element_copy.effective_gain, abs=2e-2) | ||||
|                         else: | ||||
|                             assert element.effective_gain == element_copy.effective_gain | ||||
|                         # check that delta_p is unchanged unless for saturation | ||||
|                         assert element.delta_p == element_copy.delta_p | ||||
|                         if element_is_first_amp: | ||||
|                             # if element is first amp on path, then it is the one that will saturate if req_power is | ||||
|                             # too high | ||||
|                             assert mean(element.pch_out_dbm) ==\ | ||||
|                                 pytest.approx(min(pch_max, req_power + element.delta_p - element.out_voa), abs=2e-2) | ||||
|                         # check that delta_p is unchanged unless due to saturation | ||||
|                         assert element.delta_p == pytest.approx(min(req_power + dp, pch_max) - req_power, abs=1e-2) | ||||
|                         # check that delta_p is unchanged unless for saturation | ||||
|                 else: | ||||
|                     # for all subkeys, before and after design should be the same | ||||
|                     for subkey in list_element_attr(getattr(element, key)): | ||||
|                         if isinstance(getattr(getattr(element, key), subkey), list): | ||||
|                             assert getattr(getattr(element, key), subkey) == getattr(getattr(element_copy, key), subkey) | ||||
|                         elif isinstance(getattr(getattr(element, key), subkey), dict): | ||||
|                             for value1, value2 in zip(getattr(getattr(element, key), subkey).values(), | ||||
|                                                       getattr(getattr(element_copy, key), subkey).values()): | ||||
|                                 assert all(value1 == value2) | ||||
|                         elif isinstance(getattr(getattr(element, key), subkey), ndarray): | ||||
|                             assert_allclose(getattr(getattr(element, key), subkey), | ||||
|                                             getattr(getattr(element_copy, key), subkey), rtol=1e-12) | ||||
|                         else: | ||||
|                             assert getattr(getattr(element, key), subkey) == getattr(getattr(element_copy, key), subkey) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize("restrictions, fail", [ | ||||
|     ({'preamp_variety_list': [], 'booster_variety_list':[]}, False), | ||||
|     ({'preamp_variety_list': ['std_medium_gain', 'std_low_gain'], 'booster_variety_list':['std_medium_gain']}, False), | ||||
|     # the two next amp type_variety do not exist | ||||
|     ({'preamp_variety_list': [], 'booster_variety_list':['booster_medium_gain']}, True), | ||||
|     ({'preamp_variety_list': ['std_medium_gain', 'preamp_high_gain'], 'booster_variety_list':[]}, True)]) | ||||
| def test_wrong_restrictions(restrictions, fail): | ||||
|     """Check that sanity_check correctly raises an error when restriction is incorrect and that library | ||||
|     correctly includes restrictions. | ||||
|     """ | ||||
|     json_data = load_json(EQPT_LIBRARY_NAME) | ||||
|     # define wrong restriction | ||||
|     json_data['Roadm'][0]['restrictions'] = restrictions | ||||
|     if fail: | ||||
|         with pytest.raises(ConfigurationError): | ||||
|             _ = _equipment_from_json(json_data, EQPT_LIBRARY_NAME) | ||||
|     else: | ||||
|         equipment = _equipment_from_json(json_data, EQPT_LIBRARY_NAME) | ||||
|         assert equipment['Roadm']['example_test'].restrictions == restrictions | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('roadm, from_degree, to_degree, expected_impairment_id, expected_type', [ | ||||
|     ('roadm Lannion_CAS', 'trx Lannion_CAS', 'east edfa in Lannion_CAS to Corlay', 1, 'add'), | ||||
|     ('roadm Lannion_CAS', 'west edfa in Lannion_CAS to Stbrieuc', 'east edfa in Lannion_CAS to Corlay', 0, 'express'), | ||||
|     ('roadm Lannion_CAS', 'west edfa in Lannion_CAS to Stbrieuc', 'trx Lannion_CAS', 2, 'drop'), | ||||
|     ('roadm h', 'west edfa in h to g', 'trx h', None, 'drop') | ||||
| ]) | ||||
| def test_roadm_impairments(roadm, from_degree, to_degree, expected_impairment_id, expected_type): | ||||
|     """Check that impairment id and types are correct | ||||
|     """ | ||||
|     json_data = load_json(NETWORK_FILE_NAME) | ||||
|     for el in json_data['elements']: | ||||
|         if el['uid'] == 'roadm Lannion_CAS': | ||||
|             el['type_variety'] = 'example_detailed_impairments' | ||||
|     equipment = load_equipment(EQPT_LIBRARY_NAME) | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     build_network(network, equipment, 0.0, 20.0) | ||||
|     roadm = next(n for n in network.nodes() if n.uid == roadm) | ||||
|     assert roadm.get_roadm_path(from_degree, to_degree).path_type == expected_type | ||||
|     assert roadm.get_roadm_path(from_degree, to_degree).impairment_id == expected_impairment_id | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('type_variety, from_degree, to_degree, impairment_id, expected_type', [ | ||||
|     (None, 'trx Lannion_CAS', 'east edfa in Lannion_CAS to Corlay', 1, 'add'), | ||||
|     ('default', 'trx Lannion_CAS', 'east edfa in Lannion_CAS to Corlay', 3, 'add'), | ||||
|     (None, 'west edfa in Lannion_CAS to Stbrieuc', 'east edfa in Lannion_CAS to Corlay', None, 'express') | ||||
| ]) | ||||
| def test_roadm_per_degree_impairments(type_variety, from_degree, to_degree, impairment_id, expected_type): | ||||
|     """Check that impairment type is correct also if per degree impairment is defined | ||||
|     """ | ||||
|     json_data = load_json(EQPT_LIBRARY_NAME) | ||||
|     assert 'type_variety' not in json_data['Roadm'][2] | ||||
|     json_data['Roadm'][2]['roadm-path-impairments'] = [ | ||||
|         { | ||||
|             "roadm-path-impairments-id": 1, | ||||
|             "roadm-add-path": [{ | ||||
|                 "roadm-osnr": 41, | ||||
|             }] | ||||
|         }, { | ||||
|             "roadm-path-impairments-id": 3, | ||||
|             "roadm-add-path": [{ | ||||
|                 "roadm-inband-crosstalk": 0, | ||||
|                 "roadm-osnr": 20, | ||||
|                 "roadm-noise-figure": 23 | ||||
|             }] | ||||
|         }] | ||||
|     equipment = _equipment_from_json(json_data, EQPT_LIBRARY_NAME) | ||||
|     assert equipment['Roadm']['default'].type_variety == 'default' | ||||
|  | ||||
|     json_data = load_json(NETWORK_FILE_NAME) | ||||
|     for el in json_data['elements']: | ||||
|         if el['uid'] == 'roadm Lannion_CAS' and type_variety is not None: | ||||
|             el['type_variety'] = type_variety | ||||
|             el['params'] = { | ||||
|                 "per_degree_impairments": [ | ||||
|                     { | ||||
|                         "from_degree": from_degree, | ||||
|                         "to_degree": to_degree, | ||||
|                         "impairment_id": impairment_id | ||||
|                     }] | ||||
|             } | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     build_network(network, equipment, 0.0, 20.0) | ||||
|     roadm = next(n for n in network.nodes() if n.uid == 'roadm Lannion_CAS') | ||||
|     assert roadm.get_roadm_path(from_degree, to_degree).path_type == expected_type | ||||
|     assert roadm.get_roadm_path(from_degree, to_degree).impairment_id == impairment_id | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('from_degree, to_degree, impairment_id, error, message', [ | ||||
|     ('trx Lannion_CAS', 'east edfa in Lannion_CAS to Corlay', 2, NetworkTopologyError, | ||||
|      'Roadm roadm Lannion_CAS path_type is defined as drop but it should be add'),  # wrong path_type | ||||
|     ('trx Lannion_CAS', 'east edfa toto', 1, ConfigurationError, | ||||
|      'Roadm roadm Lannion_CAS has wrong from-to degree uid trx Lannion_CAS - east edfa toto'),  # wrong degree | ||||
|     ('trx Lannion_CAS', 'east edfa in Lannion_CAS to Corlay', 11, NetworkTopologyError, | ||||
|      'ROADM roadm Lannion_CAS: impairment profile id 11 is not defined in library')  # wrong impairment_id | ||||
| ]) | ||||
| def test_wrong_roadm_per_degree_impairments(from_degree, to_degree, impairment_id, error, message): | ||||
|     """Check that wrong per degree definitions are correctly catched | ||||
|     """ | ||||
|     equipment = load_equipment(EQPT_LIBRARY_NAME) | ||||
|     json_data = load_json(NETWORK_FILE_NAME) | ||||
|     for el in json_data['elements']: | ||||
|         if el['uid'] == 'roadm Lannion_CAS': | ||||
|             el['type_variety'] = 'example_detailed_impairments' | ||||
|             el['params'] = { | ||||
|                 "per_degree_impairments": [ | ||||
|                     { | ||||
|                         "from_degree": from_degree, | ||||
|                         "to_degree": to_degree, | ||||
|                         "impairment_id": impairment_id | ||||
|                     }] | ||||
|             } | ||||
|     network = network_from_json(json_data, equipment) | ||||
|     with pytest.raises(error, match=message): | ||||
|         build_network(network, equipment, 0.0, 20.0) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('path_type, type_variety, expected_pmd, expected_pdl, expected_osnr', [ | ||||
|     ('express', 'default', 5.0e-12, 0.5, None),  # roadm instance parameters pre-empts library | ||||
|     ('express', 'example_test', 5.0e-12, 0.5, None), | ||||
|     ('express', 'example_detailed_impairments', 0, 0, None),  # detailed parameters pre-empts global instance ones | ||||
|     ('add', 'default', 5.0e-12, 0.5, None), | ||||
|     ('add', 'example_test', 5.0e-12, 0.5, None), | ||||
|     ('add', 'example_detailed_impairments', 0, 0, 41)]) | ||||
| def test_impairment_initialization(path_type, type_variety, expected_pmd, expected_pdl, expected_osnr): | ||||
|     """Check that impairments are correctly initialized, with this order: | ||||
|     - use equipment roadm impairments if no impairment are set in the ROADM instance | ||||
|     - use roadm global impairment if roadm global impairment are set | ||||
|     - use roadm detailed impairment for the corresponding path_type if roadm type_variety has detailed impairments | ||||
|     - use roadm per degree impairment if they are defined | ||||
|     """ | ||||
|     equipment = load_equipment(EQPT_LIBRARY_NAME) | ||||
|     extra_params = equipment['Roadm'][type_variety].__dict__ | ||||
|     roadm_config = { | ||||
|         "uid": "roadm Lannion_CAS", | ||||
|         "params": { | ||||
|             "add_drop_osnr": 38, | ||||
|             "pmd": 5.0e-12, | ||||
|             "pdl": 0.5 | ||||
|         } | ||||
|     } | ||||
|     if type_variety != 'default': | ||||
|         roadm_config["type_variety"] = type_variety | ||||
|     roadm_config['params'] = merge_amplifier_restrictions(roadm_config['params'], extra_params) | ||||
|     roadm = Roadm(**roadm_config) | ||||
|     roadm.set_roadm_paths(from_degree='tata', to_degree='toto', path_type=path_type) | ||||
|     assert roadm.get_roadm_path(from_degree='tata', to_degree='toto').path_type == path_type | ||||
|     assert roadm.get_roadm_path(from_degree='tata', to_degree='toto').impairment.pmd == expected_pmd | ||||
|     assert roadm.get_roadm_path(from_degree='tata', to_degree='toto').impairment.pdl == expected_pdl | ||||
|     if path_type == 'add': | ||||
|         # we assume for simplicity that add contribution is the same as drop contribution | ||||
|         # add_drop_osnr_db = 10log10(1/add_osnr + 1/drop_osnr) | ||||
|         if type_variety in ['default', 'example_test']: | ||||
|             assert roadm.get_roadm_path(from_degree='tata', | ||||
|                                         to_degree='toto').impairment.osnr == roadm.params.add_drop_osnr + lin2db(2) | ||||
|         else: | ||||
|             assert roadm.get_roadm_path(from_degree='tata', to_degree='toto').impairment.osnr == expected_osnr | ||||
|   | ||||
| @@ -12,8 +12,7 @@ from numpy.testing import assert_allclose | ||||
| from numpy import array | ||||
| import pytest | ||||
|  | ||||
| from gnpy.core.info import create_input_spectral_information, create_arbitrary_spectral_information, Pref, \ | ||||
|     ReferenceCarrier | ||||
| from gnpy.core.info import create_input_spectral_information, create_arbitrary_spectral_information | ||||
| from gnpy.core.elements import Fiber, RamanFiber | ||||
| from gnpy.core.parameters import SimParams | ||||
| from gnpy.tools.json_io import load_json | ||||
| @@ -26,12 +25,11 @@ TEST_DIR = Path(__file__).parent | ||||
| def test_fiber(): | ||||
|     """Test the accuracy of propagating the Fiber.""" | ||||
|     fiber = Fiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json')) | ||||
|  | ||||
|     fiber.ref_pch_in_dbm = 0.0 | ||||
|     # fix grid spectral information generation | ||||
|     spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15, | ||||
|                                                             baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0, | ||||
|                                                             ref_carrier= | ||||
|                                                             ReferenceCarrier(baud_rate=32e9, slot_width=50e9)) | ||||
|                                                             baud_rate=32e9, spacing=50e9, tx_osnr=40.0, | ||||
|                                                             tx_power=1e-3) | ||||
|     # propagation | ||||
|     spectral_info_out = fiber(spectral_info_input) | ||||
|  | ||||
| @@ -48,11 +46,10 @@ def test_fiber(): | ||||
|     baud_rate = array([32e9, 42e9, 64e9, 42e9, 32e9]) | ||||
|     signal = 1e-3 + array([0, -1e-4, 3e-4, -2e-4, +2e-4]) | ||||
|     delta_pdb_per_channel = [0, 0, 0, 0, 0] | ||||
|     pref = Pref(p_span0=0, p_spani=0, ref_carrier=None) | ||||
|     spectral_info_input = create_arbitrary_spectral_information(frequency=frequency, slot_width=slot_width, | ||||
|                                                                 signal=signal, baud_rate=baud_rate, roll_off=0.15, | ||||
|                                                                 delta_pdb_per_channel=delta_pdb_per_channel, | ||||
|                                                                 tx_osnr=40.0, ref_power=pref) | ||||
|                                                                 tx_osnr=40.0, tx_power=1e-3) | ||||
|  | ||||
|     # propagation | ||||
|     spectral_info_out = fiber(spectral_info_input) | ||||
| @@ -70,11 +67,11 @@ def test_raman_fiber(): | ||||
|     """Test the accuracy of propagating the RamanFiber.""" | ||||
|     # spectral information generation | ||||
|     spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15, | ||||
|                                                             baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0, | ||||
|                                                             ref_carrier=ReferenceCarrier(baud_rate=32e9, slot_width=50e9)) | ||||
|                                                             baud_rate=32e9, spacing=50e9, tx_osnr=40.0, | ||||
|                                                             tx_power=1e-3) | ||||
|     SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json')) | ||||
|     fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json')) | ||||
|  | ||||
|     fiber.ref_pch_in_dbm = 0.0 | ||||
|     # propagation | ||||
|     spectral_info_out = fiber(spectral_info_input) | ||||
|  | ||||
| @@ -108,9 +105,8 @@ def test_fiber_lumped_losses_srs(set_sim_params): | ||||
|     """Test the accuracy of Fiber with lumped losses propagation.""" | ||||
|     # spectral information generation | ||||
|     spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15, | ||||
|                                                             baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0, | ||||
|                                                             ref_carrier= | ||||
|                                                             ReferenceCarrier(baud_rate=32e9, slot_width=50e9)) | ||||
|                                                             baud_rate=32e9, spacing=50e9, tx_osnr=40.0, | ||||
|                                                             tx_power=1e-3) | ||||
|  | ||||
|     SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json')) | ||||
|     fiber = Fiber(**load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json')) | ||||
|   | ||||
| @@ -288,6 +288,7 @@ def request_set(): | ||||
|         'cost': 1, | ||||
|         'roll_off': 0.15, | ||||
|         'tx_osnr': 38, | ||||
|         'tx_power': 0.001, | ||||
|         'penalties': {}, | ||||
|         'min_spacing': 37.5e9, | ||||
|         'nb_channel': None, | ||||
|   | ||||
							
								
								
									
										156
									
								
								tests/test_trx_mode_params.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										156
									
								
								tests/test_trx_mode_params.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,156 @@ | ||||
| #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | ||||
| # @Author: Esther Le Rouzic | ||||
| # @Date:   2023-09-29 | ||||
| """ | ||||
| @author: esther.lerouzic | ||||
| checks all possibilities of this function | ||||
|  | ||||
| """ | ||||
|  | ||||
| from pathlib import Path | ||||
| import pytest | ||||
|  | ||||
| from gnpy.core.equipment import trx_mode_params | ||||
| from gnpy.core.exceptions import EquipmentConfigError | ||||
| from gnpy.tools.json_io import load_equipment, load_json, _equipment_from_json | ||||
|  | ||||
|  | ||||
| TEST_DIR = Path(__file__).parent | ||||
| EQPT_LIBRARY_NAME = TEST_DIR / 'data/eqpt_config.json' | ||||
| NETWORK_FILE_NAME = TEST_DIR / 'data/testTopology_expected.json' | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('trx_type, trx_mode, error_message, no_error, expected_result', | ||||
|     [('', '', False, True, "SI"), | ||||
|      ('', '', True, False, 'Could not find transponder "" in equipment library'), | ||||
|      ('vendorA_trx-type1', '', True, False, | ||||
|       'Could not find transponder "vendorA_trx-type1" with mode "" in equipment library'), | ||||
|      ('vendorA_trx-type1', '', False, True, "SI"), | ||||
|      ('', 'mode 1', True, False, 'Could not find transponder "" in equipment library'), | ||||
|      ('', 'mode 1', False, True, "SI"), | ||||
|      ('vendorA_trx-type1', 'mode 2', True, True, 'mode 2'), | ||||
|      ('vendorA_trx-type1', 'mode 2', False, True, 'mode 2'), | ||||
|      ('wrong type', '', True, False, 'Could not find transponder "wrong type" in equipment library'), | ||||
|      ('wrong type', '', False, True, 'SI'), | ||||
|      ('vendorA_trx-type1', 'wrong mode', True, False, | ||||
|       'Could not find transponder "vendorA_trx-type1" with mode "wrong mode" in equipment library'), | ||||
|      ('vendorA_trx-type1', 'wrong mode', False, True, 'SI'), | ||||
|      ('wrong type', 'wrong mode', True, False, 'Could not find transponder "wrong type" in equipment library'), | ||||
|      ('wrong type', 'wrong mode', False, True, 'SI'), | ||||
|      ('vendorA_trx-type1', None, True, True, 'None'), | ||||
|      ('vendorA_trx-type1', None, False, True, 'None'), | ||||
|      (None, None, True, False, 'Could not find transponder "None" in equipment library'), | ||||
|      (None, None, False, True, 'SI'), | ||||
|      (None, 'mode 2', True, False, 'Could not find transponder "None" in equipment library'), | ||||
|      (None, 'mode 2', False, True, 'SI'), | ||||
|      ]) | ||||
| def test_trx_mode_params(trx_type, trx_mode, error_message, no_error, expected_result): | ||||
|     """Checks all combinations of trx_type and mode | ||||
|     """ | ||||
|     possible_results = {} | ||||
|     possible_results["SI"] = { | ||||
|         'OSNR': None, | ||||
|         'baud_rate': 32000000000.0, | ||||
|         'bit_rate': None, | ||||
|         'cost': None, | ||||
|         'equalization_offset_db': 0, | ||||
|         'f_max': 196100000000000.0, | ||||
|         'f_min': 191300000000000.0, | ||||
|         'min_spacing': None, | ||||
|         'penalties': {}, | ||||
|         'roll_off': 0.15, | ||||
|         'spacing': 50000000000.0, | ||||
|         'tx_osnr': 100, | ||||
|     } | ||||
|     possible_results["mode 2"] = { | ||||
|         'format': 'mode 2', | ||||
|         'baud_rate': 64e9, | ||||
|         'OSNR': 15, | ||||
|         'bit_rate': 200e9, | ||||
|         'roll_off': 0.15, | ||||
|         'tx_osnr': 100, | ||||
|         'equalization_offset_db': 0, | ||||
|         'min_spacing': 75e9, | ||||
|         'f_max': 196100000000000.0, | ||||
|         'f_min': 191350000000000.0, | ||||
|         'penalties': {}, | ||||
|         'cost': 1 | ||||
|     } | ||||
|     possible_results["None"] = { | ||||
|         'format': 'undetermined', | ||||
|         'baud_rate': None, | ||||
|         'OSNR': None, | ||||
|         'bit_rate': None, | ||||
|         'roll_off': None, | ||||
|         'tx_osnr': None, | ||||
|         'equalization_offset_db': 0, | ||||
|         'min_spacing': None, | ||||
|         'f_max': 196100000000000.0, | ||||
|         'f_min': 191350000000000.0, | ||||
|         'penalties': None, | ||||
|         'cost': None | ||||
|     } | ||||
|     equipment = load_equipment(EQPT_LIBRARY_NAME) | ||||
|     if no_error: | ||||
|         trx_params = trx_mode_params(equipment, trx_type, trx_mode, error_message) | ||||
|         print(trx_params) | ||||
|         assert trx_params == possible_results[expected_result] | ||||
|     else: | ||||
|         with pytest.raises(EquipmentConfigError, match=expected_result): | ||||
|             _ = trx_mode_params(equipment, trx_type, trx_mode, error_message) | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('baudrate, spacing, error_message', | ||||
|     [(60e9, 50e9, 'Inconsistency in equipment library:\n Transponder "vendorB_trx-type1" mode "wrong mode" ' | ||||
|                   + 'has baud rate 60.00 GHz greater than min_spacing 50.00.'), | ||||
|      (32e9, 50, 'Inconsistency in equipment library:\n Transponder "vendorB_trx-type1" mode "wrong mode" ' | ||||
|                 + 'has baud rate 32.00 GHz greater than min_spacing 0.00.')]) | ||||
| def test_wrong_baudrate_spacing(baudrate, spacing, error_message): | ||||
|     """Checks wrong values for baudrate and spacing correctly raise an error | ||||
|     """ | ||||
|     json_data = load_json(EQPT_LIBRARY_NAME) | ||||
|     wrong_transceiver = { | ||||
|         'type_variety': 'vendorB_trx-type1', | ||||
|         'frequency': { | ||||
|             'min': 191.35e12, | ||||
|             'max': 196.1e12 | ||||
|         }, | ||||
|         'mode': [{ | ||||
|             'format': 'PS_SP64_1', | ||||
|             'baud_rate': 32e9, | ||||
|             'OSNR': 11, | ||||
|             'bit_rate': 100e9, | ||||
|             'roll_off': 0.15, | ||||
|             'tx_osnr': 100, | ||||
|             'min_spacing': 50e9, | ||||
|             'cost': 1, | ||||
|             'penalties': [{ | ||||
|                 'chromatic_dispersion': 80000, | ||||
|                 'penalty_value': 0.5 | ||||
|             }, { | ||||
|                 'pmd': 120, | ||||
|                 'penalty_value': 0.5}], | ||||
|             'equalization_offset_db': 0 | ||||
|         }, { | ||||
|             'format': 'wrong mode', | ||||
|             'baud_rate': baudrate, | ||||
|             'OSNR': 11, | ||||
|             'bit_rate': 100e9, | ||||
|             'roll_off': 0.15, | ||||
|             'tx_osnr': 40, | ||||
|             'min_spacing': spacing, | ||||
|             'cost': 1, | ||||
|             'penalties': [{ | ||||
|                 'chromatic_dispersion': 80000, | ||||
|                 'penalty_value': 0.5 | ||||
|             }, { | ||||
|                 'pmd': 120, | ||||
|                 'penalty_value': 0.5}], | ||||
|             'equalization_offset_db': 0}] | ||||
|     } | ||||
|     json_data['Transceiver'].append(wrong_transceiver) | ||||
|     equipment = _equipment_from_json(json_data, EQPT_LIBRARY_NAME) | ||||
|  | ||||
|     with pytest.raises(EquipmentConfigError, match=error_message): | ||||
|         _ = trx_mode_params(equipment, 'vendorB_trx-type1', 'wrong mode', error_message=False) | ||||
							
								
								
									
										10
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								tox.ini
									
									
									
									
									
								
							| @@ -2,9 +2,8 @@ | ||||
| skipsdist = True | ||||
|  | ||||
| [testenv] | ||||
| extras = tests | ||||
| deps = | ||||
| 	-r{toxinidir}/requirements.txt | ||||
| 	-r{toxinidir}/tests/requirements.txt | ||||
| 	cover: pytest-cov | ||||
| 	linters: flake8 | ||||
| 	linters: pep8-naming | ||||
| @@ -22,9 +21,8 @@ commands = | ||||
| 	python -m build | ||||
|  | ||||
| [testenv:docs] | ||||
| deps = | ||||
| 	-r{toxinidir}/docs/requirements.txt | ||||
| whitelist_externals = | ||||
| extras = docs | ||||
| allowlist_externals = | ||||
| 	/bin/sh | ||||
| commands = | ||||
| 	sphinx-build -E -W --keep-going -q -b html docs/ doc/build/html | ||||
| @@ -35,7 +33,7 @@ commands = | ||||
| 	flake8 {posargs} | ||||
|  | ||||
| [testenv:linters-diff-ci] | ||||
| whitelist_externals = bash | ||||
| allowlist_externals = bash | ||||
| commands = | ||||
| 	flake8 {posargs} --format html --htmldir linters --exit-zero | ||||
| 	bash -c "git diff -U0 origin/$(git rev-parse --abbrev-ref HEAD) | flake8 --diff {posargs}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user