mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-30 17:47:50 +00:00
Compare commits
181 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f9cf8ccc7 | ||
|
|
0c797a254c | ||
|
|
2cdeeabfa6 | ||
|
|
5e874798cb | ||
|
|
ff8f044064 | ||
|
|
d84ee4e76c | ||
|
|
521d27ffac | ||
|
|
35e759212e | ||
|
|
f6dede2b5f | ||
|
|
0d0019f627 | ||
|
|
06fe1c2f63 | ||
|
|
092316a9d7 | ||
|
|
48e3f96967 | ||
|
|
e9e8956caf | ||
|
|
0ae341c2a5 | ||
|
|
0c2f6372f8 | ||
|
|
97e80b4445 | ||
|
|
5e4c9b7d73 | ||
|
|
e96f821cce | ||
|
|
5f7e61e255 | ||
|
|
682b5c5691 | ||
|
|
11e5117505 | ||
|
|
50603420fc | ||
|
|
125264f265 | ||
|
|
b1067a6266 | ||
|
|
50d4ecd700 | ||
|
|
9f37e0371e | ||
|
|
9bd303db05 | ||
|
|
1bcb3ce25c | ||
|
|
e381138320 | ||
|
|
b450677709 | ||
|
|
54a3725e17 | ||
|
|
8889c2437a | ||
|
|
8bf8b2947b | ||
|
|
cb85b8fe2b | ||
|
|
18610fb7a9 | ||
|
|
bd6b278dd1 | ||
|
|
e143d25339 | ||
|
|
ffc7dbc241 | ||
|
|
b842898baf | ||
|
|
7ea9e3b341 | ||
|
|
fcf168b361 | ||
|
|
a7ec7e2ed6 | ||
|
|
00ee102b3a | ||
|
|
ce11524ad9 | ||
|
|
74be14562a | ||
|
|
16694d0a09 | ||
|
|
33c6038921 | ||
|
|
119c9eda90 | ||
|
|
b63e146bf4 | ||
|
|
09dba8a166 | ||
|
|
7f5043622b | ||
|
|
6ad4593f41 | ||
|
|
706661d801 | ||
|
|
a408d28911 | ||
|
|
b86fe96032 | ||
|
|
43926518ad | ||
|
|
128a6e816b | ||
|
|
44db951261 | ||
|
|
3c3d919b77 | ||
|
|
2079d2bc5b | ||
|
|
062e2076ed | ||
|
|
1dd1bad273 | ||
|
|
5b104af296 | ||
|
|
f170574abf | ||
|
|
a68e8ff8d2 | ||
|
|
d5a52d1b2b | ||
|
|
7ac6e058ec | ||
|
|
74ab3c1bcd | ||
|
|
1a2ff2d215 | ||
|
|
aaf0480e9c | ||
|
|
5e50ffbbf6 | ||
|
|
243b701391 | ||
|
|
bdbfe76aed | ||
|
|
541ec04444 | ||
|
|
bf1522b047 | ||
|
|
3f4188a0fd | ||
|
|
8b387ef722 | ||
|
|
cad9a0f18e | ||
|
|
ab84c77363 | ||
|
|
62fa9ab0b0 | ||
|
|
14591c7a11 | ||
|
|
587932290d | ||
|
|
82b148eb87 | ||
|
|
8393daf67d | ||
|
|
be61dfd094 | ||
|
|
77925b218e | ||
|
|
4621ac12bf | ||
|
|
09920c0af2 | ||
|
|
e6a3d9ce5b | ||
|
|
b9645702c8 | ||
|
|
9c2095b138 | ||
|
|
cb42115230 | ||
|
|
5909da4bbf | ||
|
|
2ba1e86b28 | ||
|
|
3358c5eeb5 | ||
|
|
13e4c29bc1 | ||
|
|
4becc9060c | ||
|
|
32d8b2a4d8 | ||
|
|
399eb9700f | ||
|
|
82f83e1462 | ||
|
|
171450fa54 | ||
|
|
9f9f4c78fc | ||
|
|
c469a8d9ba | ||
|
|
99b2a554dc | ||
|
|
57e98d7173 | ||
|
|
78b45a3958 | ||
|
|
64b6b486a9 | ||
|
|
65cb46f479 | ||
|
|
f94d06f124 | ||
|
|
e1f2c55942 | ||
|
|
d28c67143e | ||
|
|
6bb9ae8336 | ||
|
|
0dc7d853ef | ||
|
|
dec9388416 | ||
|
|
017b35fa33 | ||
|
|
cb0a410418 | ||
|
|
f250990a49 | ||
|
|
280443f17f | ||
|
|
6f62251cb4 | ||
|
|
5ad54879b1 | ||
|
|
825d37c05c | ||
|
|
3ac9f90914 | ||
|
|
dbfbf115ff | ||
|
|
ad2590962b | ||
|
|
a9d530c776 | ||
|
|
f255c31f1f | ||
|
|
80ec05f84c | ||
|
|
22541d65e4 | ||
|
|
26fcf0ff6e | ||
|
|
1c32e437a2 | ||
|
|
718007b3de | ||
|
|
4d6c06340f | ||
|
|
bad893bf86 | ||
|
|
75e7fca8e4 | ||
|
|
4e38ba98ab | ||
|
|
fdcdfca589 | ||
|
|
299ca10a47 | ||
|
|
c0b7bf714e | ||
|
|
7f7c568160 | ||
|
|
9bf6ed953a | ||
|
|
e68dc39ddd | ||
|
|
f8007b41d1 | ||
|
|
228125029e | ||
|
|
d185e0c241 | ||
|
|
357bbec257 | ||
|
|
d25e98c567 | ||
|
|
397411690e | ||
|
|
4ab6f8cb1b | ||
|
|
44aff147db | ||
|
|
a36b139065 | ||
|
|
141fc66d47 | ||
|
|
53f29957fd | ||
|
|
9f3995ee20 | ||
|
|
0cf45bd102 | ||
|
|
55932ee3e9 | ||
|
|
797a0856ec | ||
|
|
3fa53adc4d | ||
|
|
bcb5e6bb60 | ||
|
|
6380f8f37a | ||
|
|
93869d6cb5 | ||
|
|
ce51a4d160 | ||
|
|
601e228bb6 | ||
|
|
3f58cbd559 | ||
|
|
2e3274ac78 | ||
|
|
e33144f8cc | ||
|
|
fd1e3f0f61 | ||
|
|
80c41264cf | ||
|
|
a051a5723b | ||
|
|
bd025f3af4 | ||
|
|
c3e546abe3 | ||
|
|
9427d0b139 | ||
|
|
89f5b12f7e | ||
|
|
9d2c10e267 | ||
|
|
305620e5dd | ||
|
|
c91c5d622f | ||
|
|
24e7f4a5a1 | ||
|
|
08c922a5e5 | ||
|
|
efd7468d42 | ||
|
|
902cfa11a7 | ||
|
|
24c6acc027 |
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
IMAGE_NAME=telecominfraproject/oopt-gnpy
|
||||
IMAGE_TAG=$(git describe --tags)
|
||||
|
||||
ALREADY_FOUND=0
|
||||
docker pull ${IMAGE_NAME}:${IMAGE_TAG} && ALREADY_FOUND=1
|
||||
|
||||
if [[ $ALREADY_FOUND == 0 ]]; then
|
||||
docker build . -t ${IMAGE_NAME}
|
||||
docker tag ${IMAGE_NAME} ${IMAGE_NAME}:${IMAGE_TAG}
|
||||
|
||||
# shared directory setup: do not clobber the real data
|
||||
mkdir trash
|
||||
cd trash
|
||||
docker run -it --rm --volume $(pwd):/shared ${IMAGE_NAME} gnpy-transmission-example
|
||||
else
|
||||
echo "Image ${IMAGE_NAME}:${IMAGE_TAG} already available, will just update the other tags"
|
||||
fi
|
||||
|
||||
docker images
|
||||
|
||||
do_docker_login() {
|
||||
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
|
||||
}
|
||||
|
||||
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
|
||||
if [[ "${TRAVIS_BRANCH}" == "develop" || "${TRAVIS_BRANCH}" == "docker" ]]; then
|
||||
echo "Publishing latest"
|
||||
docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:latest
|
||||
do_docker_login
|
||||
if [[ $ALREADY_FOUND == 0 ]]; then
|
||||
docker push ${IMAGE_NAME}:${IMAGE_TAG}
|
||||
fi
|
||||
docker push ${IMAGE_NAME}:latest
|
||||
elif [[ "${TRAVIS_BRANCH}" == "master" ]]; then
|
||||
echo "Publishing stable"
|
||||
docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:stable
|
||||
do_docker_login
|
||||
if [[ $ALREADY_FOUND == 0 ]]; then
|
||||
docker push ${IMAGE_NAME}:${IMAGE_TAG}
|
||||
fi
|
||||
docker push ${IMAGE_NAME}:stable
|
||||
fi
|
||||
fi
|
||||
57
.github/workflows/main.yml
vendored
57
.github/workflows/main.yml
vendored
@@ -11,35 +11,42 @@ jobs:
|
||||
name: Tox test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: fedora-python/tox-github-action@v0.4
|
||||
with:
|
||||
tox_env: ${{ matrix.tox_env }}
|
||||
dnf_install: ${{ matrix.dnf_install }}
|
||||
- uses: codecov/codecov-action@v3.1.1
|
||||
if: ${{ endswith(matrix.tox_env, '-cover') }}
|
||||
with:
|
||||
files: ${{ github.workspace }}/cover/coverage.xml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
tox_env:
|
||||
- py38
|
||||
- py39
|
||||
- py310
|
||||
- py311-cover
|
||||
include:
|
||||
- tox_env: docs
|
||||
dnf_install: graphviz
|
||||
|
||||
pypi:
|
||||
needs: build
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'Telecominfraproject' }}
|
||||
name: PyPI packaging
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/setup-python@v4
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: '3.9'
|
||||
python-version: '3.11'
|
||||
- uses: casperdcl/deploy-pypi@bb869aafd89f657ceaafe9561d3b5584766c0f95
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
@@ -48,7 +55,7 @@ jobs:
|
||||
|
||||
docker:
|
||||
needs: build
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
|
||||
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) && github.repository_owner == 'Telecominfraproject' }}
|
||||
name: Docker image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -57,31 +64,57 @@ jobs:
|
||||
with:
|
||||
username: jktjkt
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Extract tag name
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
id: extract_pretty_git
|
||||
run: echo ::set-output name=GIT_DESC::$(git describe --tags)
|
||||
- name: Build and push a container
|
||||
uses: docker/build-push-action@v2
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
telecominfraproject/oopt-gnpy:dev-${{ steps.extract_pretty_git.outputs.GIT_DESC }}
|
||||
telecominfraproject/oopt-gnpy:${{ steps.extract_pretty_git.outputs.GIT_DESC }}
|
||||
telecominfraproject/oopt-gnpy:master
|
||||
- name: Extract tag name
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
|
||||
id: extract_tag_name
|
||||
run: echo ::set-output name=GIT_DESC::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Build and push a container
|
||||
uses: docker/build-push-action@v2
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
telecominfraproject/oopt-gnpy:${{ steps.extract_tag_name.outputs.GIT_DESC }}
|
||||
telecominfraproject/oopt-gnpy:latest
|
||||
|
||||
other-platforms:
|
||||
name: Tests on other platforms
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python_version }}
|
||||
- run: |
|
||||
pip install -r tests/requirements.txt
|
||||
pip install --editable .
|
||||
pytest -vv
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
python_version: "3.10"
|
||||
- os: windows-2022
|
||||
python_version: "3.11"
|
||||
- os: macos-12
|
||||
python_version: "3.11"
|
||||
|
||||
3
.lgtm.yml
Normal file
3
.lgtm.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
queries:
|
||||
- exclude: py/clear-text-logging-sensitive-data
|
||||
- exclude: py/clear-text-storage-sensitive-data
|
||||
29
.travis.yml
29
.travis.yml
@@ -1,29 +0,0 @@
|
||||
dist: focal
|
||||
os: linux
|
||||
language: python
|
||||
services: docker
|
||||
python:
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
before_install:
|
||||
- sudo apt-get -y install graphviz
|
||||
install: skip
|
||||
script:
|
||||
- pip install --editable .
|
||||
- pip install pytest-cov rstcheck
|
||||
- pytest --cov-report=xml --cov=gnpy -v
|
||||
- pip install -r docs/requirements.txt
|
||||
- rstcheck --ignore-roles cite *.rst
|
||||
- sphinx-build -W --keep-going docs/ x-throwaway-location
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
name: Docker image
|
||||
script:
|
||||
- git fetch --unshallow
|
||||
- ./.docker-travis.sh
|
||||
- docker images
|
||||
33
.zuul.yaml
33
.zuul.yaml
@@ -2,24 +2,33 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- tox-py38-cover
|
||||
- tox-py38:
|
||||
vars:
|
||||
ensure_tox_version: '<4'
|
||||
- tox-py39:
|
||||
vars:
|
||||
ensure_tox_version: '<4'
|
||||
- tox-py310-cover:
|
||||
vars:
|
||||
ensure_tox_version: '<4'
|
||||
- tox-docs-f36:
|
||||
vars:
|
||||
ensure_tox_version: '<4'
|
||||
- coverage-diff:
|
||||
voting: false
|
||||
dependencies:
|
||||
- tox-py38-cover-previous
|
||||
- tox-py38-cover
|
||||
- tox-py310-cover-previous
|
||||
- tox-py310-cover
|
||||
vars:
|
||||
coverage_job_name_previous: tox-py38-cover-previous
|
||||
coverage_job_name_current: tox-py38-cover
|
||||
coverage_job_name_previous: tox-py310-cover-previous
|
||||
coverage_job_name_current: tox-py310-cover
|
||||
- tox-linters-diff-n-report:
|
||||
voting: false
|
||||
- tox-py36-el8
|
||||
- tox-docs-f32
|
||||
- tox-py38-cover-previous
|
||||
gate:
|
||||
jobs:
|
||||
- tox-py38-f32
|
||||
- tox-docs-f32
|
||||
vars:
|
||||
ensure_tox_version: '<4'
|
||||
- tox-py310-cover-previous:
|
||||
vars:
|
||||
ensure_tox_version: '<4'
|
||||
tag:
|
||||
jobs:
|
||||
- oopt-release-python:
|
||||
|
||||
@@ -11,18 +11,21 @@ To learn how to contribute, please see CONTRIBUTING.md
|
||||
- Brian Taylor (Facebook) <briantaylor@fb.com>
|
||||
- David Boertjes (Ciena) <dboertje@ciena.com>
|
||||
- Diego Landa (Facebook) <dlanda@fb.com>
|
||||
- Emmanuelle Delfour (Orange) <WEDE7391@orange.com>
|
||||
- Esther Le Rouzic (Orange) <esther.lerouzic@orange.com>
|
||||
- Gabriele Galimberti (Cisco) <ggalimbe@cisco.com>
|
||||
- Gert Grammel (Juniper Networks) <ggrammel@juniper.net>
|
||||
- Giacomo Borraccini (Politecnico di Torino) <giacomo.borraccini@polito.it>
|
||||
- Gilad Goldfarb (Facebook) <giladg@fb.com>
|
||||
- James Powell (Telecom Infra Project) <james.powell@telecominfraproject.com>
|
||||
- Jan Kundrát (Telecom Infra Project) <jan.kundrat@telecominfraproject.com>
|
||||
- Jan Kundrát (Telecom Infra Project) <jkt@jankundrat.com>
|
||||
- Jeanluc Augé (Orange) <jeanluc.auge@orange.com>
|
||||
- Jonas Mårtensson (RISE) <jonas.martensson@ri.se>
|
||||
- Mattia Cantono (Politecnico di Torino) <mattia.cantono@polito.it>
|
||||
- Miguel Garrich (University Catalunya) <miquel.garrich@upct.es>
|
||||
- Raj Nagarajan (Lumentum) <raj.nagarajan@lumentum.com>
|
||||
- Roberts Miculens (Lattelecom) <roberts.miculens@lattelecom.lv>
|
||||
- Sami Alavi (NUST) <sami.mansooralavi1999@gmail.com>
|
||||
- Shengxiang Zhu (University of Arizona) <szhu@email.arizona.edu>
|
||||
- Stefan Melin (Telia Company) <Stefan.Melin@teliacompany.com>
|
||||
- Vittorio Curri (Politecnico di Torino) <vittorio.curri@polito.it>
|
||||
|
||||
12
README.md
12
README.md
@@ -3,12 +3,12 @@
|
||||
[](https://pypi.org/project/gnpy/)
|
||||
[](https://pypi.org/project/gnpy/)
|
||||
[](http://gnpy.readthedocs.io/en/master/?badge=master)
|
||||
[](https://github.com/Telecominfraproject/oopt-gnpy/actions/workflows/main.yml)
|
||||
[](https://github.com/Telecominfraproject/oopt-gnpy/actions/workflows/main.yml)
|
||||
[](https://review.gerrithub.io/q/project:Telecominfraproject/oopt-gnpy+is:open)
|
||||
[](https://github.com/Telecominfraproject/oopt-gnpy/graphs/contributors)
|
||||
[](https://lgtm.com/projects/g/Telecominfraproject/oopt-gnpy/)
|
||||
[](https://codecov.io/gh/Telecominfraproject/oopt-gnpy)
|
||||
[](https://doi.org/10.5281/zenodo.3458319)
|
||||
[](https://matrix.to/#/%23oopt-gnpy%3Afoss.wtf?via=matrix.org&via=foss.wtf)
|
||||
|
||||
GNPy is an open-source, community-developed library for building route planning and optimization tools in real-world mesh optical networks.
|
||||
We are a consortium of operators, vendors, and academic researchers sponsored via the [Telecom Infra Project](http://telecominfraproject.com)'s [OOPT/PSE](https://telecominfraproject.com/open-optical-packet-transport) working group.
|
||||
@@ -18,12 +18,14 @@ Together, we are building this tool for rapid development of production-grade ro
|
||||
|
||||
## Quick Start
|
||||
|
||||
Install either via [Docker](docs/install.rst#install-docker), or as a [Python package](docs/install.rst#install-pip).
|
||||
Install either via [Docker](https://gnpy.readthedocs.io/en/master/install.html#using-prebuilt-docker-images), or as a [Python package](https://gnpy.readthedocs.io/en/master/install.html#using-python-on-your-computer).
|
||||
Read our [documentation](https://gnpy.readthedocs.io/), learn from the demos, and [get in touch with us](https://github.com/Telecominfraproject/oopt-gnpy/discussions).
|
||||
|
||||
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:
|
||||
|
||||
[](https://asciinema.org/a/252295)
|
||||

|
||||
|
||||
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/).
|
||||
Learn more about this [in the documentation](https://gnpy.readthedocs.io/), or give it a [try online at `gnpy.app`](https://gnpy.app/):
|
||||
|
||||
[](https://gnpy.app/)
|
||||
|
||||
@@ -7,11 +7,12 @@ There are weekly calls about our progress.
|
||||
Newcomers, users and telecom operators are especially welcome there.
|
||||
We encourage all interested people outside the TIP to [join the project](https://telecominfraproject.com/apply-for-membership/) and especially to [get in touch with us](https://github.com/Telecominfraproject/oopt-gnpy/discussions).
|
||||
|
||||
(contributing)=
|
||||
## Contributing
|
||||
|
||||
`gnpy` is looking for additional contributors, especially those with experience planning and maintaining large-scale, real-world mesh optical networks.
|
||||
|
||||
To get involved, please contact [Jan Kundrát](mailto:jan.kundrat@telecominfraproject.com) or [Gert Grammel](mailto:ggrammel@juniper.net).
|
||||
To get involved, please contact [Jan Kundrát](mailto:jkt@jankundrat.com) or [Gert Grammel](mailto:ggrammel@juniper.net).
|
||||
|
||||
`gnpy` contributions are currently limited to members of [TIP](http://telecominfraproject.com).
|
||||
Membership is free and open to all.
|
||||
|
||||
@@ -29,6 +29,7 @@ This path is directional, and all "GNPy elements" along the path match the unidi
|
||||
|
||||
The network topology contains not just the physical topology of the network, but also references to the :ref:`equipment library<concepts-equipment>` and a set of *operating parameters* for each entity.
|
||||
These parameters include the **fiber length** of each fiber, the connector **attenutation losses**, or an amplifier's specific **gain setting**.
|
||||
The topology is specified via :ref:`XLS files<excel>` or via :ref:`JSON<legacy-json>`.
|
||||
|
||||
.. _complete-vs-incomplete:
|
||||
|
||||
|
||||
@@ -190,3 +190,5 @@ autodoc_default_options = {
|
||||
}
|
||||
|
||||
graphviz_output_format = 'svg'
|
||||
|
||||
bibtex_bibfiles = ['biblio.bib']
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _excel:
|
||||
|
||||
Excel (XLS, XLSX) input files
|
||||
=============================
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Extending GNPy with vendor-specific data
|
||||
========================================
|
||||
|
||||
GNPy ships with an :ref:`equipment library<concepts-equipment>` containing machine-readable datasheets of networking equipment.
|
||||
Vendors who are willing to contribute descriptions of their supported products are encouraged to `submit a patch <https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html>`__.
|
||||
Vendors who are willing to contribute descriptions of their supported products are encouraged to `submit a patch <https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html>`__ -- or just :ref:`get in touch with us directly<contributing>`.
|
||||
|
||||
This chapter discusses option for modeling performance of :ref:`EDFA amplifiers<extending-edfa>`, :ref:`Raman amplifiers<extending-raman>`, :ref:`transponders<extending-transponder>` and :ref:`ROADMs<extending-roadm>`.
|
||||
|
||||
@@ -29,7 +29,7 @@ The NF is expressed as a third-degree polynomial:
|
||||
|
||||
f(x) &= \text{a}x^3 + \text{b}x^2 + \text{c}x + \text{d}
|
||||
|
||||
\text{NF} &= f(G_\text{max} - G)
|
||||
\text{NF} &= f(G - G_\text{max})
|
||||
|
||||
This model can be also used for fixed-gain fixed-NF amplifiers.
|
||||
In that case, use:
|
||||
@@ -100,10 +100,10 @@ Raman Amplifiers
|
||||
|
||||
An accurate simulation of Raman amplification requires knowledge of:
|
||||
|
||||
- the *power* and *wavelength* of all Raman pumping lasers,
|
||||
- the *direction*, whether it is co-propagating or counter-propagating,
|
||||
- the Raman efficiency of the fiber,
|
||||
- the fiber temperature.
|
||||
* the *power* and *wavelength* of all Raman pumping lasers,
|
||||
* the *direction*, whether it is co-propagating or counter-propagating,
|
||||
* the Raman efficiency of the fiber,
|
||||
* the fiber temperature.
|
||||
|
||||
Under certain scenarios it is useful to be able to run a simulation without an accurate Raman description.
|
||||
For these purposes, it is possible to approximate a Raman amplifier via a fixed-gain EDFA with the :ref:`polynomial NF<ext-nf-model-polynomial-NF>` model using :math:`\text{a} = \text{b} = \text{c} = 0`, and a desired effective :math:`\text{d} = NF`.
|
||||
|
||||
BIN
docs/images/2022-04-12-gnpy-app.png
Normal file
BIN
docs/images/2022-04-12-gnpy-app.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 288 KiB |
@@ -38,7 +38,7 @@ Using Python on your computer
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**Note**: `gnpy` supports Python 3 only. Python 2 is not supported.
|
||||
`gnpy` requires Python ≥3.6
|
||||
`gnpy` requires Python ≥3.8
|
||||
|
||||
**Note**: the `gnpy` maintainers strongly recommend the use of Anaconda for
|
||||
managing dependencies.
|
||||
@@ -84,7 +84,7 @@ exact version of Python you are using.
|
||||
$ which python # check which Python executable is used
|
||||
/path/to/anaconda/bin/python
|
||||
$ python -V # check your Python version
|
||||
Python 3.6.5 :: Anaconda, Inc.
|
||||
Python 3.8.0 :: Anaconda, Inc.
|
||||
|
||||
.. _install-pip:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ fully-functional programs.
|
||||
|
||||
**Note**: *If you are a network operator or involved in route planning and
|
||||
optimization for your organization, please contact project maintainer Jan
|
||||
Kundrát <jan.kundrat@telecominfraproject.com>. gnpy is looking for users with
|
||||
Kundrát <jkt@jankundrat.com>. gnpy is looking for users with
|
||||
specific, delineated use cases to drive requirements for future
|
||||
development.*
|
||||
|
||||
@@ -20,7 +20,6 @@ This example demonstrates how GNPy can be used to check the expected SNR at the
|
||||
:width: 100%
|
||||
:align: left
|
||||
:alt: Running a simple simulation example
|
||||
:target: https://asciinema.org/a/252295
|
||||
|
||||
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>`_
|
||||
@@ -92,4 +91,4 @@ As a result transponder type is not part of the network info. it is related to t
|
||||
|
||||
The current version includes a spectrum assigment features that enables to compute a candidate spectrum assignment for each service based on a first fit policy. Spectrum is assigned based on service specified spacing value, path_bandwidth value and selected mode for the transceiver. This spectrum assignment includes a basic capacity planning capability so that the spectrum resource is limited by the frequency min and max values defined for the links. If the requested services reach the link spectrum capacity, additional services feasibility are computed but marked as blocked due to spectrum reason.
|
||||
|
||||
OpenROADM networks can be simulated via ``gnpy/example-data/eqpt_config_openroadm.json`` -- see ``gnpy/example-data/Sweden_OpenROADM_example_network.json`` as an example.
|
||||
OpenROADM networks can be simulated via ``gnpy/example-data/eqpt_config_openroadm_*.json`` -- see ``gnpy/example-data/Sweden_OpenROADM*_example_network.json`` as an example.
|
||||
|
||||
393
docs/json.rst
393
docs/json.rst
@@ -1,3 +1,5 @@
|
||||
.. _legacy-json:
|
||||
|
||||
JSON Input Files
|
||||
================
|
||||
|
||||
@@ -42,7 +44,7 @@ For all amplifier models:
|
||||
| ``type_variety`` | (string) | a unique name to ID the amplifier in the|
|
||||
| | | JSON/Excel template topology input file |
|
||||
+------------------------+-----------+-----------------------------------------+
|
||||
| ``out_voa_auto`` | (boolean) | auto_design feature to optimize the |
|
||||
| ``out_voa_auto`` | (boolean) | auto-design feature to optimize the |
|
||||
| | | amplifier output VOA. If true, output |
|
||||
| | | VOA is present and will be used to push |
|
||||
| | | amplifier gain to its maximum, within |
|
||||
@@ -71,13 +73,57 @@ The fiber library currently describes SSMF and NZDF but additional fiber types c
|
||||
| ``dispersion_slope`` | (number) | In :math:`s \times m^{-1} \times m^{-1} |
|
||||
| | | \times m^{-1}` |
|
||||
+----------------------+-----------+------------------------------------------+
|
||||
| ``gamma`` | (number) | :math:`2\pi\times n^2/(\lambda*A_{eff})`,|
|
||||
| | | in :math:`w^{-1} \times m^{-1}`. |
|
||||
| ``effective_area`` | (number) | Effective area of the fiber (not just |
|
||||
| | | the MFD circle). This is the |
|
||||
| | | :math:`A_{eff}`, see e.g., the |
|
||||
| | | `Corning whitepaper on MFD/EA`_. |
|
||||
| | | Specified in :math:`m^{2}`. |
|
||||
+----------------------+-----------+------------------------------------------+
|
||||
| ``gamma`` | (number) | Coefficient :math:`\gamma = 2\pi\times |
|
||||
| | | n^2/(\lambda*A_{eff})`. |
|
||||
| | | If not provided, this will be derived |
|
||||
| | | from the ``effective_area`` |
|
||||
| | | :math:`A_{eff}`. |
|
||||
| | | In :math:`w^{-1} \times m^{-1}`. |
|
||||
+----------------------+-----------+------------------------------------------+
|
||||
| ``pmd_coef`` | (number) | Polarization mode dispersion (PMD) |
|
||||
| | | coefficient. In |
|
||||
| | | :math:`s\times\sqrt{m}^{-1}`. |
|
||||
+----------------------+-----------+------------------------------------------+
|
||||
| ``lumped_losses`` | (array) | Places along the fiber length with extra |
|
||||
| | | losses. Specified as a loss in dB at |
|
||||
| | | each relevant position (in km): |
|
||||
| | | ``{"position": 10, "loss": 1.5}``) |
|
||||
+----------------------+-----------+------------------------------------------+
|
||||
|
||||
.. _Corning whitepaper on MFD/EA: https://www.corning.com/microsites/coc/oem/documents/specialty-fiber/WP7071-Mode-Field-Diam-and-Eff-Area.pdf
|
||||
|
||||
RamanFiber
|
||||
~~~~~~~~~~
|
||||
|
||||
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:
|
||||
|
||||
+---------------------------+-----------+------------------------------------------------------------+
|
||||
| field | type | description |
|
||||
+===========================+===========+============================================================+
|
||||
| ``power`` | (number) | Total pump power in :math:`W` |
|
||||
| | | considering a depolarized pump |
|
||||
+---------------------------+-----------+------------------------------------------------------------+
|
||||
| ``frequency`` | (number) | Pump central frequency in :math:`Hz` |
|
||||
+---------------------------+-----------+------------------------------------------------------------+
|
||||
| ``propagation_direction`` | (number) | 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]}``).
|
||||
|
||||
Transceiver
|
||||
~~~~~~~~~~~
|
||||
@@ -130,36 +176,36 @@ ROADM
|
||||
|
||||
The user can only modify the value of existing parameters:
|
||||
|
||||
+--------------------------+-----------+---------------------------------------------+
|
||||
| field | type | description |
|
||||
+==========================+===========+=============================================+
|
||||
| ``target_pch_out_db`` | (number) | Auto-design sets the ROADM egress channel |
|
||||
| | | power. This reflects typical control loop |
|
||||
| | | algorithms that adjust ROADM losses to |
|
||||
| | | equalize channels (eg coming from different |
|
||||
| | | ingress direction or add ports) |
|
||||
| | | This is the default value |
|
||||
| | | Roadm/params/target_pch_out_db if no value |
|
||||
| | | is given in the ``Roadm`` element in the |
|
||||
| | | topology input description. |
|
||||
| | | This default value is ignored if a |
|
||||
| | | params/target_pch_out_db value is input in |
|
||||
| | | the topology for a given ROADM. |
|
||||
+--------------------------+-----------+---------------------------------------------+
|
||||
| ``add_drop_osnr`` | (number) | OSNR contribution from the add/drop ports |
|
||||
+--------------------------+-----------+---------------------------------------------+
|
||||
| ``pmd`` | (number) | Polarization mode dispersion (PMD). (s) |
|
||||
+--------------------------+-----------+---------------------------------------------+
|
||||
| ``restrictions`` | (dict of | If non-empty, keys ``preamp_variety_list`` |
|
||||
| | strings) | and ``booster_variety_list`` represent |
|
||||
| | | list of ``type_variety`` amplifiers which |
|
||||
| | | are allowed for auto-design within ROADM's |
|
||||
| | | line degrees. |
|
||||
| | | |
|
||||
| | | If no booster should be placed on a degree, |
|
||||
| | | insert a ``Fused`` node on the degree |
|
||||
| | | output. |
|
||||
+--------------------------+-----------+---------------------------------------------+
|
||||
+-------------------------------+-----------+----------------------------------------------------+
|
||||
| field | type | description |
|
||||
+===============================+===========+====================================================+
|
||||
| ``target_pch_out_db`` | (number) | Default :ref:`equalization strategy<equalization>` |
|
||||
| or | | for this ROADM type. |
|
||||
| ``target_psd_out_mWperGHz`` | | |
|
||||
| or | | Auto-design sets the ROADM egress channel |
|
||||
| ``target_out_mWperSlotWidth`` | | power. This reflects typical control loop |
|
||||
| (mutually exclusive) | | algorithms that adjust ROADM losses to |
|
||||
| | | equalize channels (e.g., coming from |
|
||||
| | | different ingress direction or add ports). |
|
||||
| | | |
|
||||
| | | These values are used as defaults when no |
|
||||
| | | overrides are set per each ``Roadm`` |
|
||||
| | | element in the network topology. |
|
||||
+-------------------------------+-----------+----------------------------------------------------+
|
||||
| ``add_drop_osnr`` | (number) | OSNR contribution from the add/drop ports |
|
||||
+-------------------------------+-----------+----------------------------------------------------+
|
||||
| ``pmd`` | (number) | Polarization mode dispersion (PMD). (s) |
|
||||
+-------------------------------+-----------+----------------------------------------------------+
|
||||
| ``restrictions`` | (dict of | If non-empty, keys ``preamp_variety_list`` |
|
||||
| | strings) | and ``booster_variety_list`` represent |
|
||||
| | | list of ``type_variety`` amplifiers which |
|
||||
| | | are allowed for auto-design within ROADM's |
|
||||
| | | line degrees. |
|
||||
| | | |
|
||||
| | | If no booster should be placed on a degree, |
|
||||
| | | insert a ``Fused`` node on the degree |
|
||||
| | | output. |
|
||||
+-------------------------------+-----------+----------------------------------------------------+
|
||||
|
||||
Global parameters
|
||||
-----------------
|
||||
@@ -174,6 +220,64 @@ Only the EDFA that are marked ``'allowed_for_design': true`` are considered.
|
||||
|
||||
For amplifiers defined in the topology JSON input but whose ``gain = 0`` (placeholder), auto-design will set its gain automatically: see ``power_mode`` in the ``Spans`` library to find out how the gain is calculated.
|
||||
|
||||
The file ``sim_params.json`` contains the tuning parameters used within both the ``gnpy.science_utils.RamanSolver`` and
|
||||
the ``gnpy.science_utils.NliSolver`` for the evaluation of the Raman profile and the NLI generation, respectively.
|
||||
|
||||
If amplifiers don't have settings, auto-design also sets amplifiers gain, output VOA and target powers according to [J. -L. Auge, V. Curri and E. Le Rouzic, Open Design for Multi-Vendor Optical Networks, OFC 2019](https://ieeexplore.ieee.org/document/8696699), equation 4.
|
||||
See ``delta_power_range_db`` for more explaination.
|
||||
|
||||
+---------------------------------------------+-----------+---------------------------------------------+
|
||||
| field | type | description |
|
||||
+=============================================+===========+=============================================+
|
||||
| ``raman_params.flag`` | (boolean) | Enable/Disable the Raman effect that |
|
||||
| | | produces a power transfer from higher to |
|
||||
| | | lower frequencies. |
|
||||
| | | In general, considering the Raman effect |
|
||||
| | | provides more accurate results. It is |
|
||||
| | | mandatory when Raman amplification is |
|
||||
| | | included in the simulation |
|
||||
+---------------------------------------------+-----------+---------------------------------------------+
|
||||
| ``raman_params.result_spatial_resolution`` | (number) | Spatial resolution of the output |
|
||||
| | | Raman profile along the entire fiber span. |
|
||||
| | | This affects the accuracy and the |
|
||||
| | | computational time of the NLI |
|
||||
| | | calculation when the GGN method is used: |
|
||||
| | | smaller the spatial resolution higher both |
|
||||
| | | the accuracy and the computational time. |
|
||||
| | | In C-band simulations, with input power per |
|
||||
| | | channel around 0 dBm, a suggested value of |
|
||||
| | | spatial resolution is 10e3 m |
|
||||
+---------------------------------------------+-----------+---------------------------------------------+
|
||||
| ``raman_params.solver_spatial_resolution`` | (number) | Spatial step for the iterative solution |
|
||||
| | | of the first order differential equation |
|
||||
| | | used to calculate the Raman profile |
|
||||
| | | along the entire fiber span. |
|
||||
| | | This affects the accuracy and the |
|
||||
| | | computational time of the evaluated |
|
||||
| | | Raman profile: |
|
||||
| | | smaller the spatial resolution higher both |
|
||||
| | | the accuracy and the computational time. |
|
||||
| | | In C-band simulations, with input power per |
|
||||
| | | channel around 0 dBm, a suggested value of |
|
||||
| | | spatial resolution is 100 m |
|
||||
+---------------------------------------------+-----------+---------------------------------------------+
|
||||
| ``nli_params.method`` | (string) | Model used for the NLI evaluation. Valid |
|
||||
| | | choices are ``gn_model_analytic`` (see |
|
||||
| | | eq. 120 from `arXiv:1209.0394 |
|
||||
| | | <https://arxiv.org/abs/1209.0394>`_) and |
|
||||
| | | ``ggn_spectrally_separated`` (see eq. 21 |
|
||||
| | | from `arXiv:1710.02225 |
|
||||
| | | <https://arxiv.org/abs/1710.02225>`_). |
|
||||
+---------------------------------------------+-----------+---------------------------------------------+
|
||||
| ``nli_params.computed_channels`` | (number) | The channels on which the NLI is |
|
||||
| | | 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. |
|
||||
+---------------------------------------------+-----------+---------------------------------------------+
|
||||
|
||||
Span
|
||||
~~~~
|
||||
|
||||
@@ -182,23 +286,27 @@ Span configuration is not a list (which may change in later releases) and the us
|
||||
+-------------------------------------+-----------+---------------------------------------------+
|
||||
| field | type | description |
|
||||
+=====================================+===========+=============================================+
|
||||
| ``power_mode`` | (boolean) | If false, gain mode. Auto-design sets |
|
||||
| | | amplifier gain = preceding span loss, |
|
||||
| | | unless the amplifier exists and its |
|
||||
| | | gain > 0 in the topology input JSON. |
|
||||
| | | If true, power mode (recommended for |
|
||||
| | | auto-design and power sweep.) |
|
||||
| | | Auto-design sets amplifier power |
|
||||
| | | according to delta_power_range. If the |
|
||||
| | | amplifier exists with gain > 0 in the |
|
||||
| | | topology JSON input, then its gain is |
|
||||
| | | translated into a power target/channel. |
|
||||
| | | Moreover, when performing a power sweep |
|
||||
| | | (see ``power_range_db`` in the SI |
|
||||
| | | configuration library) the power sweep |
|
||||
| | | is performed w/r/t this power target, |
|
||||
| | | regardless of preceding amplifiers |
|
||||
| | | power saturation/limitations. |
|
||||
| ``power_mode`` | (boolean) | If false, **gain mode**. In the gain mode, |
|
||||
| | | only gain settings are used for |
|
||||
| | | propagation, and ``delta_p`` is ignored. |
|
||||
| | | If no ``gain_target`` is set in an |
|
||||
| | | amplifier, auto-design computes one |
|
||||
| | | according to the ``delta_power_range`` |
|
||||
| | | optimisation range. |
|
||||
| | | The gain mode |
|
||||
| | | is recommended if all the amplifiers |
|
||||
| | | have already consistent gain settings in |
|
||||
| | | the topology input file. |
|
||||
| | | |
|
||||
| | | If true, **power mode**. In the power mode, |
|
||||
| | | only the ``delta_p`` is used for |
|
||||
| | | propagation, and ``gain_target`` is |
|
||||
| | | ignored. |
|
||||
| | | The power mode is recommended for |
|
||||
| | | auto-design and power sweep. |
|
||||
| | | If no ``delta_p`` is set, |
|
||||
| | | auto-design sets an amplifier power target |
|
||||
| | | according to delta_power_range_db. |
|
||||
+-------------------------------------+-----------+---------------------------------------------+
|
||||
| ``delta_power_range_db`` | (number) | Auto-design only, power-mode |
|
||||
| | | only. Specifies the [min, max, step] |
|
||||
@@ -303,9 +411,9 @@ Span configuration is not a list (which may change in later releases) and the us
|
||||
SpectralInformation
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The user can only modify the value of existing parameters.
|
||||
It defines a spectrum of N identical carriers.
|
||||
While the code libraries allow for different carriers and power levels, the current user parametrization only allows one carrier type and one power/channel definition.
|
||||
GNPy requires a description of all channels that are propagated through the network.
|
||||
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:
|
||||
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| field | type | description |
|
||||
@@ -326,11 +434,20 @@ While the code libraries allow for different carriers and power levels, the curr
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``tx_osnr`` | (number) | In dB. OSNR out from transponder. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``power_dbm`` | (number) | Reference channel power. In gain mode |
|
||||
| | | (see spans/power_mode = false), all gain |
|
||||
| | | settings are offset w/r/t this reference |
|
||||
| | | power. In power mode, it is the |
|
||||
| | | reference power for |
|
||||
| ``power_dbm`` | (number) | Reference channel power, in dBm. |
|
||||
| | | In gain mode |
|
||||
| | | (see spans/power_mode = false), if no |
|
||||
| | | gain is set in an amplifier, auto-design |
|
||||
| | | sets gain to meet this reference |
|
||||
| | | power. If amplifiers gain is set, |
|
||||
| | | ``power_dbm`` is |
|
||||
| | | ignored. |
|
||||
| | | |
|
||||
| | | In power mode, the ``power_dbm`` |
|
||||
| | | is the reference power for |
|
||||
| | | the ``delta_p`` settings in amplifiers. |
|
||||
| | | It is also the reference power for |
|
||||
| | | auto-design power optimisation range |
|
||||
| | | Spans/delta_power_range_db. For example, |
|
||||
| | | if delta_power_range_db = `[0,0,0]`, the |
|
||||
| | | same power=power_dbm is launched in every |
|
||||
@@ -338,12 +455,166 @@ While the code libraries allow for different carriers and power levels, the curr
|
||||
| | | with the power_dbm value: even if a |
|
||||
| | | power sweep is defined (see after) the |
|
||||
| | | design is not repeated. |
|
||||
| | | |
|
||||
| | | If the ``--power`` CLI option is used, |
|
||||
| | | its value replaces this parameter. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``power_range_db`` | (number) | Power sweep excursion around power_dbm. |
|
||||
| | | It is not the min and max channel power |
|
||||
| | | values! The reference power becomes: |
|
||||
| ``power_range_db`` | (number) | Power sweep excursion around |
|
||||
| | | ``power_dbm``. |
|
||||
| | | This defines a list of reference powers |
|
||||
| | | to run the propagation, in the range |
|
||||
| | | power_range_db + power_dbm. |
|
||||
| | | Power sweep uses the ``delta_p`` targets |
|
||||
| | | or, if they have not been set, the ones |
|
||||
| | | computed by auto-design, regardless of |
|
||||
| | | of preceding amplifiers' power |
|
||||
| | | saturation. |
|
||||
| | | |
|
||||
| | | Power sweep is an easy way to find the |
|
||||
| | | optimal reference power. |
|
||||
| | | |
|
||||
| | | Power sweep excursion is ignored in case |
|
||||
| | | of gain mode. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``sys_margins`` | (number) | In dB. Added margin on min required |
|
||||
| | | transceiver OSNR. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
|
||||
.. _mixed-rate:
|
||||
|
||||
Arbitrary channel definition
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Non-uniform channels are defined via a list of spectrum "partitions" which are defined in an extra JSON file via the ``--spectrum`` option.
|
||||
In this approach, each partition is internally homogeneous, but different partitions might use different channel widths, power targets, modulation rates, etc.
|
||||
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| field | type | description |
|
||||
+======================+===========+===========================================+
|
||||
| ``f_min``, | (number) | In Hz. Mandatory. |
|
||||
| ``f_max`` | | Define partition :math:`f_{min}` is |
|
||||
| | | the first carrier central frequency |
|
||||
| | | :math:`f_{max}` is the last one. |
|
||||
| | | :math:`f_{min}` -:math:`f_{max}` |
|
||||
| | | partitions must not overlap. |
|
||||
| | | |
|
||||
| | | Note that the meaning of ``f_min`` and |
|
||||
| | | ``f_max`` is different than the one in |
|
||||
| | | ``SpectralInformation``. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``baud_rate`` | (number) | In Hz. Mandatory. Simulated baud rate. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``slot_width`` | (number) | In Hz. Carrier spectrum occupation. |
|
||||
| | | Carriers of this partition are spaced at |
|
||||
| | | ``slot_width`` offsets. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``roll_off`` | (number) | Pure number between 0 and 1. Mandatory |
|
||||
| | | TX signal roll-off shape. Used by |
|
||||
| | | Raman-aware simulation code. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``tx_osnr`` | (number) | In dB. Optional. OSNR out from |
|
||||
| | | transponder. Default value is 40 dB. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
| ``delta_pdb`` | (number) | In dB. Optional. Power offset compared to |
|
||||
| | | the reference power used for design |
|
||||
| | | (SI block in equipment library) to be |
|
||||
| | | applied by ROADM to equalize the carriers |
|
||||
| | | in this partition. Default value is 0 dB. |
|
||||
+----------------------+-----------+-------------------------------------------+
|
||||
|
||||
For example this example:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"SI":[
|
||||
{
|
||||
"f_min": 191.4e12,
|
||||
"f_max":193.1e12,
|
||||
"baud_rate": 32e9,
|
||||
"slot_width": 50e9,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
},
|
||||
{
|
||||
"f_min": 193.1625e12,
|
||||
"f_max":195e12,
|
||||
"baud_rate": 64e9,
|
||||
"delta_pdb": 3,
|
||||
"slot_width": 75e9,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
...defines a spectrum split into two parts.
|
||||
Carriers with central frequencies ranging from 191.4 THz to 193.1 THz will have 32 GBaud rate and will be spaced by 50 Ghz.
|
||||
Carriers with central frequencies ranging from 193.1625 THz to 195 THz will have 64 GBaud rate and will be spaced by 75 GHz with 3 dB power offset.
|
||||
|
||||
If the SI reference carrier is set to ``power_dbm`` = 0dBm, and the ROADM has ``target_pch_out_db`` set to -20 dBm, then all channels ranging from 191.4 THz to 193.1 THz will have their power equalized to -20 + 0 dBm (due to the 0 dB power offset).
|
||||
All channels ranging from 193.1625 THz to 195 THz will have their power equalized to -20 + 3 = -17 dBm (total power signal + noise).
|
||||
|
||||
Note that first carrier of the second partition has center frequency 193.1625 THz (its spectrum occupation ranges from 193.125 THz to 193.2 THz).
|
||||
The last carrier of the second partition has center frequency 193.1 THz and spectrum occupation ranges from 193.075 THz to 193.125 THz.
|
||||
There is no overlap of the occupation and both share the same boundary.
|
||||
|
||||
.. _equalization:
|
||||
|
||||
Equalization choices
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
ROADMs typically equalize the optical power across multiple channels using one of the available equalization strategies — either targeting a specific output power, or a specific power spectral density (PSD), or a spectfic power spectral density using slot_width as spectrum width reference (PSW).
|
||||
All of these strategies can be adjusted by a per-channel power offset.
|
||||
The equalization strategy can be defined globally per a ROADM model, or per each ROADM instance in the topology, and within a ROADM also on a per-degree basis.
|
||||
|
||||
Let's consider some example for the equalization. Suppose that the types of signal to be propagated are the following:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"baud_rate": 32e9,
|
||||
"f_min":191.3e12,
|
||||
"f_max":192.3e12,
|
||||
"spacing": 50e9,
|
||||
"label": 1
|
||||
},
|
||||
{
|
||||
"baud_rate": 64e9,
|
||||
"f_min":193.3e12,
|
||||
"f_max":194.3e12,
|
||||
"spacing": 75e9,
|
||||
"label": 2
|
||||
}
|
||||
|
||||
|
||||
with the PSD equalization in a ROADM:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"uid": "roadm A",
|
||||
"type": "Roadm",
|
||||
"params": {
|
||||
"target_psd_out_mWperGHz": 3.125e-4,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
This means that power out of the ROADM will be computed as 3.125e-4 * 32 = 0.01 mW ie -20 dBm for label 1 types of carriers
|
||||
and 3.125e4 * 64 = 0.02 mW ie -16.99 dBm for label2 channels. So a ratio of ~ 3 dB between target powers for these carriers.
|
||||
|
||||
With the PSW equalization:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"uid": "roadm A",
|
||||
"type": "Roadm",
|
||||
"params": {
|
||||
"target_out_mWperSlotWidth": 2.0e-4,
|
||||
}
|
||||
},
|
||||
|
||||
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.
|
||||
|
||||
@@ -145,4 +145,4 @@ Raman Scattering in order to give a proper estimation for all channels
|
||||
:cite:`cantono2018modeling`. This will be the main upgrade required within the
|
||||
PSE framework.
|
||||
|
||||
.. bibliography:: biblio.bib
|
||||
.. bibliography::
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
alabaster>=0.7.12,<1
|
||||
docutils>=0.15.2,<1
|
||||
myst-parser>=0.14.0,<1
|
||||
Pygments>=2.7.4,<3
|
||||
docutils>=0.17.1,<1
|
||||
myst-parser>=0.16.1,<1
|
||||
Pygments>=2.11.2,<3
|
||||
rstcheck
|
||||
Sphinx>=3.5.0,<4
|
||||
sphinxcontrib-bibtex>=0.4.2,<1
|
||||
Sphinx>=4.4.0,<5
|
||||
sphinxcontrib-bibtex>=2.4.1,<3
|
||||
|
||||
@@ -20,13 +20,20 @@ unique identifier and a printable name, and provide the :py:meth:`__call__` meth
|
||||
instance as a result.
|
||||
"""
|
||||
|
||||
from numpy import abs, arange, array, divide, errstate, ones, interp, mean, pi, polyfit, polyval, sum, sqrt
|
||||
from numpy import abs, array, errstate, ones, interp, mean, pi, polyfit, polyval, sum, sqrt, log10, exp, asarray, full,\
|
||||
squeeze, zeros, append, flip, outer, ndarray
|
||||
from scipy.constants import h, c
|
||||
from scipy.interpolate import interp1d
|
||||
from collections import namedtuple
|
||||
from typing import Union
|
||||
|
||||
from gnpy.core.utils import lin2db, db2lin, arrange_frequencies, snr_sum
|
||||
from gnpy.core.parameters import FiberParams, PumpParams
|
||||
from gnpy.core.science_utils import NliSolver, RamanSolver, propagate_raman_fiber, _psi
|
||||
|
||||
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
|
||||
from gnpy.core.science_utils import NliSolver, RamanSolver
|
||||
from gnpy.core.info import SpectralInformation, ReferenceCarrier
|
||||
from gnpy.core.exceptions import NetworkTopologyError, SpectrumError, ParametersError
|
||||
|
||||
|
||||
class Location(namedtuple('Location', 'latitude longitude city region')):
|
||||
@@ -79,32 +86,49 @@ class Transceiver(_Node):
|
||||
self.baud_rate = None
|
||||
self.chromatic_dispersion = None
|
||||
self.pmd = None
|
||||
self.pdl = None
|
||||
self.penalties = {}
|
||||
self.total_penalty = 0
|
||||
self.propagated_labels = [""]
|
||||
|
||||
def _calc_cd(self, spectral_info):
|
||||
""" Updates the Transceiver property with the CD of the received channels. CD in ps/nm.
|
||||
"""
|
||||
self.chromatic_dispersion = [carrier.chromatic_dispersion * 1e3 for carrier in spectral_info.carriers]
|
||||
self.chromatic_dispersion = spectral_info.chromatic_dispersion * 1e3
|
||||
|
||||
def _calc_pmd(self, spectral_info):
|
||||
"""Updates the Transceiver property with the PMD of the received channels. PMD in ps.
|
||||
"""
|
||||
self.pmd = [carrier.pmd*1e12 for carrier in spectral_info.carriers]
|
||||
self.pmd = spectral_info.pmd * 1e12
|
||||
|
||||
def _calc_pdl(self, spectral_info):
|
||||
"""Updates the Transceiver property with the PDL of the received channels. PDL in dB.
|
||||
"""
|
||||
self.pdl = spectral_info.pdl
|
||||
|
||||
def _calc_penalty(self, impairment_value, boundary_list):
|
||||
return interp(impairment_value, boundary_list['up_to_boundary'], boundary_list['penalty_value'],
|
||||
left=float('inf'), right=float('inf'))
|
||||
|
||||
def calc_penalties(self, penalties):
|
||||
"""Updates the Transceiver property with penalties (CD, PMD, etc.) of the received channels in dB.
|
||||
Penalties are linearly interpolated between given points and set to 'inf' outside interval.
|
||||
"""
|
||||
self.penalties = {impairment: self._calc_penalty(getattr(self, impairment), boundary_list)
|
||||
for impairment, boundary_list in penalties.items()}
|
||||
self.total_penalty = sum(list(self.penalties.values()), axis=0)
|
||||
|
||||
def _calc_snr(self, spectral_info):
|
||||
with errstate(divide='ignore'):
|
||||
self.baud_rate = [c.baud_rate for c in spectral_info.carriers]
|
||||
ratio_01nm = [lin2db(12.5e9 / b_rate) for b_rate in self.baud_rate]
|
||||
self.propagated_labels = spectral_info.label
|
||||
self.baud_rate = spectral_info.baud_rate
|
||||
ratio_01nm = lin2db(12.5e9 / self.baud_rate)
|
||||
# set raw values to record original calculation, before update_snr()
|
||||
self.raw_osnr_ase = [lin2db(divide(c.power.signal, c.power.ase))
|
||||
for c in spectral_info.carriers]
|
||||
self.raw_osnr_ase_01nm = [ase - ratio for ase, ratio
|
||||
in zip(self.raw_osnr_ase, ratio_01nm)]
|
||||
self.raw_osnr_nli = [lin2db(divide(c.power.signal, c.power.nli))
|
||||
for c in spectral_info.carriers]
|
||||
self.raw_snr = [lin2db(divide(c.power.signal, c.power.nli + c.power.ase))
|
||||
for c in spectral_info.carriers]
|
||||
self.raw_snr_01nm = [snr - ratio for snr, ratio
|
||||
in zip(self.raw_snr, ratio_01nm)]
|
||||
self.raw_osnr_ase = lin2db(spectral_info.signal / spectral_info.ase)
|
||||
self.raw_osnr_ase_01nm = self.raw_osnr_ase - ratio_01nm
|
||||
self.raw_osnr_nli = lin2db(spectral_info.signal / spectral_info.nli)
|
||||
self.raw_snr = lin2db(spectral_info.signal / (spectral_info.ase + spectral_info.nli))
|
||||
self.raw_snr_01nm = self.raw_snr - ratio_01nm
|
||||
|
||||
self.osnr_ase = self.raw_osnr_ase
|
||||
self.osnr_ase_01nm = self.raw_osnr_ase_01nm
|
||||
@@ -124,14 +148,10 @@ class Transceiver(_Node):
|
||||
for s in args:
|
||||
snr_added += db2lin(-s)
|
||||
snr_added = -lin2db(snr_added)
|
||||
self.osnr_ase = list(map(lambda x, y: snr_sum(x, y, snr_added),
|
||||
self.raw_osnr_ase, self.baud_rate))
|
||||
self.snr = list(map(lambda x, y: snr_sum(x, y, snr_added),
|
||||
self.raw_snr, self.baud_rate))
|
||||
self.osnr_ase_01nm = list(map(lambda x: snr_sum(x, 12.5e9, snr_added),
|
||||
self.raw_osnr_ase_01nm))
|
||||
self.snr_01nm = list(map(lambda x: snr_sum(x, 12.5e9, snr_added),
|
||||
self.raw_snr_01nm))
|
||||
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)
|
||||
self.osnr_ase_01nm = snr_sum(self.raw_osnr_ase_01nm, 12.5e9, snr_added)
|
||||
self.snr_01nm = snr_sum(self.raw_snr_01nm, 12.5e9, snr_added)
|
||||
|
||||
@property
|
||||
def to_json(self):
|
||||
@@ -150,117 +170,245 @@ class Transceiver(_Node):
|
||||
f'osnr_nli={self.osnr_nli!r}, '
|
||||
f'snr={self.snr!r}, '
|
||||
f'chromatic_dispersion={self.chromatic_dispersion!r}, '
|
||||
f'pmd={self.pmd!r})')
|
||||
f'pmd={self.pmd!r}, '
|
||||
f'pdl={self.pdl!r}, '
|
||||
f'penalties={self.penalties!r})')
|
||||
|
||||
def __str__(self):
|
||||
if self.snr is None or self.osnr_ase is None:
|
||||
return f'{type(self).__name__} {self.uid}'
|
||||
|
||||
snr = round(mean(self.snr), 2)
|
||||
osnr_ase = round(mean(self.osnr_ase), 2)
|
||||
osnr_ase_01nm = round(mean(self.osnr_ase_01nm), 2)
|
||||
snr_01nm = round(mean(self.snr_01nm), 2)
|
||||
snr = per_label_average(self.snr, self.propagated_labels)
|
||||
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)
|
||||
cd = mean(self.chromatic_dispersion)
|
||||
pmd = mean(self.pmd)
|
||||
pdl = mean(self.pdl)
|
||||
|
||||
return '\n'.join([f'{type(self).__name__} {self.uid}',
|
||||
result = '\n'.join([f'{type(self).__name__} {self.uid}',
|
||||
f' GSNR (0.1nm, dB): {pretty_summary_print(snr_01nm)}',
|
||||
f' GSNR (signal bw, dB): {pretty_summary_print(snr)}',
|
||||
f' OSNR ASE (0.1nm, dB): {pretty_summary_print(osnr_ase_01nm)}',
|
||||
f' OSNR ASE (signal bw, dB): {pretty_summary_print(osnr_ase)}',
|
||||
f' CD (ps/nm): {cd:.2f}',
|
||||
f' PMD (ps): {pmd:.2f}',
|
||||
f' PDL (dB): {pdl:.2f}'])
|
||||
|
||||
f' GSNR (0.1nm, dB): {snr_01nm:.2f}',
|
||||
f' GSNR (signal bw, dB): {snr:.2f}',
|
||||
f' OSNR ASE (0.1nm, dB): {osnr_ase_01nm:.2f}',
|
||||
f' OSNR ASE (signal bw, dB): {osnr_ase:.2f}',
|
||||
f' CD (ps/nm): {cd:.2f}',
|
||||
f' PMD (ps): {pmd:.2f}'])
|
||||
cd_penalty = self.penalties.get('chromatic_dispersion')
|
||||
if cd_penalty is not None:
|
||||
result += f'\n CD penalty (dB): {mean(cd_penalty):.2f}'
|
||||
pmd_penalty = self.penalties.get('pmd')
|
||||
if pmd_penalty is not None:
|
||||
result += f'\n PMD penalty (dB): {mean(pmd_penalty):.2f}'
|
||||
pdl_penalty = self.penalties.get('pdl')
|
||||
if pdl_penalty is not None:
|
||||
result += f'\n PDL penalty (dB): {mean(pdl_penalty):.2f}'
|
||||
|
||||
return result
|
||||
|
||||
def __call__(self, spectral_info):
|
||||
self._calc_snr(spectral_info)
|
||||
self._calc_cd(spectral_info)
|
||||
self._calc_pmd(spectral_info)
|
||||
self._calc_pdl(spectral_info)
|
||||
return spectral_info
|
||||
|
||||
|
||||
RoadmParams = namedtuple('RoadmParams', 'target_pch_out_db add_drop_osnr pmd restrictions per_degree_pch_out_db')
|
||||
|
||||
|
||||
class Roadm(_Node):
|
||||
def __init__(self, *args, params, **kwargs):
|
||||
if 'per_degree_pch_out_db' not in params.keys():
|
||||
params['per_degree_pch_out_db'] = {}
|
||||
super().__init__(*args, params=RoadmParams(**params), **kwargs)
|
||||
def __init__(self, *args, params=None, **kwargs):
|
||||
if not params:
|
||||
params = {}
|
||||
try:
|
||||
super().__init__(*args, params=RoadmParams(**params), **kwargs)
|
||||
except ParametersError as e:
|
||||
raise ParametersError(f'Config error in {kwargs["uid"]}: {e}') from e
|
||||
|
||||
# Target output power for the reference carrier, can only be computed on the fly, because it depends
|
||||
# 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.effective_loss = None
|
||||
self.effective_pch_out_db = self.params.target_pch_out_db
|
||||
|
||||
# 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.
|
||||
self.ref_effective_loss = None
|
||||
|
||||
self.passive = True
|
||||
self.restrictions = self.params.restrictions
|
||||
self.per_degree_pch_out_db = self.params.per_degree_pch_out_db
|
||||
self.propagated_labels = [""]
|
||||
# element contains the two types of equalisation parameters, but only one is not None or empty
|
||||
# target for equalization for the ROADM only one must be not None
|
||||
self.target_pch_out_dbm = self.params.target_pch_out_db
|
||||
self.target_psd_out_mWperGHz = self.params.target_psd_out_mWperGHz
|
||||
self.target_out_mWperSlotWidth = self.params.target_out_mWperSlotWidth
|
||||
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
|
||||
|
||||
@property
|
||||
def to_json(self):
|
||||
return {'uid': self.uid,
|
||||
'type': type(self).__name__,
|
||||
'params': {
|
||||
'target_pch_out_db': self.effective_pch_out_db,
|
||||
'restrictions': self.restrictions,
|
||||
'per_degree_pch_out_db': self.per_degree_pch_out_db
|
||||
},
|
||||
'metadata': {
|
||||
'location': self.metadata['location']._asdict()
|
||||
}
|
||||
}
|
||||
if self.target_pch_out_dbm is not None:
|
||||
equalisation, value = 'target_pch_out_db', self.target_pch_out_dbm
|
||||
elif self.target_psd_out_mWperGHz is not None:
|
||||
equalisation, value = 'target_psd_out_mWperGHz', self.target_psd_out_mWperGHz
|
||||
elif self.target_out_mWperSlotWidth is not None:
|
||||
equalisation, value = 'target_out_mWperSlotWidth', self.target_out_mWperSlotWidth
|
||||
else:
|
||||
assert False, 'There must be one default equalization defined in ROADM'
|
||||
to_json = {
|
||||
'uid': self.uid,
|
||||
'type': type(self).__name__,
|
||||
'params': {
|
||||
equalisation: value,
|
||||
'restrictions': self.restrictions,
|
||||
},
|
||||
'metadata': {
|
||||
'location': self.metadata['location']._asdict()
|
||||
}
|
||||
}
|
||||
# several per_degree equalization may coexist on different degrees
|
||||
if self.per_degree_pch_out_dbm:
|
||||
to_json['params']['per_degree_pch_out_db'] = self.per_degree_pch_out_dbm
|
||||
if self.per_degree_pch_psd:
|
||||
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
|
||||
return to_json
|
||||
|
||||
def __repr__(self):
|
||||
return f'{type(self).__name__}(uid={self.uid!r}, loss={self.loss!r})'
|
||||
|
||||
def __str__(self):
|
||||
if self.effective_loss is None:
|
||||
if self.ref_effective_loss is None:
|
||||
return f'{type(self).__name__} {self.uid}'
|
||||
|
||||
total_pch = pretty_summary_print(per_label_average(self.pch_out_dbm, self.propagated_labels))
|
||||
return '\n'.join([f'{type(self).__name__} {self.uid}',
|
||||
f' effective loss (dB): {self.effective_loss:.2f}',
|
||||
f' pch out (dBm): {self.effective_pch_out_db:.2f}'])
|
||||
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}'])
|
||||
|
||||
def propagate(self, pref, *carriers, degree):
|
||||
# pin_target and loss are read from eqpt_config.json['Roadm']
|
||||
# all ingress channels in xpress are set to this power level
|
||||
# but add channels are not, so we define an effective loss
|
||||
# in the case of add channels
|
||||
# find the target power on this degree:
|
||||
# if a target power has been defined for this degree use it else use the global one.
|
||||
# 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
|
||||
def get_roadm_target_power(self, ref_carrier: ReferenceCarrier = None,
|
||||
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
|
||||
target_pch_out_dbm is defined to -20 dbm, then the function returns an array of powers
|
||||
[-20, -20, -20, -20, -20]
|
||||
if target_psd_out_mWperGHz is defined instead with 3.125e-4mW/GHz then it returns
|
||||
[-20, -18.819, -16.9897, -18.819, -20]
|
||||
if instead a reference_baud_rate is defined, the functions computes the result for a
|
||||
single reference carrier whose baud_rate is reference_baudrate
|
||||
"""
|
||||
if spectral_info:
|
||||
if self.target_pch_out_dbm is not None:
|
||||
return full(len(spectral_info.channel_number), self.target_pch_out_dbm)
|
||||
if self.target_psd_out_mWperGHz is not None:
|
||||
return psd2powerdbm(self.target_psd_out_mWperGHz, spectral_info.baud_rate)
|
||||
if self.target_out_mWperSlotWidth is not None:
|
||||
return psd2powerdbm(self.target_out_mWperSlotWidth, spectral_info.slot_width)
|
||||
else:
|
||||
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)
|
||||
if self.target_out_mWperSlotWidth is not None:
|
||||
return psd2powerdbm(self.target_out_mWperSlotWidth, ref_carrier.slot_width)
|
||||
return None
|
||||
|
||||
def get_per_degree_ref_power(self, degree, ref_carrier):
|
||||
"""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)
|
||||
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)
|
||||
|
||||
def get_per_degree_power(self, degree, spectral_info):
|
||||
"""Get the target power in dBm out of ROADM degree for the spectral information
|
||||
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], spectral_info.baud_rate)
|
||||
return self.get_roadm_target_power(spectral_info=spectral_info)
|
||||
|
||||
def propagate(self, spectral_info, 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.
|
||||
"""
|
||||
# TODO maybe add a minimum loss for the ROADM
|
||||
per_degree_pch = self.per_degree_pch_out_db[degree] if degree in self.per_degree_pch_out_db.keys() else self.params.target_pch_out_db
|
||||
self.effective_pch_out_db = min(pref.p_spani, per_degree_pch)
|
||||
self.effective_loss = pref.p_spani - self.effective_pch_out_db
|
||||
carriers_power = array([c.power.signal + c.power.nli + c.power.ase for c in carriers])
|
||||
carriers_att = list(map(lambda x: lin2db(x * 1e3) - per_degree_pch, carriers_power))
|
||||
exceeding_att = -min(list(filter(lambda x: x < 0, carriers_att)), default=0)
|
||||
carriers_att = list(map(lambda x: db2lin(x + exceeding_att), carriers_att))
|
||||
for carrier_att, carrier in zip(carriers_att, carriers):
|
||||
pwr = carrier.power
|
||||
pwr = pwr._replace(signal=pwr.signal / carrier_att,
|
||||
nli=pwr.nli / carrier_att,
|
||||
ase=pwr.ase / carrier_att)
|
||||
pmd = sqrt(carrier.pmd**2 + self.params.pmd**2)
|
||||
yield carrier._replace(power=pwr, pmd=pmd)
|
||||
|
||||
def update_pref(self, pref):
|
||||
return pref._replace(p_span0=pref.p_span0, p_spani=self.effective_pch_out_db)
|
||||
# find the target power for the reference carrier
|
||||
ref_per_degree_pch = self.get_per_degree_ref_power(degree, spectral_info.pref.ref_carrier)
|
||||
# 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
|
||||
# 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)
|
||||
# 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
|
||||
target_power_per_channel = per_degree_pch + spectral_info.delta_pdb_per_channel
|
||||
# Computation of the per channel target power 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,
|
||||
# then the target power for each channel uses the specified delta_pdb_per_channel.
|
||||
# target_power_per_channel[f1, f2, f3] = -19, -17, -23
|
||||
# However if input_signal = -23, -16, -26, then the target can not be applied, because
|
||||
# -23 < -19dBm and -26 < -23dBm. Then the target is only applied to signals whose power is above the
|
||||
# threshold. others are left unchanged and unequalized.
|
||||
# the new target is [-23, -17, -26]
|
||||
# and the attenuation to apply is [-23, -16, -26] - [-23, -17, -26] = [0, 1, 0]
|
||||
# note that this changes the previous behaviour that equalized all identical channels based on the one
|
||||
# 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
|
||||
new_target = target_power_per_channel - correction
|
||||
delta_power = watt2dbm(input_power) - 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)
|
||||
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):
|
||||
"""Update Reference power
|
||||
|
||||
This modifies the spectral info in-place. Only the `pref` is updated with new p_spani,
|
||||
while p_span0 is not changed.
|
||||
"""
|
||||
spectral_info.pref = spectral_info.pref._replace(p_spani=self.ref_pch_out_dbm)
|
||||
|
||||
def __call__(self, spectral_info, degree):
|
||||
carriers = tuple(self.propagate(spectral_info.pref, *spectral_info.carriers, degree=degree))
|
||||
pref = self.update_pref(spectral_info.pref)
|
||||
return spectral_info._replace(carriers=carriers, pref=pref)
|
||||
|
||||
|
||||
FusedParams = namedtuple('FusedParams', 'loss')
|
||||
self.propagate(spectral_info, degree=degree)
|
||||
self.update_pref(spectral_info)
|
||||
return spectral_info
|
||||
|
||||
|
||||
class Fused(_Node):
|
||||
def __init__(self, *args, params=None, **kwargs):
|
||||
if params is None:
|
||||
# default loss value if not mentioned in loaded network json
|
||||
params = {'loss': 1}
|
||||
if not params:
|
||||
params = {}
|
||||
super().__init__(*args, params=FusedParams(**params), **kwargs)
|
||||
self.loss = self.params.loss
|
||||
self.passive = True
|
||||
@@ -284,23 +432,17 @@ class Fused(_Node):
|
||||
return '\n'.join([f'{type(self).__name__} {self.uid}',
|
||||
f' loss (dB): {self.loss:.2f}'])
|
||||
|
||||
def propagate(self, *carriers):
|
||||
attenuation = db2lin(self.loss)
|
||||
def propagate(self, spectral_info):
|
||||
spectral_info.apply_attenuation_db(self.loss)
|
||||
|
||||
for carrier in carriers:
|
||||
pwr = carrier.power
|
||||
pwr = pwr._replace(signal=pwr.signal / attenuation,
|
||||
nli=pwr.nli / attenuation,
|
||||
ase=pwr.ase / attenuation)
|
||||
yield carrier._replace(power=pwr)
|
||||
|
||||
def update_pref(self, pref):
|
||||
return pref._replace(p_span0=pref.p_span0, p_spani=pref.p_spani - 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):
|
||||
carriers = tuple(self.propagate(*spectral_info.carriers))
|
||||
pref = self.update_pref(spectral_info.pref)
|
||||
return spectral_info._replace(carriers=carriers, pref=pref)
|
||||
self.propagate(spectral_info)
|
||||
self.update_pref(spectral_info)
|
||||
return spectral_info
|
||||
|
||||
|
||||
class Fiber(_Node):
|
||||
@@ -309,7 +451,28 @@ class Fiber(_Node):
|
||||
params = {}
|
||||
super().__init__(*args, params=FiberParams(**params), **kwargs)
|
||||
self.pch_out_db = None
|
||||
self.nli_solver = NliSolver(self)
|
||||
self.passive = True
|
||||
self.propagated_labels = [""]
|
||||
# Raman efficiency matrix function of the delta frequency constructed such that each row is related to a
|
||||
# fixed frequency: positive elements represent a gain (from higher frequency) and negative elements represent
|
||||
# a loss (to lower frequency)
|
||||
if self.params.raman_efficiency:
|
||||
frequency_offset = self.params.raman_efficiency['frequency_offset']
|
||||
frequency_offset = append(-flip(frequency_offset[1:]), frequency_offset)
|
||||
cr = self.params.raman_efficiency['cr']
|
||||
cr = append(- flip(cr[1:]), cr)
|
||||
self._cr_function = lambda frequency: interp(frequency, frequency_offset, cr)
|
||||
else:
|
||||
self._cr_function = lambda frequency: zeros(squeeze(frequency).shape)
|
||||
|
||||
# Lumped losses
|
||||
z_lumped_losses = array([lumped['position'] for lumped in self.params.lumped_losses]) # km
|
||||
lumped_losses_power = array([lumped['loss'] for lumped in self.params.lumped_losses]) # dB
|
||||
if not ((z_lumped_losses > 0) * (z_lumped_losses < 1e-3 * self.params.length)).all():
|
||||
raise NetworkTopologyError("Lumped loss positions must be between 0 and the fiber length "
|
||||
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]
|
||||
|
||||
@property
|
||||
def to_json(self):
|
||||
@@ -319,7 +482,7 @@ class Fiber(_Node):
|
||||
'params': {
|
||||
# have to specify each because namedtupple cannot be updated :(
|
||||
'length': round(self.params.length * 1e-3, 6),
|
||||
'loss_coef': self.params.loss_coef * 1e3,
|
||||
'loss_coef': round(self.params.loss_coef * 1e3, 6),
|
||||
'length_units': 'km',
|
||||
'att_in': self.params.att_in,
|
||||
'con_in': self.params.con_in,
|
||||
@@ -339,6 +502,7 @@ class Fiber(_Node):
|
||||
if self.pch_out_db is None:
|
||||
return f'{type(self).__name__} {self.uid}'
|
||||
|
||||
total_pch = pretty_summary_print(per_label_average(self.pch_out_dbm, self.propagated_labels))
|
||||
return '\n'.join([f'{type(self).__name__} {self.uid}',
|
||||
f' type_variety: {self.type_variety}',
|
||||
f' length (km): {self.params.length * 1e-3:.2f}',
|
||||
@@ -346,45 +510,59 @@ class Fiber(_Node):
|
||||
f' total loss (dB): {self.loss:.2f}',
|
||||
f' (includes conn loss (dB) in: {self.params.con_in:.2f} out: {self.params.con_out:.2f})',
|
||||
f' (conn loss out includes EOL margin defined in eqpt_config.json)',
|
||||
f' pch out (dBm): {self.pch_out_db:.2f}'])
|
||||
f' reference pch out (dBm): {self.pch_out_db:.2f}',
|
||||
f' actual pch out (dBm): {total_pch}'])
|
||||
|
||||
def loss_coef_func(self, frequency):
|
||||
frequency = asarray(frequency)
|
||||
if self.params.loss_coef.size > 1:
|
||||
try:
|
||||
loss_coef = interp1d(self.params.f_loss_ref, self.params.loss_coef)(frequency)
|
||||
except ValueError:
|
||||
raise SpectrumError('The spectrum bandwidth exceeds the frequency interval used to define the fiber '
|
||||
f'loss coefficient in "{type(self).__name__} {self.uid}".'
|
||||
f'\nSpectrum f_min-f_max: {round(frequency[0]*1e-12,2)}-'
|
||||
f'{round(frequency[-1]*1e-12,2)}'
|
||||
f'\nLoss coefficient f_min-f_max: {round(self.params.f_loss_ref[0]*1e-12,2)}-'
|
||||
f'{round(self.params.f_loss_ref[-1]*1e-12,2)}')
|
||||
else:
|
||||
loss_coef = full(frequency.size, self.params.loss_coef)
|
||||
return squeeze(loss_coef)
|
||||
|
||||
|
||||
@property
|
||||
def loss(self):
|
||||
"""total loss including padding att_in: useful for polymorphism with roadm loss"""
|
||||
return self.params.loss_coef * self.params.length + self.params.con_in + self.params.con_out + self.params.att_in
|
||||
return self.loss_coef_func(self.params.ref_frequency) * self.params.length + \
|
||||
self.params.con_in + self.params.con_out + self.params.att_in
|
||||
|
||||
@property
|
||||
def passive(self):
|
||||
return True
|
||||
def alpha(self, frequency):
|
||||
"""Returns the linear exponent attenuation coefficient such that
|
||||
:math: `lin_attenuation = e^{- alpha length}`
|
||||
|
||||
def alpha(self, frequencies):
|
||||
"""It returns the values of the series expansion of attenuation coefficient alpha(f) for all f in frequencies
|
||||
|
||||
:param frequencies: frequencies of series expansion [Hz]
|
||||
:return: alpha: power attenuation coefficient for f in frequencies [Neper/m]
|
||||
:param frequency: the frequency at which alpha is computed [Hz]
|
||||
:return: alpha: power attenuation coefficient for f in frequency [Neper/m]
|
||||
"""
|
||||
if type(self.params.loss_coef) == dict:
|
||||
alpha = interp(frequencies, self.params.f_loss_ref, self.params.lin_loss_exp)
|
||||
else:
|
||||
alpha = self.params.lin_loss_exp * ones(frequencies.shape)
|
||||
return self.loss_coef_func(frequency) / (10 * log10(exp(1)))
|
||||
|
||||
return alpha
|
||||
def cr(self, frequency):
|
||||
"""Returns the raman efficiency matrix including the vibrational loss
|
||||
|
||||
def alpha0(self, f_ref=193.5e12):
|
||||
"""It returns the zero element of the series expansion of attenuation coefficient alpha(f) in the
|
||||
reference frequency f_ref
|
||||
|
||||
:param f_ref: reference frequency of series expansion [Hz]
|
||||
:return: alpha0: power attenuation coefficient in f_ref [Neper/m]
|
||||
:param frequency: the frequency at which cr is computed [Hz]
|
||||
:return: cr: raman efficiency matrix [1 / (W m)]
|
||||
"""
|
||||
return self.alpha(f_ref * ones(1))[0]
|
||||
df = outer(ones(frequency.shape), frequency) - outer(frequency, ones(frequency.shape))
|
||||
cr = self._cr_function(df)
|
||||
vibrational_loss = outer(frequency, ones(frequency.shape)) / outer(ones(frequency.shape), frequency)
|
||||
return cr * (cr >= 0) + cr * (cr < 0) * vibrational_loss # Raman efficiency [1/(W m)]
|
||||
|
||||
def chromatic_dispersion(self, freq=193.5e12):
|
||||
def chromatic_dispersion(self, freq=None):
|
||||
"""Returns accumulated chromatic dispersion (CD).
|
||||
|
||||
:param freq: the frequency at which the chromatic dispersion is computed
|
||||
:return: chromatic dispersion: the accumulated dispersion [s/m]
|
||||
"""
|
||||
freq = self.params.ref_frequency if freq is None else freq
|
||||
beta2 = self.params.beta2
|
||||
beta3 = self.params.beta3
|
||||
ref_f = self.params.ref_frequency
|
||||
@@ -398,147 +576,107 @@ class Fiber(_Node):
|
||||
"""differential group delay (PMD) [s]"""
|
||||
return self.params.pmd_coef * sqrt(self.params.length)
|
||||
|
||||
def _gn_analytic(self, carrier, *carriers):
|
||||
r"""Computes the nonlinear interference power on a single carrier.
|
||||
The method uses eq. 120 from `arXiv:1209.0394 <https://arxiv.org/abs/1209.0394>`__.
|
||||
|
||||
:param carrier: the signal under analysis
|
||||
:param \*carriers: the full WDM comb
|
||||
:return: carrier_nli: the amount of nonlinear interference in W on the under analysis
|
||||
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
|
||||
attenuation_in_db = self.params.con_in + self.params.att_in
|
||||
spectral_info.apply_attenuation_db(attenuation_in_db)
|
||||
|
||||
g_nli = 0
|
||||
for interfering_carrier in carriers:
|
||||
psi = _psi(carrier, interfering_carrier, beta2=self.params.beta2,
|
||||
asymptotic_length=self.params.asymptotic_length)
|
||||
g_nli += (interfering_carrier.power.signal / interfering_carrier.baud_rate)**2 \
|
||||
* (carrier.power.signal / carrier.baud_rate) * psi
|
||||
# inter channels Raman effect
|
||||
stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(spectral_info, self)
|
||||
|
||||
g_nli *= (16 / 27) * (self.params.gamma * self.params.effective_length)**2 \
|
||||
/ (2 * pi * abs(self.params.beta2) * self.params.asymptotic_length)
|
||||
# NLI noise evaluated at the fiber input
|
||||
spectral_info.nli += NliSolver.compute_nli(spectral_info, stimulated_raman_scattering, self)
|
||||
|
||||
carrier_nli = carrier.baud_rate * g_nli
|
||||
return carrier_nli
|
||||
# chromatic dispersion and pmd variations
|
||||
spectral_info.chromatic_dispersion += self.chromatic_dispersion(spectral_info.frequency)
|
||||
spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.pmd ** 2)
|
||||
|
||||
def propagate(self, *carriers):
|
||||
r"""Generator that computes the fiber propagation: attenuation, non-linear interference generation, CD
|
||||
accumulation and PMD accumulation.
|
||||
# apply the attenuation due to the fiber losses
|
||||
attenuation_fiber = stimulated_raman_scattering.loss_profile[:, -1]
|
||||
spectral_info.apply_attenuation_lin(attenuation_fiber)
|
||||
|
||||
:param: \*carriers: the channels at the input of the fiber
|
||||
:yield: carrier: the next channel at the output of the fiber
|
||||
"""
|
||||
# apply the attenuation due to the output connector loss
|
||||
attenuation_out_db = self.params.con_out
|
||||
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
|
||||
|
||||
# apply connector_att_in on all carriers before computing gn analytics premiere partie pas bonne
|
||||
attenuation = db2lin(self.params.con_in + self.params.att_in)
|
||||
|
||||
chan = []
|
||||
for carrier in carriers:
|
||||
pwr = carrier.power
|
||||
pwr = pwr._replace(signal=pwr.signal / attenuation,
|
||||
nli=pwr.nli / attenuation,
|
||||
ase=pwr.ase / attenuation)
|
||||
carrier = carrier._replace(power=pwr)
|
||||
chan.append(carrier)
|
||||
|
||||
carriers = tuple(f for f in chan)
|
||||
|
||||
# propagate in the fiber and apply attenuation out
|
||||
attenuation = db2lin(self.params.con_out)
|
||||
for carrier in carriers:
|
||||
pwr = carrier.power
|
||||
carrier_nli = self._gn_analytic(carrier, *carriers)
|
||||
pwr = pwr._replace(signal=pwr.signal / self.params.lin_attenuation / attenuation,
|
||||
nli=(pwr.nli + carrier_nli) / self.params.lin_attenuation / attenuation,
|
||||
ase=pwr.ase / self.params.lin_attenuation / attenuation)
|
||||
chromatic_dispersion = carrier.chromatic_dispersion + self.chromatic_dispersion(carrier.frequency)
|
||||
pmd = sqrt(carrier.pmd**2 + self.pmd**2)
|
||||
yield carrier._replace(power=pwr, chromatic_dispersion=chromatic_dispersion, pmd=pmd)
|
||||
|
||||
def update_pref(self, pref):
|
||||
self.pch_out_db = round(pref.p_spani - self.loss, 2)
|
||||
return pref._replace(p_span0=pref.p_span0, p_spani=self.pch_out_db)
|
||||
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):
|
||||
carriers = tuple(self.propagate(*spectral_info.carriers))
|
||||
pref = self.update_pref(spectral_info.pref)
|
||||
return spectral_info._replace(carriers=carriers, pref=pref)
|
||||
# _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)
|
||||
return spectral_info
|
||||
|
||||
|
||||
class RamanFiber(Fiber):
|
||||
def __init__(self, *args, params=None, **kwargs):
|
||||
super().__init__(*args, params=params, **kwargs)
|
||||
if self.operational and 'raman_pumps' in self.operational:
|
||||
self.raman_pumps = tuple(PumpParams(p['power'], p['frequency'], p['propagation_direction'])
|
||||
for p in self.operational['raman_pumps'])
|
||||
else:
|
||||
self.raman_pumps = None
|
||||
self.raman_solver = RamanSolver(self)
|
||||
if not self.operational:
|
||||
raise NetworkTopologyError(f'Fiber element uid:{self.uid} '
|
||||
'defined as RamanFiber without operational parameters')
|
||||
|
||||
if 'raman_pumps' not in self.operational:
|
||||
raise NetworkTopologyError(f'Fiber element uid:{self.uid} '
|
||||
'defined as RamanFiber without raman pumps description in operational')
|
||||
|
||||
if 'temperature' not in self.operational:
|
||||
raise NetworkTopologyError(f'Fiber element uid:{self.uid} '
|
||||
'defined as RamanFiber without temperature in operational')
|
||||
|
||||
pump_loss = db2lin(self.params.con_out)
|
||||
self.raman_pumps = tuple(PumpParams(p['power'] / pump_loss, p['frequency'], p['propagation_direction'])
|
||||
for p in self.operational['raman_pumps'])
|
||||
self.temperature = self.operational['temperature']
|
||||
|
||||
@property
|
||||
def to_json(self):
|
||||
return dict(super().to_json, operational=self.operational)
|
||||
|
||||
def update_pref(self, pref, *carriers):
|
||||
pch_out_db = lin2db(mean([carrier.power.signal for carrier in carriers])) + 30
|
||||
self.pch_out_db = round(pch_out_db, 2)
|
||||
return pref._replace(p_span0=pref.p_span0, p_spani=self.pch_out_db)
|
||||
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
|
||||
attenuation_in_db = self.params.con_in + self.params.att_in
|
||||
spectral_info.apply_attenuation_db(attenuation_in_db)
|
||||
|
||||
def __call__(self, spectral_info):
|
||||
carriers = tuple(self.propagate(*spectral_info.carriers))
|
||||
pref = self.update_pref(spectral_info.pref, *carriers)
|
||||
return spectral_info._replace(carriers=carriers, pref=pref)
|
||||
# Raman pumps and inter channel Raman effect
|
||||
stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(spectral_info, self)
|
||||
spontaneous_raman_scattering = \
|
||||
RamanSolver.calculate_spontaneous_raman_scattering(spectral_info, stimulated_raman_scattering, self)
|
||||
|
||||
def propagate(self, *carriers):
|
||||
for propagated_carrier in propagate_raman_fiber(self, *carriers):
|
||||
chromatic_dispersion = propagated_carrier.chromatic_dispersion + \
|
||||
self.chromatic_dispersion(propagated_carrier.frequency)
|
||||
pmd = sqrt(propagated_carrier.pmd**2 + self.pmd**2)
|
||||
propagated_carrier = propagated_carrier._replace(chromatic_dispersion=chromatic_dispersion, pmd=pmd)
|
||||
yield propagated_carrier
|
||||
# nli and ase noise evaluated at the fiber input
|
||||
spectral_info.nli += NliSolver.compute_nli(spectral_info, stimulated_raman_scattering, self)
|
||||
spectral_info.ase += spontaneous_raman_scattering
|
||||
|
||||
# chromatic dispersion and pmd variations
|
||||
spectral_info.chromatic_dispersion += self.chromatic_dispersion(spectral_info.frequency)
|
||||
spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.pmd ** 2)
|
||||
|
||||
class EdfaParams:
|
||||
def __init__(self, **params):
|
||||
self.update_params(params)
|
||||
if params == {}:
|
||||
self.type_variety = ''
|
||||
self.type_def = ''
|
||||
# self.gain_flatmax = 0
|
||||
# self.gain_min = 0
|
||||
# self.p_max = 0
|
||||
# self.nf_model = None
|
||||
# self.nf_fit_coeff = None
|
||||
# self.nf_ripple = None
|
||||
# self.dgt = None
|
||||
# self.gain_ripple = None
|
||||
# self.out_voa_auto = False
|
||||
# self.allowed_for_design = None
|
||||
# apply the attenuation due to the fiber losses
|
||||
attenuation_fiber = stimulated_raman_scattering.loss_profile[:spectral_info.number_of_channels, -1]
|
||||
|
||||
def update_params(self, kwargs):
|
||||
for k, v in kwargs.items():
|
||||
setattr(self, k, self.update_params(**v) if isinstance(v, dict) else v)
|
||||
spectral_info.apply_attenuation_lin(attenuation_fiber)
|
||||
|
||||
|
||||
class EdfaOperational:
|
||||
default_values = {
|
||||
'gain_target': None,
|
||||
'delta_p': None,
|
||||
'out_voa': None,
|
||||
'tilt_target': 0
|
||||
}
|
||||
|
||||
def __init__(self, **operational):
|
||||
self.update_attr(operational)
|
||||
|
||||
def update_attr(self, kwargs):
|
||||
clean_kwargs = {k: v for k, v in kwargs.items() if v != ''}
|
||||
for k, v in self.default_values.items():
|
||||
setattr(self, k, clean_kwargs.get(k, v))
|
||||
|
||||
def __repr__(self):
|
||||
return (f'{type(self).__name__}('
|
||||
f'gain_target={self.gain_target!r}, '
|
||||
f'tilt_target={self.tilt_target!r})')
|
||||
# apply the attenuation due to the output connector loss
|
||||
attenuation_out_db = self.params.con_out
|
||||
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
|
||||
|
||||
|
||||
class Edfa(_Node):
|
||||
@@ -548,12 +686,7 @@ class Edfa(_Node):
|
||||
if operational is None:
|
||||
operational = {}
|
||||
self.variety_list = kwargs.pop('variety_list', None)
|
||||
super().__init__(
|
||||
*args,
|
||||
params=EdfaParams(**params),
|
||||
operational=EdfaOperational(**operational),
|
||||
**kwargs
|
||||
)
|
||||
super().__init__(*args, params=EdfaParams(**params), operational=EdfaOperational(**operational), **kwargs)
|
||||
self.interpol_dgt = None # interpolated dynamic gain tilt
|
||||
self.interpol_gain_ripple = None # gain ripple
|
||||
self.interpol_nf_ripple = None # nf_ripple
|
||||
@@ -572,6 +705,7 @@ class Edfa(_Node):
|
||||
self.delta_p = self.operational.delta_p # delta P with Pref (power swwep) in power mode
|
||||
self.tilt_target = self.operational.tilt_target
|
||||
self.out_voa = self.operational.out_voa
|
||||
self.propagated_labels = [""]
|
||||
|
||||
@property
|
||||
def to_json(self):
|
||||
@@ -579,7 +713,7 @@ class Edfa(_Node):
|
||||
'type': type(self).__name__,
|
||||
'type_variety': self.params.type_variety,
|
||||
'operational': {
|
||||
'gain_target': self.effective_gain,
|
||||
'gain_target': round(self.effective_gain, 6) if self.effective_gain else None,
|
||||
'delta_p': self.delta_p,
|
||||
'tilt_target': self.tilt_target,
|
||||
'out_voa': self.out_voa
|
||||
@@ -605,6 +739,7 @@ class Edfa(_Node):
|
||||
if self.pin_db is None or self.pout_db is None:
|
||||
return f'{type(self).__name__} {self.uid}'
|
||||
nf = mean(self.nf)
|
||||
total_pch = pretty_summary_print(per_label_average(self.pch_out_dbm, self.propagated_labels))
|
||||
return '\n'.join([f'{type(self).__name__} {self.uid}',
|
||||
f' type_variety: {self.params.type_variety}',
|
||||
f' effective gain(dB): {self.effective_gain:.2f}',
|
||||
@@ -614,49 +749,56 @@ 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' 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}',
|
||||
f' actual pch out (dBm): {total_pch}',
|
||||
f' output VOA (dB): {self.out_voa:.2f}'])
|
||||
|
||||
def interpol_params(self, frequencies, pin, baud_rates, pref):
|
||||
def interpol_params(self, spectral_info):
|
||||
"""interpolate SI channel frequencies with the edfa dgt and gain_ripple frquencies from JSON
|
||||
:param spectral_info: instance of gnpy.core.info.SpectralInformation
|
||||
:return: None
|
||||
"""
|
||||
# TODO|jla: read amplifier actual frequencies from additional params in json
|
||||
self.channel_freq = frequencies
|
||||
|
||||
self.channel_freq = spectral_info.frequency
|
||||
amplifier_freq = arrange_frequencies(len(self.params.dgt), self.params.f_min, self.params.f_max) # Hz
|
||||
self.interpol_dgt = interp(self.channel_freq, amplifier_freq, self.params.dgt)
|
||||
self.interpol_dgt = interp(spectral_info.frequency, amplifier_freq, self.params.dgt)
|
||||
|
||||
amplifier_freq = arrange_frequencies(len(self.params.gain_ripple), self.params.f_min, self.params.f_max) # Hz
|
||||
self.interpol_gain_ripple = interp(self.channel_freq, amplifier_freq, self.params.gain_ripple)
|
||||
self.interpol_gain_ripple = interp(spectral_info.frequency, amplifier_freq, self.params.gain_ripple)
|
||||
|
||||
amplifier_freq = arrange_frequencies(len(self.params.nf_ripple), self.params.f_min, self.params.f_max) # Hz
|
||||
self.interpol_nf_ripple = interp(self.channel_freq, amplifier_freq, self.params.nf_ripple)
|
||||
self.interpol_nf_ripple = interp(spectral_info.frequency, amplifier_freq, self.params.nf_ripple)
|
||||
|
||||
self.nch = frequencies.size
|
||||
self.pin_db = lin2db(sum(pin * 1e3))
|
||||
self.nch = spectral_info.number_of_channels
|
||||
pin = spectral_info.signal + spectral_info.ase + spectral_info.nli
|
||||
self.pin_db = watt2dbm(sum(pin))
|
||||
# The following should be changed when we have the new spectral information including slot widths.
|
||||
# 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 - (pref.p_spani + pref.neq_ch)
|
||||
self.params.p_max - self.pin_db
|
||||
)
|
||||
#print(self.uid, self.effective_gain, self.operational.gain_target)
|
||||
self.effective_pch_out_db = round(pref.p_spani + self.effective_gain, 2)
|
||||
|
||||
"""check power saturation and correct target_gain accordingly:"""
|
||||
#print(self.uid, self.effective_gain, self.pin_db, pref.p_spani)
|
||||
self.nf = self._calc_nf()
|
||||
self.gprofile = self._gain_profile(pin)
|
||||
|
||||
pout = (pin + self.noise_profile(baud_rates)) * db2lin(self.gprofile)
|
||||
pout = (pin + self.noise_profile(spectral_info)) * db2lin(self.gprofile)
|
||||
self.pout_db = lin2db(sum(pout * 1e3))
|
||||
# ase & nli are only calculated in signal bandwidth
|
||||
# pout_db is not the absolute full output power (negligible if sufficient channels)
|
||||
@@ -673,13 +815,17 @@ class Edfa(_Node):
|
||||
elif type_def == 'fixed_gain':
|
||||
nf_avg = nf_model.nf0
|
||||
elif type_def == 'openroadm':
|
||||
pin_ch = self.pin_db - lin2db(self.nch)
|
||||
# model OSNR = f(Pin)
|
||||
nf_avg = pin_ch - polyval(nf_model.nf_coef, pin_ch) + 58
|
||||
# OpenROADM specifies OSNR vs. input power per channel for 50 GHz slot width so we
|
||||
# scale it to 50 GHz based on actual slot width.
|
||||
pin_ch_50GHz = self.pin_db - lin2db(self.nch) + lin2db(50e9 / self.slot_width)
|
||||
# model OSNR = f(Pin per 50 GHz channel)
|
||||
nf_avg = pin_ch_50GHz - polyval(nf_model.nf_coef, pin_ch_50GHz) + 58
|
||||
elif type_def == 'openroadm_preamp':
|
||||
pin_ch = self.pin_db - lin2db(self.nch)
|
||||
# model OSNR = f(Pin)
|
||||
nf_avg = pin_ch - min((4 * pin_ch + 275) / 7, 33) + 58
|
||||
# OpenROADM specifies OSNR vs. input power per channel for 50 GHz slot width so we
|
||||
# scale it to 50 GHz based on actual slot width.
|
||||
pin_ch_50GHz = self.pin_db - lin2db(self.nch) + lin2db(50e9 / self.slot_width)
|
||||
# model OSNR = f(Pin per 50 GHz channel)
|
||||
nf_avg = pin_ch_50GHz - min((4 * pin_ch_50GHz + 275) / 7, 33) + 58
|
||||
elif type_def == 'openroadm_booster':
|
||||
# model a zero-noise amp with "infinitely negative" (in dB) NF
|
||||
nf_avg = float('-inf')
|
||||
@@ -725,13 +871,8 @@ class Edfa(_Node):
|
||||
else:
|
||||
return self.interpol_nf_ripple + nf_avg # input VOA = 1 for 1 NF degradation
|
||||
|
||||
def noise_profile(self, df):
|
||||
"""noise_profile(bw) computes amplifier ASE (W) in signal bandwidth (Hz)
|
||||
|
||||
Noise is calculated at amplifier input
|
||||
|
||||
:bw: signal bandwidth = baud rate in Hz
|
||||
:type bw: float
|
||||
def noise_profile(self, spectral_info: SpectralInformation):
|
||||
"""Computes amplifier ASE noise integrated over the signal bandwidth. This is calculated at amplifier input.
|
||||
|
||||
:return: the asepower in W in the signal bandwidth bw for 96 channels
|
||||
:return type: numpy array of float
|
||||
@@ -767,7 +908,7 @@ class Edfa(_Node):
|
||||
quoting power spectral density in the same BW for both signal and ASE,
|
||||
e.g. 12.5GHz."""
|
||||
|
||||
ase = h * df * self.channel_freq * db2lin(self.nf) # W
|
||||
ase = h * spectral_info.baud_rate * spectral_info.frequency * db2lin(self.nf) # W
|
||||
return ase # in W at amplifier input
|
||||
|
||||
def _gain_profile(self, pin, err_tolerance=1.0e-11, simple_opt=True):
|
||||
@@ -873,30 +1014,26 @@ class Edfa(_Node):
|
||||
|
||||
return g1st - voa + array(self.interpol_dgt) * dgts3
|
||||
|
||||
def propagate(self, pref, *carriers):
|
||||
def propagate(self, spectral_info):
|
||||
"""add ASE noise to the propagating carriers of :class:`.info.SpectralInformation`"""
|
||||
pin = array([c.power.signal + c.power.nli + c.power.ase for c in carriers]) # pin in W
|
||||
freq = array([c.frequency for c in carriers])
|
||||
brate = array([c.baud_rate for c in carriers])
|
||||
# interpolate the amplifier vectors with the carriers freq, calculate nf & gain profile
|
||||
self.interpol_params(freq, pin, brate, pref)
|
||||
self.interpol_params(spectral_info)
|
||||
|
||||
gains = db2lin(self.gprofile)
|
||||
carrier_ases = self.noise_profile(brate)
|
||||
att = db2lin(self.out_voa)
|
||||
ase = self.noise_profile(spectral_info)
|
||||
spectral_info.ase += ase
|
||||
|
||||
for gain, carrier_ase, carrier in zip(gains, carrier_ases, carriers):
|
||||
pwr = carrier.power
|
||||
pwr = pwr._replace(signal=pwr.signal * gain / att,
|
||||
nli=pwr.nli * gain / att,
|
||||
ase=(pwr.ase + carrier_ase) * gain / att)
|
||||
yield carrier._replace(power=pwr)
|
||||
spectral_info.apply_gain_db(self.gprofile - self.out_voa)
|
||||
spectral_info.pmd = sqrt(spectral_info.pmd ** 2 + self.params.pmd ** 2)
|
||||
spectral_info.pdl = sqrt(spectral_info.pdl ** 2 + self.params.pdl ** 2)
|
||||
self.pch_out_dbm = watt2dbm(spectral_info.signal + spectral_info.nli + spectral_info.ase)
|
||||
self.propagated_labels = spectral_info.label
|
||||
|
||||
def update_pref(self, pref):
|
||||
return pref._replace(p_span0=pref.p_span0,
|
||||
p_spani=pref.p_spani + self.effective_gain - self.out_voa)
|
||||
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):
|
||||
carriers = tuple(self.propagate(spectral_info.pref, *spectral_info.carriers))
|
||||
pref = self.update_pref(spectral_info.pref)
|
||||
return spectral_info._replace(carriers=carriers, pref=pref)
|
||||
self.propagate(spectral_info)
|
||||
self.update_pref(spectral_info)
|
||||
return spectral_info
|
||||
|
||||
@@ -35,6 +35,7 @@ def trx_mode_params(equipment, trx_type_variety='', trx_mode='', error_message=F
|
||||
mode_params = {"format": "undetermined",
|
||||
"baud_rate": None,
|
||||
"OSNR": None,
|
||||
"penalties": None,
|
||||
"bit_rate": None,
|
||||
"roll_off": None,
|
||||
"tx_osnr": None,
|
||||
@@ -59,14 +60,12 @@ def trx_mode_params(equipment, trx_type_variety='', trx_mode='', error_message=F
|
||||
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
|
||||
nch = automatic_nch(trx_params['f_min'], trx_params['f_max'], trx_params['spacing'])
|
||||
trx_params['nb_channel'] = nch
|
||||
print(f'There are {nch} channels propagating')
|
||||
|
||||
trx_params['power'] = db2lin(default_si_data.power_dbm) * 1e-3
|
||||
|
||||
|
||||
@@ -8,49 +8,378 @@ gnpy.core.info
|
||||
This module contains classes for modelling :class:`SpectralInformation`.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
from collections import namedtuple
|
||||
from gnpy.core.utils import automatic_nch, lin2db
|
||||
from collections.abc import Iterable
|
||||
from typing import Union
|
||||
from dataclasses import dataclass
|
||||
from numpy import argsort, mean, array, append, ones, ceil, any, zeros, outer, full, ndarray, asarray
|
||||
|
||||
from gnpy.core.utils import automatic_nch, db2lin, watt2dbm
|
||||
from gnpy.core.exceptions import SpectrumError
|
||||
|
||||
DEFAULT_SLOT_WIDTH_STEP = 12.5e9 # Hz
|
||||
"""Channels with unspecified slot width will have their slot width evaluated as the baud rate rounded up to the minimum
|
||||
multiple of the DEFAULT_SLOT_WIDTH_STEP (the baud rate is extended including the roll off in this evaluation)"""
|
||||
|
||||
|
||||
class Power(namedtuple('Power', 'signal nli ase')):
|
||||
"""carriers power in W"""
|
||||
|
||||
|
||||
class Channel(namedtuple('Channel', 'channel_number frequency baud_rate roll_off power chromatic_dispersion pmd')):
|
||||
class Channel(namedtuple('Channel',
|
||||
'channel_number frequency baud_rate slot_width roll_off power chromatic_dispersion pmd pdl')):
|
||||
""" Class containing the parameters of a WDM signal.
|
||||
|
||||
:param channel_number: channel number in the WDM grid
|
||||
:param frequency: central frequency of the signal (Hz)
|
||||
:param baud_rate: the symbol rate of the signal (Baud)
|
||||
:param slot_width: the slot width (Hz)
|
||||
:param roll_off: the roll off of the signal. It is a pure number between 0 and 1
|
||||
:param power (gnpy.core.info.Power): power of signal, ASE noise and NLI (W)
|
||||
:param chromatic_dispersion: chromatic dispersion (s/m)
|
||||
:param pmd: polarization mode dispersion (s)
|
||||
:param pdl: polarization dependent loss (dB)
|
||||
"""
|
||||
|
||||
|
||||
class Pref(namedtuple('Pref', 'p_span0, p_spani, neq_ch ')):
|
||||
class Pref(namedtuple('Pref', 'p_span0, p_spani, ref_carrier')):
|
||||
"""noiseless reference power in dBm:
|
||||
p_span0: inital target carrier power
|
||||
p_spani: carrier power after element i
|
||||
neq_ch: equivalent channel count in dB"""
|
||||
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(namedtuple('SpectralInformation', 'pref carriers')):
|
||||
class SpectralInformation(object):
|
||||
""" Class containing the parameters of the entire WDM comb.
|
||||
delta_pdb_per_channel: (per frequency) per channel delta power in dbm for the actual mix of channels"""
|
||||
|
||||
def __new__(cls, pref, carriers):
|
||||
return super().__new__(cls, pref, carriers)
|
||||
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, delta_pdb_per_channel: array,
|
||||
tx_osnr: array, ref_power: Pref, label: array):
|
||||
indices = argsort(frequency)
|
||||
self._frequency = frequency[indices]
|
||||
self._df = outer(ones(frequency.shape), frequency) - outer(frequency, ones(frequency.shape))
|
||||
self._number_of_channels = len(self._frequency)
|
||||
self._channel_number = [*range(1, self._number_of_channels + 1)]
|
||||
self._slot_width = slot_width[indices]
|
||||
self._baud_rate = baud_rate[indices]
|
||||
overlap = self._frequency[:-1] + self._slot_width[:-1] / 2 > self._frequency[1:] - self._slot_width[1:] / 2
|
||||
if any(overlap):
|
||||
overlap = [pair for pair in zip(overlap * self._channel_number[:-1], overlap * self._channel_number[1:])
|
||||
if pair != (0, 0)]
|
||||
raise SpectrumError(f'Spectrum required slot widths larger than the frequency spectral distances '
|
||||
f'between channels: {overlap}.')
|
||||
exceed = self._baud_rate > self._slot_width
|
||||
if any(exceed):
|
||||
raise SpectrumError(f'Spectrum baud rate, including the roll off, larger than the slot width for channels: '
|
||||
f'{[ch for ch in exceed * self._channel_number if ch]}.')
|
||||
self._signal = signal[indices]
|
||||
self._nli = nli[indices]
|
||||
self._ase = ase[indices]
|
||||
self._roll_off = roll_off[indices]
|
||||
self._chromatic_dispersion = chromatic_dispersion[indices]
|
||||
self._pmd = pmd[indices]
|
||||
self._pdl = pdl[indices]
|
||||
self._delta_pdb_per_channel = delta_pdb_per_channel[indices]
|
||||
self._tx_osnr = tx_osnr[indices]
|
||||
self._pref = ref_power
|
||||
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
|
||||
|
||||
@property
|
||||
def df(self):
|
||||
"""Matrix of relative frequency distances between all channels. Positive elements in the upper right side."""
|
||||
return self._df
|
||||
|
||||
@property
|
||||
def slot_width(self):
|
||||
return self._slot_width
|
||||
|
||||
@property
|
||||
def baud_rate(self):
|
||||
return self._baud_rate
|
||||
|
||||
@property
|
||||
def number_of_channels(self):
|
||||
return self._number_of_channels
|
||||
|
||||
@property
|
||||
def powers(self):
|
||||
powers = zip(self.signal, self.nli, self.ase)
|
||||
return [Power(*p) for p in powers]
|
||||
|
||||
@property
|
||||
def signal(self):
|
||||
return self._signal
|
||||
|
||||
@signal.setter
|
||||
def signal(self, signal):
|
||||
self._signal = signal
|
||||
|
||||
@property
|
||||
def nli(self):
|
||||
return self._nli
|
||||
|
||||
@nli.setter
|
||||
def nli(self, nli):
|
||||
self._nli = nli
|
||||
|
||||
@property
|
||||
def ase(self):
|
||||
return self._ase
|
||||
|
||||
@ase.setter
|
||||
def ase(self, ase):
|
||||
self._ase = ase
|
||||
|
||||
@property
|
||||
def roll_off(self):
|
||||
return self._roll_off
|
||||
|
||||
@property
|
||||
def chromatic_dispersion(self):
|
||||
return self._chromatic_dispersion
|
||||
|
||||
@chromatic_dispersion.setter
|
||||
def chromatic_dispersion(self, chromatic_dispersion):
|
||||
self._chromatic_dispersion = chromatic_dispersion
|
||||
|
||||
@property
|
||||
def pmd(self):
|
||||
return self._pmd
|
||||
|
||||
@property
|
||||
def label(self):
|
||||
return self._label
|
||||
|
||||
@pmd.setter
|
||||
def pmd(self, pmd):
|
||||
self._pmd = pmd
|
||||
|
||||
@property
|
||||
def pdl(self):
|
||||
return self._pdl
|
||||
|
||||
@pdl.setter
|
||||
def pdl(self, pdl):
|
||||
self._pdl = pdl
|
||||
|
||||
@property
|
||||
def delta_pdb_per_channel(self):
|
||||
return self._delta_pdb_per_channel
|
||||
|
||||
@delta_pdb_per_channel.setter
|
||||
def delta_pdb_per_channel(self, delta_pdb_per_channel):
|
||||
self._delta_pdb_per_channel = delta_pdb_per_channel
|
||||
|
||||
@property
|
||||
def tx_osnr(self):
|
||||
return self._tx_osnr
|
||||
|
||||
@tx_osnr.setter
|
||||
def tx_osnr(self, tx_osnr):
|
||||
self._tx_osnr = tx_osnr
|
||||
|
||||
@property
|
||||
def channel_number(self):
|
||||
return self._channel_number
|
||||
|
||||
@property
|
||||
def carriers(self):
|
||||
entries = zip(self.channel_number, self.frequency, self.baud_rate, self.slot_width,
|
||||
self.roll_off, self.powers, self.chromatic_dispersion, self.pmd, self.pdl)
|
||||
return [Channel(*entry) for entry in entries]
|
||||
|
||||
def apply_attenuation_lin(self, attenuation_lin):
|
||||
self.signal *= attenuation_lin
|
||||
self.nli *= attenuation_lin
|
||||
self.ase *= attenuation_lin
|
||||
|
||||
def apply_attenuation_db(self, attenuation_db):
|
||||
attenuation_lin = 1 / db2lin(attenuation_db)
|
||||
self.apply_attenuation_lin(attenuation_lin)
|
||||
|
||||
def apply_gain_lin(self, gain_lin):
|
||||
self.signal *= gain_lin
|
||||
self.nli *= gain_lin
|
||||
self.ase *= gain_lin
|
||||
|
||||
def apply_gain_db(self, gain_db):
|
||||
gain_lin = db2lin(gain_db)
|
||||
self.apply_gain_lin(gain_lin)
|
||||
|
||||
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),
|
||||
ase=append(self.ase, other.ase),
|
||||
baud_rate=append(self.baud_rate, other.baud_rate),
|
||||
roll_off=append(self.roll_off, other.roll_off),
|
||||
chromatic_dispersion=append(self.chromatic_dispersion,
|
||||
other.chromatic_dispersion),
|
||||
pmd=append(self.pmd, other.pmd),
|
||||
pdl=append(self.pdl, other.pdl),
|
||||
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),
|
||||
label=append(self.label, other.label))
|
||||
except SpectrumError:
|
||||
raise SpectrumError('Spectra cannot be summed: channels overlapping.')
|
||||
|
||||
|
||||
def create_input_spectral_information(f_min, f_max, roll_off, baud_rate, power, spacing):
|
||||
# pref in dB : convert power lin into power in dB
|
||||
pref = lin2db(power * 1e3)
|
||||
nb_channel = automatic_nch(f_min, f_max, spacing)
|
||||
si = SpectralInformation(
|
||||
pref=Pref(pref, pref, lin2db(nb_channel)),
|
||||
carriers=[
|
||||
Channel(f, (f_min + spacing * f),
|
||||
baud_rate, roll_off, Power(power, 0, 0), 0, 0) for f in range(1, nb_channel + 1)
|
||||
]
|
||||
)
|
||||
return si
|
||||
def _replace(self, carriers, pref):
|
||||
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])
|
||||
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
|
||||
|
||||
|
||||
def create_arbitrary_spectral_information(frequency: Union[ndarray, Iterable, float],
|
||||
signal: Union[float, ndarray, Iterable],
|
||||
baud_rate: Union[float, ndarray, Iterable],
|
||||
tx_osnr: Union[float, ndarray, Iterable],
|
||||
delta_pdb_per_channel: Union[float, ndarray, Iterable] = 0.,
|
||||
slot_width: Union[float, ndarray, Iterable] = None,
|
||||
roll_off: Union[float, ndarray, Iterable] = 0.,
|
||||
chromatic_dispersion: Union[float, ndarray, Iterable] = 0.,
|
||||
pmd: Union[float, ndarray, Iterable] = 0.,
|
||||
pdl: 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."""
|
||||
frequency = asarray(frequency)
|
||||
number_of_channels = frequency.size
|
||||
try:
|
||||
signal = full(number_of_channels, signal)
|
||||
baud_rate = full(number_of_channels, baud_rate)
|
||||
roll_off = full(number_of_channels, roll_off)
|
||||
slot_width = full(number_of_channels, slot_width) if slot_width is not None else \
|
||||
ceil((1 + roll_off) * baud_rate / DEFAULT_SLOT_WIDTH_STEP) * DEFAULT_SLOT_WIDTH_STEP
|
||||
chromatic_dispersion = full(number_of_channels, chromatic_dispersion)
|
||||
pmd = full(number_of_channels, pmd)
|
||||
pdl = full(number_of_channels, pdl)
|
||||
nli = zeros(number_of_channels)
|
||||
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)
|
||||
label = full(number_of_channels, label)
|
||||
return SpectralInformation(frequency=frequency, slot_width=slot_width,
|
||||
signal=signal, nli=nli, ase=ase,
|
||||
baud_rate=baud_rate, roll_off=roll_off,
|
||||
chromatic_dispersion=chromatic_dispersion,
|
||||
pmd=pmd, pdl=pdl,
|
||||
delta_pdb_per_channel=delta_pdb_per_channel,
|
||||
tx_osnr=tx_osnr,
|
||||
ref_power=ref_power, label=label)
|
||||
except ValueError as e:
|
||||
if 'could not broadcast' in str(e):
|
||||
raise SpectrumError('Dimension mismatch in input fields.')
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
def create_input_spectral_information(f_min, f_max, roll_off, baud_rate, power, spacing, tx_osnr, ref_carrier=None):
|
||||
""" 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 = zeros(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,
|
||||
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)
|
||||
|
||||
|
||||
def carriers_to_spectral_information(initial_spectrum: dict[float, Carrier], power: float,
|
||||
ref_carrier: ReferenceCarrier) -> 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.
|
||||
: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()]
|
||||
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()]
|
||||
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)
|
||||
|
||||
|
||||
@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.
|
||||
Label is used to group carriers which belong to the same partition when printing results.
|
||||
"""
|
||||
delta_pdb: float
|
||||
baud_rate: float
|
||||
slot_width: float
|
||||
roll_off: float
|
||||
tx_osnr: float
|
||||
label: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class ReferenceCarrier:
|
||||
"""Reference channel type is used to determine target power out of ROADM for the reference channel when
|
||||
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.
|
||||
|
||||
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
|
||||
output power should be -20 dBm and for a 64 GBaud channel power target would need 3 dB more: -17 dBm.
|
||||
|
||||
Slot width is required to find the target power in constant PSW (constant power per slot width equalization):
|
||||
power = PSW_target * slot_width.
|
||||
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.
|
||||
"""
|
||||
baud_rate: float
|
||||
slot_width: float
|
||||
|
||||
@@ -12,6 +12,7 @@ from operator import attrgetter
|
||||
from gnpy.core import ansi_escapes, elements
|
||||
from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError
|
||||
from gnpy.core.utils import round2float, convert_length
|
||||
from gnpy.core.info import ReferenceCarrier
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
@@ -27,6 +28,7 @@ def edfa_nf(gain_target, variety_type, equipment):
|
||||
)
|
||||
amp.pin_db = 0
|
||||
amp.nch = 88
|
||||
amp.slot_width = 50e9
|
||||
return amp._calc_nf(True)
|
||||
|
||||
|
||||
@@ -236,22 +238,20 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
|
||||
""" this node can be a transceiver or a ROADM (same function called in both cases)
|
||||
"""
|
||||
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))
|
||||
this_node_degree = {k: v for k, v in this_node.per_degree_pch_out_db.items()} if hasattr(this_node, 'per_degree_pch_out_db') else {}
|
||||
for oms in next_oms:
|
||||
# go through all the OMS departing from the ROADM
|
||||
prev_node = this_node
|
||||
node = oms
|
||||
# if isinstance(next_node, elements.Fused): #support ROADM wo egress amp for metro applications
|
||||
# node = find_last_node(next_node)
|
||||
# next_node = next(n for n in network.successors(node))
|
||||
# next_node = find_last_node(next_node)
|
||||
if node.uid not in this_node_degree:
|
||||
# if no target power is defined on this degree or no per degree target power is given use the global one
|
||||
# if target_pch_out_db is not an attribute, then the element must be a transceiver
|
||||
this_node_degree[node.uid] = getattr(this_node.params, 'target_pch_out_db', 0)
|
||||
if isinstance(this_node, elements.Transceiver):
|
||||
this_node_out_power = 0.0 # default value if this_node is a transceiver
|
||||
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)
|
||||
# use the target power on this degree
|
||||
prev_dp = this_node_degree[node.uid] - pref_ch_db
|
||||
prev_dp = this_node_out_power - pref_ch_db
|
||||
dp = prev_dp
|
||||
prev_voa = 0
|
||||
voa = 0
|
||||
@@ -269,7 +269,7 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
|
||||
node_loss = span_loss(network, prev_node)
|
||||
voa = node.out_voa if node.out_voa else 0
|
||||
if node.delta_p is None:
|
||||
dp = target_power(network, next_node, equipment)
|
||||
dp = target_power(network, next_node, equipment) + voa
|
||||
else:
|
||||
dp = node.delta_p
|
||||
if node.effective_gain is None or power_mode:
|
||||
@@ -282,7 +282,7 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
|
||||
|
||||
if isinstance(prev_node, elements.Fiber):
|
||||
max_fiber_lineic_loss_for_raman = \
|
||||
equipment['Span']['default'].max_fiber_lineic_loss_for_raman
|
||||
equipment['Span']['default'].max_fiber_lineic_loss_for_raman * 1e-3 # dB/m
|
||||
raman_allowed = prev_node.params.loss_coef < max_fiber_lineic_loss_for_raman
|
||||
else:
|
||||
raman_allowed = False
|
||||
@@ -303,9 +303,14 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
|
||||
node.params.update_params(extra_params.__dict__)
|
||||
dp += power_reduction
|
||||
gain_target += power_reduction
|
||||
elif node.params.raman and not raman_allowed:
|
||||
print(f'{ansi_escapes.red}WARNING{ansi_escapes.reset}: raman is used in node {node.uid}\n but fiber lineic loss is above threshold\n')
|
||||
else:
|
||||
if node.params.raman and not raman_allowed:
|
||||
if isinstance(prev_node, elements.Fiber):
|
||||
print(f'{ansi_escapes.red}WARNING{ansi_escapes.reset}: raman is used in node {node.uid}\n '
|
||||
'but fiber lineic loss is above threshold\n')
|
||||
else:
|
||||
print(f'{ansi_escapes.red}WARNING{ansi_escapes.reset}: raman is used in node {node.uid}\n '
|
||||
'but previous node is not a fiber\n')
|
||||
# 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 - \
|
||||
@@ -325,10 +330,28 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
|
||||
prev_voa = voa
|
||||
prev_node = node
|
||||
node = next_node
|
||||
# print(f'{node.uid}')
|
||||
|
||||
if isinstance(this_node, elements.Roadm):
|
||||
this_node.per_degree_pch_out_db = {k: v for k, v in this_node_degree.items()}
|
||||
|
||||
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
|
||||
they are not initialized by users.
|
||||
"""
|
||||
next_oms = (n for n in network.successors(roadm) if not isinstance(n, elements.Transceiver))
|
||||
|
||||
for node in next_oms:
|
||||
# go through all the OMS departing from the ROADM
|
||||
if node.uid not in roadm.per_degree_pch_out_dbm and node.uid not in roadm.per_degree_pch_psd and \
|
||||
node.uid not in roadm.per_degree_pch_psw:
|
||||
# if no target power is defined on this degree or no per degree target power is given use the global one
|
||||
if roadm.params.target_pch_out_db:
|
||||
roadm.per_degree_pch_out_dbm[node.uid] = roadm.params.target_pch_out_db
|
||||
elif roadm.params.target_psd_out_mWperGHz:
|
||||
roadm.per_degree_pch_psd[node.uid] = roadm.params.target_psd_out_mWperGHz
|
||||
elif roadm.params.target_out_mWperSlotWidth:
|
||||
roadm.per_degree_pch_psw[node.uid] = roadm.params.target_out_mWperSlotWidth
|
||||
else:
|
||||
raise ConfigurationError(roadm.uid, 'needs an equalization target')
|
||||
|
||||
|
||||
def add_roadm_booster(network, roadm):
|
||||
@@ -426,10 +449,10 @@ def calculate_new_length(fiber_length, bounds, target_length):
|
||||
return (length1, n_spans1)
|
||||
elif (bounds.start <= length2 <= bounds.stop) and not(bounds.start <= length1 <= bounds.stop):
|
||||
return (length2, n_spans2)
|
||||
elif target_length - length1 < length2 - target_length:
|
||||
return (length1, n_spans1)
|
||||
else:
|
||||
elif length2 - target_length <= target_length - length1 and length2 <= bounds.stop:
|
||||
return (length2, n_spans2)
|
||||
else:
|
||||
return (length1, n_spans1)
|
||||
|
||||
|
||||
def split_fiber(network, fiber, bounds, target_length, equipment):
|
||||
@@ -511,32 +534,37 @@ def add_fiber_padding(network, fibers, padding):
|
||||
first_fiber.params.att_in = first_fiber.params.att_in + padding - this_span_loss
|
||||
|
||||
|
||||
def build_network(network, equipment, pref_ch_db, pref_total_db):
|
||||
def build_network(network, equipment, pref_ch_db, pref_total_db, no_insert_edfas=False):
|
||||
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, 90_000)
|
||||
target_length = max(min_length, min(max_length, 90_000))
|
||||
|
||||
# set roadm loss for gain_mode before to build network
|
||||
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)
|
||||
add_fiber_padding(network, fibers, default_span_data.padding)
|
||||
# don't group split fiber and add amp in the same loop
|
||||
# =>for code clarity (at the expense of speed):
|
||||
for fiber in fibers:
|
||||
split_fiber(network, fiber, bounds, target_length, equipment)
|
||||
|
||||
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)
|
||||
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)
|
||||
|
||||
for roadm in roadms:
|
||||
set_roadm_per_degree_targets(roadm, network)
|
||||
set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db)
|
||||
|
||||
trx = [t for t in network.nodes() if isinstance(t, elements.Transceiver)]
|
||||
|
||||
@@ -9,9 +9,9 @@ This module contains all parameters to configure standard network elements.
|
||||
"""
|
||||
|
||||
from scipy.constants import c, pi
|
||||
from numpy import squeeze, log10, exp
|
||||
from numpy import asarray, array
|
||||
|
||||
from gnpy.core.utils import db2lin, convert_length
|
||||
from gnpy.core.utils import convert_length
|
||||
from gnpy.core.exceptions import ParametersError
|
||||
|
||||
|
||||
@@ -28,110 +28,111 @@ class Parameters:
|
||||
|
||||
class PumpParams(Parameters):
|
||||
def __init__(self, power, frequency, propagation_direction):
|
||||
self._power = power
|
||||
self._frequency = frequency
|
||||
self._propagation_direction = propagation_direction
|
||||
|
||||
@property
|
||||
def power(self):
|
||||
return self._power
|
||||
|
||||
@property
|
||||
def frequency(self):
|
||||
return self._frequency
|
||||
|
||||
@property
|
||||
def propagation_direction(self):
|
||||
return self._propagation_direction
|
||||
self.power = power
|
||||
self.frequency = frequency
|
||||
self.propagation_direction = propagation_direction.lower()
|
||||
|
||||
|
||||
class RamanParams(Parameters):
|
||||
def __init__(self, **kwargs):
|
||||
self._flag_raman = kwargs['flag_raman']
|
||||
self._space_resolution = kwargs['space_resolution'] if 'space_resolution' in kwargs else None
|
||||
self._tolerance = kwargs['tolerance'] if 'tolerance' in kwargs else None
|
||||
|
||||
@property
|
||||
def flag_raman(self):
|
||||
return self._flag_raman
|
||||
|
||||
@property
|
||||
def space_resolution(self):
|
||||
return self._space_resolution
|
||||
|
||||
@property
|
||||
def tolerance(self):
|
||||
return self._tolerance
|
||||
def __init__(self, flag=False, result_spatial_resolution=10e3, solver_spatial_resolution=50):
|
||||
""" Simulation parameters used within the Raman Solver
|
||||
:params flag: boolean for enabling/disable the evaluation of the Raman power profile in frequency and position
|
||||
:params result_spatial_resolution: spatial resolution of the evaluated Raman power profile
|
||||
:params solver_spatial_resolution: spatial step for the iterative solution of the first order ode
|
||||
"""
|
||||
self.flag = flag
|
||||
self.result_spatial_resolution = result_spatial_resolution # [m]
|
||||
self.solver_spatial_resolution = solver_spatial_resolution # [m]
|
||||
|
||||
|
||||
class NLIParams(Parameters):
|
||||
def __init__(self, **kwargs):
|
||||
self._nli_method_name = kwargs['nli_method_name']
|
||||
self._wdm_grid_size = kwargs['wdm_grid_size']
|
||||
self._dispersion_tolerance = kwargs['dispersion_tolerance']
|
||||
self._phase_shift_tolerance = kwargs['phase_shift_tolerance']
|
||||
self._f_cut_resolution = None
|
||||
self._f_pump_resolution = None
|
||||
self._computed_channels = kwargs['computed_channels'] if 'computed_channels' in kwargs else None
|
||||
|
||||
@property
|
||||
def nli_method_name(self):
|
||||
return self._nli_method_name
|
||||
|
||||
@property
|
||||
def wdm_grid_size(self):
|
||||
return self._wdm_grid_size
|
||||
|
||||
@property
|
||||
def dispersion_tolerance(self):
|
||||
return self._dispersion_tolerance
|
||||
|
||||
@property
|
||||
def phase_shift_tolerance(self):
|
||||
return self._phase_shift_tolerance
|
||||
|
||||
@property
|
||||
def f_cut_resolution(self):
|
||||
return self._f_cut_resolution
|
||||
|
||||
@f_cut_resolution.setter
|
||||
def f_cut_resolution(self, f_cut_resolution):
|
||||
self._f_cut_resolution = f_cut_resolution
|
||||
|
||||
@property
|
||||
def f_pump_resolution(self):
|
||||
return self._f_pump_resolution
|
||||
|
||||
@f_pump_resolution.setter
|
||||
def f_pump_resolution(self, f_pump_resolution):
|
||||
self._f_pump_resolution = f_pump_resolution
|
||||
|
||||
@property
|
||||
def computed_channels(self):
|
||||
return self._computed_channels
|
||||
def __init__(self, method='gn_model_analytic', dispersion_tolerance=1, phase_shift_tolerance=0.1,
|
||||
computed_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
|
||||
"""
|
||||
self.method = method.lower()
|
||||
self.dispersion_tolerance = dispersion_tolerance
|
||||
self.phase_shift_tolerance = phase_shift_tolerance
|
||||
self.computed_channels = computed_channels
|
||||
|
||||
|
||||
class SimParams(Parameters):
|
||||
def __init__(self, **kwargs):
|
||||
try:
|
||||
if 'nli_parameters' in kwargs:
|
||||
self._nli_params = NLIParams(**kwargs['nli_parameters'])
|
||||
else:
|
||||
self._nli_params = None
|
||||
if 'raman_parameters' in kwargs:
|
||||
self._raman_params = RamanParams(**kwargs['raman_parameters'])
|
||||
else:
|
||||
self._raman_params = None
|
||||
except KeyError as e:
|
||||
raise ParametersError(f'Simulation parameters must include {e}. Configuration: {kwargs}')
|
||||
_shared_dict = {'nli_params': NLIParams(), 'raman_params': RamanParams()}
|
||||
|
||||
def __init__(self):
|
||||
if type(self) == SimParams:
|
||||
raise NotImplementedError('Instances of SimParams cannot be generated')
|
||||
|
||||
@classmethod
|
||||
def set_params(cls, sim_params):
|
||||
cls._shared_dict['nli_params'] = NLIParams(**sim_params.get('nli_params', {}))
|
||||
cls._shared_dict['raman_params'] = RamanParams(**sim_params.get('raman_params', {}))
|
||||
|
||||
@classmethod
|
||||
def get(cls):
|
||||
self = cls.__new__(cls)
|
||||
return self
|
||||
|
||||
@property
|
||||
def nli_params(self):
|
||||
return self._nli_params
|
||||
return self._shared_dict['nli_params']
|
||||
|
||||
@property
|
||||
def raman_params(self):
|
||||
return self._raman_params
|
||||
return self._shared_dict['raman_params']
|
||||
|
||||
|
||||
class RoadmParams(Parameters):
|
||||
def __init__(self, **kwargs):
|
||||
self.target_pch_out_db = kwargs.get('target_pch_out_db')
|
||||
self.target_psd_out_mWperGHz = kwargs.get('target_psd_out_mWperGHz')
|
||||
self.target_out_mWperSlotWidth = kwargs.get('target_out_mWperSlotWidth')
|
||||
equalisation_type = ['target_pch_out_db', 'target_psd_out_mWperGHz', 'target_out_mWperSlotWidth']
|
||||
temp = [kwargs.get(k) is not None for k in equalisation_type]
|
||||
if sum(temp) > 1:
|
||||
raise ParametersError('ROADM config contains more than one equalisation type.'
|
||||
+ 'Please choose only one', kwargs)
|
||||
self.per_degree_pch_out_db = kwargs.get('per_degree_pch_out_db', {})
|
||||
self.per_degree_pch_psd = kwargs.get('per_degree_psd_out_mWperGHz', {})
|
||||
self.per_degree_pch_psw = kwargs.get('per_degree_psd_out_mWperSlotWidth', {})
|
||||
try:
|
||||
self.add_drop_osnr = kwargs['add_drop_osnr']
|
||||
self.pmd = kwargs['pmd']
|
||||
self.pdl = kwargs['pdl']
|
||||
self.restrictions = kwargs['restrictions']
|
||||
except KeyError as e:
|
||||
raise ParametersError(f'ROADM configurations must include {e}. Configuration: {kwargs}')
|
||||
|
||||
|
||||
class FusedParams(Parameters):
|
||||
def __init__(self, **kwargs):
|
||||
self.loss = kwargs['loss'] if 'loss' in kwargs else 1
|
||||
|
||||
|
||||
# SSMF Raman coefficient profile normalized with respect to the effective area (Cr * A_eff)
|
||||
CR_NORM = array([
|
||||
0., 7.802e-16, 2.4236e-15, 4.0504e-15, 5.6606e-15, 6.8973e-15, 7.802e-15, 8.4162e-15, 8.8727e-15, 9.2877e-15,
|
||||
1.01011e-14, 1.05244e-14, 1.13295e-14, 1.2367e-14, 1.3695e-14, 1.5023e-14, 1.64091e-14, 1.81936e-14, 2.04927e-14,
|
||||
2.28167e-14, 2.48917e-14, 2.66098e-14, 2.82615e-14, 2.98136e-14, 3.1042e-14, 3.17558e-14, 3.18803e-14, 3.17558e-14,
|
||||
3.15566e-14, 3.11748e-14, 2.94567e-14, 3.14985e-14, 2.8552e-14, 2.43439e-14, 1.67992e-14, 9.6114e-15, 7.02180e-15,
|
||||
5.9262e-15, 5.6938e-15, 7.055e-15, 7.4119e-15, 7.4783e-15, 6.7645e-15, 5.5361e-15, 3.6271e-15, 2.7224e-15,
|
||||
2.4568e-15, 2.1995e-15, 2.1331e-15, 2.3323e-15, 2.5564e-15, 3.0461e-15, 4.8555e-15, 5.5029e-15, 5.2788e-15,
|
||||
4.565e-15, 3.3698e-15, 2.2991e-15, 2.0086e-15, 1.5521e-15, 1.328e-15, 1.162e-15, 9.379e-16, 8.715e-16, 8.134e-16,
|
||||
8.134e-16, 9.379e-16, 1.3612e-15, 1.6185e-15, 1.9754e-15, 1.8758e-15, 1.6849e-15, 1.2284e-15, 9.047e-16, 8.134e-16,
|
||||
8.715e-16, 9.711e-16, 1.0375e-15, 1.0043e-15, 9.047e-16, 8.134e-16, 6.806e-16, 5.478e-16, 3.901e-16, 2.241e-16,
|
||||
1.577e-16, 9.96e-17, 3.32e-17, 1.66e-17, 8.3e-18])
|
||||
|
||||
# Note the non-uniform spacing of this range; this is required for properly capturing the Raman peak shape.
|
||||
FREQ_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
|
||||
|
||||
|
||||
class FiberParams(Parameters):
|
||||
@@ -139,45 +140,50 @@ class FiberParams(Parameters):
|
||||
try:
|
||||
self._length = convert_length(kwargs['length'], kwargs['length_units'])
|
||||
# fixed attenuator for padding
|
||||
self._att_in = kwargs['att_in'] if 'att_in' in kwargs else 0
|
||||
self._att_in = kwargs.get('att_in', 0)
|
||||
# if not defined in the network json connector loss in/out
|
||||
# the None value will be updated in network.py[build_network]
|
||||
# with default values from eqpt_config.json[Spans]
|
||||
self._con_in = kwargs['con_in'] if 'con_in' in kwargs else None
|
||||
self._con_out = kwargs['con_out'] if 'con_out' in kwargs else None
|
||||
self._con_in = kwargs.get('con_in')
|
||||
self._con_out = kwargs.get('con_out')
|
||||
if 'ref_wavelength' in kwargs:
|
||||
self._ref_wavelength = kwargs['ref_wavelength']
|
||||
self._ref_frequency = c / self.ref_wavelength
|
||||
self._ref_frequency = c / self._ref_wavelength
|
||||
elif 'ref_frequency' in kwargs:
|
||||
self._ref_frequency = kwargs['ref_frequency']
|
||||
self._ref_wavelength = c / self.ref_frequency
|
||||
self._ref_wavelength = c / self._ref_frequency
|
||||
else:
|
||||
self._ref_wavelength = 1550e-9
|
||||
self._ref_frequency = c / self.ref_wavelength
|
||||
self._ref_wavelength = 1550e-9 # conventional central C band wavelength [m]
|
||||
self._ref_frequency = c / self._ref_wavelength
|
||||
self._dispersion = kwargs['dispersion'] # s/m/m
|
||||
self._dispersion_slope = kwargs['dispersion_slope'] if 'dispersion_slope' in kwargs else \
|
||||
-2 * self._dispersion/self.ref_wavelength # s/m/m/m
|
||||
self._dispersion_slope = \
|
||||
kwargs.get('dispersion_slope', -2 * self._dispersion / self.ref_wavelength) # s/m/m/m
|
||||
self._beta2 = -(self.ref_wavelength ** 2) * self.dispersion / (2 * pi * c) # 1/(m * Hz^2)
|
||||
# Eq. (3.23) in Abramczyk, Halina. "Dispersion phenomena in optical fibers." Virtual European University
|
||||
# on Lasers. Available online: http://mitr.p.lodz.pl/evu/lectures/Abramczyk3.pdf
|
||||
# (accessed on 25 March 2018) (2005).
|
||||
self._beta3 = ((self.dispersion_slope - (4*pi*c/self.ref_wavelength**3) * self.beta2) /
|
||||
(2*pi*c/self.ref_wavelength**2)**2)
|
||||
self._gamma = kwargs['gamma'] # 1/W/m
|
||||
self._effective_area = kwargs.get('effective_area') # m^2
|
||||
n2 = 2.6e-20 # m^2/W
|
||||
if self._effective_area:
|
||||
self._gamma = kwargs.get('gamma', 2 * pi * n2 / (self.ref_wavelength * self._effective_area)) # 1/W/m
|
||||
elif 'gamma' in kwargs:
|
||||
self._gamma = kwargs['gamma'] # 1/W/m
|
||||
self._effective_area = 2 * pi * n2 / (self.ref_wavelength * self._gamma) # m^2
|
||||
else:
|
||||
self._gamma = 0 # 1/W/m
|
||||
self._effective_area = 83e-12 # m^2
|
||||
default_raman_efficiency = {'cr': CR_NORM / self._effective_area, 'frequency_offset': FREQ_OFFSET}
|
||||
self._raman_efficiency = kwargs.get('raman_efficiency', default_raman_efficiency)
|
||||
self._pmd_coef = kwargs['pmd_coef'] # s/sqrt(m)
|
||||
if type(kwargs['loss_coef']) == dict:
|
||||
self._loss_coef = squeeze(kwargs['loss_coef']['loss_coef_power']) * 1e-3 # lineic loss dB/m
|
||||
self._f_loss_ref = squeeze(kwargs['loss_coef']['frequency']) # Hz
|
||||
self._loss_coef = asarray(kwargs['loss_coef']['value']) * 1e-3 # lineic loss dB/m
|
||||
self._f_loss_ref = asarray(kwargs['loss_coef']['frequency']) # Hz
|
||||
else:
|
||||
self._loss_coef = kwargs['loss_coef'] * 1e-3 # lineic loss dB/m
|
||||
self._f_loss_ref = 193.5e12 # Hz
|
||||
self._lin_attenuation = db2lin(self.length * self.loss_coef)
|
||||
self._lin_loss_exp = self.loss_coef / (10 * log10(exp(1))) # linear power exponent loss Neper/m
|
||||
self._effective_length = (1 - exp(- self.lin_loss_exp * self.length)) / self.lin_loss_exp
|
||||
self._asymptotic_length = 1 / self.lin_loss_exp
|
||||
# raman parameters (not compulsory)
|
||||
self._raman_efficiency = kwargs['raman_efficiency'] if 'raman_efficiency' in kwargs else None
|
||||
self._pumps_loss_coef = kwargs['pumps_loss_coef'] if 'pumps_loss_coef' in kwargs else None
|
||||
self._loss_coef = asarray(kwargs['loss_coef']) * 1e-3 # lineic loss dB/m
|
||||
self._f_loss_ref = asarray(self._ref_frequency) # Hz
|
||||
self._lumped_losses = kwargs['lumped_losses'] if 'lumped_losses' in kwargs else []
|
||||
except KeyError as e:
|
||||
raise ParametersError(f'Fiber configurations json must include {e}. Configuration: {kwargs}')
|
||||
|
||||
@@ -210,6 +216,10 @@ class FiberParams(Parameters):
|
||||
def con_out(self):
|
||||
return self._con_out
|
||||
|
||||
@property
|
||||
def lumped_losses(self):
|
||||
return self._lumped_losses
|
||||
|
||||
@con_out.setter
|
||||
def con_out(self, con_out):
|
||||
self._con_out = con_out
|
||||
@@ -254,32 +264,60 @@ class FiberParams(Parameters):
|
||||
def f_loss_ref(self):
|
||||
return self._f_loss_ref
|
||||
|
||||
@property
|
||||
def lin_loss_exp(self):
|
||||
return self._lin_loss_exp
|
||||
|
||||
@property
|
||||
def lin_attenuation(self):
|
||||
return self._lin_attenuation
|
||||
|
||||
@property
|
||||
def effective_length(self):
|
||||
return self._effective_length
|
||||
|
||||
@property
|
||||
def asymptotic_length(self):
|
||||
return self._asymptotic_length
|
||||
|
||||
@property
|
||||
def raman_efficiency(self):
|
||||
return self._raman_efficiency
|
||||
|
||||
@property
|
||||
def pumps_loss_coef(self):
|
||||
return self._pumps_loss_coef
|
||||
|
||||
def asdict(self):
|
||||
dictionary = super().asdict()
|
||||
dictionary['loss_coef'] = self.loss_coef * 1e3
|
||||
dictionary['length_units'] = 'm'
|
||||
if not self.lumped_losses:
|
||||
dictionary.pop('lumped_losses')
|
||||
if not self.raman_efficiency:
|
||||
dictionary.pop('raman_efficiency')
|
||||
return dictionary
|
||||
|
||||
|
||||
class EdfaParams:
|
||||
def __init__(self, **params):
|
||||
self.update_params(params)
|
||||
if params == {}:
|
||||
self.type_variety = ''
|
||||
self.type_def = ''
|
||||
# self.gain_flatmax = 0
|
||||
# self.gain_min = 0
|
||||
# self.p_max = 0
|
||||
# self.nf_model = None
|
||||
# self.nf_fit_coeff = None
|
||||
# self.nf_ripple = None
|
||||
# self.dgt = None
|
||||
# self.gain_ripple = None
|
||||
# self.out_voa_auto = False
|
||||
# self.allowed_for_design = None
|
||||
|
||||
def update_params(self, kwargs):
|
||||
for k, v in kwargs.items():
|
||||
setattr(self, k, self.update_params(**v) if isinstance(v, dict) else v)
|
||||
|
||||
|
||||
class EdfaOperational:
|
||||
default_values = {
|
||||
'gain_target': None,
|
||||
'delta_p': None,
|
||||
'out_voa': None,
|
||||
'tilt_target': 0
|
||||
}
|
||||
|
||||
def __init__(self, **operational):
|
||||
self.update_attr(operational)
|
||||
|
||||
def update_attr(self, kwargs):
|
||||
clean_kwargs = {k: v for k, v in kwargs.items() if v != ''}
|
||||
for k, v in self.default_values.items():
|
||||
setattr(self, k, clean_kwargs.get(k, v))
|
||||
|
||||
def __repr__(self):
|
||||
return (f'{type(self).__name__}('
|
||||
f'gain_target={self.gain_target!r}, '
|
||||
f'tilt_target={self.tilt_target!r})')
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
from numpy import pi, cos, sqrt, log10, linspace, zeros, shape, where, logical_and, mean
|
||||
from scipy import constants
|
||||
|
||||
from gnpy.core.exceptions import ConfigurationError
|
||||
@@ -106,7 +106,99 @@ def db2lin(value):
|
||||
return 10**(value / 10)
|
||||
|
||||
|
||||
def watt2dbm(value):
|
||||
"""Convert Watt units to dBm
|
||||
|
||||
>>> round(watt2dbm(0.001), 1)
|
||||
0.0
|
||||
>>> round(watt2dbm(0.02), 1)
|
||||
13.0
|
||||
"""
|
||||
return lin2db(value * 1e3)
|
||||
|
||||
|
||||
def dbm2watt(value):
|
||||
"""Convert dBm units to Watt
|
||||
|
||||
>>> round(dbm2watt(0), 4)
|
||||
0.001
|
||||
>>> round(dbm2watt(-3), 4)
|
||||
0.0005
|
||||
>>> round(dbm2watt(13), 4)
|
||||
0.02
|
||||
"""
|
||||
return db2lin(value) * 1e-3
|
||||
|
||||
|
||||
def psd2powerdbm(psd_mwperghz, baudrate_baud):
|
||||
"""computes power in dBm based on baudrate in bauds and psd in mW/GHz
|
||||
|
||||
>>> round(psd2powerdbm(0.031176, 64e9),3)
|
||||
3.0
|
||||
>>> round(psd2powerdbm(0.062352, 32e9),3)
|
||||
3.0
|
||||
>>> round(psd2powerdbm(0.015625, 64e9),3)
|
||||
0.0
|
||||
"""
|
||||
return lin2db(baudrate_baud * psd_mwperghz * 1e-9)
|
||||
|
||||
|
||||
def power_dbm_to_psd_mw_ghz(power_dbm, baudrate_baud):
|
||||
"""computes power spectral density in mW/GHz based on baudrate in bauds and power in dBm
|
||||
|
||||
>>> power_dbm_to_psd_mw_ghz(0, 64e9)
|
||||
0.015625
|
||||
>>> round(power_dbm_to_psd_mw_ghz(3, 64e9), 6)
|
||||
0.031176
|
||||
>>> round(power_dbm_to_psd_mw_ghz(3, 32e9), 6)
|
||||
0.062352
|
||||
"""
|
||||
return db2lin(power_dbm) / (baudrate_baud * 1e-9)
|
||||
|
||||
|
||||
def psd_mw_per_ghz(power_watt, baudrate_baud):
|
||||
"""computes power spectral density in mW/GHz based on baudrate in bauds and power in W
|
||||
|
||||
>>> psd_mw_per_ghz(2e-3, 32e9)
|
||||
0.0625
|
||||
>>> psd_mw_per_ghz(1e-3, 64e9)
|
||||
0.015625
|
||||
>>> psd_mw_per_ghz(0.5e-3, 32e9)
|
||||
0.015625
|
||||
"""
|
||||
return power_watt * 1e3 / (baudrate_baud * 1e-9)
|
||||
|
||||
|
||||
def round2float(number, step):
|
||||
"""Round a floating point number so that its "resolution" is not bigger than 'step'
|
||||
|
||||
The finest step is fixed at 0.01; smaller values are silently changed to 0.01.
|
||||
|
||||
>>> round2float(123.456, 1000)
|
||||
0.0
|
||||
>>> round2float(123.456, 100)
|
||||
100.0
|
||||
>>> round2float(123.456, 10)
|
||||
120.0
|
||||
>>> round2float(123.456, 1)
|
||||
123.0
|
||||
>>> round2float(123.456, 0.1)
|
||||
123.5
|
||||
>>> round2float(123.456, 0.01)
|
||||
123.46
|
||||
>>> round2float(123.456, 0.001)
|
||||
123.46
|
||||
>>> round2float(123.249, 0.5)
|
||||
123.0
|
||||
>>> round2float(123.250, 0.5)
|
||||
123.0
|
||||
>>> round2float(123.251, 0.5)
|
||||
123.5
|
||||
>>> round2float(123.300, 0.2)
|
||||
123.2
|
||||
>>> round2float(123.301, 0.2)
|
||||
123.4
|
||||
"""
|
||||
step = round(step, 1)
|
||||
if step >= 0.01:
|
||||
number = round(number / step, 0)
|
||||
@@ -137,6 +229,32 @@ def snr_sum(snr, bw, snr_added, bw_added=12.5e9):
|
||||
return snr
|
||||
|
||||
|
||||
def per_label_average(values, labels):
|
||||
"""computes the average per defined spectrum band, using labels
|
||||
|
||||
>>> labels = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'D', 'D', 'D', 'D']
|
||||
>>> values = [28.51, 28.23, 28.15, 28.17, 28.36, 28.53, 28.64, 28.68, 28.7, 28.71, 28.72, 28.73, 28.74, 28.91, 27.96, 27.85, 27.87, 28.02]
|
||||
>>> per_label_average(values, labels)
|
||||
{'A': 28.28, 'B': 28.68, 'C': 28.91, 'D': 27.92}
|
||||
"""
|
||||
|
||||
label_set = sorted(set(labels))
|
||||
summary = {}
|
||||
for label in label_set:
|
||||
vals = [val for val, lab in zip(values, labels) if lab == label]
|
||||
summary[label] = round(mean(vals), 2)
|
||||
return summary
|
||||
|
||||
|
||||
def pretty_summary_print(summary):
|
||||
"""Build a prettty string that shows the summary dict values per label with 2 digits
|
||||
"""
|
||||
if len(summary) == 1:
|
||||
return f'{list(summary.values())[0]:.2f}'
|
||||
text = ', '.join([f'{label}: {value:.2f}' for label, value in summary.items()])
|
||||
return text
|
||||
|
||||
|
||||
def deltawl2deltaf(delta_wl, wavelength):
|
||||
""" deltawl2deltaf(delta_wl, wavelength):
|
||||
delta_wl is BW in wavelength units
|
||||
|
||||
6233
gnpy/example-data/Sweden_OpenROADMv5_example_network.json
Normal file
6233
gnpy/example-data/Sweden_OpenROADMv5_example_network.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -55,6 +55,24 @@
|
||||
"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,
|
||||
@@ -162,51 +180,27 @@
|
||||
"Fiber":[{
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 1.67e-05,
|
||||
"gamma": 0.00127,
|
||||
"effective_area": 83e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
},
|
||||
{
|
||||
"type_variety": "NZDF",
|
||||
"dispersion": 0.5e-05,
|
||||
"gamma": 0.00146,
|
||||
"effective_area": 72e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
},
|
||||
{
|
||||
"type_variety": "LOF",
|
||||
"dispersion": 2.2e-05,
|
||||
"gamma": 0.000843,
|
||||
"effective_area": 125e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
}
|
||||
],
|
||||
"RamanFiber":[{
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 1.67e-05,
|
||||
"gamma": 0.00127,
|
||||
"pmd_coef": 1.265e-15,
|
||||
"raman_efficiency": {
|
||||
"cr":[
|
||||
0, 9.4E-06, 2.92E-05, 4.88E-05, 6.82E-05, 8.31E-05, 9.4E-05, 0.0001014, 0.0001069, 0.0001119,
|
||||
0.0001217, 0.0001268, 0.0001365, 0.000149, 0.000165, 0.000181, 0.0001977, 0.0002192, 0.0002469,
|
||||
0.0002749, 0.0002999, 0.0003206, 0.0003405, 0.0003592, 0.000374, 0.0003826, 0.0003841, 0.0003826,
|
||||
0.0003802, 0.0003756, 0.0003549, 0.0003795, 0.000344, 0.0002933, 0.0002024, 0.0001158, 8.46E-05,
|
||||
7.14E-05, 6.86E-05, 8.5E-05, 8.93E-05, 9.01E-05, 8.15E-05, 6.67E-05, 4.37E-05, 3.28E-05, 2.96E-05,
|
||||
2.65E-05, 2.57E-05, 2.81E-05, 3.08E-05, 3.67E-05, 5.85E-05, 6.63E-05, 6.36E-05, 5.5E-05, 4.06E-05,
|
||||
2.77E-05, 2.42E-05, 1.87E-05, 1.6E-05, 1.4E-05, 1.13E-05, 1.05E-05, 9.8E-06, 9.8E-06, 1.13E-05,
|
||||
1.64E-05, 1.95E-05, 2.38E-05, 2.26E-05, 2.03E-05, 1.48E-05, 1.09E-05, 9.8E-06, 1.05E-05, 1.17E-05,
|
||||
1.25E-05, 1.21E-05, 1.09E-05, 9.8E-06, 8.2E-06, 6.6E-06, 4.7E-06, 2.7E-06, 1.9E-06, 1.2E-06, 4E-07,
|
||||
2E-07, 1E-07
|
||||
],
|
||||
"frequency_offset":[
|
||||
0, 0.5e12, 1e12, 1.5e12, 2e12, 2.5e12, 3e12, 3.5e12, 4e12, 4.5e12, 5e12, 5.5e12, 6e12, 6.5e12, 7e12,
|
||||
7.5e12, 8e12, 8.5e12, 9e12, 9.5e12, 10e12, 10.5e12, 11e12, 11.5e12, 12e12, 12.5e12, 12.75e12,
|
||||
13e12, 13.25e12, 13.5e12, 14e12, 14.5e12, 14.75e12, 15e12, 15.5e12, 16e12, 16.5e12, 17e12,
|
||||
17.5e12, 18e12, 18.25e12, 18.5e12, 18.75e12, 19e12, 19.5e12, 20e12, 20.5e12, 21e12, 21.5e12,
|
||||
22e12, 22.5e12, 23e12, 23.5e12, 24e12, 24.5e12, 25e12, 25.5e12, 26e12, 26.5e12, 27e12, 27.5e12, 28e12,
|
||||
28.5e12, 29e12, 29.5e12, 30e12, 30.5e12, 31e12, 31.5e12, 32e12, 32.5e12, 33e12, 33.5e12, 34e12, 34.5e12,
|
||||
35e12, 35.5e12, 36e12, 36.5e12, 37e12, 37.5e12, 38e12, 38.5e12, 39e12, 39.5e12, 40e12, 40.5e12, 41e12,
|
||||
41.5e12, 42e12
|
||||
]
|
||||
}
|
||||
"effective_area": 83e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
}
|
||||
],
|
||||
"Span":[{
|
||||
@@ -227,6 +221,7 @@
|
||||
"target_pch_out_db": -20,
|
||||
"add_drop_osnr": 38,
|
||||
"pmd": 0,
|
||||
"pdl": 0,
|
||||
"restrictions": {
|
||||
"preamp_variety_list":[],
|
||||
"booster_variety_list":[]
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
{ "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],
|
||||
"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],
|
||||
"allowed_for_design": true
|
||||
},
|
||||
{
|
||||
"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_booster",
|
||||
"type_def": "openroadm_booster",
|
||||
"gain_flatmax": 32,
|
||||
"gain_min": 0,
|
||||
"p_max": 22,
|
||||
"allowed_for_design": false
|
||||
}
|
||||
],
|
||||
"Fiber":[
|
||||
{
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 1.67e-05,
|
||||
"gamma": 0.00127,
|
||||
"pmd_coef": 1.265e-15
|
||||
},
|
||||
{
|
||||
"type_variety": "NZDF",
|
||||
"dispersion": 0.5e-05,
|
||||
"gamma": 0.00146,
|
||||
"pmd_coef": 1.265e-15
|
||||
},
|
||||
{
|
||||
"type_variety": "LOF",
|
||||
"dispersion": 2.2e-05,
|
||||
"gamma": 0.000843,
|
||||
"pmd_coef": 1.265e-15
|
||||
}
|
||||
],
|
||||
"RamanFiber":[
|
||||
{
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 1.67e-05,
|
||||
"gamma": 0.00127,
|
||||
"pmd_coef": 1.265e-15,
|
||||
"raman_efficiency": {
|
||||
"cr":[
|
||||
0, 9.4E-06, 2.92E-05, 4.88E-05, 6.82E-05, 8.31E-05, 9.4E-05, 0.0001014, 0.0001069, 0.0001119,
|
||||
0.0001217, 0.0001268, 0.0001365, 0.000149, 0.000165, 0.000181, 0.0001977, 0.0002192, 0.0002469,
|
||||
0.0002749, 0.0002999, 0.0003206, 0.0003405, 0.0003592, 0.000374, 0.0003826, 0.0003841, 0.0003826,
|
||||
0.0003802, 0.0003756, 0.0003549, 0.0003795, 0.000344, 0.0002933, 0.0002024, 0.0001158, 8.46E-05,
|
||||
7.14E-05, 6.86E-05, 8.5E-05, 8.93E-05, 9.01E-05, 8.15E-05, 6.67E-05, 4.37E-05, 3.28E-05, 2.96E-05,
|
||||
2.65E-05, 2.57E-05, 2.81E-05, 3.08E-05, 3.67E-05, 5.85E-05, 6.63E-05, 6.36E-05, 5.5E-05, 4.06E-05,
|
||||
2.77E-05, 2.42E-05, 1.87E-05, 1.6E-05, 1.4E-05, 1.13E-05, 1.05E-05, 9.8E-06, 9.8E-06, 1.13E-05,
|
||||
1.64E-05, 1.95E-05, 2.38E-05, 2.26E-05, 2.03E-05, 1.48E-05, 1.09E-05, 9.8E-06, 1.05E-05, 1.17E-05,
|
||||
1.25E-05, 1.21E-05, 1.09E-05, 9.8E-06, 8.2E-06, 6.6E-06, 4.7E-06, 2.7E-06, 1.9E-06, 1.2E-06, 4E-07,
|
||||
2E-07, 1E-07
|
||||
],
|
||||
"frequency_offset":[
|
||||
0, 0.5e12, 1e12, 1.5e12, 2e12, 2.5e12, 3e12, 3.5e12, 4e12, 4.5e12, 5e12, 5.5e12, 6e12, 6.5e12, 7e12,
|
||||
7.5e12, 8e12, 8.5e12, 9e12, 9.5e12, 10e12, 10.5e12, 11e12, 11.5e12, 12e12, 12.5e12, 12.75e12,
|
||||
13e12, 13.25e12, 13.5e12, 14e12, 14.5e12, 14.75e12, 15e12, 15.5e12, 16e12, 16.5e12, 17e12,
|
||||
17.5e12, 18e12, 18.25e12, 18.5e12, 18.75e12, 19e12, 19.5e12, 20e12, 20.5e12, 21e12, 21.5e12,
|
||||
22e12, 22.5e12, 23e12, 23.5e12, 24e12, 24.5e12, 25e12, 25.5e12, 26e12, 26.5e12, 27e12, 27.5e12, 28e12,
|
||||
28.5e12, 29e12, 29.5e12, 30e12, 30.5e12, 31e12, 31.5e12, 32e12, 32.5e12, 33e12, 33.5e12, 34e12, 34.5e12,
|
||||
35e12, 35.5e12, 36e12, 36.5e12, 37e12, 37.5e12, 38e12, 38.5e12, 39e12, 39.5e12, 40e12, 40.5e12, 41e12,
|
||||
41.5e12, 42e12
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"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": 0,
|
||||
"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":[
|
||||
{
|
||||
"format": "100 Gbit/s, 27.95 Gbaud, DP-QPSK",
|
||||
"baud_rate": 27.95e9,
|
||||
"OSNR": 17,
|
||||
"bit_rate": 100e9,
|
||||
"roll_off": null,
|
||||
"tx_osnr": 33,
|
||||
"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,
|
||||
"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,
|
||||
"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,
|
||||
"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,
|
||||
"min_spacing": 87.5e9,
|
||||
"cost":1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
349
gnpy/example-data/eqpt_config_openroadm_ver4.json
Normal file
349
gnpy/example-data/eqpt_config_openroadm_ver4.json
Normal file
@@ -0,0 +1,349 @@
|
||||
{
|
||||
"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": [
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
409
gnpy/example-data/eqpt_config_openroadm_ver5.json
Normal file
409
gnpy/example-data/eqpt_config_openroadm_ver5.json
Normal file
@@ -0,0 +1,409 @@
|
||||
{
|
||||
"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": [
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
12
gnpy/example-data/initial_spectrum1.json
Normal file
12
gnpy/example-data/initial_spectrum1.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"spectrum":[
|
||||
{
|
||||
"f_min": 191.35e12,
|
||||
"f_max": 195.1e12,
|
||||
"baud_rate": 32e9,
|
||||
"slot_width": 50e9,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
}
|
||||
]
|
||||
}
|
||||
23
gnpy/example-data/initial_spectrum2.json
Normal file
23
gnpy/example-data/initial_spectrum2.json
Normal file
@@ -0,0 +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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,8 +14,8 @@
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -39,8 +39,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -104,8 +104,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -129,8 +129,8 @@
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
@@ -154,8 +154,8 @@
|
||||
"trx_mode": "mode 2",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
@@ -179,8 +179,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -204,8 +204,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -229,8 +229,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"temperature": 283,
|
||||
"raman_pumps": [
|
||||
{
|
||||
"power": 200e-3,
|
||||
"power": 224.403e-3,
|
||||
"frequency": 205e12,
|
||||
"propagation_direction": "counterprop"
|
||||
},
|
||||
{
|
||||
"power": 206e-3,
|
||||
"power": 231.135e-3,
|
||||
"frequency": 201e12,
|
||||
"propagation_direction": "counterprop"
|
||||
}
|
||||
@@ -49,6 +49,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Fused1",
|
||||
"type": "Fused",
|
||||
"params": {
|
||||
"loss": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"latitude": 1.5,
|
||||
"longitude": 0,
|
||||
"city": null,
|
||||
"region": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa1",
|
||||
"type": "Edfa",
|
||||
@@ -88,6 +103,10 @@
|
||||
},
|
||||
{
|
||||
"from_node": "Span1",
|
||||
"to_node": "Fused1"
|
||||
},
|
||||
{
|
||||
"from_node": "Fused1",
|
||||
"to_node": "Edfa1"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
{
|
||||
"raman_parameters": {
|
||||
"flag_raman": true,
|
||||
"space_resolution": 10e3,
|
||||
"tolerance": 1e-8
|
||||
"raman_params": {
|
||||
"flag": true,
|
||||
"result_spatial_resolution": 10e3,
|
||||
"solver_spatial_resolution": 50
|
||||
},
|
||||
"nli_parameters": {
|
||||
"nli_method_name": "ggn_spectrally_separated",
|
||||
"wdm_grid_size": 50e9,
|
||||
"dispersion_tolerance": 1,
|
||||
"phase_shift_tolerance": 0.1,
|
||||
"computed_channels": [1, 18, 37, 56, 75]
|
||||
"nli_params": {
|
||||
"method": "ggn_spectrally_separated",
|
||||
"dispersion_tolerance": 1,
|
||||
"phase_shift_tolerance": 0.1,
|
||||
"computed_channels": [1, 18, 37, 56, 75]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,9 @@ from gnpy.tools.json_io import load_equipment
|
||||
from gnpy.topology.request import jsontocsv
|
||||
|
||||
|
||||
parser = ArgumentParser(description='A function that writes json path results in an excel sheet.')
|
||||
parser.add_argument('filename', nargs='?', type=Path)
|
||||
parser.add_argument('output_filename', nargs='?', type=Path)
|
||||
parser = ArgumentParser(description='Converting JSON path results into a CSV')
|
||||
parser.add_argument('filename', type=Path)
|
||||
parser.add_argument('output_filename', type=Path)
|
||||
parser.add_argument('eqpt_filename', nargs='?', type=Path, default=Path(__file__).parent / 'eqpt_config.json')
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -10,26 +10,25 @@ Common code for CLI examples
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os.path
|
||||
import sys
|
||||
from math import ceil
|
||||
from numpy import linspace, mean
|
||||
from pathlib import Path
|
||||
|
||||
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.parameters import SimParams
|
||||
from gnpy.core.science_utils import Simulation
|
||||
from gnpy.core.utils import db2lin, lin2db, automatic_nch
|
||||
from gnpy.topology.request import (ResultElement, jsontocsv, compute_path_dsjctn, requests_aggregation,
|
||||
BLOCKING_NOPATH, correct_json_route_list,
|
||||
deduplicate_disjunctions, compute_path_with_disjunction,
|
||||
PathRequest, compute_constrained_path, propagate)
|
||||
from gnpy.topology.spectrum_assignment import build_oms_list, pth_assign_spectrum
|
||||
from gnpy.tools.json_io import load_equipment, load_network, load_json, load_requests, save_network, \
|
||||
requests_from_json, disjunctions_from_json, save_json
|
||||
from gnpy.tools.json_io import (load_equipment, load_network, load_json, load_requests, save_network,
|
||||
requests_from_json, disjunctions_from_json, save_json, load_initial_spectrum)
|
||||
from gnpy.tools.plots import plot_baseline, plot_results
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -57,14 +56,15 @@ def load_common_data(equipment_filename, topology_filename, simulation_filename,
|
||||
if save_raw_network_filename is not None:
|
||||
save_network(network, save_raw_network_filename)
|
||||
print(f'{ansi_escapes.blue}Raw network (no optimizations) saved to {save_raw_network_filename}{ansi_escapes.reset}')
|
||||
sim_params = SimParams(**load_json(simulation_filename)) if simulation_filename is not None else None
|
||||
if not sim_params:
|
||||
if not simulation_filename:
|
||||
sim_params = {}
|
||||
if next((node for node in network if isinstance(node, RamanFiber)), None) is not None:
|
||||
print(f'{ansi_escapes.red}Invocation error:{ansi_escapes.reset} '
|
||||
f'RamanFiber requires passing simulation params via --sim-params')
|
||||
sys.exit(1)
|
||||
else:
|
||||
Simulation.set_params(sim_params)
|
||||
sim_params = load_json(simulation_filename)
|
||||
SimParams.set_params(sim_params)
|
||||
except exceptions.EquipmentConfigError as e:
|
||||
print(f'{ansi_escapes.red}Configuration error in the equipment library:{ansi_escapes.reset} {e}')
|
||||
sys.exit(1)
|
||||
@@ -103,6 +103,9 @@ def _add_common_options(parser: argparse.ArgumentParser, network_default: Path):
|
||||
help='Save the final network as a JSON file')
|
||||
parser.add_argument('--save-network-before-autodesign', type=Path, metavar=_help_fname_json,
|
||||
help='Dump the network into a JSON file prior to autodesign')
|
||||
parser.add_argument('--no-insert-edfas', action='store_true',
|
||||
help='Disable insertion of EDFAs after ROADMs and fibers '
|
||||
'as well as splitting of fibers by auto-design.')
|
||||
|
||||
|
||||
def transmission_main_example(args=None):
|
||||
@@ -116,6 +119,7 @@ def transmission_main_example(args=None):
|
||||
parser.add_argument('-pl', '--plot', action='store_true')
|
||||
parser.add_argument('-l', '--list-nodes', action='store_true', help='list all transceiver nodes')
|
||||
parser.add_argument('-po', '--power', default=0, help='channel ref power in dBm')
|
||||
parser.add_argument('--spectrum', type=Path, help='user defined mixed rate spectrum JSON file')
|
||||
parser.add_argument('source', nargs='?', help='source node')
|
||||
parser.add_argument('destination', nargs='?', help='destination node')
|
||||
|
||||
@@ -187,20 +191,30 @@ def transmission_main_example(args=None):
|
||||
params['loose_list'] = ['strict']
|
||||
params['format'] = ''
|
||||
params['path_bandwidth'] = 0
|
||||
params['effective_freq_slot'] = None
|
||||
trx_params = trx_mode_params(equipment)
|
||||
if args.power:
|
||||
trx_params['power'] = db2lin(float(args.power)) * 1e-3
|
||||
params.update(trx_params)
|
||||
initial_spectrum = None
|
||||
nb_channels = automatic_nch(trx_params['f_min'], trx_params['f_max'], trx_params['spacing'])
|
||||
if args.spectrum:
|
||||
initial_spectrum = load_initial_spectrum(args.spectrum)
|
||||
nb_channels = len(initial_spectrum)
|
||||
print('User input for spectrum used for propagation instead of SI')
|
||||
params['nb_channel'] = nb_channels
|
||||
req = PathRequest(**params)
|
||||
|
||||
req.initial_spectrum = initial_spectrum
|
||||
print(f'There are {nb_channels} 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']))
|
||||
|
||||
# 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)
|
||||
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)
|
||||
@@ -214,19 +228,22 @@ def transmission_main_example(args=None):
|
||||
f'and {destination.uid}')
|
||||
print(f'\nNow propagating between {source.uid} and {destination.uid}:')
|
||||
|
||||
try:
|
||||
p_start, p_stop, p_step = equipment['SI']['default'].power_range_db
|
||||
p_num = abs(int(round((p_stop - p_start) / p_step))) + 1 if p_step != 0 else 1
|
||||
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]')
|
||||
power_range = [0]
|
||||
|
||||
if not power_mode:
|
||||
power_range = [0]
|
||||
if power_mode:
|
||||
# power cannot be changed in gain mode
|
||||
power_range = [0]
|
||||
try:
|
||||
p_start, p_stop, p_step = equipment['SI']['default'].power_range_db
|
||||
p_num = abs(int(round((p_stop - p_start) / p_step))) + 1 if p_step != 0 else 1
|
||||
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]')
|
||||
for dp_db in power_range:
|
||||
req.power = db2lin(pref_ch_db + dp_db) * 1e-3
|
||||
# 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}:')
|
||||
else:
|
||||
@@ -262,9 +279,9 @@ def transmission_main_example(args=None):
|
||||
ch_freq = final_carrier.frequency * 1e-12
|
||||
ch_power = lin2db(final_carrier.power.signal * 1e3)
|
||||
print(
|
||||
'{:5}{:26.2f}{:26.2f}{:28.2f}{:28.2f}{:28.2f}' .format(
|
||||
'{:5}{:26.5f}{:26.2f}{:28.2f}{:28.2f}{:28.2f}' .format(
|
||||
final_carrier.channel_number, round(
|
||||
ch_freq, 2), round(
|
||||
ch_freq, 5), round(
|
||||
ch_power, 2), round(
|
||||
ch_osnr, 2), round(
|
||||
ch_snr_nl, 2), round(
|
||||
@@ -307,7 +324,6 @@ def path_requests_run(args=None):
|
||||
_setup_logging(args)
|
||||
|
||||
_logger.info(f'Computing path requests {args.service_filename} into JSON format')
|
||||
print(f'{ansi_escapes.blue}Computing path requests {os.path.relpath(args.service_filename)} into JSON format{ansi_escapes.reset}')
|
||||
|
||||
(equipment, network) = load_common_data(args.equipment, args.topology, args.sim_params, args.save_network_before_autodesign)
|
||||
|
||||
@@ -319,7 +335,7 @@ def path_requests_run(args=None):
|
||||
p_total_db = p_db + lin2db(automatic_nch(equipment['SI']['default'].f_min,
|
||||
equipment['SI']['default'].f_max, equipment['SI']['default'].spacing))
|
||||
try:
|
||||
build_network(network, equipment, p_db, p_total_db)
|
||||
build_network(network, equipment, p_db, p_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)
|
||||
|
||||
@@ -13,12 +13,15 @@ from logging import getLogger
|
||||
from pathlib import Path
|
||||
import json
|
||||
from collections import namedtuple
|
||||
from numpy import arange
|
||||
|
||||
from gnpy.core import ansi_escapes, elements
|
||||
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.topology.request import PathRequest, Disjunction
|
||||
from gnpy.topology.request import PathRequest, Disjunction, compute_spectrum_slot_vs_bandwidth
|
||||
from gnpy.tools.convert import xls_to_json_data
|
||||
from gnpy.tools.service_sheet import read_service_sheet
|
||||
|
||||
@@ -33,6 +36,14 @@ Model_hybrid = namedtuple('Model_hybrid', 'nf_ram gain_ram edfa_variety')
|
||||
Model_dual_stage = namedtuple('Model_dual_stage', 'preamp_variety booster_variety')
|
||||
|
||||
|
||||
class Model_openroadm_preamp:
|
||||
pass
|
||||
|
||||
|
||||
class Model_openroadm_booster:
|
||||
pass
|
||||
|
||||
|
||||
class _JsonThing:
|
||||
def update_attr(self, default_values, kwargs, name):
|
||||
clean_kwargs = {k: v for k, v in kwargs.items() if v != ''}
|
||||
@@ -83,9 +94,9 @@ class Span(_JsonThing):
|
||||
|
||||
class Roadm(_JsonThing):
|
||||
default_values = {
|
||||
'target_pch_out_db': -17,
|
||||
'add_drop_osnr': 100,
|
||||
'pmd': 0,
|
||||
'pdl': 0,
|
||||
'restrictions': {
|
||||
'preamp_variety_list': [],
|
||||
'booster_variety_list': []
|
||||
@@ -93,6 +104,20 @@ class Roadm(_JsonThing):
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
# If equalization is not defined in equipment, then raise an error.
|
||||
# Only one type of equalization must be defined.
|
||||
allowed_equalisations = ['target_pch_out_db', 'target_psd_out_mWperGHz', 'target_out_mWperSlotWidth']
|
||||
requested_eq_mask = [eq in kwargs for eq in allowed_equalisations]
|
||||
if sum(requested_eq_mask) > 1:
|
||||
raise EquipmentConfigError('Only one equalization type should be set in ROADM, found: '
|
||||
+ ', '.join(eq for eq in allowed_equalisations if eq in kwargs))
|
||||
if not any(requested_eq_mask):
|
||||
raise EquipmentConfigError('No equalization type set in ROADM')
|
||||
|
||||
for key in allowed_equalisations:
|
||||
if key in kwargs:
|
||||
setattr(self, key, kwargs[key])
|
||||
break
|
||||
self.update_attr(self.default_values, kwargs, 'Roadm')
|
||||
|
||||
|
||||
@@ -105,36 +130,45 @@ class Transceiver(_JsonThing):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.update_attr(self.default_values, kwargs, 'Transceiver')
|
||||
for mode_params in self.mode:
|
||||
penalties = mode_params.get('penalties')
|
||||
mode_params['penalties'] = {}
|
||||
if not penalties:
|
||||
continue
|
||||
for impairment in ('chromatic_dispersion', 'pmd', 'pdl'):
|
||||
imp_penalties = [p for p in penalties if impairment in p]
|
||||
if not imp_penalties:
|
||||
continue
|
||||
if all(p[impairment] > 0 for p in imp_penalties):
|
||||
# make sure the list of penalty values include a proper lower boundary
|
||||
# (we assume 0 penalty for 0 impairment)
|
||||
imp_penalties.insert(0, {impairment: 0, 'penalty_value': 0})
|
||||
# make sure the list of penalty values are sorted by impairment value
|
||||
imp_penalties.sort(key=lambda i: i[impairment])
|
||||
# rearrange as dict of lists instead of list of dicts
|
||||
mode_params['penalties'][impairment] = {
|
||||
'up_to_boundary': [p[impairment] for p in imp_penalties],
|
||||
'penalty_value': [p['penalty_value'] for p in imp_penalties]
|
||||
}
|
||||
|
||||
|
||||
class Fiber(_JsonThing):
|
||||
default_values = {
|
||||
'type_variety': '',
|
||||
'dispersion': None,
|
||||
'gamma': 0,
|
||||
'effective_area': None,
|
||||
'pmd_coef': 0
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.update_attr(self.default_values, kwargs, 'Fiber')
|
||||
self.update_attr(self.default_values, kwargs, self.__class__.__name__)
|
||||
for optional in ['gamma', 'raman_efficiency']:
|
||||
if optional in kwargs:
|
||||
setattr(self, optional, kwargs[optional])
|
||||
|
||||
|
||||
class RamanFiber(_JsonThing):
|
||||
default_values = {
|
||||
'type_variety': '',
|
||||
'dispersion': None,
|
||||
'gamma': 0,
|
||||
'pmd_coef': 0,
|
||||
'raman_efficiency': None
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.update_attr(self.default_values, kwargs, 'RamanFiber')
|
||||
for param in ('cr', 'frequency_offset'):
|
||||
if param not in self.raman_efficiency:
|
||||
raise EquipmentConfigError(f'RamanFiber.raman_efficiency: missing "{param}" parameter')
|
||||
if self.raman_efficiency['frequency_offset'] != sorted(self.raman_efficiency['frequency_offset']):
|
||||
raise EquipmentConfigError(f'RamanFiber.raman_efficiency.frequency_offset is not sorted')
|
||||
class RamanFiber(Fiber):
|
||||
pass
|
||||
|
||||
|
||||
class Amp(_JsonThing):
|
||||
@@ -154,7 +188,9 @@ class Amp(_JsonThing):
|
||||
'gain_ripple': None,
|
||||
'out_voa_auto': False,
|
||||
'allowed_for_design': False,
|
||||
'raman': False
|
||||
'raman': False,
|
||||
'pmd': 0,
|
||||
'pdl': 0
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
@@ -201,8 +237,10 @@ class Amp(_JsonThing):
|
||||
except KeyError: # nf_coef is expected for openroadm amp
|
||||
raise EquipmentConfigError(f'missing nf_coef input for amplifier: {type_variety} in equipment config')
|
||||
nf_def = Model_openroadm_ila(nf_coef)
|
||||
elif type_def in ('openroadm_preamp', 'openroadm_booster'):
|
||||
pass # no extra parameters needed
|
||||
elif type_def == 'openroadm_preamp':
|
||||
nf_def = Model_openroadm_preamp()
|
||||
elif type_def == 'openroadm_booster':
|
||||
nf_def = Model_openroadm_booster()
|
||||
elif type_def == 'dual_stage':
|
||||
try: # nf_ram and gain_ram are expected for a hybrid amp
|
||||
preamp_variety = kwargs.pop('preamp_variety')
|
||||
@@ -227,11 +265,89 @@ def _automatic_spacing(baud_rate):
|
||||
return min((s[1] for s in spacing_list if s[0] > baud_rate), default=baud_rate * 1.2)
|
||||
|
||||
|
||||
def _spectrum_from_json(json_data):
|
||||
"""JSON_data is a list of spectrum partitions each with
|
||||
{f_min, f_max, baud_rate, roll_off, delta_pdb, slot_width, tx_osnr, label}
|
||||
Creates the per freq Carrier's dict.
|
||||
f_min, f_max, baud_rate, slot_width and roll_off are mandatory
|
||||
label, tx_osnr and delta_pdb are created if not present
|
||||
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},\
|
||||
{'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}]}
|
||||
>>> spectrum = _spectrum_from_json(json_data['spectrum'])
|
||||
>>> 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')
|
||||
"""
|
||||
spectrum = {}
|
||||
json_data = sorted(json_data, key=lambda x: x['f_min'])
|
||||
# min freq of occupation is f_min - slot_width/2 (numbering starts at 0)
|
||||
previous_part_max_freq = 0.0
|
||||
for index, part in enumerate(json_data):
|
||||
# default delta_pdb is 0 dB
|
||||
if 'delta_pdb' not in part:
|
||||
part['delta_pdb'] = 0
|
||||
# add a label to the partition for the printings
|
||||
if 'label' not in part:
|
||||
part['label'] = f'{index}-{part["baud_rate"] * 1e-9 :.2f}G'
|
||||
# default tx_osnr is set to 40 dB
|
||||
if 'tx_osnr' not in part:
|
||||
part['tx_osnr'] = 40
|
||||
# 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
|
||||
if previous_part_max_freq > (part['f_min'] - part['slot_width'] / 2):
|
||||
# check that previous part last channel does not overlap on next part first channel
|
||||
# max center of the part should be below part['f_max'] and aligned on the slot_width
|
||||
msg = 'Not a valid initial spectrum definition:\nprevious spectrum last carrier max occupation ' +\
|
||||
f'{previous_part_max_freq * 1e-12 :.5f}GHz ' +\
|
||||
'overlaps on next spectrum first carrier occupation ' +\
|
||||
f'{(part["f_min"] - part["slot_width"] / 2) * 1e-12 :.5f}GHz'
|
||||
raise ValueError(msg)
|
||||
|
||||
max_range = ((part['f_max'] - part['f_min']) // part['slot_width'] + 1) * part['slot_width']
|
||||
for current_freq in arange(part['f_min'],
|
||||
part['f_min'] + max_range,
|
||||
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'])
|
||||
previous_part_max_freq = current_freq + part['slot_width'] / 2
|
||||
return spectrum
|
||||
|
||||
|
||||
def load_equipment(filename):
|
||||
json_data = load_json(filename)
|
||||
return _equipment_from_json(json_data, filename)
|
||||
|
||||
|
||||
def load_initial_spectrum(filename):
|
||||
json_data = load_json(filename)
|
||||
return _spectrum_from_json(json_data['spectrum'])
|
||||
|
||||
|
||||
def _update_dual_stage(equipment):
|
||||
edfa_dict = equipment['Edfa']
|
||||
for edfa in edfa_dict.values():
|
||||
@@ -267,7 +383,7 @@ def _check_fiber_vs_raman_fiber(equipment):
|
||||
if 'RamanFiber' not in equipment:
|
||||
return
|
||||
for fiber_type in set(equipment['Fiber'].keys()) & set(equipment['RamanFiber'].keys()):
|
||||
for attr in ('dispersion', 'dispersion-slope', 'gamma', 'pmd-coefficient'):
|
||||
for attr in ('dispersion', 'dispersion-slope', 'effective_area', 'gamma', 'pmd-coefficient'):
|
||||
fiber = equipment['Fiber'][fiber_type]
|
||||
raman = equipment['RamanFiber'][fiber_type]
|
||||
a = getattr(fiber, attr, None)
|
||||
@@ -362,9 +478,16 @@ def network_from_json(json_data, equipment):
|
||||
# well, there's no variety for the 'Fused' node type
|
||||
pass
|
||||
elif variety in equipment[typ]:
|
||||
extra_params = equipment[typ][variety]
|
||||
extra_params = equipment[typ][variety].__dict__
|
||||
temp = el_config.setdefault('params', {})
|
||||
temp = merge_amplifier_restrictions(temp, extra_params.__dict__)
|
||||
if typ == 'Roadm':
|
||||
# if equalization is defined, remove default equalization from the extra_params
|
||||
# If equalisation is not defined in the element config, then use the default one from equipment
|
||||
# if more than one equalization was defined in element config, then raise an error
|
||||
extra_params = merge_equalization(temp, extra_params)
|
||||
if not extra_params:
|
||||
raise ConfigurationError(f'ROADM {el_config["uid"]}: invalid equalization settings')
|
||||
temp = merge_amplifier_restrictions(temp, extra_params)
|
||||
el_config['params'] = temp
|
||||
el_config['type_variety'] = variety
|
||||
elif (typ in ['Fiber', 'RamanFiber']) or (typ == 'Edfa' and variety not in ['default', '']):
|
||||
@@ -435,16 +558,16 @@ def requests_from_json(json_data, equipment):
|
||||
for req in json_data['path-request']:
|
||||
# init all params from request
|
||||
params = {}
|
||||
params['request_id'] = req['request-id']
|
||||
params['request_id'] = f'{req["request-id"]}'
|
||||
params['source'] = req['source']
|
||||
params['bidir'] = req['bidirectional']
|
||||
params['destination'] = req['destination']
|
||||
params['trx_type'] = req['path-constraints']['te-bandwidth']['trx_type']
|
||||
params['trx_mode'] = req['path-constraints']['te-bandwidth']['trx_mode']
|
||||
params['trx_mode'] = req['path-constraints']['te-bandwidth'].get('trx_mode', None)
|
||||
params['format'] = params['trx_mode']
|
||||
params['spacing'] = req['path-constraints']['te-bandwidth']['spacing']
|
||||
try:
|
||||
nd_list = req['explicit-route-objects']['route-object-include-exclude']
|
||||
nd_list = sorted(req['explicit-route-objects']['route-object-include-exclude'], key=lambda x: x['index'])
|
||||
except KeyError:
|
||||
nd_list = []
|
||||
params['nodes_list'] = [n['num-unnum-hop']['node-id'] for n in nd_list]
|
||||
@@ -475,12 +598,12 @@ def requests_from_json(json_data, equipment):
|
||||
params['nb_channel'] = automatic_nch(f_min, f_max_from_si, params['spacing'])
|
||||
except KeyError:
|
||||
params['nb_channel'] = automatic_nch(f_min, f_max_from_si, params['spacing'])
|
||||
_check_one_request(params, f_max_from_si)
|
||||
|
||||
params['effective_freq_slot'] = req['path-constraints']['te-bandwidth'].get('effective-freq-slot', [None])[0]
|
||||
try:
|
||||
params['path_bandwidth'] = req['path-constraints']['te-bandwidth']['path_bandwidth']
|
||||
except KeyError:
|
||||
pass
|
||||
_check_one_request(params, f_max_from_si)
|
||||
requests_list.append(PathRequest(**params))
|
||||
return requests_list
|
||||
|
||||
@@ -506,6 +629,22 @@ def _check_one_request(params, f_max_from_si):
|
||||
max recommanded nb of channels is {max_recommanded_nb_channels}.'''
|
||||
_logger.critical(msg)
|
||||
raise ServiceError(msg)
|
||||
# Transponder mode already selected; will it fit to the requested bandwidth?
|
||||
if params['trx_mode'] is not None and params['effective_freq_slot'] is not None \
|
||||
and params['effective_freq_slot']['M'] is not None:
|
||||
_, requested_m = compute_spectrum_slot_vs_bandwidth(params['path_bandwidth'],
|
||||
params['spacing'],
|
||||
params['bit_rate'])
|
||||
# params['effective_freq_slot']['M'] value should be bigger than the computed requested_m (simple estimate)
|
||||
# TODO: elaborate a more accurate estimate with nb_wl * tx_osnr + possibly guardbands in case of
|
||||
# superchannel closed packing.
|
||||
|
||||
if requested_m > params['effective_freq_slot']['M']:
|
||||
msg = f'requested M {params["effective_freq_slot"]["M"]} number of slots for request' +\
|
||||
f'{params["request_id"]} should be greater than {requested_m} to support request' +\
|
||||
f'{params["path_bandwidth"] * 1e-9} Gbit/s with {params["trx_type"]} {params["trx_mode"]}'
|
||||
_logger.critical(msg)
|
||||
raise ServiceError(msg)
|
||||
|
||||
|
||||
def disjunctions_from_json(json_data):
|
||||
@@ -538,3 +677,42 @@ def convert_service_sheet(
|
||||
data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir)
|
||||
save_json(data, output_filename)
|
||||
return data
|
||||
|
||||
|
||||
def find_equalisation(params, equalization_types):
|
||||
"""Find the equalization(s) defined in params. params can be a dict or a Roadm object.
|
||||
|
||||
>>> roadm = {'add_drop_osnr': 100, 'pmd': 1, 'pdl': 0.5,
|
||||
... 'restrictions': {'preamp_variety_list': ['a'], 'booster_variety_list': ['b']},
|
||||
... 'target_psd_out_mWperGHz': 4e-4}
|
||||
>>> equalization_types = ['target_pch_out_db', 'target_psd_out_mWperGHz']
|
||||
>>> find_equalisation(roadm, equalization_types)
|
||||
{'target_pch_out_db': False, 'target_psd_out_mWperGHz': True}
|
||||
"""
|
||||
equalization = {e: False for e in equalization_types}
|
||||
for equ in equalization_types:
|
||||
if equ in params:
|
||||
equalization[equ] = True
|
||||
return equalization
|
||||
|
||||
|
||||
def merge_equalization(params, extra_params):
|
||||
"""params contains ROADM element config and extra_params default values from equipment library.
|
||||
If equalization is not defined in ROADM element use the one defined in equipment library.
|
||||
Only one type of equalization must be defined: power (target_pch_out_db) or PSD (target_psd_out_mWperGHz)
|
||||
or PSW (target_out_mWperSlotWidth)
|
||||
params and extra_params are dict
|
||||
"""
|
||||
equalization_types = ['target_pch_out_db', 'target_psd_out_mWperGHz', 'target_out_mWperSlotWidth']
|
||||
roadm_equalizations = find_equalisation(params, equalization_types)
|
||||
if sum(roadm_equalizations.values()) > 1:
|
||||
# if ROADM config contains more than one equalization type then this is an error
|
||||
return None
|
||||
if sum(roadm_equalizations.values()) == 1:
|
||||
# if ROADM config contains one equalization
|
||||
# don't use the default equalization
|
||||
return {k: v for k, v in extra_params.items() if k not in equalization_types}
|
||||
if sum(roadm_equalizations.values()) == 0:
|
||||
# If ROADM config doesn't contain any equalization type, keep the default one
|
||||
return extra_params
|
||||
return None
|
||||
|
||||
@@ -127,7 +127,7 @@ class Request_element(Element):
|
||||
'technology': 'flexi-grid',
|
||||
'trx_type': self.trx_type,
|
||||
'trx_mode': self.mode,
|
||||
'effective-freq-slot': [{'N': 'null', 'M': 'null'}],
|
||||
'effective-freq-slot': [{'N': None, 'M': None}],
|
||||
'spacing': self.spacing,
|
||||
'max-nb-of-channel': self.nb_channel,
|
||||
'output-power': self.power
|
||||
|
||||
@@ -20,10 +20,10 @@ from logging import getLogger
|
||||
from networkx import (dijkstra_path, NetworkXNoPath,
|
||||
all_simple_paths, shortest_simple_paths)
|
||||
from networkx.utils import pairwise
|
||||
from numpy import mean
|
||||
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
|
||||
from gnpy.core.info import create_input_spectral_information, carriers_to_spectral_information, ReferenceCarrier
|
||||
from gnpy.core.exceptions import ServiceError, DisjunctionError
|
||||
import gnpy.core.ansi_escapes as ansi_escapes
|
||||
from copy import deepcopy
|
||||
@@ -32,12 +32,12 @@ from math import ceil
|
||||
|
||||
LOGGER = getLogger(__name__)
|
||||
|
||||
RequestParams = namedtuple('RequestParams', 'request_id source destination bidir trx_type' +
|
||||
' trx_mode nodes_list loose_list spacing power nb_channel f_min' +
|
||||
' f_max format baud_rate OSNR bit_rate roll_off tx_osnr' +
|
||||
' min_spacing cost path_bandwidth')
|
||||
DisjunctionParams = namedtuple('DisjunctionParams', 'disjunction_id relaxable link' +
|
||||
'_diverse node_diverse disjunctions_req')
|
||||
RequestParams = namedtuple('RequestParams', 'request_id source destination bidir trx_type'
|
||||
' 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')
|
||||
DisjunctionParams = namedtuple('DisjunctionParams', 'disjunction_id relaxable link_diverse'
|
||||
' node_diverse disjunctions_req')
|
||||
|
||||
|
||||
class PathRequest:
|
||||
@@ -62,12 +62,17 @@ class PathRequest:
|
||||
self.f_max = params.f_max
|
||||
self.format = params.format
|
||||
self.OSNR = params.OSNR
|
||||
self.penalties = params.penalties
|
||||
self.bit_rate = params.bit_rate
|
||||
self.roll_off = params.roll_off
|
||||
self.tx_osnr = params.tx_osnr
|
||||
self.min_spacing = params.min_spacing
|
||||
self.cost = params.cost
|
||||
self.path_bandwidth = params.path_bandwidth
|
||||
if params.effective_freq_slot is not None:
|
||||
self.N = params.effective_freq_slot['N']
|
||||
self.M = params.effective_freq_slot['M']
|
||||
self.initial_spectrum = None
|
||||
|
||||
def __str__(self):
|
||||
return '\n\t'.join([f'{type(self).__name__} {self.request_id}',
|
||||
@@ -75,7 +80,7 @@ class PathRequest:
|
||||
f'destination: {self.destination}'])
|
||||
|
||||
def __repr__(self):
|
||||
if self.baud_rate is not None:
|
||||
if self.baud_rate is not None and self.bit_rate is not None:
|
||||
temp = self.baud_rate * 1e-9
|
||||
temp2 = self.bit_rate * 1e-9
|
||||
else:
|
||||
@@ -129,7 +134,7 @@ BLOCKING_NOPATH = ['NO_PATH', 'NO_PATH_WITH_CONSTRAINT',
|
||||
'NO_FEASIBLE_BAUDRATE_WITH_SPACING',
|
||||
'NO_COMPUTED_SNR']
|
||||
BLOCKING_NOMODE = ['NO_FEASIBLE_MODE', 'MODE_NOT_FEASIBLE']
|
||||
BLOCKING_NOSPECTRUM = 'NO_SPECTRUM'
|
||||
BLOCKING_NOSPECTRUM = ['NO_SPECTRUM', 'NOT_ENOUGH_RESERVED_SPECTRUM']
|
||||
|
||||
|
||||
class ResultElement:
|
||||
@@ -162,7 +167,11 @@ class ResultElement:
|
||||
}
|
||||
pro_list.append(temp)
|
||||
index += 1
|
||||
if self.path_request.M > 0:
|
||||
if not hasattr(self.path_request, 'blocking_reason'):
|
||||
# M and N values should not be None at this point
|
||||
if self.path_request.M is None or self.path_request.N is None:
|
||||
raise ServiceError('request {self.path_id} should have positive non null n and m values.')
|
||||
|
||||
temp = {
|
||||
'path-route-object': {
|
||||
'index': index,
|
||||
@@ -174,12 +183,14 @@ class ResultElement:
|
||||
}
|
||||
pro_list.append(temp)
|
||||
index += 1
|
||||
elif self.path_request.M == 0 and hasattr(self.path_request, 'blocking_reason'):
|
||||
# if the path is blocked due to spectrum, no label object is created, but
|
||||
# the json response includes a detailed path for user infromation.
|
||||
pass
|
||||
else:
|
||||
raise ServiceError('request {self.path_id} should have positive path bandwidth value.')
|
||||
# if the path is blocked, no label object is created, but
|
||||
# the json response includes a detailed path for user information.
|
||||
# M and N values should be None at this point
|
||||
if self.path_request.M is not None or self.path_request.N is not None:
|
||||
raise ServiceError('request {self.path_id} should not have label M and N values at this point.')
|
||||
|
||||
|
||||
if isinstance(element, Transceiver):
|
||||
temp = {
|
||||
'path-route-object': {
|
||||
@@ -329,20 +340,37 @@ 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):
|
||||
si = create_input_spectral_information(
|
||||
req.f_min, req.f_max, req.roll_off, req.baud_rate,
|
||||
req.power, req.spacing)
|
||||
""" 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))
|
||||
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, ref_carrier=ref_carrier(equipment))
|
||||
for i, el in enumerate(path):
|
||||
if isinstance(el, Roadm):
|
||||
si = el(si, degree=path[i+1].uid)
|
||||
else:
|
||||
si = el(si)
|
||||
path[0].update_snr(req.tx_osnr)
|
||||
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(req.tx_osnr, equipment['Roadm']['default'].add_drop_osnr)
|
||||
path[-1].update_snr(si.tx_osnr, equipment['Roadm']['default'].add_drop_osnr)
|
||||
else:
|
||||
path[-1].update_snr(req.tx_osnr)
|
||||
path[-1].update_snr(si.tx_osnr)
|
||||
path[-1].calc_penalties(req.penalties)
|
||||
return si
|
||||
|
||||
|
||||
@@ -362,13 +390,18 @@ def propagate_and_optimize_mode(path, req, equipment):
|
||||
float(this_mode['min_spacing']) <= req.spacing]
|
||||
modes_to_explore = sorted(modes_to_explore,
|
||||
key=lambda x: x['bit_rate'], reverse=True)
|
||||
# print(modes_to_explore)
|
||||
# step2: computes propagation for each baudrate: stop and select the first that passes
|
||||
# TODO: the case of roll of is not included: for now use SI one
|
||||
# TODO: the case of roll off is not included: for now use SI one
|
||||
# TODO: if the loop in mode optimization does not have a feasible path, then bugs
|
||||
spc_info = create_input_spectral_information(req.f_min, req.f_max,
|
||||
equipment['SI']['default'].roll_off,
|
||||
this_br, req.power, req.spacing)
|
||||
if req.initial_spectrum is not None:
|
||||
# this case is not yet handled: spectrum can not be defined for the path-request-run function
|
||||
# and this function is only called in this case. so coming here should not be considered yet.
|
||||
msg = f'Request: {req.request_id} contains a unexpected initial_spectrum.'
|
||||
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,
|
||||
tx_osnr=req.tx_osnr, ref_carrier=ref_carrier(equipment))
|
||||
for i, el in enumerate(path):
|
||||
if isinstance(el, Roadm):
|
||||
spc_info = el(spc_info, degree=path[i+1].uid)
|
||||
@@ -377,11 +410,13 @@ def propagate_and_optimize_mode(path, req, equipment):
|
||||
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'])
|
||||
if round(min(path[-1].snr + lin2db(this_br / (12.5e9))), 2) \
|
||||
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:
|
||||
return path, this_mode
|
||||
else:
|
||||
@@ -389,7 +424,6 @@ def propagate_and_optimize_mode(path, req, equipment):
|
||||
else:
|
||||
req.blocking_reason = 'NO_COMPUTED_SNR'
|
||||
return path, None
|
||||
|
||||
# only get to this point if no baudrate/mode satisfies OSNR requirement
|
||||
|
||||
# returns the last propagated path and mode
|
||||
@@ -696,8 +730,8 @@ def compute_path_dsjctn(network, equipment, pathreqlist, disjunctions_list):
|
||||
# in each loop, dpath is updated with a path for rq that satisfies
|
||||
# disjunction with each path in dpath
|
||||
# for example, assume set of requests in the vector (disjunction_list) is {rq1,rq2, rq3}
|
||||
# rq1 p1: abfhg
|
||||
# p2: aefhg
|
||||
# rq1 p1: aefhg
|
||||
# p2: abfhg
|
||||
# p3: abcg
|
||||
# rq2 p8: bf
|
||||
# rq3 p4: abcgh
|
||||
@@ -714,6 +748,7 @@ def compute_path_dsjctn(network, equipment, pathreqlist, disjunctions_list):
|
||||
# after second loop:
|
||||
# dpath = [ p3 p8 p6 ]
|
||||
# since p1 and p4 are not disjoint
|
||||
# p1 and p6 are not disjoint
|
||||
# p1 and p7 are not disjoint
|
||||
# p3 and p4 are not disjoint
|
||||
# p3 and p7 are not disjoint
|
||||
@@ -737,7 +772,6 @@ def compute_path_dsjctn(network, equipment, pathreqlist, disjunctions_list):
|
||||
temp.append(temp2)
|
||||
# print(f' coucou {elem1}: \t{temp}')
|
||||
dpath = temp
|
||||
# print(dpath)
|
||||
candidates[dis.disjunction_id] = dpath
|
||||
|
||||
# for i in disjunctions_list:
|
||||
@@ -778,9 +812,9 @@ def compute_path_dsjctn(network, equipment, pathreqlist, disjunctions_list):
|
||||
if pth in cndt:
|
||||
candidates[this_id].remove(cndt)
|
||||
|
||||
# for i in disjunctions_list:
|
||||
# print(i.disjunction_id)
|
||||
# print(f'\n{candidates[i.disjunction_id]}')
|
||||
# for i in disjunctions_list:
|
||||
# print(i.disjunction_id)
|
||||
# print(f'\n{candidates[i.disjunction_id]}')
|
||||
|
||||
# step 4 apply route constraints: remove candidate path that do not satisfy
|
||||
# the constraint only in the case of disjounction: the simple path is processed in
|
||||
@@ -788,33 +822,34 @@ def compute_path_dsjctn(network, equipment, pathreqlist, disjunctions_list):
|
||||
# TODO: keep a version without the loose constraint
|
||||
for this_d in disjunctions_list:
|
||||
temp = []
|
||||
alternatetemp = []
|
||||
for j, sol in enumerate(candidates[this_d.disjunction_id]):
|
||||
testispartok = True
|
||||
testispartnokloose = True
|
||||
for pth in sol:
|
||||
# print(f'test {allpaths[id(pth)].req.request_id}')
|
||||
# print(f'length of route {len(allpaths[id(pth)].req.nodes_list)}')
|
||||
if allpaths[id(pth)].req.nodes_list:
|
||||
# if pth does not containt the ordered list node, remove sol from the candidate
|
||||
# except if this was the last solution: then check if the constraint is loose
|
||||
# or not
|
||||
# if any pth from sol does not contain the ordered list node,
|
||||
# remove sol from the candidate, except if constraint was loose:
|
||||
# then keep sol as an alternate solution
|
||||
if not ispart(allpaths[id(pth)].req.nodes_list, pth):
|
||||
# print(f'nb of solutions {len(temp)}')
|
||||
if j < len(candidates[this_d.disjunction_id]) - 1:
|
||||
msg = f'removing {sol}'
|
||||
LOGGER.info(msg)
|
||||
testispartok = False
|
||||
# break
|
||||
else:
|
||||
if 'LOOSE' in allpaths[id(pth)].req.loose_list:
|
||||
LOGGER.info(f'Could not apply route constraint' +
|
||||
f'{allpaths[id(pth)].req.nodes_list} on request' +
|
||||
f' {allpaths[id(pth)].req.request_id}')
|
||||
else:
|
||||
LOGGER.info(f'removing last solution from candidate paths\n{sol}')
|
||||
testispartok = False
|
||||
testispartok = False
|
||||
if 'STRICT' in allpaths[id(pth)].req.loose_list:
|
||||
LOGGER.info(f'removing solution from candidate paths\n{pth}')
|
||||
testispartnokloose = False
|
||||
break
|
||||
if testispartok:
|
||||
temp.append(sol)
|
||||
candidates[this_d.disjunction_id] = temp
|
||||
elif testispartnokloose:
|
||||
LOGGER.info(f'Adding solution as alternate solution not satisfying constraint\n{pth}')
|
||||
alternatetemp.append(sol)
|
||||
if temp:
|
||||
candidates[this_d.disjunction_id] = temp
|
||||
elif alternatetemp:
|
||||
candidates[this_d.disjunction_id] = alternatetemp
|
||||
else:
|
||||
candidates[this_d.disjunction_id] = []
|
||||
|
||||
# step 5 select the first combination that works
|
||||
pathreslist_disjoint = {}
|
||||
@@ -964,7 +999,9 @@ def compare_reqs(req1, req2, disjlist):
|
||||
req1.format == req2.format and \
|
||||
req1.OSNR == req2.OSNR and \
|
||||
req1.roll_off == req2.roll_off and \
|
||||
same_disj:
|
||||
same_disj and \
|
||||
getattr(req1, 'N', None) is None and getattr(req2, 'N', None) is None and \
|
||||
getattr(req1, 'M', None) is None and getattr(req2, 'M', None) is None:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@@ -1096,12 +1133,16 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
|
||||
# means that at this point the mode was entered/forced by user and thus a
|
||||
# baud_rate was defined
|
||||
propagate(total_path, pathreq, equipment)
|
||||
temp_snr01nm = round(mean(total_path[-1].snr+lin2db(pathreq.baud_rate/(12.5e9))), 2)
|
||||
if temp_snr01nm < pathreq.OSNR + equipment['SI']['default'].sys_margins:
|
||||
snr01nm_with_penalty = total_path[-1].snr_01nm - total_path[-1].total_penalty
|
||||
min_ind = argmin(snr01nm_with_penalty)
|
||||
if round(snr01nm_with_penalty[min_ind], 2) < pathreq.OSNR + equipment['SI']['default'].sys_margins:
|
||||
msg = f'\tWarning! Request {pathreq.request_id} computed path from' +\
|
||||
f' {pathreq.source} to {pathreq.destination} does not pass with' +\
|
||||
f' {pathreq.tsp_mode}\n\tcomputedSNR in 0.1nm = {temp_snr01nm} ' +\
|
||||
f'- required osnr {pathreq.OSNR} + {equipment["SI"]["default"].sys_margins} margin'
|
||||
f' {pathreq.source} to {pathreq.destination} does not pass with {pathreq.tsp_mode}' +\
|
||||
f'\n\tcomputed SNR in 0.1nm = {round(total_path[-1].snr_01nm[min_ind], 2)}' +\
|
||||
f'\n\tCD penalty = {round(total_path[-1].penalties["chromatic_dispersion"][min_ind], 2)}' +\
|
||||
f'\n\tPMD penalty = {round(total_path[-1].penalties["pmd"][min_ind], 2)}' +\
|
||||
f'\n\trequired osnr = {pathreq.OSNR}' +\
|
||||
f'\n\tsystem margin = {equipment["SI"]["default"].sys_margins}'
|
||||
print(msg)
|
||||
LOGGER.warning(msg)
|
||||
pathreq.blocking_reason = 'MODE_NOT_FEASIBLE'
|
||||
@@ -1122,6 +1163,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
|
||||
pathreq.OSNR = mode['OSNR']
|
||||
pathreq.tx_osnr = mode['tx_osnr']
|
||||
pathreq.bit_rate = mode['bit_rate']
|
||||
pathreq.penalties = mode['penalties']
|
||||
# other blocking reason should not appear at this point
|
||||
except AttributeError:
|
||||
pathreq.baud_rate = mode['baud_rate']
|
||||
@@ -1130,6 +1172,7 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
|
||||
pathreq.OSNR = mode['OSNR']
|
||||
pathreq.tx_osnr = mode['tx_osnr']
|
||||
pathreq.bit_rate = mode['bit_rate']
|
||||
pathreq.penalties = mode['penalties']
|
||||
|
||||
# reversed path is needed for correct spectrum assignment
|
||||
reversed_path = find_reversed_path(pathlist[i])
|
||||
@@ -1141,18 +1184,21 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
|
||||
print(f'\tPath (roadsm) {[r.uid for r in rev_p if isinstance(r,Roadm)]}\n')
|
||||
propagate(rev_p, pathreq, equipment)
|
||||
propagated_reversed_path = rev_p
|
||||
temp_snr01nm = round(mean(propagated_reversed_path[-1].snr +\
|
||||
lin2db(pathreq.baud_rate/(12.5e9))), 2)
|
||||
if temp_snr01nm < pathreq.OSNR + equipment['SI']['default'].sys_margins:
|
||||
snr01nm_with_penalty = rev_p[-1].snr_01nm - rev_p[-1].total_penalty
|
||||
min_ind = argmin(snr01nm_with_penalty)
|
||||
if round(snr01nm_with_penalty[min_ind], 2) < pathreq.OSNR + equipment['SI']['default'].sys_margins:
|
||||
msg = f'\tWarning! Request {pathreq.request_id} computed path from' +\
|
||||
f' {pathreq.source} to {pathreq.destination} does not pass with' +\
|
||||
f' {pathreq.tsp_mode}\n' +\
|
||||
f'\tcomputedSNR in 0.1nm = {temp_snr01nm} -' \
|
||||
f' required osnr {pathreq.OSNR} + {equipment["SI"]["default"].sys_margins} margin'
|
||||
f' {pathreq.source} to {pathreq.destination} does not pass with {pathreq.tsp_mode}' +\
|
||||
f'\n\tcomputed SNR in 0.1nm = {round(rev_p[-1].snr_01nm[min_ind], 2)}' +\
|
||||
f'\n\tCD penalty = {round(rev_p[-1].penalties["chromatic_dispersion"][min_ind], 2)}' +\
|
||||
f'\n\tPMD penalty = {round(rev_p[-1].penalties["pmd"][min_ind], 2)}' +\
|
||||
f'\n\trequired osnr = {pathreq.OSNR}' +\
|
||||
f'\n\tsystem margin = {equipment["SI"]["default"].sys_margins}'
|
||||
print(msg)
|
||||
LOGGER.warning(msg)
|
||||
# TODO selection of mode should also be on reversed direction !!
|
||||
pathreq.blocking_reason = 'MODE_NOT_FEASIBLE'
|
||||
if not hasattr(pathreq, 'blocking_reason'):
|
||||
pathreq.blocking_reason = 'MODE_NOT_FEASIBLE'
|
||||
else:
|
||||
propagated_reversed_path = []
|
||||
else:
|
||||
@@ -1168,3 +1214,15 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
|
||||
# print to have a nice output
|
||||
print('')
|
||||
return path_res_list, reversed_path_res_list, propagated_reversed_path_res_list
|
||||
|
||||
|
||||
def compute_spectrum_slot_vs_bandwidth(bandwidth, spacing, bit_rate, slot_width=0.0125e12):
|
||||
""" Compute the number of required wavelengths and the M value (number of consumed slots)
|
||||
Each wavelength consumes one `spacing`, and the result is rounded up to consume a natural number of slots.
|
||||
|
||||
>>> compute_spectrum_slot_vs_bandwidth(400e9, 50e9, 200e9)
|
||||
(2, 8)
|
||||
"""
|
||||
number_of_wavelengths = ceil(bandwidth / bit_rate)
|
||||
total_number_of_slots = ceil(spacing / slot_width) * number_of_wavelengths
|
||||
return number_of_wavelengths, total_number_of_slots
|
||||
|
||||
@@ -15,9 +15,9 @@ element/oms correspondace
|
||||
|
||||
from collections import namedtuple
|
||||
from logging import getLogger
|
||||
from math import ceil
|
||||
from gnpy.core.elements import Roadm, Transceiver
|
||||
from gnpy.core.exceptions import ServiceError, SpectrumError
|
||||
from gnpy.topology.request import compute_spectrum_slot_vs_bandwidth
|
||||
|
||||
LOGGER = getLogger(__name__)
|
||||
|
||||
@@ -365,12 +365,6 @@ def spectrum_selection(pth, oms_list, requested_m, requested_n=None):
|
||||
candidate = (requested_n, requested_n - requested_m, requested_n + requested_m - 1)
|
||||
else:
|
||||
candidate = (None, None, None)
|
||||
# print("coucou11")
|
||||
# print(candidate)
|
||||
# print(freq_availability[321:321+2*m])
|
||||
# a = [i+321 for i in range(2*m)]
|
||||
# print(a)
|
||||
# print(candidate)
|
||||
return candidate, path_oms
|
||||
|
||||
|
||||
@@ -390,42 +384,40 @@ def pth_assign_spectrum(pths, rqs, oms_list, rpths):
|
||||
""" basic first fit assignment
|
||||
if reversed path are provided, means that occupation is bidir
|
||||
"""
|
||||
for i, pth in enumerate(pths):
|
||||
for pth, rq, rpth in zip(pths, rqs, rpths):
|
||||
# computes the number of channels required
|
||||
try:
|
||||
if rqs[i].blocking_reason:
|
||||
rqs[i].blocked = True
|
||||
rqs[i].N = 0
|
||||
rqs[i].M = 0
|
||||
except AttributeError:
|
||||
nb_wl = ceil(rqs[i].path_bandwidth / rqs[i].bit_rate)
|
||||
# computes the total nb of slots according to requested spacing
|
||||
# TODO : express superchannels
|
||||
# assumes that all channels must be grouped
|
||||
# TODO : enables non contiguous reservation in case of blocking
|
||||
requested_m = ceil(rqs[i].spacing / 0.0125e12) * nb_wl
|
||||
# concatenate all path and reversed path elements to derive slots availability
|
||||
(center_n, startn, stopn), path_oms = spectrum_selection(pth + rpths[i], oms_list, requested_m,
|
||||
requested_n=None)
|
||||
# checks that requested_m is fitting startm and stopm
|
||||
if hasattr(rq, 'blocking_reason'):
|
||||
rq.N = None
|
||||
rq.M = None
|
||||
else:
|
||||
nb_wl, requested_m = compute_spectrum_slot_vs_bandwidth(rq.path_bandwidth,
|
||||
rq.spacing, rq.bit_rate)
|
||||
if getattr(rq, 'M', None) is not None:
|
||||
# Consistency check between the requested M and path_bandwidth
|
||||
# M value should be bigger than the computed requested_m (simple estimate)
|
||||
# TODO: elaborate a more accurate estimate with nb_wl * tx_osnr + possibly guardbands in case of
|
||||
# superchannel closed packing.
|
||||
if requested_m > rq.M:
|
||||
rq.N = None
|
||||
rq.M = None
|
||||
rq.blocking_reason = 'NOT_ENOUGH_RESERVED_SPECTRUM'
|
||||
# need to stop here for this request and not go though spectrum selection process with requested_m
|
||||
continue
|
||||
# use the req.M even if requested_m is smaller
|
||||
requested_m = rq.M
|
||||
requested_n = getattr(rq, 'N', None)
|
||||
(center_n, startn, stopn), path_oms = spectrum_selection(pth + rpth, oms_list, requested_m,
|
||||
requested_n)
|
||||
# if requested n and m concern already occupied spectrum the previous function returns a None candidate
|
||||
# if not None, center_n and start, stop frequencies are applicable to all oms of pth
|
||||
# checks that spectrum is not None else indicate blocking reason
|
||||
if center_n is not None:
|
||||
# checks that requested_m is fitting startm and stopm
|
||||
if 2 * requested_m > (stopn - startn + 1):
|
||||
msg = f'candidate: {(center_n, startn, stopn)} is not consistant ' +\
|
||||
f'with {requested_m}'
|
||||
LOGGER.critical(msg)
|
||||
raise ValueError(msg)
|
||||
|
||||
for oms_elem in path_oms:
|
||||
oms_list[oms_elem].assign_spectrum(center_n, requested_m)
|
||||
oms_list[oms_elem].add_service(rqs[i].request_id, nb_wl)
|
||||
rqs[i].blocked = False
|
||||
rqs[i].N = center_n
|
||||
rqs[i].M = requested_m
|
||||
oms_list[oms_elem].add_service(rq.request_id, nb_wl)
|
||||
rq.N = center_n
|
||||
rq.M = requested_m
|
||||
else:
|
||||
rqs[i].blocked = True
|
||||
rqs[i].N = 0
|
||||
rqs[i].M = 0
|
||||
rqs[i].blocking_reason = 'NO_SPECTRUM'
|
||||
rq.N = None
|
||||
rq.M = None
|
||||
rq.blocking_reason = 'NO_SPECTRUM'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
matplotlib>=3.3.3,<4
|
||||
networkx>=2.5,<3
|
||||
numpy>=1.19.4,<2
|
||||
pandas>=1.1.5,<2
|
||||
pbr>=5.5.1,<6
|
||||
scipy>=1.5.4,<2
|
||||
matplotlib>=3.5.1,<4
|
||||
networkx>=2.6,<3
|
||||
numpy>=1.22.0,<2
|
||||
pbr>=5.7.0,<6
|
||||
scipy>=1.7.3,<2
|
||||
xlrd>=1.2.0,<2
|
||||
|
||||
11
setup.cfg
11
setup.cfg
@@ -3,13 +3,13 @@ name = gnpy
|
||||
description-file = README.md
|
||||
description-content-type = text/markdown; variant=GFM
|
||||
author = Telecom Infra Project
|
||||
author-email = jan.kundrat@telecominfraproject.com
|
||||
author-email = jkt@jankundrat.com
|
||||
license = BSD-3-Clause
|
||||
home-page = https://github.com/Telecominfraproject/oopt-gnpy
|
||||
project_urls =
|
||||
Bug Tracker = https://github.com/Telecominfraproject/oopt-gnpy/issues
|
||||
Documentation = https://gnpy.readthedocs.io/
|
||||
python-requires = >=3.6
|
||||
python-requires = >=3.8
|
||||
classifier =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
@@ -19,10 +19,10 @@ classifier =
|
||||
Natural Language :: English
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
Topic :: Scientific/Engineering
|
||||
Topic :: Scientific/Engineering :: Physics
|
||||
@@ -41,9 +41,6 @@ warnerrors = True
|
||||
|
||||
[files]
|
||||
packages = gnpy
|
||||
data_files =
|
||||
examples = examples/*
|
||||
# FIXME: solve example data files
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
|
||||
135
tests/compare.py
135
tests/compare.py
@@ -1,135 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
from json import dump
|
||||
from pathlib import Path
|
||||
from argparse import ArgumentParser
|
||||
from collections import namedtuple
|
||||
from gnpy.tools.json_io import load_json
|
||||
|
||||
|
||||
class Results(namedtuple('Results', 'missing extra different expected actual')):
|
||||
def _asdict(self):
|
||||
return {'missing': self.missing,
|
||||
'extra': self.extra,
|
||||
'different': self.different}
|
||||
|
||||
def __str__(self):
|
||||
rv = []
|
||||
if self.missing:
|
||||
rv.append('Missing: {len(self.missing)}/{len(self.expected)}')
|
||||
rv.extend(f'\t{x}' for x in sorted(self.missing))
|
||||
if self.extra:
|
||||
rv.append('Extra: {len(self.extra)}/{len(self.expected)}')
|
||||
rv.extend(f'\t{x}' for x in sorted(self.extra))
|
||||
if self.different:
|
||||
rv.append('Different: {len(self.different)}/{len(self.expected)}')
|
||||
rv.extend(f'\tExpected: {x}\n\tActual: {y}' for x, y in self.different)
|
||||
if not self.missing and not self.extra and not self.different:
|
||||
rv.append('All match!')
|
||||
return '\n'.join(rv)
|
||||
|
||||
|
||||
class NetworksResults(namedtuple('NetworksResult', 'elements connections')):
|
||||
def _asdict(self):
|
||||
return {'elements': self.elements._asdict(),
|
||||
'connections': self.connections._asdict()}
|
||||
|
||||
def __str__(self):
|
||||
return '\n'.join([
|
||||
'Elements'.center(40, '='),
|
||||
str(self.elements),
|
||||
'Connections'.center(40, '='),
|
||||
str(self.connections),
|
||||
])
|
||||
|
||||
|
||||
class ServicesResults(namedtuple('ServicesResult', 'requests synchronizations')):
|
||||
def _asdict(self):
|
||||
return {'requests': self.requests.asdict(),
|
||||
'synchronizations': self.synchronizations.asdict()}
|
||||
|
||||
def __str__(self):
|
||||
return '\n'.join([
|
||||
'Requests'.center(40, '='),
|
||||
str(self.requests),
|
||||
'Synchronizations'.center(40, '='),
|
||||
str(self.synchronizations),
|
||||
])
|
||||
|
||||
|
||||
class PathsResults(namedtuple('PathsResults', 'paths')):
|
||||
def _asdict(self):
|
||||
return {'paths': self.paths.asdict()}
|
||||
|
||||
def __str__(self):
|
||||
return '\n'.join([
|
||||
'Paths'.center(40, '='),
|
||||
str(self.paths),
|
||||
])
|
||||
|
||||
|
||||
def compare(expected, actual, key=lambda x: x):
|
||||
expected = {key(el): el for el in expected}
|
||||
actual = {key(el): el for el in actual}
|
||||
missing = set(expected) - set(actual)
|
||||
extra = set(actual) - set(expected)
|
||||
different = [(expected[x], actual[x]) for
|
||||
x in set(expected) & set(actual)
|
||||
if expected[x] != actual[x]]
|
||||
return Results(missing, extra, different, expected, actual)
|
||||
|
||||
|
||||
def compare_networks(expected, actual):
|
||||
elements = compare(expected['elements'], actual['elements'],
|
||||
key=lambda el: el['uid'])
|
||||
connections = compare(expected['connections'], actual['connections'],
|
||||
key=lambda el: (el['from_node'], el['to_node']))
|
||||
return NetworksResults(elements, connections)
|
||||
|
||||
|
||||
def compare_services(expected, actual):
|
||||
requests = compare(expected['path-request'], actual['path-request'],
|
||||
key=lambda el: el['request-id'])
|
||||
synchronizations = compare(expected['path-request'], expected['path-request'],
|
||||
key=lambda el: el['request-id'])
|
||||
if 'synchronization' in expected.keys():
|
||||
synchronizations = compare(expected['synchronization'], actual['synchronization'],
|
||||
key=lambda el: el['synchronization-id'])
|
||||
return ServicesResults(requests, synchronizations)
|
||||
|
||||
|
||||
def compare_paths(expected_output, actual_output):
|
||||
paths = compare(expected['path'], actual['path'], key=lambda el: el['path-id'])
|
||||
return PathsResults(paths)
|
||||
|
||||
|
||||
COMPARISONS = {
|
||||
'networks': compare_networks,
|
||||
'services': compare_services,
|
||||
'paths': compare_paths,
|
||||
}
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('expected_output', type=Path, metavar='FILE')
|
||||
parser.add_argument('actual_output', type=Path, metavar='FILE')
|
||||
parser.add_argument('-o', '--output', default=None)
|
||||
parser.add_argument('-c', '--comparison', choices=COMPARISONS, default='networks')
|
||||
|
||||
|
||||
def encode_sets(obj):
|
||||
if isinstance(obj, set):
|
||||
return list(obj)
|
||||
raise TypeError(f'{obj!r} is not JSON serializable!')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = parser.parse_args()
|
||||
expected = load_json(args.expected_output)
|
||||
actual = load_json(args.actual_output)
|
||||
|
||||
result = COMPARISONS[args.comparison](expected, actual)
|
||||
|
||||
if args.output:
|
||||
with open(args.output, 'w', encoding='utf-8') as f:
|
||||
dump(result, f, default=encode_sets, indent=2, ensure_ascii=False)
|
||||
else:
|
||||
print(str(result))
|
||||
13
tests/conftest.py
Normal file
13
tests/conftest.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
# Copyright (C) 2020 Telecom Infra Project and GNPy contributors
|
||||
# see LICENSE.md for a list of contributors
|
||||
#
|
||||
|
||||
import pytest
|
||||
from gnpy.core.parameters import SimParams, NLIParams, RamanParams
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def set_sim_params(monkeypatch):
|
||||
monkeypatch.setattr(SimParams, '_shared_dict', {'nli_params': NLIParams(), 'raman_params': RamanParams()})
|
||||
File diff suppressed because it is too large
Load Diff
@@ -196,101 +196,101 @@
|
||||
0.0
|
||||
],
|
||||
"dgt": [
|
||||
2.714526681131686,
|
||||
2.705443819238505,
|
||||
2.6947834587664494,
|
||||
2.6841217449620203,
|
||||
2.6681935771243177,
|
||||
2.6521732021128046,
|
||||
2.630396440815385,
|
||||
2.602860350286428,
|
||||
2.5696460593920065,
|
||||
2.5364027376452056,
|
||||
2.499446286796604,
|
||||
2.4587748041127506,
|
||||
2.414398437185221,
|
||||
2.3699990328716107,
|
||||
2.322373696229342,
|
||||
2.271520771371253,
|
||||
2.2174389328192197,
|
||||
2.16337565384239,
|
||||
2.1183028432496016,
|
||||
2.082225099873648,
|
||||
2.055100772005235,
|
||||
2.0279625371819305,
|
||||
2.0008103857988204,
|
||||
1.9736443063300082,
|
||||
1.9482128147680253,
|
||||
1.9245345552113182,
|
||||
1.9026104247588487,
|
||||
1.8806927939516411,
|
||||
1.862235672444246,
|
||||
1.847275503201129,
|
||||
1.835814081380705,
|
||||
1.824381436842932,
|
||||
1.8139629377087627,
|
||||
1.8045606557581335,
|
||||
1.7961751115773796,
|
||||
1.7877868031023945,
|
||||
1.7793941781790852,
|
||||
1.7709972329654864,
|
||||
1.7625959636196327,
|
||||
1.7541903672600494,
|
||||
1.7459181197626403,
|
||||
1.737780757913635,
|
||||
1.7297783508684146,
|
||||
1.7217732861435076,
|
||||
1.7137640932265894,
|
||||
1.7057507692361864,
|
||||
1.6918150918099673,
|
||||
1.6719047669939942,
|
||||
1.6460167077689267,
|
||||
1.6201194134191075,
|
||||
1.5986915141218316,
|
||||
1.5817353179379183,
|
||||
1.569199764184379,
|
||||
1.5566577309558969,
|
||||
1.545374152761467,
|
||||
1.5353620432989845,
|
||||
1.5266220576235803,
|
||||
1.5178910621476225,
|
||||
1.5097346239790443,
|
||||
1.502153039909686,
|
||||
1.495145456062699,
|
||||
1.488134243479226,
|
||||
1.48111939735681,
|
||||
1.474100442252211,
|
||||
1.4670307626366115,
|
||||
1.4599103316162523,
|
||||
1.45273959485914,
|
||||
1.445565137158368,
|
||||
1.4340878115214444,
|
||||
1.418273806730323,
|
||||
1.3981208704326855,
|
||||
1.3779439775587023,
|
||||
1.3598972673004606,
|
||||
1.3439818461440451,
|
||||
1.3301807335621048,
|
||||
1.316383926863083,
|
||||
1.3040618749785347,
|
||||
1.2932153453410835,
|
||||
1.2838336236692311,
|
||||
1.2744470198196236,
|
||||
1.2650555289898042,
|
||||
1.2556591482982988,
|
||||
1.2428104897182262,
|
||||
1.2264996957264114,
|
||||
1.2067249615595257,
|
||||
1.1869318618366975,
|
||||
1.1672278304018044,
|
||||
1.1476135933863398,
|
||||
1.1280891949729075,
|
||||
1.108555289615659,
|
||||
1.0895983485572227,
|
||||
1.0712204022764056,
|
||||
1.0534217504465226,
|
||||
1.0356155337864215,
|
||||
1.0,
|
||||
1.017807767853702,
|
||||
1.0
|
||||
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
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
"Fiber":[{
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 1.67e-05,
|
||||
"gamma": 0.00127,
|
||||
"effective_area": 83e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
}
|
||||
],
|
||||
@@ -85,6 +85,7 @@
|
||||
"target_pch_out_db": -20,
|
||||
"add_drop_osnr": 38,
|
||||
"pmd": 0,
|
||||
"pdl": 0,
|
||||
"restrictions": {
|
||||
"preamp_variety_list":[],
|
||||
"booster_variety_list":[]
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
{
|
||||
"uid": "Span1",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km",
|
||||
"att_in": 0,
|
||||
"con_in": 0.5,
|
||||
"con_out": 0.5,
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 0.0000167,
|
||||
"gamma": 0.00127,
|
||||
"pmd_coef": 1.265e-15,
|
||||
"raman_efficiency": {
|
||||
"cr": [
|
||||
0,
|
||||
0.0000094,
|
||||
0.0000292,
|
||||
0.0000488,
|
||||
0.0000682,
|
||||
0.0000831,
|
||||
0.000094,
|
||||
0.0001014,
|
||||
0.0001069,
|
||||
0.0001119,
|
||||
0.0001217,
|
||||
0.0001268,
|
||||
0.0001365,
|
||||
0.000149,
|
||||
0.000165,
|
||||
0.000181,
|
||||
0.0001977,
|
||||
0.0002192,
|
||||
0.0002469,
|
||||
0.0002749,
|
||||
0.0002999,
|
||||
0.0003206,
|
||||
0.0003405,
|
||||
0.0003592,
|
||||
0.000374,
|
||||
0.0003826,
|
||||
0.0003841,
|
||||
0.0003826,
|
||||
0.0003802,
|
||||
0.0003756,
|
||||
0.0003549,
|
||||
0.0003795,
|
||||
0.000344,
|
||||
0.0002933,
|
||||
0.0002024,
|
||||
0.0001158,
|
||||
0.0000846,
|
||||
0.0000714,
|
||||
0.0000686,
|
||||
0.000085,
|
||||
0.0000893,
|
||||
0.0000901,
|
||||
0.0000815,
|
||||
0.0000667,
|
||||
0.0000437,
|
||||
0.0000328,
|
||||
0.0000296,
|
||||
0.0000265,
|
||||
0.0000257,
|
||||
0.0000281,
|
||||
0.0000308,
|
||||
0.0000367,
|
||||
0.0000585,
|
||||
0.0000663,
|
||||
0.0000636,
|
||||
0.000055,
|
||||
0.0000406,
|
||||
0.0000277,
|
||||
0.0000242,
|
||||
0.0000187,
|
||||
0.000016,
|
||||
0.000014,
|
||||
0.0000113,
|
||||
0.0000105,
|
||||
0.0000098,
|
||||
0.0000098,
|
||||
0.0000113,
|
||||
0.0000164,
|
||||
0.0000195,
|
||||
0.0000238,
|
||||
0.0000226,
|
||||
0.0000203,
|
||||
0.0000148,
|
||||
0.0000109,
|
||||
0.0000098,
|
||||
0.0000105,
|
||||
0.0000117,
|
||||
0.0000125,
|
||||
0.0000121,
|
||||
0.0000109,
|
||||
0.0000098,
|
||||
0.0000082,
|
||||
0.0000066,
|
||||
0.0000047,
|
||||
0.0000027,
|
||||
0.0000019,
|
||||
0.0000012,
|
||||
4e-7,
|
||||
2e-7,
|
||||
1e-7
|
||||
],
|
||||
"frequency_offset": [
|
||||
0,
|
||||
500000000000,
|
||||
1000000000000,
|
||||
1500000000000,
|
||||
2000000000000,
|
||||
2500000000000,
|
||||
3000000000000,
|
||||
3500000000000,
|
||||
4000000000000,
|
||||
4500000000000,
|
||||
5000000000000,
|
||||
5500000000000,
|
||||
6000000000000,
|
||||
6500000000000,
|
||||
7000000000000,
|
||||
7500000000000,
|
||||
8000000000000,
|
||||
8500000000000,
|
||||
9000000000000,
|
||||
9500000000000,
|
||||
10000000000000,
|
||||
10500000000000,
|
||||
11000000000000,
|
||||
11500000000000,
|
||||
12000000000000,
|
||||
12500000000000,
|
||||
12750000000000,
|
||||
13000000000000,
|
||||
13250000000000,
|
||||
13500000000000,
|
||||
14000000000000,
|
||||
14500000000000,
|
||||
14750000000000,
|
||||
15000000000000,
|
||||
15500000000000,
|
||||
16000000000000,
|
||||
16500000000000,
|
||||
17000000000000,
|
||||
17500000000000,
|
||||
18000000000000,
|
||||
18250000000000,
|
||||
18500000000000,
|
||||
18750000000000,
|
||||
19000000000000,
|
||||
19500000000000,
|
||||
20000000000000,
|
||||
20500000000000,
|
||||
21000000000000,
|
||||
21500000000000,
|
||||
22000000000000,
|
||||
22500000000000,
|
||||
23000000000000,
|
||||
23500000000000,
|
||||
24000000000000,
|
||||
24500000000000,
|
||||
25000000000000,
|
||||
25500000000000,
|
||||
26000000000000,
|
||||
26500000000000,
|
||||
27000000000000,
|
||||
27500000000000,
|
||||
28000000000000,
|
||||
28500000000000,
|
||||
29000000000000,
|
||||
29500000000000,
|
||||
30000000000000,
|
||||
30500000000000,
|
||||
31000000000000,
|
||||
31500000000000,
|
||||
32000000000000,
|
||||
32500000000000,
|
||||
33000000000000,
|
||||
33500000000000,
|
||||
34000000000000,
|
||||
34500000000000,
|
||||
35000000000000,
|
||||
35500000000000,
|
||||
36000000000000,
|
||||
36500000000000,
|
||||
37000000000000,
|
||||
37500000000000,
|
||||
38000000000000,
|
||||
38500000000000,
|
||||
39000000000000,
|
||||
39500000000000,
|
||||
40000000000000,
|
||||
40500000000000,
|
||||
41000000000000,
|
||||
41500000000000,
|
||||
42000000000000
|
||||
]
|
||||
}
|
||||
},
|
||||
"operational": {
|
||||
"temperature": 283,
|
||||
"raman_pumps": [
|
||||
{
|
||||
"power": 0.2,
|
||||
"frequency": 205000000000000,
|
||||
"propagation_direction": "counterprop"
|
||||
},
|
||||
{
|
||||
"power": 0.206,
|
||||
"frequency": 201000000000000,
|
||||
"propagation_direction": "counterprop"
|
||||
}
|
||||
]
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"latitude": 1,
|
||||
"longitude": 0,
|
||||
"city": null,
|
||||
"region": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
{
|
||||
"raman_parameters": {
|
||||
"flag_raman": true,
|
||||
"space_resolution": 10e3,
|
||||
"tolerance": 1e-8
|
||||
"raman_params": {
|
||||
"flag": true,
|
||||
"result_spatial_resolution": 10e3,
|
||||
"solver_spatial_resolution": 50
|
||||
},
|
||||
"nli_parameters": {
|
||||
"nli_method_name": "ggn_spectrally_separated",
|
||||
"wdm_grid_size": 50e9,
|
||||
"nli_params": {
|
||||
"method": "ggn_spectrally_separated",
|
||||
"dispersion_tolerance": 1,
|
||||
"phase_shift_tolerance": 0.1,
|
||||
"computed_channels": [1, 18, 37, 56, 75]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -39,8 +39,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -64,8 +64,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
|
||||
@@ -1258,7 +1258,7 @@
|
||||
},
|
||||
{
|
||||
"metric-type": "SNR-0.1nm",
|
||||
"accumulative-value": 28.77
|
||||
"accumulative-value": 28.78
|
||||
},
|
||||
{
|
||||
"metric-type": "OSNR-bandwidth",
|
||||
|
||||
@@ -3,5 +3,5 @@ response-id,source,destination,path_bandwidth,Pass?,nb of tsp pairs,total cost,t
|
||||
1,trx Brest_KLA,trx Vannes_KBE,10.0,True,1,1,Voyager,mode 1,22.65,22.11,18.03,32.0,1.0,trx Brest_KLA | roadm Brest_KLA | east edfa in Brest_KLA to Morlaix | fiber (Brest_KLA → Morlaix)-F060 | east fused spans in Morlaix | fiber (Morlaix → Lannion_CAS)-F059 | west edfa in Lannion_CAS to Morlaix | roadm Lannion_CAS | east edfa in Lannion_CAS to Corlay | fiber (Lannion_CAS → Corlay)-F061 | west fused spans in Corlay | fiber (Corlay → Loudeac)-F010 | west fused spans in Loudeac | fiber (Loudeac → Lorient_KMA)-F054 | west edfa in Lorient_KMA to Loudeac | roadm Lorient_KMA | east edfa in Lorient_KMA to Vannes_KBE | fiber (Lorient_KMA → Vannes_KBE)-F055 | west edfa in Vannes_KBE to Lorient_KMA | roadm Vannes_KBE | trx Vannes_KBE,"-276, 4",,,
|
||||
3,trx Lannion_CAS,trx Rennes_STA,60.0,True,1,1,vendorA_trx-type1,mode 1,28.29,25.85,21.77,32.0,1.0,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,"-284, 4",,,
|
||||
4,trx Rennes_STA,trx Lannion_CAS,150.0,True,1,1,vendorA_trx-type1,mode 2,22.27,22.15,15.05,64.0,0.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Ploermel | fiber (Rennes_STA → Ploermel)- | east edfa in Ploermel to Vannes_KBE | fiber (Ploermel → Vannes_KBE)- | west edfa in Vannes_KBE to Ploermel | roadm Vannes_KBE | east edfa in Vannes_KBE to Lorient_KMA | fiber (Vannes_KBE → Lorient_KMA)-F055 | west edfa in Lorient_KMA to Vannes_KBE | roadm Lorient_KMA | east edfa in Lorient_KMA to Loudeac | fiber (Lorient_KMA → Loudeac)-F054 | east fused spans in Loudeac | fiber (Loudeac → Corlay)-F010 | east fused spans in Corlay | fiber (Corlay → Lannion_CAS)-F061 | west edfa in Lannion_CAS to Corlay | roadm Lannion_CAS | trx Lannion_CAS,"-266, 6",,,
|
||||
5,trx Rennes_STA,trx Lannion_CAS,20.0,True,1,1,vendorA_trx-type1,mode 2,30.79,28.77,21.68,64.0,3.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Stbrieuc | fiber (Rennes_STA → Stbrieuc)-F057 | west edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Lannion_CAS)-F056 | west edfa in Lannion_CAS to Stbrieuc | roadm Lannion_CAS | trx Lannion_CAS,"-274, 6",,,
|
||||
5,trx Rennes_STA,trx Lannion_CAS,20.0,True,1,1,vendorA_trx-type1,mode 2,30.79,28.78,21.68,64.0,3.0,trx Rennes_STA | roadm Rennes_STA | east edfa in Rennes_STA to Stbrieuc | fiber (Rennes_STA → Stbrieuc)-F057 | west edfa in Stbrieuc to Rennes_STA | fiber (Stbrieuc → Lannion_CAS)-F056 | west edfa in Lannion_CAS to Stbrieuc | roadm Lannion_CAS | trx Lannion_CAS,"-274, 6",,,
|
||||
6,,,,NO_PATH,,,,,,,,,,,,,,
|
||||
|
||||
|
@@ -14,8 +14,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -39,8 +39,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -104,8 +104,8 @@
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
@@ -129,8 +129,8 @@
|
||||
"trx_mode": "mode 2",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
@@ -154,8 +154,8 @@
|
||||
"trx_mode": "mode 2",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
@@ -179,8 +179,8 @@
|
||||
"trx_mode": "mode 2",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"N": "null",
|
||||
"M": "null"
|
||||
"N": null,
|
||||
"M": null
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager_16QAM",
|
||||
"trx_mode": "16QAM",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -37,12 +31,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -62,12 +50,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -87,12 +69,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -133,12 +109,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": "mode 2 - fake",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
"max-nb-of-channel": 63,
|
||||
"output-power": 0.001,
|
||||
@@ -158,12 +128,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": "mode 2",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
"max-nb-of-channel": 63,
|
||||
"output-power": 0.001,
|
||||
@@ -183,12 +147,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -221,12 +179,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": "mode 3",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 62500000000.0,
|
||||
"max-nb-of-channel": 76,
|
||||
"output-power": 0.001,
|
||||
@@ -259,12 +211,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -284,12 +230,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -330,12 +270,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager_16QAM",
|
||||
"trx_mode": "16QAM",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": null,
|
||||
@@ -355,12 +289,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": "mode 1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": null,
|
||||
"output-power": 0.001,
|
||||
@@ -380,12 +308,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": "PS_SP64_1",
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": null,
|
||||
"output-power": null,
|
||||
@@ -405,12 +327,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "vendorA_trx-type1",
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": 80,
|
||||
"output-power": 0.001,
|
||||
@@ -451,12 +367,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": null,
|
||||
"output-power": 0.001,
|
||||
@@ -476,12 +386,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
"max-nb-of-channel": 63,
|
||||
"output-power": null,
|
||||
@@ -501,12 +405,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 50000000000.0,
|
||||
"max-nb-of-channel": null,
|
||||
"output-power": null,
|
||||
@@ -526,12 +424,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 75000000000.0,
|
||||
"max-nb-of-channel": null,
|
||||
"output-power": null,
|
||||
@@ -551,12 +443,6 @@
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": null,
|
||||
"effective-freq-slot": [
|
||||
{
|
||||
"n": "null",
|
||||
"m": "null"
|
||||
}
|
||||
],
|
||||
"spacing": 30000000000.0,
|
||||
"max-nb-of-channel": null,
|
||||
"output-power": null,
|
||||
|
||||
97
tests/data/test_fiber_fix_expected_results.csv
Normal file
97
tests/data/test_fiber_fix_expected_results.csv
Normal file
@@ -0,0 +1,97 @@
|
||||
signal,nli
|
||||
1.9952623149688793e-05,1.1158426495504604e-08
|
||||
1.9952623149688793e-05,1.263949624403159e-08
|
||||
1.9952623149688793e-05,1.3358478621325285e-08
|
||||
1.9952623149688793e-05,1.3830775406251184e-08
|
||||
1.9952623149688793e-05,1.4180462471172083e-08
|
||||
1.9952623149688793e-05,1.4456701012984246e-08
|
||||
1.9952623149688793e-05,1.4683973899785875e-08
|
||||
1.9952623149688793e-05,1.487624147046227e-08
|
||||
1.9952623149688793e-05,1.5042217041806274e-08
|
||||
1.9952623149688793e-05,1.5187703614492153e-08
|
||||
1.9952623149688793e-05,1.5316759790785317e-08
|
||||
1.9952623149688793e-05,1.543233485150211e-08
|
||||
1.9952623149688793e-05,1.553663885878994e-08
|
||||
1.9952623149688793e-05,1.5631370249579246e-08
|
||||
1.9952623149688793e-05,1.5717862065800704e-08
|
||||
1.9952623149688793e-05,1.57971793985894e-08
|
||||
1.9952623149688793e-05,1.5870186356579704e-08
|
||||
1.9952623149688793e-05,1.593759332223716e-08
|
||||
1.9952623149688793e-05,1.5999991070923486e-08
|
||||
1.9952623149688793e-05,1.6057875903450682e-08
|
||||
1.9952623149688793e-05,1.6111668489205982e-08
|
||||
1.9952623149688793e-05,1.6161728217386366e-08
|
||||
1.9952623149688793e-05,1.6208364281630228e-08
|
||||
1.9952623149688793e-05,1.6251844350226973e-08
|
||||
1.9952623149688793e-05,1.629240142540359e-08
|
||||
1.9952623149688793e-05,1.6330239326114482e-08
|
||||
1.9952623149688793e-05,1.6365537111728e-08
|
||||
1.9952623149688793e-05,1.6398452681655655e-08
|
||||
1.9952623149688793e-05,1.642912572715412e-08
|
||||
1.9952623149688793e-05,1.6457680168940455e-08
|
||||
1.9952623149688793e-05,1.6484226183026747e-08
|
||||
1.9952623149688793e-05,1.6508861894003893e-08
|
||||
1.9952623149688793e-05,1.6531674797617433e-08
|
||||
1.9952623149688793e-05,1.655274296130114e-08
|
||||
1.9952623149688793e-05,1.657213604125123e-08
|
||||
1.9952623149688793e-05,1.6589916146838222e-08
|
||||
1.9952623149688793e-05,1.660613857708963e-08
|
||||
1.9952623149688793e-05,1.6620852449214096e-08
|
||||
1.9952623149688793e-05,1.6634101235366932e-08
|
||||
1.9952623149688793e-05,1.664592322084737e-08
|
||||
1.9952623149688793e-05,1.6656351894496074e-08
|
||||
1.9952623149688793e-05,1.666541628009631e-08
|
||||
1.9952623149688793e-05,1.6673141215973025e-08
|
||||
1.9952623149688793e-05,1.6679547588653583e-08
|
||||
1.9952623149688793e-05,1.6684652525341145e-08
|
||||
1.9952623149688793e-05,1.668846954900963e-08
|
||||
1.9952623149688793e-05,1.66910086991187e-08
|
||||
1.9952623149688793e-05,1.6692276620238304e-08
|
||||
1.9952623149688793e-05,1.6692276620238304e-08
|
||||
1.9952623149688793e-05,1.6691008699118703e-08
|
||||
1.9952623149688793e-05,1.6688469549009633e-08
|
||||
1.9952623149688793e-05,1.6684652525341148e-08
|
||||
1.9952623149688793e-05,1.6679547588653586e-08
|
||||
1.9952623149688793e-05,1.6673141215973028e-08
|
||||
1.9952623149688793e-05,1.666541628009631e-08
|
||||
1.9952623149688793e-05,1.6656351894496084e-08
|
||||
1.9952623149688793e-05,1.6645923220847374e-08
|
||||
1.9952623149688793e-05,1.6634101235366935e-08
|
||||
1.9952623149688793e-05,1.66208524492141e-08
|
||||
1.9952623149688793e-05,1.6606138577089633e-08
|
||||
1.9952623149688793e-05,1.6589916146838225e-08
|
||||
1.9952623149688793e-05,1.6572136041251237e-08
|
||||
1.9952623149688793e-05,1.6552742961301146e-08
|
||||
1.9952623149688793e-05,1.653167479761744e-08
|
||||
1.9952623149688793e-05,1.6508861894003893e-08
|
||||
1.9952623149688793e-05,1.648422618302675e-08
|
||||
1.9952623149688793e-05,1.645768016894046e-08
|
||||
1.9952623149688793e-05,1.6429125727154126e-08
|
||||
1.9952623149688793e-05,1.6398452681655658e-08
|
||||
1.9952623149688793e-05,1.6365537111728004e-08
|
||||
1.9952623149688793e-05,1.6330239326114482e-08
|
||||
1.9952623149688793e-05,1.6292401425403594e-08
|
||||
1.9952623149688793e-05,1.6251844350226973e-08
|
||||
1.9952623149688793e-05,1.6208364281630228e-08
|
||||
1.9952623149688793e-05,1.616172821738637e-08
|
||||
1.9952623149688793e-05,1.6111668489205982e-08
|
||||
1.9952623149688793e-05,1.605787590345069e-08
|
||||
1.9952623149688793e-05,1.5999991070923493e-08
|
||||
1.9952623149688793e-05,1.5937593322237167e-08
|
||||
1.9952623149688793e-05,1.5870186356579704e-08
|
||||
1.9952623149688793e-05,1.5797179398589402e-08
|
||||
1.9952623149688793e-05,1.571786206580071e-08
|
||||
1.9952623149688793e-05,1.5631370249579252e-08
|
||||
1.9952623149688793e-05,1.5536638858789946e-08
|
||||
1.9952623149688793e-05,1.5432334851502114e-08
|
||||
1.9952623149688793e-05,1.531675979078532e-08
|
||||
1.9952623149688793e-05,1.5187703614492156e-08
|
||||
1.9952623149688793e-05,1.5042217041806274e-08
|
||||
1.9952623149688793e-05,1.4876241470462273e-08
|
||||
1.9952623149688793e-05,1.4683973899785879e-08
|
||||
1.9952623149688793e-05,1.4456701012984246e-08
|
||||
1.9952623149688793e-05,1.4180462471172086e-08
|
||||
1.9952623149688793e-05,1.3830775406251184e-08
|
||||
1.9952623149688793e-05,1.3358478621325285e-08
|
||||
1.9952623149688793e-05,1.2639496244031593e-08
|
||||
1.9952623149688793e-05,1.1158426495504613e-08
|
||||
|
6
tests/data/test_fiber_flex_expected_results.csv
Normal file
6
tests/data/test_fiber_flex_expected_results.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
signal,nli
|
||||
1.9952623149688793e-05,5.522326183599433e-09
|
||||
1.7957360834719913e-05,4.5606601423111315e-09
|
||||
2.593841009459543e-05,6.633717697038881e-09
|
||||
1.5962098519751036e-05,4.3237017878447286e-09
|
||||
2.3943147779626553e-05,8.311382502260195e-09
|
||||
|
809
tests/data/test_long_network.json
Normal file
809
tests/data/test_long_network.json
Normal file
@@ -0,0 +1,809 @@
|
||||
{
|
||||
"network_name": "Example Network - long path",
|
||||
"elements": [{
|
||||
"uid": "Site_A",
|
||||
"type": "Transceiver",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site A",
|
||||
"region": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "roadm Site A",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site A",
|
||||
"region": "RLD",
|
||||
"latitude": 0.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
},
|
||||
"type": "Roadm"
|
||||
},
|
||||
{
|
||||
"uid": "booster A",
|
||||
"type": "Edfa",
|
||||
"type_variety": "std_medium_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span1",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa1",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span2",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa2",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span3",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa3",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span4",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa4",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span5",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa5",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "roadm Site C",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site A",
|
||||
"region": "RLD",
|
||||
"latitude": 0.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
},
|
||||
"type": "Roadm"
|
||||
},
|
||||
{
|
||||
"uid": "booster C",
|
||||
"type": "Edfa",
|
||||
"type_variety": "std_medium_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span6",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa6",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span7",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa7",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span8",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa8",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span9",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa9",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span10",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa10",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "roadm Site D",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site A",
|
||||
"region": "RLD",
|
||||
"latitude": 0.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
},
|
||||
"type": "Roadm"
|
||||
},
|
||||
{
|
||||
"uid": "booster D",
|
||||
"type": "Edfa",
|
||||
"type_variety": "std_medium_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span11",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa11",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span12",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa12",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "roadm Site E",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site A",
|
||||
"region": "RLD",
|
||||
"latitude": 0.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
},
|
||||
"type": "Roadm"
|
||||
},
|
||||
{
|
||||
"uid": "booster E",
|
||||
"type": "Edfa",
|
||||
"type_variety": "std_medium_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span13",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa13",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span14",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa14",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test_fixed_gain",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Span15",
|
||||
"type": "Fiber",
|
||||
"type_variety": "SSMF",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km"
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 1,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "Edfa15",
|
||||
"type": "Edfa",
|
||||
"type_variety": "test",
|
||||
"operational": {
|
||||
"gain_target": 16,
|
||||
"tilt_target": 0
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"region": "",
|
||||
"latitude": 2,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"uid": "roadm Site B",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site B",
|
||||
"region": "RLD",
|
||||
"latitude": 0.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
},
|
||||
"type": "Roadm"
|
||||
},
|
||||
{
|
||||
"uid": "Site_B",
|
||||
"type": "Transceiver",
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Site B",
|
||||
"region": "",
|
||||
"latitude": 3,
|
||||
"longitude": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"connections": [{
|
||||
"from_node": "Site_A",
|
||||
"to_node": "roadm Site A"
|
||||
},
|
||||
{
|
||||
"from_node": "roadm Site A",
|
||||
"to_node": "booster A"
|
||||
},
|
||||
{
|
||||
"from_node": "booster A",
|
||||
"to_node": "Span1"
|
||||
},
|
||||
{
|
||||
"from_node": "Span1",
|
||||
"to_node": "Edfa1"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa1",
|
||||
"to_node": "Span2"
|
||||
},
|
||||
{
|
||||
"from_node": "Span2",
|
||||
"to_node": "Edfa2"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa2",
|
||||
"to_node": "Span3"
|
||||
},
|
||||
{
|
||||
"from_node": "Span3",
|
||||
"to_node": "Edfa3"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa3",
|
||||
"to_node": "Span4"
|
||||
},
|
||||
{
|
||||
"from_node": "Span4",
|
||||
"to_node": "Edfa4"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa4",
|
||||
"to_node": "Span5"
|
||||
},
|
||||
{
|
||||
"from_node": "Span5",
|
||||
"to_node": "Edfa5"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa5",
|
||||
"to_node": "roadm Site C"
|
||||
},
|
||||
{
|
||||
"from_node": "roadm Site C",
|
||||
"to_node": "booster C"
|
||||
},
|
||||
{
|
||||
"from_node": "booster C",
|
||||
"to_node": "Span6"
|
||||
},
|
||||
{
|
||||
"from_node": "Span6",
|
||||
"to_node": "Edfa6"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa6",
|
||||
"to_node": "Span7"
|
||||
},
|
||||
{
|
||||
"from_node": "Span7",
|
||||
"to_node": "Edfa7"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa7",
|
||||
"to_node": "Span8"
|
||||
},
|
||||
{
|
||||
"from_node": "Span8",
|
||||
"to_node": "Edfa8"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa8",
|
||||
"to_node": "Span9"
|
||||
},
|
||||
{
|
||||
"from_node": "Span9",
|
||||
"to_node": "Edfa9"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa9",
|
||||
"to_node": "Span10"
|
||||
},
|
||||
{
|
||||
"from_node": "Span10",
|
||||
"to_node": "Edfa10"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa10",
|
||||
"to_node": "roadm Site D"
|
||||
},
|
||||
{
|
||||
"from_node": "roadm Site D",
|
||||
"to_node": "booster D"
|
||||
},
|
||||
{
|
||||
"from_node": "booster D",
|
||||
"to_node": "Span11"
|
||||
},
|
||||
{
|
||||
"from_node": "Span11",
|
||||
"to_node": "Edfa11"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa11",
|
||||
"to_node": "Span12"
|
||||
},
|
||||
{
|
||||
"from_node": "Span12",
|
||||
"to_node": "Edfa12"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa12",
|
||||
"to_node": "roadm Site E"
|
||||
},
|
||||
{
|
||||
"from_node": "roadm Site E",
|
||||
"to_node": "booster E"
|
||||
},
|
||||
{
|
||||
"from_node": "booster E",
|
||||
"to_node": "Span13"
|
||||
},
|
||||
{
|
||||
"from_node": "Span13",
|
||||
"to_node": "Edfa13"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa13",
|
||||
"to_node": "Span14"
|
||||
},
|
||||
{
|
||||
"from_node": "Span14",
|
||||
"to_node": "Edfa14"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa14",
|
||||
"to_node": "Span15"
|
||||
},
|
||||
{
|
||||
"from_node": "Span15",
|
||||
"to_node": "Edfa15"
|
||||
},
|
||||
{
|
||||
"from_node": "Edfa15",
|
||||
"to_node": "roadm Site B"
|
||||
},
|
||||
{
|
||||
"from_node": "roadm Site B",
|
||||
"to_node": "Site_B"
|
||||
}
|
||||
]
|
||||
}
|
||||
96
tests/data/test_lumped_losses_fiber_no_pumps.csv
Normal file
96
tests/data/test_lumped_losses_fiber_no_pumps.csv
Normal file
@@ -0,0 +1,96 @@
|
||||
1.000000000000000021e-03,5.915557166626927424e-04,3.840877221245049653e-04,2.466727384040633977e-04,1.573474629975438242e-04,9.994300566924636483e-05,6.331217828438720550e-05,4.004003600460594289e-05,2.529553013238426405e-05
|
||||
1.000000000000000021e-03,5.910087140881509866e-04,3.835259923737136521e-04,2.462279833344210639e-04,1.570298910751132091e-04,9.972770370845923681e-05,6.317035443958771254e-05,3.994817502675088248e-05,2.523663218966317481e-05
|
||||
1.000000000000000021e-03,5.904624672772724710e-04,3.829653846278134621e-04,2.457842903404500092e-04,1.567131560243821098e-04,9.951300275831494635e-05,6.302894048828063141e-05,3.985658526347281646e-05,2.517791045472703461e-05
|
||||
1.000000000000000021e-03,5.899169734839467818e-04,3.824058950962419133e-04,2.453416557234028707e-04,1.563972548287988369e-04,9.929890059644241613e-05,6.288793488850426760e-05,3.976526568300959219e-05,2.511936425240675192e-05
|
||||
1.000000000000000021e-03,5.893722299298780965e-04,3.818475199355363483e-04,2.449000757332959262e-04,1.560821844312877747e-04,9.908539497140619857e-05,6.274733607851797545e-05,3.967421524053715842e-05,2.506099289905929403e-05
|
||||
1.000000000000000021e-03,5.888282338048204554e-04,3.812902552499899305e-04,2.444595465697163919e-04,1.557679417349789946e-04,9.887248360327203632e-05,6.260714247720703990e-05,3.958343287844485109e-05,2.500279570274922987e-05
|
||||
1.000000000000000021e-03,5.882849822668304897e-04,3.807340970923119234e-04,2.440200643826254091e-04,1.554545236039297650e-04,9.866016418416755746e-05,6.246735248448248958e-05,3.949291752660743311e-05,2.494477196342878550e-05
|
||||
1.000000000000000021e-03,5.877403241312353140e-04,3.801768826891299322e-04,2.435799392795756472e-04,1.551407333476893054e-04,9.844762961169771281e-05,6.232743618144160702e-05,3.940232665622856909e-05,2.488670234861411131e-05
|
||||
1.000000000000000021e-03,5.871942634186000593e-04,3.796186190022559433e-04,2.431391779090945110e-04,1.548265761463755335e-04,9.823488356157069126e-05,6.218739605181586088e-05,3.931166190013138108e-05,2.482858791458364441e-05
|
||||
1.000000000000000021e-03,5.866468041173980141e-04,3.790593129257516128e-04,2.426977868451053722e-04,1.545120571165502460e-04,9.802192966180839372e-05,6.204723454596646772e-05,3.922092486871354988e-05,2.477042970290643410e-05
|
||||
1.000000000000000021e-03,5.860979501842715923e-04,3.784989712866057847e-04,2.422557725877665796e-04,1.541971813119806349e-04,9.780877149334107738e-05,6.190695408131255699e-05,3.913011715023943305e-05,2.471222874063606835e-05
|
||||
1.000000000000000021e-03,5.855428054911818777e-04,3.779325362214322600e-04,2.418091152720060536e-04,1.538790714407033914e-04,9.759345536126727376e-05,6.176526646718061210e-05,3.903840385562048950e-05,2.465344951928800295e-05
|
||||
1.000000000000000021e-03,5.849813875456967485e-04,3.773600382625630725e-04,2.413578451141304101e-04,1.535577517356502032e-04,9.737599881379701964e-05,6.162218372343696363e-05,3.894579295722817337e-05,2.459409722576532997e-05
|
||||
1.000000000000000021e-03,5.844137140093277807e-04,3.767815081401627831e-04,2.409019924922280132e-04,1.532332465435331354e-04,9.715641947446165209e-05,6.147771791853056712e-05,3.885229245840823961e-05,2.453417706661341544e-05
|
||||
1.000000000000000021e-03,5.838398026969793654e-04,3.761969767804803125e-04,2.404415879440078890e-04,1.529055803229076760e-04,9.693473504062415536e-05,6.133188116843621776e-05,3.875791039276530608e-05,2.447369426754818325e-05
|
||||
1.000000000000000021e-03,5.832596715764015120e-04,3.756064753041117783e-04,2.399766621646476654e-04,1.525747776422469490e-04,9.671096328199675835e-05,6.118468563560254894e-05,3.866265482344967213e-05,2.441265407298631344e-05
|
||||
1.000000000000000021e-03,5.826733387676383139e-04,3.750100350242446291e-04,2.395072460046293692e-04,1.522408631780071723e-04,9.648512203915507620e-05,6.103614352789890607e-05,3.856653384244465896e-05,2.435106174557538284e-05
|
||||
1.000000000000000021e-03,5.820810441807425326e-04,3.744079089136845458e-04,2.390335428197917333e-04,1.519039834472631588e-04,9.625731118926498641e-05,6.088632085792882825e-05,3.846959029618343478e-05,2.428894479270876788e-05
|
||||
1.000000000000000021e-03,5.814828054675655030e-04,3.738001274474016776e-04,2.385555825972570808e-04,1.515641624143126585e-04,9.602754804766522702e-05,6.073522946956701240e-05,3.837183203343020677e-05,2.422630831805138899e-05
|
||||
1.000000000000000021e-03,5.808786404289665358e-04,3.731867212872194738e-04,2.380733954737781241e-04,1.512214241469207320e-04,9.579584999731260704e-05,6.058288124990010364e-05,3.827326693032387752e-05,2.416315744255338838e-05
|
||||
1.000000000000000021e-03,5.802685670142343878e-04,3.725677212800349654e-04,2.375870117335689917e-04,1.508757928143868079e-04,9.556223448729982074e-05,6.042928812817623899e-05,3.817390288966712009e-05,2.409949730398197492e-05
|
||||
1.000000000000000021e-03,5.796526968519212725e-04,3.719432545624587992e-04,2.370965379259533010e-04,1.505273470495264228e-04,9.532675589286383365e-05,6.027448635812982831e-05,3.807376356963088358e-05,2.403534314190221437e-05
|
||||
1.000000000000000021e-03,5.790310479093865609e-04,3.713133518665244839e-04,2.366020041460938778e-04,1.501761108339581341e-04,9.508943151110322721e-05,6.011848775803337427e-05,3.797285679655886708e-05,2.397070004317041725e-05
|
||||
1.000000000000000021e-03,5.784036383121742876e-04,3.706780441238009577e-04,2.361034406501071276e-04,1.498221082613785163e-04,9.485027871279472060e-05,5.996130419345521918e-05,3.787119042685209972e-05,2.390557311366359151e-05
|
||||
1.000000000000000021e-03,5.777704863433433301e-04,3.700373624633735868e-04,2.356008778526011383e-04,1.494653635353745394e-04,9.460931494071504256e-05,5.980294757607067669e-05,3.776877234616485572e-05,2.383996747774973522e-05
|
||||
1.000000000000000021e-03,5.771316104427772061e-04,3.693913382097967039e-04,2.350943463241932639e-04,1.491059009672212558e-04,9.436655770795449559e-05,5.964342986246977532e-05,3.766561046859827219e-05,2.377388827775711285e-05
|
||||
1.000000000000000021e-03,5.764870292064976651e-04,3.687400028810397501e-04,2.345838767890191692e-04,1.487437449736715462e-04,9.412202459622686095e-05,5.948276305296108525e-05,3.756171273589169023e-05,2.370734067344167480e-05
|
||||
1.000000000000000021e-03,5.758375946234993610e-04,3.680842155919215072e-04,2.340701414876563216e-04,1.483793719498717782e-04,9.387603703510192111e-05,5.932115823520561543e-05,3.745721560837426419e-05,2.364041205155829344e-05
|
||||
1.000000000000000021e-03,5.751833223951592329e-04,3.674240032104748388e-04,2.335531666416808738e-04,1.480128027327277474e-04,9.362861002461524574e-05,5.915862564500113025e-05,3.735212585887714390e-05,2.357310681190604310e-05
|
||||
1.000000000000000021e-03,5.745242283439769499e-04,3.667593927483133397e-04,2.330329785818580578e-04,1.476440582313571256e-04,9.337975861033522300e-05,5.899517554647101613e-05,3.724645027783519551e-05,2.350542936525477225e-05
|
||||
1.000000000000000021e-03,5.738603284130473379e-04,3.660904113590355527e-04,2.325096037462197861e-04,1.472731594253864234e-04,9.312949788206356194e-05,5.883081823114703288e-05,3.714019567266727830e-05,2.343738413293735195e-05
|
||||
1.000000000000000021e-03,5.731917314000997948e-04,3.654171810067180655e-04,2.319831433530600859e-04,1.469001805571756218e-04,9.287787898176902846e-05,5.866558771451522606e-05,3.703338420706373603e-05,2.336898537810763873e-05
|
||||
1.000000000000000021e-03,5.725184531760584700e-04,3.647397285916569422e-04,2.314536235223777264e-04,1.465251423190001693e-04,9.262491677678542706e-05,5.849949412959568328e-05,3.692602258076439168e-05,2.330023745100291859e-05
|
||||
1.000000000000000021e-03,5.718405097346714646e-04,3.640580811583470273e-04,2.309210704829702432e-04,1.461480654746279682e-04,9.237062617930094123e-05,5.833254763720848617e-05,3.681811751074023914e-05,2.323114471257928647e-05
|
||||
1.000000000000000021e-03,5.711579171919053044e-04,3.633722658937428313e-04,2.303855105703487465e-04,1.457689708574830614e-04,9.211502214495855044e-05,5.816475842498649012e-05,3.670967573052717390e-05,2.316171153407365905e-05
|
||||
1.000000000000000021e-03,5.704706917853448337e-04,3.626823101255147543e-04,2.298469702246577707e-04,1.453878793688169360e-04,9.185811967146480901e-05,5.799613670639434487e-05,3.660070398956385041e-05,2.309194229656875218e-05
|
||||
1.000000000000000021e-03,5.697788498735841109e-04,3.619882413202942504e-04,2.293054759885765847e-04,1.450048119758659754e-04,9.159993379718755254e-05,5.782669271974067121e-05,3.649120905252569737e-05,2.302184139055488024e-05
|
||||
1.000000000000000021e-03,5.690839249361781711e-04,3.612915831986411477e-04,2.287622092282637863e-04,1.446206010588695675e-04,9.134102410651873409e-05,5.765679311500335815e-05,3.638142760462866287e-05,2.295156024783083523e-05
|
||||
1.000000000000000021e-03,5.683859273133331363e-04,3.605923537461036641e-04,2.282171874164802170e-04,1.442352604283837097e-04,9.108140050118301682e-05,5.748644463023418617e-05,3.627136409615889481e-05,2.288110175599186700e-05
|
||||
1.000000000000000021e-03,5.676848674169825831e-04,3.598905710243090802e-04,2.276704280772651710e-04,1.438488039249314222e-04,9.082107289971861372e-05,5.731565401294060850e-05,3.616102298282374168e-05,2.281046880581413228e-05
|
||||
1.000000000000000021e-03,5.669807557304629327e-04,3.591862531699841626e-04,2.271219487847658911e-04,1.434612454179789358e-04,9.056005123670258442e-05,5.714442801953895405e-05,3.605040872538299508e-05,2.273966429101268041e-05
|
||||
1.000000000000000021e-03,5.662756696284717943e-04,3.584815135619230891e-04,2.265734124911083147e-04,1.430737675597642188e-04,9.029913524493678829e-05,5.697329258726415482e-05,3.593986162522089478e-05,2.266890625682277028e-05
|
||||
1.000000000000000021e-03,5.655696121370722921e-04,3.577763576655677066e-04,2.260248242651153531e-04,1.426863741861267136e-04,9.003832758694041048e-05,5.680224948786493348e-05,3.582938283523433764e-05,2.259819544408493697e-05
|
||||
1.000000000000000021e-03,5.648625863181645518e-04,3.570707909872514684e-04,2.254761892066869196e-04,1.422990691538204475e-04,8.977763093872482745e-05,5.663130050166089515e-05,3.571897351373497692e-05,2.252753259705453904e-05
|
||||
1.000000000000000021e-03,5.641545952693012783e-04,3.563648190736888295e-04,2.249275124461922067e-04,1.419118563399853763e-04,8.951704798938974166e-05,5.646044741725799208e-05,3.560863482425828067e-05,2.245691846327665519e-05
|
||||
1.000000000000000021e-03,5.634456421235028989e-04,3.556584475114634488e-04,2.243787991438712611e-04,1.415247396416227112e-04,8.925658144072659398e-05,5.628969203126926030e-05,3.549836793537420297e-05,2.238635379346144160e-05
|
||||
1.000000000000000021e-03,5.627357300490819225e-04,3.549516819265270164e-04,2.238300544892383743e-04,1.411377229750731741e-04,8.899623400682166435e-05,5.611903614803531905e-05,3.538817402049950172e-05,2.231583934136070575e-05
|
||||
1.000000000000000021e-03,5.620265745740795878e-04,3.542462045793823072e-04,2.232825718355581747e-04,1.407517127660701999e-04,8.873661298955798349e-05,5.594887683102661642e-05,3.527830905094599801e-05,2.224553873809700179e-05
|
||||
1.000000000000000021e-03,5.613181716914067464e-04,3.535420099674467737e-04,2.227363458317740963e-04,1.403667046661989041e-04,8.847771519474716161e-05,5.577921186868756777e-05,3.516877154903826080e-05,2.217545101761858074e-05
|
||||
1.000000000000000021e-03,5.606105174362018646e-04,3.528390926567629869e-04,2.221913711948466166e-04,1.399826943822104249e-04,8.821953746856249804e-05,5.561003907731979445e-05,3.505956005567386572e-05,2.210557522599888898e-05
|
||||
1.000000000000000021e-03,5.599036078855734169e-04,3.521374472813410678e-04,2.216476427089692435e-04,1.395996776753266513e-04,8.796207669700402236e-05,5.544135630070159596e-05,3.495067313006486022e-05,2.203591042126611129e-05
|
||||
1.000000000000000021e-03,5.591992581819900257e-04,3.514388991464684675e-04,2.211065862108586844e-04,1.392186639199167455e-04,8.770601346645835294e-05,5.527361030479937100e-05,3.484239951455165907e-05,2.196664147854661471e-05
|
||||
1.000000000000000021e-03,5.584974577369657654e-04,3.507434317312190116e-04,2.205681855748304113e-04,1.388396401724235928e-04,8.745133837595373525e-05,5.510679463338290224e-05,3.473473491875524963e-05,2.189776560286087024e-05
|
||||
1.000000000000000021e-03,5.577981960279812567e-04,3.500510286412654524e-04,2.200324248112712805e-04,1.384625936044855835e-04,8.719804211084999142e-05,5.494090289064881491e-05,3.462767509292537455e-05,2.182928002589032757e-05
|
||||
1.000000000000000021e-03,5.571014625980537805e-04,3.493616736077873519e-04,2.194992880653100025e-04,1.380875115017372141e-04,8.694611544190507637e-05,5.477592874055209164e-05,3.452121582748434684e-05,2.176118200567564087e-05
|
||||
1.000000000000000021e-03,5.564072470552914543e-04,3.486753504863699662e-04,2.189687596154907018e-04,1.377143812626113696e-04,8.669554922434540153e-05,5.461186590614181566e-05,3.441535295257522900e-05,2.169346882631773742e-05
|
||||
1.000000000000000021e-03,5.557155390724777657e-04,3.479920432559456848e-04,2.184408238724854000e-04,1.373431903971786034e-04,8.644633439696230146e-05,5.444870816891464747e-05,3.431008233762035268e-05,2.162613779768559453e-05
|
||||
1.000000000000000021e-03,5.550282308874212147e-04,3.473135853761227104e-04,2.179168797741835634e-04,1.369749146289257855e-04,8.619912270820690987e-05,5.428688083545962664e-05,3.420567782931384528e-05,2.155936384410790980e-05
|
||||
1.000000000000000021e-03,5.543453044039096641e-04,3.466399489498413807e-04,2.173969005859271932e-04,1.366095327799803094e-04,8.595389890905566596e-05,5.412637349122350694e-05,3.410213253115887156e-05,2.149314248283782383e-05
|
||||
1.000000000000000021e-03,5.536667416543260278e-04,3.459711063207645686e-04,2.168808598269340415e-04,1.362470238846985658e-04,8.571064790824490891e-05,5.396717583150281386e-05,3.399943962027434491e-05,2.142746927933548718e-05
|
||||
1.000000000000000021e-03,5.529925247987736454e-04,3.453070300711248903e-04,2.163687312677279435e-04,1.358873671873677324e-04,8.546935477049620155e-05,5.380927766017944798e-05,3.389759234653519571e-05,2.136233984669994517e-05
|
||||
1.000000000000000021e-03,5.523242123557685823e-04,3.446492679875326503e-04,2.158617145497228296e-04,1.355314077800207832e-04,8.523058755788532964e-05,5.365305115434923267e-05,3.379683095199963850e-05,2.129790788796336886e-05
|
||||
1.000000000000000021e-03,5.516617811459008413e-04,3.439977838203789025e-04,2.153597748770509342e-04,1.351791181086447731e-04,8.499432644189092710e-05,5.349848277838686991e-05,3.369714647650299112e-05,2.123416758034315385e-05
|
||||
1.000000000000000021e-03,5.510052081904127453e-04,3.433525416882428740e-04,2.148628778379304833e-04,1.348304709382760146e-04,8.476055183025699440e-05,5.334555916079864168e-05,3.359853006971443923e-05,2.117111317291617240e-05
|
||||
1.000000000000000021e-03,5.503544707098636342e-04,3.427135060745518090e-04,2.143709894006651793e-04,1.344854393494213974e-04,8.452924436422564868e-05,5.319426709225049006e-05,3.350097298979682009e-05,2.110873898573355285e-05
|
||||
1.000000000000000021e-03,5.497095461228062706e-04,3.420806418242862412e-04,2.138840759097000895e-04,1.341439967345312348e-04,8.430038491581448882e-05,5.304459352362807473e-05,3.340446660208796169e-05,2.104703940894962140e-05
|
||||
1.000000000000000021e-03,5.490704120444732210e-04,3.414539141407250565e-04,2.134021040817290626e-04,1.338061167945246396e-04,8.407395458513211085e-05,5.289652556412503305e-05,3.330900237780223545e-05,2.098600890196449472e-05
|
||||
1.000000000000000021e-03,5.484371298422446297e-04,3.408333692467681113e-04,2.129251024270059081e-04,1.334718163299163942e-04,8.384996326436759272e-05,5.275006911363530105e-05,3.321458388816914869e-05,2.092564965374723430e-05
|
||||
1.000000000000000021e-03,5.478096771889333057e-04,3.402189725469309967e-04,2.124530379214265854e-04,1.331410692793207290e-04,8.362839223924152716e-05,5.260521141428185532e-05,3.312120269498457291e-05,2.086595618361951373e-05
|
||||
1.000000000000000021e-03,5.471880319478338028e-04,3.396106897916775086e-04,2.119858778995733334e-04,1.328138498781884043e-04,8.340922301478033581e-05,5.246193986031627375e-05,3.302885046175365648e-05,2.080692307740899109e-05
|
||||
1.000000000000000021e-03,5.465721721714859958e-04,3.390084870743713592e-04,2.115235900510876890e-04,1.324901326555763298e-04,8.319243731282516567e-05,5.232024199634728476e-05,3.293751895248773966e-05,2.074854498665493433e-05
|
||||
1.000000000000000021e-03,5.459629241404544706e-04,3.384131725428774743e-04,2.110667946787101129e-04,1.321703518944146796e-04,8.297832591380873519e-05,5.218030786215170435e-05,3.284733064718059383e-05,2.069090019482566404e-05
|
||||
1.000000000000000021e-03,5.453602635114507746e-04,3.378247083723790616e-04,2.106154557101209946e-04,1.318544791589579420e-04,8.276686841524559784e-05,5.204212355675735553e-05,3.275827635494999894e-05,2.063398273378693265e-05
|
||||
1.000000000000000021e-03,5.447641661727002649e-04,3.372430571518834691e-04,2.101695374983407439e-04,1.315424863636820575e-04,8.255804467261116894e-05,5.190567535780167048e-05,3.267034700418964161e-05,2.057778671334094953e-05
|
||||
1.000000000000000021e-03,5.441746082424759419e-04,3.366681818805845774e-04,2.097290048174083239e-04,1.312343457694375884e-04,8.235183479637930588e-05,5.177094971942625129e-05,3.258353364113958107e-05,2.052230632028256941e-05
|
||||
1.000000000000000021e-03,5.435915660676414983e-04,3.361000459642789163e-04,2.092938228581225045e-04,1.309300299796617602e-04,8.214821914910500468e-05,5.163793327020207291e-05,3.249782742847867687e-05,2.046753581747058517e-05
|
||||
1.000000000000000021e-03,5.430150162222109568e-04,3.355386132118161487e-04,2.088639572238308215e-04,1.306295119366350911e-04,8.194717834254394587e-05,5.150661281108238069e-05,3.241321964393507540e-05,2.041346954291065543e-05
|
||||
1.000000000000000021e-03,5.424450181544462771e-04,3.349839271155603902e-04,2.084394340599780252e-04,1.303328067075743425e-04,8.174872108664715700e-05,5.137699346328779477e-05,3.232971335519106785e-05,2.036010936323692981e-05
|
||||
1.000000000000000021e-03,5.418815485793469040e-04,3.344359518126675877e-04,2.080202193468776877e-04,1.300398875631312602e-04,8.155282824274543232e-05,5.124906220377890154e-05,3.224729995882103797e-05,2.030744969463951815e-05
|
||||
1.000000000000000021e-03,5.413245844265015877e-04,3.338946518213946552e-04,2.076062794549138172e-04,1.297507280942760690e-04,8.135948090770286575e-05,5.112280617242197348e-05,3.216597096011364272e-05,2.025548502431296445e-05
|
||||
1.000000000000000021e-03,5.407741028387587183e-04,3.333599920378552692e-04,2.071975811406991498e-04,1.294653022088876294e-04,8.116866041129419294e-05,5.099821267012491396e-05,3.208571797180734118e-05,2.020420990962221080e-05
|
||||
1.000000000000000021e-03,5.402303025747014556e-04,3.328321561526745862e-04,2.067942601549091974e-04,1.291837026153304184e-04,8.098042783792958120e-05,5.087532120941394917e-05,3.200656629292941073e-05,2.015364045325785942e-05
|
||||
1.000000000000000021e-03,5.396931605409548225e-04,3.323111087173311550e-04,2.063962829591101838e-04,1.289059030082810651e-04,8.079476437365657295e-05,5.075411899733799342e-05,3.192850747587867838e-05,2.010377117411100997e-05
|
||||
1.000000000000000021e-03,5.391626538584482192e-04,3.317968146613820609e-04,2.060036164003212873e-04,1.286318773981824648e-04,8.061165143636152362e-05,5.063459340114707095e-05,3.185153317990099749e-05,2.005459666083220688e-05
|
||||
1.000000000000000021e-03,5.386387598611086340e-04,3.312892392892789490e-04,2.056162277072543561e-04,1.283616001079104806e-04,8.043107067321031531e-05,5.051673194647494236e-05,3.177563516985718072e-05,2.000611157101859271e-05
|
||||
1.000000000000000021e-03,5.381214560945620949e-04,3.307883482772016118e-04,2.052340844865845515e-04,1.280950457694747437e-04,8.025300395811590449e-05,5.040052231554306949e-05,3.170080531500530551e-05,1.995831063041139523e-05
|
||||
1.000000000000000021e-03,5.376107203148404326e-04,3.302941076699326679e-04,2.048571547192701043e-04,1.278321893207613302e-04,8.007743338923888358e-05,5.028595234538581714e-05,3.162703558779804923e-05,1.991118863210237610e-05
|
||||
1.000000000000000021e-03,5.371022748594453389e-04,3.298024246812891291e-04,2.044823390252625600e-04,1.275708788891961756e-04,7.990292563076895462e-05,5.017208832604374468e-05,3.155372544493714152e-05,1.986436223028797206e-05
|
||||
1.000000000000000021e-03,5.365961117498912114e-04,3.293132869081722108e-04,2.041096254707852251e-04,1.273111050031557620e-04,7.972947385597059739e-05,5.005892559260894715e-05,3.148087179640124731e-05,1.981782941609088261e-05
|
||||
1.000000000000000021e-03,5.360922230056120808e-04,3.288266819633119922e-04,2.037390021489647173e-04,1.270528582181514683e-04,7.955707126027152540e-05,4.994645949643470906e-05,3.140847156340457124e-05,1.977158818812822943e-05
|
||||
1.000000000000000021e-03,5.355906006439992324e-04,3.283425974753378354e-04,2.033704571798752555e-04,1.267961291168465381e-04,7.938571106126265876e-05,4.983468540512894492e-05,3.133652167839010846e-05,1.972563655250571181e-05
|
||||
1.000000000000000021e-03,5.350891259362026411e-04,3.278589502113704612e-04,2.030023855884717748e-04,1.265397912200834861e-04,7.921463777328526478e-05,4.972310904903239575e-05,3.126470337114675132e-05,1.967977067875568528e-05
|
||||
1.000000000000000021e-03,5.345877966909636306e-04,3.273757374134148111e-04,2.026347848040474173e-04,1.262838424862170036e-04,7.904384991646645146e-05,4.961172941171763403e-05,3.119301596587686584e-05,1.963399012641590455e-05
|
||||
1.000000000000000021e-03,5.340866106918126799e-04,3.268929562877650259e-04,2.022676522245876859e-04,1.260282808504260116e-04,7.887334599501782170e-05,4.950054546622813158e-05,3.112145877995456692e-05,1.958829445064508602e-05
|
||||
1.000000000000000021e-03,5.335855656972701092e-04,3.264106040054970534e-04,2.019009852173301103e-04,1.257731042251948573e-04,7.870312449759831505e-05,4.938955617533215942e-05,3.105003112409614148e-05,1.954268320233478379e-05
|
||||
1.000000000000000021e-03,5.330846594410641130e-04,3.259286777029715004e-04,2.015347811193284109e-04,1.255183105007985753e-04,7.853318389767883849e-05,4.927876049177821896e-05,3.097873230253197569e-05,1.949715592822227211e-05
|
||||
|
96
tests/data/test_lumped_losses_fiber_no_raman.csv
Normal file
96
tests/data/test_lumped_losses_fiber_no_raman.csv
Normal file
@@ -0,0 +1,96 @@
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
1.000000000000000021e-03,6.456542290346556703e-04,2.238721138568339957e-05
|
||||
|
98
tests/data/test_lumped_losses_raman_fiber.csv
Normal file
98
tests/data/test_lumped_losses_raman_fiber.csv
Normal file
@@ -0,0 +1,98 @@
|
||||
1.000000000000000021e-03,6.059596816131984903e-04,4.124540545641951000e-04,2.874328952539468305e-04,2.103398919772851445e-04,1.677242405549142946e-04,1.544863001982801454e-04,1.810521006745035243e-04,3.200643516934312716e-04
|
||||
1.000000000000000021e-03,6.053276391419512917e-04,4.117105797931639192e-04,2.867132476380170980e-04,2.096494018677202108e-04,1.670078900317705016e-04,1.536235748319029191e-04,1.797412011853683042e-04,3.172302656811062894e-04
|
||||
1.000000000000000021e-03,6.046965215788322606e-04,4.109687952835336887e-04,2.859957486816950244e-04,2.089614974033423851e-04,1.662949011112697126e-04,1.527659914515381017e-04,1.784402430016445015e-04,3.144223032044235564e-04
|
||||
1.000000000000000021e-03,6.040663257237133005e-04,4.102286952029449651e-04,2.852803900268787471e-04,2.082761669373014350e-04,1.655852558250782110e-04,1.519135165004971508e-04,1.771491455864908956e-04,3.116402083285431824e-04
|
||||
1.000000000000000021e-03,6.034134049131552151e-04,4.094420572177277762e-04,2.844940684888993296e-04,2.074903534701979157e-04,1.647299311261353841e-04,1.508247978694524506e-04,1.753757648572244786e-04,3.073546770239318966e-04
|
||||
1.000000000000000021e-03,6.027614491955140619e-04,4.086572704905903084e-04,2.837102537033676193e-04,2.067078158689920062e-04,1.638793172508614261e-04,1.497441922066543145e-04,1.736205593148946460e-04,3.031290170068882115e-04
|
||||
1.000000000000000021e-03,6.021104551256277167e-04,4.078743283205443272e-04,2.829289352705667755e-04,2.059285379676389937e-04,1.630333854029286287e-04,1.486716352337672398e-04,1.718833358612950819e-04,2.989623714008152688e-04
|
||||
1.000000000000000021e-03,6.014582116574243619e-04,4.070908897338878368e-04,2.821481168500803620e-04,2.051508852341138217e-04,1.621907338278938133e-04,1.476057520309239507e-04,1.701623353591907634e-04,2.948510854465446421e-04
|
||||
1.000000000000000021e-03,6.008047235362061304e-04,4.063069632907822604e-04,2.813678065291968134e-04,2.043748619094956848e-04,1.613513572535205565e-04,1.465465096091600223e-04,1.684574188261711764e-04,2.907944492354505236e-04
|
||||
1.000000000000000021e-03,6.001451360530016092e-04,4.055123728737173791e-04,2.805722092000019225e-04,2.035777116783122080e-04,1.604816172174310248e-04,1.454380432794140279e-04,1.666509749540511247e-04,2.864106919229302104e-04
|
||||
1.000000000000000021e-03,5.994843238884264500e-04,4.047173509812383436e-04,2.797772242168449484e-04,2.027823739011739494e-04,1.596154967418240479e-04,1.443369747762361644e-04,1.648627759919576703e-04,2.820911717580149220e-04
|
||||
1.000000000000000021e-03,5.988172342183890103e-04,4.039163714190686103e-04,2.789780293498389497e-04,2.019848363041463460e-04,1.587495225986212185e-04,1.432398991427229250e-04,1.630885426393815433e-04,2.778273023594395367e-04
|
||||
1.000000000000000021e-03,5.981438884479926745e-04,4.031094770638417378e-04,2.781746763026650849e-04,2.011851525894453846e-04,1.578837467363927922e-04,1.421468562989037501e-04,1.613282432889087106e-04,2.736185440612619660e-04
|
||||
1.000000000000000021e-03,5.974643081279905951e-04,4.022967109333065402e-04,2.773672167904255525e-04,2.003833762773818070e-04,1.570182206524130687e-04,1.410578853054891162e-04,1.595818450324428667e-04,2.694643589605560702e-04
|
||||
1.000000000000000021e-03,5.967776135628261383e-04,4.014760835454474729e-04,2.765523639715266420e-04,1.995745107850170087e-04,1.561451751437292214e-04,1.399593838969533089e-04,1.578189695554256631e-04,2.652593622585595239e-04
|
||||
1.000000000000000021e-03,5.960847301704033955e-04,4.006496794462583626e-04,2.757335282633677394e-04,1.987637005805311633e-04,1.552725686595443394e-04,1.388652425906941482e-04,1.560705931497471889e-04,2.611111091988240428e-04
|
||||
1.000000000000000021e-03,5.953856800664869900e-04,3.998175424230218200e-04,2.749107619574642008e-04,1.979509993037016505e-04,1.544004519462355480e-04,1.377754975907092790e-04,1.543366727366940775e-04,2.570190084729973012e-04
|
||||
1.000000000000000021e-03,5.946807128856675898e-04,3.989799547069150759e-04,2.740843182982303974e-04,1.971366223883773178e-04,1.535290106655841792e-04,1.366903106980890768e-04,1.526173104925201149e-04,2.529827224768709296e-04
|
||||
1.000000000000000021e-03,5.939698501124463306e-04,3.981369586533569987e-04,2.732542475356756692e-04,1.963206208562686219e-04,1.526582921179318820e-04,1.356097131673934353e-04,1.509124557001679569e-04,2.490016526370400561e-04
|
||||
1.000000000000000021e-03,5.932465626846949178e-04,3.972749900655482406e-04,2.723996767755988246e-04,1.954732420440092287e-04,1.517449722599865122e-04,1.344633353162260421e-04,1.490787207039270096e-04,2.446311790608478916e-04
|
||||
1.000000000000000021e-03,5.925174390191371033e-04,3.964077570693368959e-04,2.715417094444828503e-04,1.946245940839898595e-04,1.508329769024341859e-04,1.333227635443309334e-04,1.472627410071646460e-04,2.403295419535726046e-04
|
||||
1.000000000000000021e-03,5.917825975966207411e-04,3.955354074700222146e-04,2.706804869652218665e-04,1.937748023716854423e-04,1.499224142400159925e-04,1.321880784683747445e-04,1.454644877205459041e-04,2.360959501695517580e-04
|
||||
1.000000000000000021e-03,5.910420603206251872e-04,3.946579839875351422e-04,2.698160594859791645e-04,1.929239167799043884e-04,1.490133276731937860e-04,1.310592984163628486e-04,1.436838579350653566e-04,2.319294885748935905e-04
|
||||
1.000000000000000021e-03,5.902958492424382119e-04,3.937755294749108723e-04,2.689484771457827648e-04,1.920719869699086713e-04,1.481057601269397369e-04,1.299364409184113305e-04,1.419207481479104003e-04,2.278292508796841368e-04
|
||||
1.000000000000000021e-03,5.895598685634120817e-04,3.929178479527316910e-04,2.681193531438139815e-04,1.912726116179633686e-04,1.472689584526509451e-04,1.289152165190126341e-04,1.403276367723939690e-04,2.241040180807166735e-04
|
||||
1.000000000000000021e-03,5.888182184446727908e-04,3.920550888852155800e-04,2.672869104586279658e-04,1.904718280301954622e-04,1.464329431074320987e-04,1.278983689606465277e-04,1.387482416027983217e-04,2.204326648641897243e-04
|
||||
1.000000000000000021e-03,5.880709209312291698e-04,3.911872944022057189e-04,2.664511977530461032e-04,1.896696843025943828e-04,1.455977573633372962e-04,1.268859249854523304e-04,1.371825077963339959e-04,2.168145532732365665e-04
|
||||
1.000000000000000021e-03,5.873188516038330012e-04,3.903153927531259398e-04,2.656130037940035156e-04,1.888668181821939697e-04,1.447639292589146184e-04,1.258783532658409540e-04,1.356308744741794301e-04,2.132498546822566535e-04
|
||||
1.000000000000000021e-03,5.865620290918570692e-04,3.894394196579139384e-04,2.647723694527710347e-04,1.880632691586897262e-04,1.439314922056974795e-04,1.248756678383702303e-04,1.340932673985179111e-04,2.097378989636096219e-04
|
||||
1.000000000000000021e-03,5.858004721379563712e-04,3.885594109297237520e-04,2.639293355828808605e-04,1.872590765580118600e-04,1.431004792703304354e-04,1.238778821782577646e-04,1.325696118981003829e-04,2.062780220293337398e-04
|
||||
1.000000000000000021e-03,5.850341996176138979e-04,3.876754025264287241e-04,2.630839431003643525e-04,1.864542796470906004e-04,1.422709233084495310e-04,1.228850093894619591e-04,1.310598332174379369e-04,2.028695668674851068e-04
|
||||
1.000000000000000021e-03,5.842633259194077947e-04,3.867875329548579075e-04,2.622363206668650243e-04,1.856489888735660490e-04,1.414429165168560936e-04,1.218971173595769875e-04,1.295639192660443006e-04,1.995119889022209966e-04
|
||||
1.000000000000000021e-03,5.834878697730810785e-04,3.858958376209294626e-04,2.613865082576556967e-04,1.848432421885319707e-04,1.406164899573639974e-04,1.209142166826000190e-04,1.280817922197122173e-04,1.962046375108947760e-04
|
||||
1.000000000000000021e-03,5.827078500230523962e-04,3.850003520236475163e-04,2.605345458299026889e-04,1.840370773822073991e-04,1.397916743597008157e-04,1.199363174304283899e-04,1.266133739282210172e-04,1.929468682039042694e-04
|
||||
1.000000000000000021e-03,5.819334261621241173e-04,3.841195496874485939e-04,2.597054450234843122e-04,1.832615752361228063e-04,1.390067359137023490e-04,1.190124837885568685e-04,1.252266477671892364e-04,1.898342669542842250e-04
|
||||
1.000000000000000021e-03,5.811544494713084385e-04,3.832349425929183610e-04,2.588741118031709712e-04,1.824854619290212638e-04,1.382230274271905722e-04,1.180928923649849320e-04,1.238519429087230690e-04,1.867668194223294086e-04
|
||||
1.000000000000000021e-03,5.803709388350691226e-04,3.823465658113372784e-04,2.580405852181276633e-04,1.817087742555892370e-04,1.374405795299253087e-04,1.171775570200931022e-04,1.224892004036316632e-04,1.837439681062861012e-04
|
||||
1.000000000000000021e-03,5.795844646861092117e-04,3.814560496353979662e-04,2.572062245701910057e-04,1.809325897993571621e-04,1.366602663048694689e-04,1.162672443199922736e-04,1.211391750652958171e-04,1.807664171209839225e-04
|
||||
1.000000000000000021e-03,5.787950390386191295e-04,3.805634168176052199e-04,2.563710546191050039e-04,1.801569303693986560e-04,1.358821021611104744e-04,1.153619483579342790e-04,1.198017787120210541e-04,1.778335550584487373e-04
|
||||
1.000000000000000021e-03,5.780026739739645147e-04,3.796686901561970007e-04,2.555351001009416268e-04,1.793818176715784992e-04,1.351061013224604760e-04,1.144616629966290335e-04,1.184769233829579004e-04,1.749447775426769835e-04
|
||||
1.000000000000000021e-03,5.772073816396077655e-04,3.787718924921195112e-04,2.546983857238086673e-04,1.786072733038042632e-04,1.343322778228697451e-04,1.135663818643436025e-04,1.171645213323757931e-04,1.720994871389106646e-04
|
||||
1.000000000000000021e-03,5.764112975619451167e-04,3.778753049229251356e-04,2.538628529985562728e-04,1.778348606584519826e-04,1.335619170774594953e-04,1.126772524533375236e-04,1.158657577413503814e-04,1.692991320527776819e-04
|
||||
1.000000000000000021e-03,5.756144252522814222e-04,3.769789335549947914e-04,2.530285065275222683e-04,1.770645798114452998e-04,1.327950095246515803e-04,1.117942393436846088e-04,1.145805009748875411e-04,1.665430248001372392e-04
|
||||
1.000000000000000021e-03,5.748167682568085593e-04,3.760827845283660131e-04,2.521953509290719687e-04,1.762964308427695766e-04,1.320315456257037542e-04,1.109173072961205789e-04,1.133086205901110452e-04,1.638304880953399246e-04
|
||||
1.000000000000000021e-03,5.740166237139158025e-04,3.751830736799844387e-04,2.513572749088919958e-04,1.755213872380331861e-04,1.312580494760662926e-04,1.100242733780145235e-04,1.120050977276823334e-04,1.610268323297459373e-04
|
||||
1.000000000000000021e-03,5.732157063485666254e-04,3.742836154796483610e-04,2.505204393147844274e-04,1.747485543201545441e-04,1.304881340598568315e-04,1.091376023135285023e-04,1.107157077892566201e-04,1.582698947895536752e-04
|
||||
1.000000000000000021e-03,5.724140197507473007e-04,3.733844159930685934e-04,2.496848484812796650e-04,1.739779315547772373e-04,1.297217884948703216e-04,1.082572552711356679e-04,1.094403070125688193e-04,1.555589173140119988e-04
|
||||
1.000000000000000021e-03,5.716133163514535006e-04,3.724872615728835922e-04,2.488519667094108378e-04,1.732106573421359136e-04,1.289599119326889729e-04,1.073839886960488172e-04,1.081795839980315968e-04,1.528943685588057789e-04
|
||||
1.000000000000000021e-03,5.708135916089464952e-04,3.715921440481619780e-04,2.480217821880964816e-04,1.724467146387093834e-04,1.282024761936270685e-04,1.065177436423506841e-04,1.069333674890963240e-04,1.502754491507743331e-04
|
||||
1.000000000000000021e-03,5.700148410279018158e-04,3.706990553358867476e-04,2.471942832207120249e-04,1.716860865497342535e-04,1.274494533371790404e-04,1.056584617232978574e-04,1.057014883248694426e-04,1.477013737020834935e-04
|
||||
1.000000000000000021e-03,5.692170601522963469e-04,3.698079874222007994e-04,2.463694581964103098e-04,1.709287562926333241e-04,1.267008156164750913e-04,1.048060850476081559e-04,1.044837793145218324e-04,1.451713702741069042e-04
|
||||
1.000000000000000021e-03,5.684221107462931718e-04,3.689208973051672467e-04,2.455489480245545849e-04,1.701760222502850749e-04,1.259576042689529907e-04,1.039615052862917467e-04,1.032810864032787402e-04,1.426862118551680341e-04
|
||||
1.000000000000000021e-03,5.676299806599446841e-04,3.680377623533836952e-04,2.447327238198633678e-04,1.694278494753442496e-04,1.252197721019686588e-04,1.031246414956518974e-04,1.020932099638295122e-04,1.402450714512258731e-04
|
||||
1.000000000000000021e-03,5.668406578186927338e-04,3.671585601102087264e-04,2.439207569480618843e-04,1.686842033525584789e-04,1.244872724153648453e-04,1.022954136930148580e-04,1.009199532576916553e-04,1.378471380449364540e-04
|
||||
1.000000000000000021e-03,5.660528798623399357e-04,3.662807588285737852e-04,2.431092838206291959e-04,1.679399278621275505e-04,1.237529841606189703e-04,1.014631173867882653e-04,9.974194130068655907e-05,1.354424501489320950e-04
|
||||
1.000000000000000021e-03,5.652678887062091489e-04,3.654068578608936813e-04,2.423020363044335113e-04,1.672001557892942780e-04,1.230240193993821724e-04,1.006384714692423982e-04,9.857860748076281341e-05,1.330810886504238974e-04
|
||||
1.000000000000000021e-03,5.644856725120149217e-04,3.645368352560149003e-04,2.414989864020476457e-04,1.664648531857207327e-04,1.223003320760450115e-04,9.982139651422967225e-05,9.742975533494338731e-05,1.307622432316707048e-04
|
||||
1.000000000000000021e-03,5.637081598516872297e-04,3.636726247466106157e-04,2.407016951041400575e-04,1.657352124900924413e-04,1.215828418563276393e-04,9.901263879559620603e-05,9.629602344691408898e-05,1.284862679388324466e-04
|
||||
1.000000000000000021e-03,5.629353300793490293e-04,3.628141892281135789e-04,2.399101174854294510e-04,1.650111827309744587e-04,1.208714852573268089e-04,9.821209936496322563e-05,9.517719041742417905e-05,1.262523213089875105e-04
|
||||
1.000000000000000021e-03,5.621671626935266465e-04,3.619614919160761232e-04,2.391242090587739641e-04,1.642927134849468424e-04,1.201661995513669139e-04,9.741968060975319133e-05,9.407303841474721877e-05,1.240595794224424390e-04
|
||||
1.000000000000000021e-03,5.614036373218869204e-04,3.611144963064036881e-04,2.383439257149278542e-04,1.635797548004748762e-04,1.194669226721670609e-04,9.663528612429730903e-05,9.298335293466474341e-05,1.219072350364201328e-04
|
||||
1.000000000000000021e-03,5.606463485664969944e-04,3.602748496609082000e-04,2.375706263435288989e-04,1.628733614326239394e-04,1.187744774441648902e-04,9.585958850070355037e-05,9.190871230268097864e-05,1.197956257524449784e-04
|
||||
1.000000000000000021e-03,5.598952698555576370e-04,3.594425038433207622e-04,2.368042532426757629e-04,1.621734693226255697e-04,1.180887870128607769e-04,9.509247448928166366e-05,9.084888029067286991e-05,1.177239166851852087e-04
|
||||
1.000000000000000021e-03,5.591503748394264367e-04,3.586174111937711294e-04,2.360447493430869353e-04,1.614800151758654528e-04,1.174097755299612002e-04,9.433383251239638840e-05,8.980362478385646723e-05,1.156912913627774928e-04
|
||||
1.000000000000000021e-03,5.584225591487143505e-04,3.578196518919505740e-04,2.353197697834314708e-04,1.608280111225492105e-04,1.167814916834832538e-04,9.364209834454310303e-05,8.886089862139266997e-05,1.138670987493162862e-04
|
||||
1.000000000000000021e-03,5.577008468242452242e-04,3.570289620106132170e-04,2.346013750077580542e-04,1.601820316992516276e-04,1.161592518078891664e-04,9.295772679954118940e-05,8.793036528463705852e-05,1.120748093307471799e-04
|
||||
1.000000000000000021e-03,5.569852125454166723e-04,3.562452965139748743e-04,2.338895121728417183e-04,1.595420198714332595e-04,1.155429900504064843e-04,9.228062559771084612e-05,8.701184300011380421e-05,1.103138112316197746e-04
|
||||
1.000000000000000021e-03,5.562757163116399499e-04,3.554686957703368042e-04,2.331841974232642283e-04,1.589079715282182140e-04,1.149326819589807311e-04,9.161073769793274093e-05,8.610518609906000706e-05,1.085835484715731990e-04
|
||||
1.000000000000000021e-03,5.555723328562507538e-04,3.546991150005096983e-04,2.324853783642831767e-04,1.582798302759657303e-04,1.143282626503791007e-04,9.094797264045832242e-05,8.521021771090780625e-05,1.068834322603653324e-04
|
||||
1.000000000000000021e-03,5.548750371213563657e-04,3.539365098621276230e-04,2.317930031654593444e-04,1.576575403787569985e-04,1.137296680667903865e-04,9.029224125378113518e-05,8.432676390648500317e-05,1.052128860599020399e-04
|
||||
1.000000000000000021e-03,5.541838042439771635e-04,3.531808364136874187e-04,2.311070205067102163e-04,1.570410466910287454e-04,1.131368348940622735e-04,8.964345554504144940e-05,8.345465350366406993e-05,1.035713449503019397e-04
|
||||
1.000000000000000021e-03,5.534994772986728557e-04,3.524329474767404734e-04,2.304281200650363333e-04,1.564308719194829761e-04,1.125501566344392631e-04,8.900191672771989599e-05,8.259410426967044201e-05,1.019587783174918249e-04
|
||||
1.000000000000000021e-03,5.528220286453137825e-04,3.516927939956549431e-04,2.297562446752235638e-04,1.558269550144645319e-04,1.119695640249353838e-04,8.836753049012398612e-05,8.174493812638424233e-05,1.003746189891791522e-04
|
||||
1.000000000000000021e-03,5.521514308959529988e-04,3.509603274307335013e-04,2.290913378267074509e-04,1.552292356754889449e-04,1.113949887224841186e-04,8.774020391605217217e-05,8.090698006040516024e-05,9.881831191717569708e-05
|
||||
1.000000000000000021e-03,5.514925705077818562e-04,3.502439423799475968e-04,2.284441610897542578e-04,1.546502536108915020e-04,1.108405451476827762e-04,8.713560862370903280e-05,8.009669495978734939e-05,9.729798207441842409e-05
|
||||
1.000000000000000021e-03,5.508404954145605355e-04,3.495351144497065954e-04,2.278037808073336661e-04,1.540772565128698055e-04,1.102918428934658313e-04,8.653767235071846409e-05,7.929694151393572473e-05,9.580416231533655223e-05
|
||||
1.000000000000000021e-03,5.501951791779016417e-04,3.488337972114359704e-04,2.271701434112839691e-04,1.535101877933933972e-04,1.097488185619751536e-04,8.594630990981442489e-05,7.850756016455258672e-05,9.433633928045583440e-05
|
||||
1.000000000000000021e-03,5.495566796872157793e-04,3.481400279377950191e-04,2.265432624126748171e-04,1.529490418493457818e-04,1.092114481281042810e-04,8.536146896299809861e-05,7.772842391839215501e-05,9.289404738934854406e-05
|
||||
1.000000000000000021e-03,5.489249706454161527e-04,3.474537605956091817e-04,2.259230848255512310e-04,1.523937628358645337e-04,1.086796692149487770e-04,8.478306608188779627e-05,7.695937762456762194e-05,9.147679298288125297e-05
|
||||
1.000000000000000021e-03,5.483000259883204826e-04,3.467749496226811058e-04,2.253095582547179863e-04,1.518442955755717951e-04,1.081534202533376696e-04,8.421101904463252675e-05,7.620026875215024978e-05,9.008409282780761526e-05
|
||||
1.000000000000000021e-03,5.476818198739591458e-04,3.461035499001802445e-04,2.247026308546789793e-04,1.513005855077949086e-04,1.076326404207925846e-04,8.364524675486820964e-05,7.545094724756280888e-05,8.871547365198851438e-05
|
||||
1.000000000000000021e-03,5.470705529810189179e-04,3.454397485743721506e-04,2.241024413587690614e-04,1.507627254998857578e-04,1.071173841908876651e-04,8.308576484396013343e-05,7.471135773791005180e-05,8.737059031219478156e-05
|
||||
1.000000000000000021e-03,5.464661991670638182e-04,3.447835000304132159e-04,2.235089374295866490e-04,1.502306605954647535e-04,1.066075905365267742e-04,8.253249249775968508e-05,7.398135232542971769e-05,8.604898363826276057e-05
|
||||
1.000000000000000021e-03,5.458687325221291348e-04,3.441347591201103138e-04,2.229220673120790245e-04,1.497043364932862668e-04,1.061031992194506256e-04,8.198535007121052676e-05,7.326078561528488937e-05,8.475020417489323324e-05
|
||||
1.000000000000000021e-03,5.452901895090844558e-04,3.435150570304173014e-04,2.223706511768525117e-04,1.492190839480494894e-04,1.056468106030715887e-04,8.149737756206330190e-05,7.262157722718122260e-05,8.358877577600780481e-05
|
||||
1.000000000000000021e-03,5.447184570616723891e-04,3.429026954804162766e-04,2.218256219048080177e-04,1.487392297472955698e-04,1.051953246672348403e-04,8.101471604563164947e-05,7.199020130947719233e-05,8.244600742971828849e-05
|
||||
1.000000000000000021e-03,5.441535103689846154e-04,3.422976319891982578e-04,2.212869318272295087e-04,1.482647252612499030e-04,1.047486894350850925e-04,8.053730000430466094e-05,7.136654438032706549e-05,8.132155926679031160e-05
|
||||
1.000000000000000021e-03,5.435909997143165834e-04,3.416955774702987799e-04,2.207511658034611989e-04,1.477929951923679644e-04,1.043049394866297369e-04,8.006352324306285982e-05,7.074908147590525608e-05,8.021344078389119761e-05
|
||||
1.000000000000000021e-03,5.430309161342643806e-04,3.410965159927432586e-04,2.202183050641030458e-04,1.473240192034464783e-04,1.038640511149413747e-04,7.959335168171117276e-05,7.013774197495506457e-05,7.912139691327875046e-05
|
||||
1.000000000000000021e-03,5.424732506674768149e-04,3.405004316631486216e-04,2.196883309178195964e-04,1.468577770769967101e-04,1.034260007962051111e-04,7.912675157408064104e-05,6.953245613429904408e-05,7.804517686317993341e-05
|
||||
1.000000000000000021e-03,5.419179943504857889e-04,3.399073086151600896e-04,2.191612247355960430e-04,1.463942486957527610e-04,1.029907651665082401e-04,7.866368947795671801e-05,6.893315503775990498e-05,7.698453395110452940e-05
|
||||
1.000000000000000021e-03,5.413629828746738867e-04,3.393149394667066966e-04,2.186351838182767991e-04,1.459320465988429058e-04,1.025572658029062702e-04,7.820326658601671303e-05,6.833895931108436813e-05,7.593823716905742757e-05
|
||||
1.000000000000000021e-03,5.408082138671730385e-04,3.387233205925343745e-04,2.181102035828516778e-04,1.454711649598321068e-04,1.021254940975202248e-04,7.774546638666711494e-05,6.774982397495531476e-05,7.490609035628451105e-05
|
||||
1.000000000000000021e-03,5.402536849306272763e-04,3.381324483351249330e-04,2.175862794239174624e-04,1.450115979478540569e-04,1.016954414669310805e-04,7.729027246482876178e-05,6.716570445567967391e-05,7.388790009412213962e-05
|
||||
1.000000000000000021e-03,5.396844473492076093e-04,3.375153269484326116e-04,2.170269255797531330e-04,1.445081577421817903e-04,1.012119806681102793e-04,7.676796353167371053e-05,6.648955946153636300e-05,7.272015355307609235e-05
|
||||
1.000000000000000021e-03,5.391154759339646064e-04,3.368990409960971838e-04,2.164687998325534753e-04,1.440063199340409466e-04,1.007307157169936256e-04,7.624910690660518565e-05,6.582015362379603355e-05,7.157078178685281889e-05
|
||||
1.174325560395078800e-03,2.755298774803674553e-03,5.194387759090383395e-03,9.354521953613973567e-03,1.651171618252517473e-02,2.916966879690554432e-02,5.262163370571950466e-02,9.910396847768351836e-02,2.000000000000000111e-01
|
||||
4.160571131359890040e-03,8.527170824088577475e-03,1.466969461393815427e-02,2.443642414582058997e-02,3.975038656808106002e-02,6.331729118004528201e-02,9.842489957479945428e-02,1.474045868235714374e-01,2.059999999999999887e-01
|
||||
|
36
tests/data/test_lumped_losses_raman_fiber_config.json
Normal file
36
tests/data/test_lumped_losses_raman_fiber_config.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"uid": "Span1",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km",
|
||||
"att_in": 0,
|
||||
"con_in": 0.5,
|
||||
"con_out": 0.0,
|
||||
"lumped_losses": [
|
||||
{
|
||||
"position": 7,
|
||||
"loss": 0.5
|
||||
}
|
||||
],
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 0.0000167,
|
||||
"effective_area": 83e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
},
|
||||
"operational": {
|
||||
"temperature": 283,
|
||||
"raman_pumps": [
|
||||
{
|
||||
"power": 0.2,
|
||||
"frequency": 205000000000000,
|
||||
"propagation_direction": "counterprop"
|
||||
},
|
||||
{
|
||||
"power": 0.206,
|
||||
"frequency": 201000000000000,
|
||||
"propagation_direction": "counterprop"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
97
tests/data/test_raman_fiber_expected_results.csv
Normal file
97
tests/data/test_raman_fiber_expected_results.csv
Normal file
@@ -0,0 +1,97 @@
|
||||
,Unnamed: 0,signal,ase,nli
|
||||
0,0,0.00028461768874888705,3.436639817118301e-08,2.1584395398371026e-07
|
||||
1,1,0.00028211666293476406,3.423996759499589e-08,2.1809245861954257e-07
|
||||
2,2,0.0002796385058453953,3.411427963331182e-08,2.2028548201656645e-07
|
||||
3,3,0.0002771829951915728,3.398932824433299e-08,2.224238538437057e-07
|
||||
4,4,0.00027338904730863836,3.371109366484941e-08,2.2339638015421542e-07
|
||||
5,5,0.0002696478418176822,3.3435235312069656e-08,2.2430128879557504e-07
|
||||
6,6,0.00026595862771951147,3.316172589770091e-08,2.2514026889123164e-07
|
||||
7,7,0.0002623182345801782,3.289051654795761e-08,2.2591288176837496e-07
|
||||
8,8,0.00025872603823298804,3.262158136113203e-08,2.2662073272007013e-07
|
||||
9,9,0.0002548422077504841,3.231480491053109e-08,2.269632917207947e-07
|
||||
10,10,0.0002510150800727548,3.201089350512762e-08,2.2724305184561305e-07
|
||||
11,11,0.0002472372108596339,3.1709697987730424e-08,2.274556638142854e-07
|
||||
12,12,0.0002435081184388883,3.1411188710954923e-08,2.2760284870806473e-07
|
||||
13,13,0.0002398273228957255,3.1115336193393125e-08,2.2768630096746835e-07
|
||||
14,14,0.00023610099948769217,3.081056270085416e-08,2.27617695956038e-07
|
||||
15,15,0.00023242489102440902,3.050859262250336e-08,2.274887362838919e-07
|
||||
16,16,0.00022879847092097078,3.020939430576677e-08,2.273011122655665e-07
|
||||
17,17,0.00022522143236587835,2.991293825364657e-08,2.27056704831033e-07
|
||||
18,18,0.00022169324298613107,2.9619193056612953e-08,2.2315585168570266e-07
|
||||
19,19,0.0002178178461312317,2.9278097616561043e-08,2.189169855906453e-07
|
||||
20,20,0.0002140033759047069,2.8940600865395135e-08,2.1475128288390263e-07
|
||||
21,21,0.00021024912752446947,2.8606658136588645e-08,2.1065775386659407e-07
|
||||
22,22,0.000206554289175574,2.827622313698371e-08,2.0663530613832196e-07
|
||||
23,23,0.00020291805701626135,2.7949249962519028e-08,2.0268286030011824e-07
|
||||
24,24,0.00019961589106178864,2.765975998385304e-08,1.9907485701921993e-07
|
||||
25,25,0.00019636137150032674,2.7373095433009936e-08,1.9552454239910457e-07
|
||||
26,26,0.0001931539326017224,2.7089223372231097e-08,1.9203113225618846e-07
|
||||
27,27,0.00018999370973089413,2.68081175642488e-08,1.885945418493717e-07
|
||||
28,28,0.00018688010986276862,2.6529745205109403e-08,1.8521396370161997e-07
|
||||
29,29,0.00018381254538966195,2.6254073731438793e-08,1.818885993764317e-07
|
||||
30,30,0.00018079043504395085,2.5981070886269e-08,1.78617660347401e-07
|
||||
31,31,0.00017781329518445636,2.5710706310905614e-08,1.7540045799671345e-07
|
||||
32,32,0.00017488055045064023,2.544294811944895e-08,1.7223621637516225e-07
|
||||
33,33,0.00017199163096488036,2.5177764647772334e-08,1.691241684952796e-07
|
||||
34,34,0.00016923198600435235,2.4926164244345613e-08,1.6614800249846462e-07
|
||||
35,35,0.00016651223518287261,2.4676978561810828e-08,1.632195038378843e-07
|
||||
36,36,0.00016383188581753214,2.443018036493577e-08,1.6033800467387247e-07
|
||||
37,37,0.0001611915388800597,2.418575294396746e-08,1.5725354810318075e-07
|
||||
38,38,0.0001585906555197023,2.394366896238391e-08,1.5422386234766858e-07
|
||||
39,39,0.00015602870309712287,2.3703901303924173e-08,1.5124806354481474e-07
|
||||
40,40,0.0001535051551031788,2.3466423066629146e-08,1.4832528036973196e-07
|
||||
41,41,0.0001510212597387019,2.3231240549132765e-08,1.4545635735033158e-07
|
||||
42,42,0.00014857641307701306,2.2998325757462813e-08,1.4264034538487909e-07
|
||||
43,43,0.00014617002011358969,2.276765094680208e-08,1.3987631140917146e-07
|
||||
44,44,0.00014368188097051016,2.252080862505795e-08,1.3704924606778587e-07
|
||||
45,45,0.00014123500136325632,2.227648394665253e-08,1.342768563640109e-07
|
||||
46,46,0.00013882871459443323,2.2034644371118186e-08,1.31558126246417e-07
|
||||
47,47,0.00013646341840215168,2.1795267893415555e-08,1.2889305332810146e-07
|
||||
48,48,0.00013413841082142,2.155832207437193e-08,1.2628059500046815e-07
|
||||
49,49,0.00013185300210097483,2.132377480769977e-08,1.2371972883222934e-07
|
||||
50,50,0.00012960651423053282,2.1091594291962705e-08,1.2120945193769904e-07
|
||||
51,51,0.00012739961074346843,2.0861774576065466e-08,1.1875002031242091e-07
|
||||
52,52,0.00012523156633255863,2.0634283235397628e-08,1.1634039147633555e-07
|
||||
53,53,0.00012310166960708747,2.0409088189365173e-08,1.1397954484148417e-07
|
||||
54,54,0.00012096529298347188,2.0178855168888422e-08,1.1162594309222065e-07
|
||||
55,55,0.00011886718830718708,1.9950983760858723e-08,1.093208043434055e-07
|
||||
56,56,0.00011680664424128133,1.9725440474060072e-08,1.0695583879566178e-07
|
||||
57,57,0.00011478396058700633,1.950220202088885e-08,1.0464196732373097e-07
|
||||
58,58,0.00011279839933843229,1.9281235055452333e-08,1.0237806316789167e-07
|
||||
59,59,0.00011084923776207272,1.906250658388995e-08,1.0016302524437989e-07
|
||||
60,60,0.00010893576763351642,1.884598391874928e-08,9.79957771514819e-08
|
||||
61,61,0.00010705827573621923,1.8631654017664683e-08,9.587614496435341e-08
|
||||
62,62,0.00010521603014069265,1.8419483867548078e-08,9.380304193213288e-08
|
||||
63,63,0.00010340831493293095,1.8209440802910146e-08,9.1775407295826e-08
|
||||
64,64,0.00010178667717264663,1.8029552937387797e-08,8.992671343771878e-08
|
||||
65,65,0.00010019319833745167,1.7851381317094802e-08,8.811583172055121e-08
|
||||
66,66,9.86273426809622e-05,1.767490377589294e-08,8.634195328719705e-08
|
||||
67,67,9.70886230248071e-05,1.7500098774413897e-08,8.460432022445385e-08
|
||||
68,68,9.557652367577673e-05,1.7326944621204857e-08,8.290215772518696e-08
|
||||
69,69,9.409053958216297e-05,1.7155419863785074e-08,8.123470846820667e-08
|
||||
70,70,9.263017577528553e-05,1.698550325493719e-08,7.960123192429599e-08
|
||||
71,71,9.119540203213482e-05,1.681718296074974e-08,7.800139303615196e-08
|
||||
72,72,8.978572151582878e-05,1.6650437769918198e-08,7.643446000507212e-08
|
||||
73,73,8.840064792008674e-05,1.648524670194174e-08,7.489971794966337e-08
|
||||
74,74,8.704752218385389e-05,1.6323921332107853e-08,7.340306015991841e-08
|
||||
75,75,8.571782151670807e-05,1.616417166590195e-08,7.228178645083984e-08
|
||||
76,76,8.441109599127084e-05,1.6005979385519616e-08,7.117988659258102e-08
|
||||
77,77,8.312693723019766e-05,1.584932678267078e-08,7.009701621983393e-08
|
||||
78,78,8.186491243372442e-05,1.569419608150936e-08,6.90328103730187e-08
|
||||
79,79,8.062459786565112e-05,1.554056978222129e-08,6.798691173543069e-08
|
||||
80,80,7.94055784447779e-05,1.538843064058219e-08,6.695897028871753e-08
|
||||
81,81,7.820755061857071e-05,1.523776381588298e-08,6.594873006137818e-08
|
||||
82,82,7.703011159024537e-05,1.5088552513719166e-08,6.495585139392737e-08
|
||||
83,83,7.587286701386211e-05,1.494078021244127e-08,6.398000175307732e-08
|
||||
84,84,7.483848702669918e-05,1.481852757489104e-08,6.310775801171533e-08
|
||||
85,85,7.382059659354297e-05,1.4697575551136038e-08,6.224941913167962e-08
|
||||
86,86,7.281889798107282e-05,1.4577917663325962e-08,6.140473404853674e-08
|
||||
87,87,7.183165666349203e-05,1.4459532716368791e-08,6.057224011868445e-08
|
||||
88,88,7.08586484091438e-05,1.4342415672865158e-08,5.975174825816752e-08
|
||||
89,89,6.989965271824705e-05,1.422656189652791e-08,5.8943072529944956e-08
|
||||
90,90,6.895445267562359e-05,1.411196715686287e-08,5.814603001970201e-08
|
||||
91,91,6.802197391413278e-05,1.3998609279853771e-08,5.735971476442124e-08
|
||||
92,92,6.710204336793658e-05,1.3886485591019257e-08,5.6583980825863337e-08
|
||||
93,93,6.619449037899918e-05,1.3775593851234834e-08,5.581868429617485e-08
|
||||
94,94,6.515268324911003e-05,1.3628882565600955e-08,5.494017759648076e-08
|
||||
95,95,6.412720169535454e-05,1.3483606920728348e-08,5.407543748332493e-08
|
||||
|
@@ -1,97 +0,0 @@
|
||||
,signal,ase,nli
|
||||
0,0.0002869472910749756,3.829244288314411e-08,2.1570435023738975e-07
|
||||
1,0.0002844264441819097,3.810807396068084e-08,2.1799950841473497e-07
|
||||
2,0.00028192866252406385,3.792544000755193e-08,2.2023841125047751e-07
|
||||
3,0.0002794537215642667,3.7744517714620316e-08,2.2242189941355056e-07
|
||||
4,0.00027562432957345563,3.739256592350871e-08,2.2343448272115905e-07
|
||||
5,0.0002718482755003939,3.7044482870002475e-08,2.2437826192962336e-07
|
||||
6,0.00026812479793132313,3.670020704375223e-08,2.2525495466693408e-07
|
||||
7,0.000264450700138397,3.635954085714981e-08,2.2606415187873477e-07
|
||||
8,0.0002608253488030976,3.602242835595967e-08,2.2680748521505387e-07
|
||||
9,0.0002569046888856947,3.564392097524325e-08,2.2718285844823122e-07
|
||||
10,0.0002530414048172964,3.52696660940159e-08,2.2749429758474536e-07
|
||||
11,0.0002492279873569917,3.489974200864255e-08,2.277374766527899e-07
|
||||
12,0.00024546394589921574,3.453407358954537e-08,2.2791414400785136e-07
|
||||
13,0.00024174879169001578,3.4172586853993816e-08,2.280260208417818e-07
|
||||
14,0.00023798746912554602,3.3802283179520985e-08,2.2798420759778034e-07
|
||||
15,0.00023427697848580554,3.343627022987542e-08,2.2788101592695744e-07
|
||||
16,0.0002306167836320285,3.307447309241581e-08,2.2771816297650914e-07
|
||||
17,0.00022700656967539738,3.2716831574363364e-08,2.274975560288182e-07
|
||||
18,0.00022344579480967338,3.236327278261661e-08,2.2361822442592406e-07
|
||||
19,0.00021953361935365365,3.195819964288877e-08,2.1939761734541424e-07
|
||||
20,0.000215683131390894,3.155821693631402e-08,2.152494588710531e-07
|
||||
21,0.0002118936126056039,3.116322947665684e-08,2.1117277567387026e-07
|
||||
22,0.00020816423698459974,3.0773146233359933e-08,2.0716649124095414e-07
|
||||
23,0.000204494186708796,3.0387877710694614e-08,2.0322954179937734e-07
|
||||
24,0.0002011608152067422,3.0044038268833097e-08,1.9963693210325328e-07
|
||||
25,0.0001978756946189507,2.9704204306604607e-08,1.9610141536963302e-07
|
||||
26,0.00019463824873067792,2.9368307297032184e-08,1.9262221997374404e-07
|
||||
27,0.00019144860669288407,2.903632861769827e-08,1.8919927457566036e-07
|
||||
28,0.00018830616497929743,2.870820070744311e-08,1.8583178406705711e-07
|
||||
29,0.0001852103256336822,2.838385708911634e-08,1.8251896218718027e-07
|
||||
30,0.0001821604972098109,2.8063232252848876e-08,1.7926003240910756e-07
|
||||
31,0.00017915618670059162,2.774625963676283e-08,1.76054318231953e-07
|
||||
32,0.00017619680881745593,2.7432875871797347e-08,1.729010553429381e-07
|
||||
33,0.0001732817839023698,2.712301856538676e-08,1.6979948820365403e-07
|
||||
34,0.0001704966413678542,2.6828122477482957e-08,1.6683312331765736e-07
|
||||
35,0.00016775189226190024,2.6536528664560742e-08,1.639139770351803e-07
|
||||
36,0.00016504703499518105,2.624818226917535e-08,1.6104139135569604e-07
|
||||
37,0.00016238266779776653,2.5963117448579666e-08,1.5795381794641793e-07
|
||||
38,0.0001597582427278871,2.568127942199337e-08,1.5492098715709327e-07
|
||||
39,0.0001571732182027887,2.5402614261982925e-08,1.5194201541883415e-07
|
||||
40,0.00015462705891567335,2.5127068868391087e-08,1.4901603171959048e-07
|
||||
41,0.00015212101646395513,2.4854550603641668e-08,1.4614388817380648e-07
|
||||
42,0.00014965447757985992,2.4585009902449718e-08,1.4332463586635585e-07
|
||||
43,0.0001472268380950584,2.4318397887399997e-08,1.4055734193945962e-07
|
||||
44,0.0001447164668892332,2.4034551917480693e-08,1.377259000826997e-07
|
||||
45,0.00014224784112376056,2.3753930444781328e-08,1.3494914625940223e-07
|
||||
46,0.000139820283675003,2.3476479506890216e-08,1.3222606385781202e-07
|
||||
47,0.00013743418748444287,2.3202247900619965e-08,1.295566531341862e-07
|
||||
48,0.00013508884015386686,2.2931181973013504e-08,1.2693987096025158e-07
|
||||
49,0.00013278354172498307,2.2663228905058608e-08,1.2437469442130953e-07
|
||||
50,0.00013051760419724657,2.2398336706395863e-08,1.2186012017917007e-07
|
||||
51,0.00012829168984638487,2.2136423459712534e-08,1.1939640981689728e-07
|
||||
52,0.00012610506317956756,2.1877440279108582e-08,1.1698252030563078e-07
|
||||
53,0.00012395700285919374,2.1621338937233993e-08,1.1461743054419825e-07
|
||||
54,0.00012180241033650921,2.136015630373758e-08,1.1225922783040025e-07
|
||||
55,0.0001196865090578088,2.11019103466444e-08,1.0994951537260489e-07
|
||||
56,0.00011760857776205185,2.0846552296319304e-08,1.0757395097863843e-07
|
||||
57,0.00011556891128259512,2.0594154864038522e-08,1.0524972555992818e-07
|
||||
58,0.00011356676177304645,2.0344670536408355e-08,1.0297570549834491e-07
|
||||
59,0.00011160139690545148,2.009805268169949e-08,1.007507830554809e-07
|
||||
60,0.00010967209909252316,1.9854255584746143e-08,9.857387536569294e-08
|
||||
61,0.00010777915187088834,1.961321154131787e-08,9.644480679617587e-08
|
||||
62,0.00010592181397175025,1.9374877782865603e-08,9.43624842461164e-08
|
||||
63,0.00010409936038609485,1.913921236065976e-08,9.232584080120623e-08
|
||||
64,0.00010246447558376296,1.8936229484424864e-08,9.046927135292076e-08
|
||||
65,0.00010085803630103994,1.873544193319646e-08,8.865067925960422e-08
|
||||
66,9.927950010555374e-05,1.8536821682157304e-08,8.686925127148483e-08
|
||||
67,9.772837346090753e-05,1.834034757300294e-08,8.512422533827403e-08
|
||||
68,9.62041343011343e-05,1.8145993316507615e-08,8.341482250640209e-08
|
||||
69,9.470627135912848e-05,1.7953733512786736e-08,8.174028142913557e-08
|
||||
70,9.32342835979764e-05,1.776354374489084e-08,8.009985766376519e-08
|
||||
71,9.178813743816069e-05,1.757538990695628e-08,7.849321446941075e-08
|
||||
72,9.036733009485282e-05,1.7389250225057777e-08,7.691961625609573e-08
|
||||
73,8.897136946428169e-05,1.7205104136353174e-08,7.537834446343352e-08
|
||||
74,8.760740745801088e-05,1.7025340034280735e-08,7.38751341742058e-08
|
||||
75,8.626710469266231e-05,1.6847609082084475e-08,7.274492099364066e-08
|
||||
76,8.495000573672366e-05,1.6671897815367364e-08,7.16342744751107e-08
|
||||
77,8.365569697520734e-05,1.6498202874185357e-08,7.054284583689086e-08
|
||||
78,8.238374036673638e-05,1.6326516066391613e-08,6.94702656996508e-08
|
||||
79,8.11337070649851e-05,1.615683240442047e-08,6.84161724378069e-08
|
||||
80,7.990517700271111e-05,1.5989150837085435e-08,6.738021182875641e-08
|
||||
81,7.869784230919362e-05,1.5823472723367315e-08,6.63621242598539e-08
|
||||
82,7.751129541079501e-05,1.5659808141896922e-08,6.536156604375558e-08
|
||||
83,7.634513730458697e-05,1.5498175122781168e-08,6.437820072038669e-08
|
||||
84,7.530262080974513e-05,1.5364277079429572e-08,6.349909645089698e-08
|
||||
85,7.427675504203511e-05,1.523236493234819e-08,6.263403294276124e-08
|
||||
86,7.326723873728716e-05,1.510251249079146e-08,6.178275615432246e-08
|
||||
87,7.227232864620995e-05,1.4974078108462424e-08,6.094379608687809e-08
|
||||
88,7.1291797553153e-05,1.4847055996011248e-08,6.011696114034367e-08
|
||||
89,7.032542203609039e-05,1.4721440784517874e-08,5.930206291361685e-08
|
||||
90,6.937298231673965e-05,1.4597227547292096e-08,5.849891607818969e-08
|
||||
91,6.843339696762385e-05,1.447443282270653e-08,5.7706608718023645e-08
|
||||
92,6.750649045006057e-05,1.4353051811356354e-08,5.6924992809748396e-08
|
||||
93,6.65920896785063e-05,1.4233080214004659e-08,5.615392239860827e-08
|
||||
94,6.554258932109667e-05,1.407504972937325e-08,5.5268928972034444e-08
|
||||
95,6.450957734109368e-05,1.3918655180382722e-08,5.439783940506079e-08
|
||||
|
38
tests/data/test_science_utils_fiber_config.json
Normal file
38
tests/data/test_science_utils_fiber_config.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"uid": "Span1",
|
||||
"params": {
|
||||
"length": 80,
|
||||
"loss_coef": 0.2,
|
||||
"length_units": "km",
|
||||
"att_in": 0,
|
||||
"con_in": 0.5,
|
||||
"con_out": 0.5,
|
||||
"type_variety": "SSMF",
|
||||
"dispersion": 0.0000167,
|
||||
"effective_area": 83e-12,
|
||||
"pmd_coef": 1.265e-15
|
||||
},
|
||||
"operational": {
|
||||
"temperature": 283,
|
||||
"raman_pumps": [
|
||||
{
|
||||
"power": 224.403e-3,
|
||||
"frequency": 205e12,
|
||||
"propagation_direction": "counterprop"
|
||||
},
|
||||
{
|
||||
"power": 231.135e-3,
|
||||
"frequency": 201e12,
|
||||
"propagation_direction": "counterprop"
|
||||
}
|
||||
]
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"latitude": 1,
|
||||
"longitude": 0,
|
||||
"city": null,
|
||||
"region": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,11 @@ Transceiver trx_Stockholm
|
||||
OSNR ASE (signal bw, dB): 30.98
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
Roadm roadm_Stockholm
|
||||
effective loss (dB): 22.00
|
||||
pch out (dBm): -20.00
|
||||
effective 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
|
||||
@@ -29,6 +31,7 @@ Edfa Edfa_booster_roadm_Stockholm_to_fiber (Stockholm → Norrköping)_(1/2)
|
||||
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)
|
||||
type_variety: SSMF
|
||||
@@ -37,7 +40,8 @@ Fiber fiber (Stockholm → Norrköping)_(1/2)
|
||||
total loss (dB): 16.33
|
||||
(includes conn loss (dB) in: 0.00 out: 0.00)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -14.33
|
||||
reference pch out (dBm): -14.33
|
||||
actual pch out (dBm): -14.31
|
||||
Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2)
|
||||
type_variety: openroadm_ila_low_noise
|
||||
effective gain(dB): 16.33
|
||||
@@ -50,6 +54,7 @@ Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2)
|
||||
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
|
||||
Fiber fiber (Stockholm → Norrköping)_(2/2)
|
||||
type_variety: SSMF
|
||||
@@ -58,7 +63,8 @@ Fiber fiber (Stockholm → Norrköping)_(2/2)
|
||||
total loss (dB): 16.33
|
||||
(includes conn loss (dB) in: 0.00 out: 0.00)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -14.33
|
||||
reference pch out (dBm): -14.33
|
||||
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
|
||||
@@ -71,10 +77,12 @@ Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2)
|
||||
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_Norrköping
|
||||
effective loss (dB): 22.00
|
||||
pch out (dBm): -20.00
|
||||
effective loss (dB): 22.00
|
||||
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
|
||||
@@ -87,6 +95,7 @@ Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping)
|
||||
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)
|
||||
type_variety: SSMF
|
||||
@@ -95,7 +104,8 @@ Fiber fiber (Norrköping → Linköping)
|
||||
total loss (dB): 11.00
|
||||
(includes conn loss (dB) in: 0.00 out: 0.00)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -9.00
|
||||
reference pch out (dBm): -9.00
|
||||
actual pch out (dBm): -9.00
|
||||
Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping)
|
||||
type_variety: openroadm_mw_mw_preamp
|
||||
effective gain(dB): 11.00
|
||||
@@ -108,10 +118,12 @@ Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping)
|
||||
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
|
||||
pch out (dBm): -20.00
|
||||
effective loss (dB): 22.00
|
||||
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
|
||||
@@ -124,6 +136,7 @@ Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping)
|
||||
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)
|
||||
type_variety: SSMF
|
||||
@@ -132,7 +145,8 @@ Fiber fiber (Linköping → Jönköping)
|
||||
total loss (dB): 26.80
|
||||
(includes conn loss (dB) in: 0.00 out: 0.00)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -24.80
|
||||
reference pch out (dBm): -24.80
|
||||
actual pch out (dBm): -24.79
|
||||
Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping)
|
||||
type_variety: openroadm_mw_mw_preamp
|
||||
effective gain(dB): 26.80
|
||||
@@ -145,10 +159,12 @@ Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping)
|
||||
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
|
||||
pch out (dBm): -20.00
|
||||
effective loss (dB): 22.00
|
||||
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
|
||||
@@ -161,6 +177,7 @@ Edfa Edfa_booster_roadm_Jönköping_to_fiber (Jönköping → Borås)
|
||||
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)
|
||||
type_variety: SSMF
|
||||
@@ -169,7 +186,8 @@ Fiber fiber (Jönköping → Borås)
|
||||
total loss (dB): 17.82
|
||||
(includes conn loss (dB) in: 0.00 out: 0.00)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -15.82
|
||||
reference pch out (dBm): -15.82
|
||||
actual pch out (dBm): -15.81
|
||||
Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås)
|
||||
type_variety: openroadm_mw_mw_preamp
|
||||
effective gain(dB): 17.82
|
||||
@@ -182,10 +200,12 @@ Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås)
|
||||
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
|
||||
pch out (dBm): -20.00
|
||||
effective loss (dB): 22.00
|
||||
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
|
||||
@@ -198,6 +218,7 @@ Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg)
|
||||
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)
|
||||
type_variety: SSMF
|
||||
@@ -206,7 +227,8 @@ Fiber fiber (Borås → Gothenburg)
|
||||
total loss (dB): 13.53
|
||||
(includes conn loss (dB) in: 0.00 out: 0.00)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -11.53
|
||||
reference pch out (dBm): -11.53
|
||||
actual pch out (dBm): -11.52
|
||||
Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg)
|
||||
type_variety: openroadm_mw_mw_preamp
|
||||
effective gain(dB): 13.53
|
||||
@@ -219,17 +241,20 @@ Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg)
|
||||
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
|
||||
pch out (dBm): -20.00
|
||||
effective loss (dB): 22.00
|
||||
reference pch out (dBm): -20.00
|
||||
actual pch out (dBm): -20.00
|
||||
Transceiver trx_Gothenburg
|
||||
GSNR (0.1nm, dB): 18.90
|
||||
GSNR (signal bw, dB): 14.88
|
||||
OSNR ASE (0.1nm, dB): 21.20
|
||||
OSNR ASE (signal bw, dB): 17.18
|
||||
CD (ps/nm): 8350.42
|
||||
PMD (ps): 0.89
|
||||
PMD (ps): 7.99
|
||||
PDL (dB): 3.74
|
||||
|
||||
Transmission result for input power = 2.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m18.90 dB[0m
|
||||
264
tests/invocation/openroadm-v5-Stockholm-Gothenburg
Normal file
264
tests/invocation/openroadm-v5-Stockholm-Gothenburg
Normal file
@@ -0,0 +1,264 @@
|
||||
There are 96 channels propagating
|
||||
Power mode is set to True
|
||||
=> it can be modified in eqpt_config.json - Span
|
||||
|
||||
There are 6 fiber spans over 500 km between trx_Stockholm and trx_Gothenburg
|
||||
|
||||
Now propagating between trx_Stockholm and trx_Gothenburg:
|
||||
|
||||
Propagating with input power = [1;36;40m2.00 dBm[0m:
|
||||
Transceiver trx_Stockholm
|
||||
GSNR (0.1nm, dB): 35.00
|
||||
GSNR (signal bw, dB): 30.98
|
||||
OSNR ASE (0.1nm, dB): 35.00
|
||||
OSNR ASE (signal bw, dB): 30.98
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
Roadm roadm_Stockholm
|
||||
effective 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
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): -inf
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -0.18
|
||||
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)
|
||||
type_variety: SSMF
|
||||
length (km): 81.63
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 16.33
|
||||
(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.31
|
||||
Edfa Edfa_fiber (Stockholm → Norrköping)_(1/2)
|
||||
type_variety: openroadm_ila_low_noise
|
||||
effective gain(dB): 16.33
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 8.01
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): 5.51
|
||||
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
|
||||
Fiber fiber (Stockholm → Norrköping)_(2/2)
|
||||
type_variety: SSMF
|
||||
length (km): 81.63
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 16.33
|
||||
(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.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
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): 5.53
|
||||
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
|
||||
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
|
||||
Edfa Edfa_booster_roadm_Norrköping_to_fiber (Norrköping → Linköping)
|
||||
type_variety: openroadm_mw_mw_booster
|
||||
effective gain(dB): 22.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): -inf
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -0.18
|
||||
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)
|
||||
type_variety: SSMF
|
||||
length (km): 45.99
|
||||
pad att_in (dB): 1.80
|
||||
total loss (dB): 11.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): -9.00
|
||||
actual pch out (dBm): -9.00
|
||||
Edfa Edfa_preamp_roadm_Linköping_from_fiber (Norrköping → Linköping)
|
||||
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
|
||||
effective gain(dB): 11.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 16.00
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): 10.83
|
||||
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
|
||||
Edfa Edfa_booster_roadm_Linköping_to_fiber (Linköping → Jönköping)
|
||||
type_variety: openroadm_mw_mw_booster
|
||||
effective gain(dB): 22.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): -inf
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -0.18
|
||||
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)
|
||||
type_variety: SSMF
|
||||
length (km): 134.02
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 26.80
|
||||
(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): -24.80
|
||||
actual pch out (dBm): -24.79
|
||||
Edfa Edfa_preamp_roadm_Jönköping_from_fiber (Linköping → Jönköping)
|
||||
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
|
||||
effective gain(dB): 26.80
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 8.01
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -4.97
|
||||
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
|
||||
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
|
||||
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
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): -inf
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -0.18
|
||||
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)
|
||||
type_variety: SSMF
|
||||
length (km): 89.12
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 17.82
|
||||
(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): -15.82
|
||||
actual pch out (dBm): -15.81
|
||||
Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås)
|
||||
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
|
||||
effective gain(dB): 17.82
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 10.54
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): 4.01
|
||||
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
|
||||
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
|
||||
Edfa Edfa_booster_roadm_Borås_to_fiber (Borås → Gothenburg)
|
||||
type_variety: openroadm_mw_mw_booster
|
||||
effective gain(dB): 22.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): -inf
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -0.18
|
||||
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)
|
||||
type_variety: SSMF
|
||||
length (km): 67.64
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 13.53
|
||||
(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): -11.53
|
||||
actual pch out (dBm): -11.52
|
||||
Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg)
|
||||
type_variety: openroadm_mw_mw_preamp_worstcase_ver5
|
||||
effective gain(dB): 13.53
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 13.54
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): 8.30
|
||||
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
|
||||
Transceiver trx_Gothenburg
|
||||
GSNR (0.1nm, dB): 19.27
|
||||
GSNR (signal bw, dB): 15.24
|
||||
OSNR ASE (0.1nm, dB): 21.84
|
||||
OSNR ASE (signal bw, dB): 17.82
|
||||
CD (ps/nm): 8350.42
|
||||
PMD (ps): 7.99
|
||||
PDL (dB): 3.74
|
||||
|
||||
Transmission result for input power = 2.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m19.27 dB[0m
|
||||
|
||||
(No source node specified: picked trx_Stockholm)
|
||||
|
||||
(No destination node specified: picked trx_Gothenburg)
|
||||
@@ -1,4 +1,3 @@
|
||||
[1;34;40mComputing path requests gnpy/example-data/meshTopologyExampleV2.xls into JSON format[0m
|
||||
[1;34;40mList of disjunctions[0m
|
||||
[Disjunction 3
|
||||
relaxable: false
|
||||
@@ -147,7 +146,7 @@ req id demand GSNR@bandwidth A-Z (Z-A) GSNR@0
|
||||
0 trx Lorient_KMA to trx Vannes_KBE : 24.83 28.92 14 mode 1 100.0 1 (-284,4)
|
||||
1 trx Brest_KLA to trx Vannes_KBE : 17.75 21.83 14 mode 1 200.0 2 (-272,8)
|
||||
3 trx Lannion_CAS to trx Rennes_STA : 22.21 26.29 13 mode 1 60.0 1 (-284,4)
|
||||
4 trx Rennes_STA to trx Lannion_CAS : 16.07 23.29 17 mode 2 150.0 1 (-258,6)
|
||||
4 trx Rennes_STA to trx Lannion_CAS : 16.06 23.29 17 mode 2 150.0 1 (-258,6)
|
||||
5 trx Rennes_STA to trx Lannion_CAS : 20.31 27.54 17 mode 2 20.0 1 (-274,6)
|
||||
7 | 6 trx Lannion_CAS to trx Lorient_KMA : 19.52 23.61 14 mode 1 700.0 7 (-224,28)
|
||||
7b trx Lannion_CAS to trx Lorient_KMA : 19.61 23.69 14 mode 1 400.0 4 (-172,24)
|
||||
|
||||
100
tests/invocation/spectrum1_transmission_main_example
Normal file
100
tests/invocation/spectrum1_transmission_main_example
Normal file
@@ -0,0 +1,100 @@
|
||||
User input for spectrum used for propagation instead of SI
|
||||
There are 76 channels propagating
|
||||
Power mode is set to True
|
||||
=> it can be modified in eqpt_config.json - Span
|
||||
|
||||
There are 3 fiber spans over 130 km between trx Lannion_CAS and trx Lorient_KMA
|
||||
|
||||
Now propagating between trx Lannion_CAS and trx Lorient_KMA:
|
||||
|
||||
Propagating with input power = [1;36;40m0.00 dBm[0m:
|
||||
Transceiver trx Lannion_CAS
|
||||
GSNR (0.1nm, dB): 40.00
|
||||
GSNR (signal bw, dB): 35.92
|
||||
OSNR ASE (0.1nm, dB): 40.00
|
||||
OSNR ASE (signal bw, dB): 35.92
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
Roadm roadm Lannion_CAS
|
||||
effective 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
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 6.36
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -1.19
|
||||
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
|
||||
type_variety: SSMF
|
||||
length (km): 20.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 4.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): -3.00
|
||||
actual pch out (dBm): -2.99
|
||||
Fused west fused spans in Corlay
|
||||
loss (dB): 1.00
|
||||
Fiber fiber (Corlay → Loudeac)-F010
|
||||
type_variety: SSMF
|
||||
length (km): 50.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 10.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): -14.00
|
||||
actual pch out (dBm): -13.99
|
||||
Fused west fused spans in Loudeac
|
||||
loss (dB): 1.00
|
||||
Fiber fiber (Loudeac → Lorient_KMA)-F054
|
||||
type_variety: SSMF
|
||||
length (km): 60.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 12.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): -27.00
|
||||
actual pch out (dBm): -26.99
|
||||
Edfa west edfa in Lorient_KMA to Loudeac
|
||||
type_variety: std_high_gain
|
||||
effective gain(dB): 28.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 5.92
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -8.18
|
||||
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
|
||||
Transceiver trx Lorient_KMA
|
||||
GSNR (0.1nm, dB): 23.61
|
||||
GSNR (signal bw, dB): 19.52
|
||||
OSNR ASE (0.1nm, dB): 23.89
|
||||
OSNR ASE (signal bw, dB): 19.81
|
||||
CD (ps/nm): 2171.00
|
||||
PMD (ps): 0.46
|
||||
PDL (dB): 0.00
|
||||
|
||||
Transmission result for input power = 0.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m23.61 dB[0m
|
||||
|
||||
(No source node specified: picked trx Lannion_CAS)
|
||||
|
||||
(No destination node specified: picked trx Lorient_KMA)
|
||||
163
tests/invocation/spectrum2_transmission_main_example
Normal file
163
tests/invocation/spectrum2_transmission_main_example
Normal file
@@ -0,0 +1,163 @@
|
||||
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 3 fiber spans over 130 km between trx Lannion_CAS and trx Lorient_KMA
|
||||
|
||||
Now propagating between trx Lannion_CAS and trx Lorient_KMA:
|
||||
|
||||
Propagating with input power = [1;36;40m0.00 dBm[0m:
|
||||
Transceiver trx Lannion_CAS
|
||||
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
|
||||
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
|
||||
Edfa east edfa in Lannion_CAS to Corlay
|
||||
type_variety: std_medium_gain
|
||||
effective gain(dB): 21.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 6.36
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -2.22
|
||||
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
|
||||
type_variety: SSMF
|
||||
length (km): 20.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 4.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): -3.00
|
||||
actual pch out (dBm): mode_1: -2.99, mode_2: -2.98
|
||||
Fused west fused spans in Corlay
|
||||
loss (dB): 1.00
|
||||
Fiber fiber (Corlay → Loudeac)-F010
|
||||
type_variety: SSMF
|
||||
length (km): 50.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 10.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): -14.00
|
||||
actual pch out (dBm): mode_1: -13.99, mode_2: -13.98
|
||||
Fused west fused spans in Loudeac
|
||||
loss (dB): 1.00
|
||||
Fiber fiber (Loudeac → Lorient_KMA)-F054
|
||||
type_variety: SSMF
|
||||
length (km): 60.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 12.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): -27.00
|
||||
actual pch out (dBm): mode_1: -26.99, mode_2: -26.98
|
||||
Edfa west edfa in Lorient_KMA to Loudeac
|
||||
type_variety: std_high_gain
|
||||
effective gain(dB): 28.00
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 5.92
|
||||
(including att_in)
|
||||
pad att_in (dB): 0.00
|
||||
Power In (dBm): -9.21
|
||||
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
|
||||
Transceiver trx Lorient_KMA
|
||||
GSNR (0.1nm, dB): mode_1: 23.65, mode_2: 23.81
|
||||
GSNR (signal bw, dB): mode_1: 19.57, mode_2: 16.72
|
||||
OSNR ASE (0.1nm, dB): mode_1: 23.91, mode_2: 23.87
|
||||
OSNR ASE (signal bw, dB): mode_1: 19.83, mode_2: 16.78
|
||||
CD (ps/nm): 2171.00
|
||||
PMD (ps): 0.46
|
||||
PDL (dB): 0.00
|
||||
|
||||
Transmission result for input power = 0.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m23.72 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.40000 -20.04 19.85 33.30 19.65
|
||||
2 191.45000 -20.04 19.85 32.70 19.63
|
||||
3 191.50000 -20.04 19.84 32.45 19.61
|
||||
4 191.55000 -20.04 19.84 32.29 19.60
|
||||
5 191.60000 -20.04 19.84 32.18 19.60
|
||||
6 191.65000 -20.04 19.84 32.10 19.59
|
||||
7 191.70000 -20.04 19.84 32.03 19.59
|
||||
8 191.75000 -20.04 19.84 31.98 19.58
|
||||
9 191.80000 -20.04 19.84 31.93 19.58
|
||||
10 191.85000 -20.04 19.84 31.90 19.57
|
||||
11 191.90000 -20.04 19.84 31.86 19.57
|
||||
12 191.95000 -20.04 19.84 31.84 19.57
|
||||
13 192.00000 -20.04 19.83 31.82 19.57
|
||||
14 192.05000 -20.04 19.83 31.80 19.57
|
||||
15 192.10000 -20.04 19.83 31.78 19.56
|
||||
16 192.15000 -20.04 19.83 31.77 19.56
|
||||
17 192.20000 -20.04 19.83 31.76 19.56
|
||||
18 192.25000 -20.04 19.83 31.75 19.56
|
||||
19 192.30000 -20.04 19.83 31.75 19.56
|
||||
20 192.35000 -20.04 19.83 31.75 19.56
|
||||
21 192.40000 -20.05 19.83 31.75 19.56
|
||||
22 192.45000 -20.05 19.82 31.75 19.55
|
||||
23 192.50000 -20.05 19.82 31.76 19.55
|
||||
24 192.55000 -20.05 19.82 31.76 19.55
|
||||
25 192.60000 -20.05 19.82 31.78 19.55
|
||||
26 192.65000 -20.05 19.82 31.79 19.55
|
||||
27 192.70000 -20.05 19.82 31.81 19.55
|
||||
28 192.75000 -20.05 19.82 31.83 19.55
|
||||
29 192.80000 -20.05 19.82 31.86 19.55
|
||||
30 192.85000 -20.05 19.82 31.90 19.56
|
||||
31 192.90000 -20.04 19.82 31.95 19.56
|
||||
32 192.95000 -20.04 19.81 32.02 19.56
|
||||
33 193.00000 -20.04 19.81 32.11 19.56
|
||||
34 193.05000 -20.04 19.81 32.27 19.57
|
||||
35 193.10000 -20.04 19.81 32.61 19.59
|
||||
36 193.16250 -20.09 16.80 33.70 16.71
|
||||
37 193.23750 -20.09 16.80 34.20 16.72
|
||||
38 193.31250 -20.09 16.80 34.45 16.72
|
||||
39 193.38750 -20.09 16.79 34.62 16.72
|
||||
40 193.46250 -20.09 16.79 34.75 16.72
|
||||
41 193.53750 -20.09 16.79 34.85 16.72
|
||||
42 193.61250 -20.09 16.79 34.94 16.72
|
||||
43 193.68750 -20.09 16.79 35.02 16.72
|
||||
44 193.76250 -20.09 16.79 35.08 16.72
|
||||
45 193.83750 -20.09 16.78 35.15 16.72
|
||||
46 193.91250 -20.09 16.78 35.20 16.72
|
||||
47 193.98750 -20.09 16.78 35.26 16.72
|
||||
48 194.06250 -20.09 16.78 35.31 16.72
|
||||
49 194.13750 -20.09 16.78 35.36 16.72
|
||||
50 194.21250 -20.09 16.78 35.41 16.72
|
||||
51 194.28750 -20.09 16.78 35.47 16.72
|
||||
52 194.36250 -20.09 16.77 35.52 16.72
|
||||
53 194.43750 -20.09 16.77 35.58 16.72
|
||||
54 194.51250 -20.09 16.77 35.65 16.71
|
||||
55 194.58750 -20.09 16.77 35.72 16.71
|
||||
56 194.66250 -20.09 16.77 35.81 16.71
|
||||
57 194.73750 -20.09 16.77 35.92 16.71
|
||||
58 194.81250 -20.09 16.76 36.06 16.71
|
||||
59 194.88750 -20.09 16.76 36.27 16.71
|
||||
60 194.96250 -20.09 16.76 36.75 16.72
|
||||
|
||||
(No source node specified: picked trx Lannion_CAS)
|
||||
|
||||
(No destination node specified: picked trx Lorient_KMA)
|
||||
@@ -14,6 +14,7 @@ Transceiver Site_A
|
||||
OSNR ASE (signal bw, dB): 35.92
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
Fiber Span1
|
||||
type_variety: SSMF
|
||||
length (km): 80.00
|
||||
@@ -21,7 +22,8 @@ Fiber Span1
|
||||
total loss (dB): 17.00
|
||||
(includes conn loss (dB) in: 0.50 out: 0.50)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -17.00
|
||||
reference pch out (dBm): -17.00
|
||||
actual pch out (dBm): -17.00
|
||||
Edfa Edfa1
|
||||
type_variety: std_low_gain
|
||||
effective gain(dB): 15.00
|
||||
@@ -34,6 +36,7 @@ Edfa Edfa1
|
||||
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
|
||||
GSNR (0.1nm, dB): 31.17
|
||||
@@ -42,6 +45,7 @@ Transceiver Site_B
|
||||
OSNR ASE (signal bw, dB): 29.21
|
||||
CD (ps/nm): 1336.00
|
||||
PMD (ps): 0.36
|
||||
PDL (dB): 0.00
|
||||
|
||||
Transmission result for input power = 0.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m31.17 dB[0m
|
||||
|
||||
@@ -14,6 +14,7 @@ Transceiver Site_A
|
||||
OSNR ASE (signal bw, dB): 35.92
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
RamanFiber Span1
|
||||
type_variety: SSMF
|
||||
length (km): 80.00
|
||||
@@ -21,109 +22,114 @@ RamanFiber Span1
|
||||
total loss (dB): 17.00
|
||||
(includes conn loss (dB) in: 0.50 out: 0.50)
|
||||
(conn loss out includes EOL margin defined in eqpt_config.json)
|
||||
pch out (dBm): -7.74
|
||||
reference pch out (dBm): -7.77
|
||||
actual pch out (dBm): -8.03
|
||||
Fused Fused1
|
||||
loss (dB): 0.00
|
||||
Edfa Edfa1
|
||||
type_variety: std_low_gain
|
||||
effective gain(dB): 5.74
|
||||
effective gain(dB): 5.77
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 13.26
|
||||
noise figure (dB): 13.23
|
||||
(including att_in)
|
||||
pad att_in (dB): 2.26
|
||||
Power In (dBm): 11.07
|
||||
Power Out (dBm): 16.82
|
||||
pad att_in (dB): 2.23
|
||||
Power In (dBm): 11.04
|
||||
Power Out (dBm): 16.81
|
||||
Delta_P (dB): -2.00
|
||||
target pch (dBm): -2.00
|
||||
effective pch (dBm): -2.00
|
||||
actual pch out (dBm): -2.26
|
||||
output VOA (dB): 0.00
|
||||
Transceiver Site_B
|
||||
GSNR (0.1nm, dB): 31.43
|
||||
GSNR (signal bw, dB): 27.35
|
||||
OSNR ASE (0.1nm, dB): 34.18
|
||||
OSNR ASE (signal bw, dB): 30.10
|
||||
GSNR (0.1nm, dB): 31.44
|
||||
GSNR (signal bw, dB): 27.36
|
||||
OSNR ASE (0.1nm, dB): 34.21
|
||||
OSNR ASE (signal bw, dB): 30.13
|
||||
CD (ps/nm): 1336.00
|
||||
PMD (ps): 0.36
|
||||
PDL (dB): 0.00
|
||||
|
||||
Transmission result for input power = 0.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m31.43 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.35 0.21 31.56 31.47 28.50
|
||||
2 191.40 0.17 31.54 31.38 28.45
|
||||
3 191.45 0.14 31.52 31.30 28.40
|
||||
4 191.50 0.10 31.50 31.22 28.34
|
||||
5 191.55 0.04 31.47 31.14 28.29
|
||||
6 191.60 -0.02 31.44 31.06 28.23
|
||||
7 191.65 -0.08 31.41 30.98 28.18
|
||||
8 191.70 -0.14 31.37 30.90 28.12
|
||||
9 191.75 -0.20 31.34 30.83 28.07
|
||||
10 191.80 -0.26 31.31 30.75 28.01
|
||||
11 191.85 -0.33 31.27 30.68 27.96
|
||||
12 191.90 -0.39 31.24 30.61 27.90
|
||||
13 191.95 -0.46 31.20 30.54 27.85
|
||||
14 192.00 -0.52 31.17 30.47 27.79
|
||||
15 192.05 -0.59 31.13 30.40 27.74
|
||||
16 192.10 -0.66 31.10 30.33 27.69
|
||||
17 192.15 -0.72 31.06 30.26 27.63
|
||||
18 192.20 -0.79 31.02 30.20 27.58
|
||||
19 192.25 -0.86 30.98 30.21 27.57
|
||||
20 192.30 -0.94 30.94 30.21 27.55
|
||||
21 192.35 -1.01 30.90 30.22 27.54
|
||||
22 192.40 -1.09 30.86 30.23 27.52
|
||||
23 192.45 -1.16 30.81 30.23 27.50
|
||||
24 192.50 -1.24 30.77 30.24 27.49
|
||||
25 192.55 -1.31 30.73 30.25 27.47
|
||||
26 192.60 -1.38 30.69 30.25 27.46
|
||||
27 192.65 -1.45 30.65 30.26 27.44
|
||||
28 192.70 -1.52 30.61 30.27 27.42
|
||||
29 192.75 -1.59 30.56 30.28 27.41
|
||||
30 192.80 -1.66 30.52 30.28 27.39
|
||||
31 192.85 -1.73 30.48 30.29 27.37
|
||||
32 192.90 -1.80 30.44 30.30 27.36
|
||||
33 192.95 -1.87 30.39 30.30 27.34
|
||||
34 193.00 -1.94 30.35 30.31 27.32
|
||||
35 193.05 -2.01 30.31 30.32 27.30
|
||||
36 193.10 -2.08 30.27 30.33 27.29
|
||||
37 193.15 -2.15 30.22 30.33 27.27
|
||||
38 193.20 -2.22 30.18 30.35 27.25
|
||||
39 193.25 -2.29 30.14 30.37 27.24
|
||||
40 193.30 -2.36 30.09 30.39 27.23
|
||||
41 193.35 -2.43 30.05 30.40 27.21
|
||||
42 193.40 -2.49 30.01 30.42 27.20
|
||||
43 193.45 -2.56 29.96 30.44 27.18
|
||||
44 193.50 -2.63 29.92 30.46 27.17
|
||||
45 193.55 -2.70 29.87 30.47 27.15
|
||||
46 193.60 -2.78 29.83 30.49 27.13
|
||||
47 193.65 -2.85 29.78 30.51 27.12
|
||||
48 193.70 -2.92 29.73 30.53 27.10
|
||||
49 193.75 -2.99 29.68 30.54 27.08
|
||||
50 193.80 -3.06 29.64 30.56 27.06
|
||||
51 193.85 -3.14 29.59 30.58 27.05
|
||||
52 193.90 -3.21 29.54 30.60 27.03
|
||||
53 193.95 -3.28 29.49 30.62 27.01
|
||||
54 194.00 -3.35 29.44 30.64 26.99
|
||||
55 194.05 -3.42 29.39 30.65 26.97
|
||||
56 194.10 -3.50 29.34 30.67 26.95
|
||||
57 194.15 -3.57 29.29 30.73 26.94
|
||||
58 194.20 -3.64 29.24 30.79 26.94
|
||||
59 194.25 -3.72 29.19 30.85 26.93
|
||||
60 194.30 -3.79 29.14 30.91 26.93
|
||||
61 194.35 -3.86 29.09 30.97 26.92
|
||||
62 194.40 -3.93 29.04 31.03 26.91
|
||||
63 194.45 -4.01 28.99 31.09 26.90
|
||||
64 194.50 -4.08 28.94 31.15 26.90
|
||||
65 194.55 -4.14 28.89 31.22 26.89
|
||||
66 194.60 -4.21 28.85 31.28 26.88
|
||||
67 194.65 -4.28 28.80 31.35 26.88
|
||||
68 194.70 -4.34 28.75 31.41 26.87
|
||||
69 194.75 -4.41 28.70 31.48 26.86
|
||||
70 194.80 -4.47 28.66 31.55 26.86
|
||||
71 194.85 -4.54 28.61 31.62 26.85
|
||||
72 194.90 -4.60 28.56 31.69 26.84
|
||||
73 194.95 -4.67 28.51 31.77 26.83
|
||||
74 195.00 -4.73 28.47 31.84 26.82
|
||||
75 195.05 -4.80 28.42 31.91 26.81
|
||||
76 195.10 -4.86 28.37 31.91 26.78
|
||||
1 191.35000 0.21 31.62 31.43 28.52
|
||||
2 191.40000 0.17 31.60 31.35 28.46
|
||||
3 191.45000 0.13 31.58 31.26 28.41
|
||||
4 191.50000 0.09 31.56 31.18 28.36
|
||||
5 191.55000 0.03 31.53 31.10 28.30
|
||||
6 191.60000 -0.02 31.50 31.02 28.24
|
||||
7 191.65000 -0.08 31.46 30.94 28.19
|
||||
8 191.70000 -0.14 31.43 30.87 28.13
|
||||
9 191.75000 -0.20 31.40 30.79 28.08
|
||||
10 191.80000 -0.27 31.37 30.72 28.02
|
||||
11 191.85000 -0.33 31.33 30.65 27.97
|
||||
12 191.90000 -0.40 31.29 30.58 27.91
|
||||
13 191.95000 -0.46 31.26 30.51 27.86
|
||||
14 192.00000 -0.53 31.22 30.44 27.80
|
||||
15 192.05000 -0.59 31.18 30.37 27.75
|
||||
16 192.10000 -0.66 31.15 30.30 27.69
|
||||
17 192.15000 -0.73 31.11 30.24 27.64
|
||||
18 192.20000 -0.80 31.07 30.17 27.59
|
||||
19 192.25000 -0.86 31.03 30.18 27.57
|
||||
20 192.30000 -0.94 30.99 30.19 27.56
|
||||
21 192.35000 -1.02 30.94 30.20 27.54
|
||||
22 192.40000 -1.09 30.90 30.20 27.53
|
||||
23 192.45000 -1.17 30.86 30.21 27.51
|
||||
24 192.50000 -1.24 30.81 30.22 27.50
|
||||
25 192.55000 -1.31 30.77 30.23 27.48
|
||||
26 192.60000 -1.38 30.73 30.23 27.46
|
||||
27 192.65000 -1.45 30.69 30.24 27.45
|
||||
28 192.70000 -1.52 30.65 30.25 27.43
|
||||
29 192.75000 -1.59 30.60 30.26 27.42
|
||||
30 192.80000 -1.67 30.56 30.27 27.40
|
||||
31 192.85000 -1.74 30.52 30.27 27.38
|
||||
32 192.90000 -1.81 30.47 30.28 27.37
|
||||
33 192.95000 -1.88 30.43 30.29 27.35
|
||||
34 193.00000 -1.95 30.39 30.30 27.33
|
||||
35 193.05000 -2.02 30.34 30.30 27.31
|
||||
36 193.10000 -2.08 30.30 30.31 27.30
|
||||
37 193.15000 -2.15 30.26 30.32 27.28
|
||||
38 193.20000 -2.22 30.21 30.34 27.26
|
||||
39 193.25000 -2.29 30.17 30.36 27.25
|
||||
40 193.30000 -2.36 30.13 30.37 27.24
|
||||
41 193.35000 -2.43 30.08 30.39 27.22
|
||||
42 193.40000 -2.50 30.04 30.41 27.21
|
||||
43 193.45000 -2.56 29.99 30.43 27.19
|
||||
44 193.50000 -2.63 29.95 30.44 27.18
|
||||
45 193.55000 -2.70 29.90 30.46 27.16
|
||||
46 193.60000 -2.78 29.85 30.48 27.15
|
||||
47 193.65000 -2.85 29.80 30.50 27.13
|
||||
48 193.70000 -2.92 29.76 30.52 27.11
|
||||
49 193.75000 -2.99 29.71 30.54 27.09
|
||||
50 193.80000 -3.06 29.66 30.55 27.07
|
||||
51 193.85000 -3.14 29.61 30.57 27.06
|
||||
52 193.90000 -3.21 29.56 30.59 27.04
|
||||
53 193.95000 -3.28 29.52 30.61 27.02
|
||||
54 194.00000 -3.35 29.47 30.63 27.00
|
||||
55 194.05000 -3.42 29.42 30.65 26.98
|
||||
56 194.10000 -3.50 29.37 30.67 26.96
|
||||
57 194.15000 -3.57 29.32 30.72 26.95
|
||||
58 194.20000 -3.64 29.26 30.78 26.95
|
||||
59 194.25000 -3.72 29.21 30.84 26.94
|
||||
60 194.30000 -3.79 29.16 30.90 26.94
|
||||
61 194.35000 -3.86 29.11 30.96 26.93
|
||||
62 194.40000 -3.93 29.06 31.02 26.92
|
||||
63 194.45000 -4.01 29.01 31.09 26.91
|
||||
64 194.50000 -4.08 28.96 31.15 26.91
|
||||
65 194.55000 -4.14 28.91 31.21 26.90
|
||||
66 194.60000 -4.21 28.86 31.28 26.90
|
||||
67 194.65000 -4.27 28.82 31.34 26.89
|
||||
68 194.70000 -4.34 28.77 31.41 26.88
|
||||
69 194.75000 -4.41 28.72 31.48 26.88
|
||||
70 194.80000 -4.47 28.67 31.55 26.87
|
||||
71 194.85000 -4.54 28.63 31.62 26.86
|
||||
72 194.90000 -4.60 28.58 31.69 26.85
|
||||
73 194.95000 -4.67 28.53 31.76 26.84
|
||||
74 195.00000 -4.73 28.48 31.84 26.83
|
||||
75 195.05000 -4.80 28.43 31.91 26.82
|
||||
76 195.10000 -4.86 28.38 31.91 26.79
|
||||
|
||||
(No source node specified: picked Site_A)
|
||||
|
||||
|
||||
453
tests/invocation/transmission_main_example_long
Normal file
453
tests/invocation/transmission_main_example_long
Normal file
@@ -0,0 +1,453 @@
|
||||
There are 96 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): 100.00
|
||||
GSNR (signal bw, dB): 95.92
|
||||
OSNR ASE (0.1nm, dB): 100.00
|
||||
OSNR ASE (signal bw, dB): 95.92
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
Roadm roadm Site A
|
||||
effective 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
|
||||
(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.18
|
||||
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
|
||||
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): -15.99
|
||||
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.84
|
||||
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
|
||||
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): -15.98
|
||||
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.84
|
||||
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
|
||||
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): -15.97
|
||||
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.85
|
||||
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
|
||||
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): -15.96
|
||||
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.86
|
||||
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
|
||||
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): -15.95
|
||||
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.87
|
||||
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
|
||||
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.18
|
||||
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
|
||||
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): -15.99
|
||||
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.83
|
||||
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
|
||||
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): -15.98
|
||||
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.84
|
||||
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
|
||||
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): -15.97
|
||||
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.85
|
||||
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
|
||||
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): -15.96
|
||||
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.86
|
||||
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
|
||||
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): -15.95
|
||||
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.87
|
||||
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
|
||||
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.18
|
||||
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
|
||||
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): -15.99
|
||||
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.83
|
||||
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
|
||||
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): -15.98
|
||||
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.84
|
||||
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
|
||||
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.18
|
||||
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
|
||||
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): -15.99
|
||||
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.83
|
||||
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
|
||||
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): -15.98
|
||||
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.84
|
||||
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
|
||||
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): -15.97
|
||||
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.85
|
||||
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
|
||||
Transceiver Site_B
|
||||
GSNR (0.1nm, dB): 17.85
|
||||
GSNR (signal bw, dB): 13.77
|
||||
OSNR ASE (0.1nm, dB): 19.70
|
||||
OSNR ASE (signal bw, dB): 15.62
|
||||
CD (ps/nm): 20040.00
|
||||
PMD (ps): 1.39
|
||||
PDL (dB): 0.00
|
||||
|
||||
Transmission result for input power = 0.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m17.85 dB[0m
|
||||
|
||||
(No source node specified: picked Site_A)
|
||||
|
||||
(No destination node specified: picked Site_B)
|
||||
335
tests/invocation/transmission_saturated
Normal file
335
tests/invocation/transmission_saturated
Normal file
@@ -0,0 +1,335 @@
|
||||
There are 96 channels propagating
|
||||
Power mode is set to True
|
||||
=> it can be modified in eqpt_config.json - Span
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING[0m: 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.
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING[0m: 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.
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING[0m: 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.
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING[0m: 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.
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
[1;31;40mWARNING:[0m 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.82 is applied
|
||||
|
||||
|
||||
There are 3 fiber spans over 130 km between trx Lannion_CAS and trx Lorient_KMA
|
||||
|
||||
Now propagating between trx Lannion_CAS and trx Lorient_KMA:
|
||||
|
||||
Propagating with input power = [1;36;40m3.00 dBm[0m:
|
||||
Transceiver trx Lannion_CAS
|
||||
GSNR (0.1nm, dB): 100.00
|
||||
GSNR (signal bw, dB): 95.92
|
||||
OSNR ASE (0.1nm, dB): 100.00
|
||||
OSNR ASE (signal bw, dB): 95.92
|
||||
CD (ps/nm): 0.00
|
||||
PMD (ps): 0.00
|
||||
PDL (dB): 0.00
|
||||
Roadm roadm Lannion_CAS
|
||||
effective 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
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 6.13
|
||||
(including att_in)
|
||||
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
|
||||
actual pch out (dBm): 1.18
|
||||
output VOA (dB): 0.00
|
||||
Fiber fiber (Lannion_CAS → Corlay)-F061
|
||||
type_variety: SSMF
|
||||
length (km): 20.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 4.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): -2.82
|
||||
actual pch out (dBm): -2.81
|
||||
Fused west fused spans in Corlay
|
||||
loss (dB): 1.00
|
||||
Fiber fiber (Corlay → Loudeac)-F010
|
||||
type_variety: SSMF
|
||||
length (km): 50.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 10.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): -13.82
|
||||
actual pch out (dBm): -13.81
|
||||
Fused west fused spans in Loudeac
|
||||
loss (dB): 1.00
|
||||
Fiber fiber (Loudeac → Lorient_KMA)-F054
|
||||
type_variety: SSMF
|
||||
length (km): 60.00
|
||||
pad att_in (dB): 0.00
|
||||
total loss (dB): 12.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): -26.82
|
||||
actual pch out (dBm): -26.81
|
||||
Edfa west edfa in Lorient_KMA to Loudeac
|
||||
type_variety: test
|
||||
effective gain(dB): 27.99
|
||||
(before att_in and before output VOA)
|
||||
noise figure (dB): 5.76
|
||||
(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
|
||||
Transceiver trx Lorient_KMA
|
||||
GSNR (0.1nm, dB): 23.94
|
||||
GSNR (signal bw, dB): 19.85
|
||||
OSNR ASE (0.1nm, dB): 24.29
|
||||
OSNR ASE (signal bw, dB): 20.20
|
||||
CD (ps/nm): 2171.00
|
||||
PMD (ps): 0.46
|
||||
PDL (dB): 0.00
|
||||
|
||||
Transmission result for input power = 3.00 dBm:
|
||||
Final GSNR (0.1 nm): [1;36;40m23.94 dB[0m
|
||||
|
||||
(Invalid source node 'lannion' replaced with trx Lannion_CAS)
|
||||
|
||||
(Invalid destination node 'lorient' replaced with trx Lorient_KMA)
|
||||
6
tests/requirements.txt
Normal file
6
tests/requirements.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
build>=0.10.0,<1
|
||||
pytest>=6.2.5,<7
|
||||
pandas>=1.3.5,<2
|
||||
|
||||
# flake v6 killed the --diff option
|
||||
flake8>=5.0.4,<6
|
||||
@@ -6,7 +6,7 @@
|
||||
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, Pref
|
||||
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
|
||||
@@ -73,20 +73,21 @@ 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_max, 0.15, bw, 1e-3, spacing)
|
||||
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))
|
||||
|
||||
|
||||
@pytest.mark.parametrize("gain, nf_expected", [(10, 15), (15, 10), (25, 5.8)])
|
||||
def test_variable_gain_nf(gain, nf_expected, setup_edfa_variable_gain, si):
|
||||
"""=> unitary test for variable gain model Edfa._calc_nf() (and Edfa.interpol_params)"""
|
||||
edfa = setup_edfa_variable_gain
|
||||
frequencies = array([c.frequency for c in si.carriers])
|
||||
pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers])
|
||||
pin = pin / db2lin(gain)
|
||||
baud_rates = array([c.baud_rate for c in si.carriers])
|
||||
si.signal /= db2lin(gain)
|
||||
si.nli /= db2lin(gain)
|
||||
si.ase /= db2lin(gain)
|
||||
edfa.operational.gain_target = gain
|
||||
pref = Pref(0, -gain, lin2db(len(frequencies)))
|
||||
edfa.interpol_params(frequencies, pin, baud_rates, pref)
|
||||
si.pref = si.pref._replace(p_span0=0, p_spani=-gain)
|
||||
edfa.interpol_params(si)
|
||||
result = edfa.nf
|
||||
assert pytest.approx(nf_expected, abs=0.01) == result[0]
|
||||
|
||||
@@ -95,23 +96,20 @@ def test_variable_gain_nf(gain, nf_expected, setup_edfa_variable_gain, si):
|
||||
def test_fixed_gain_nf(gain, nf_expected, setup_edfa_fixed_gain, si):
|
||||
"""=> unitary test for fixed gain model Edfa._calc_nf() (and Edfa.interpol_params)"""
|
||||
edfa = setup_edfa_fixed_gain
|
||||
frequencies = array([c.frequency for c in si.carriers])
|
||||
pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers])
|
||||
pin = pin / db2lin(gain)
|
||||
baud_rates = array([c.baud_rate for c in si.carriers])
|
||||
si.signal /= db2lin(gain)
|
||||
si.nli /= db2lin(gain)
|
||||
si.ase /= db2lin(gain)
|
||||
edfa.operational.gain_target = gain
|
||||
pref = Pref(0, -gain, lin2db(len(frequencies)))
|
||||
edfa.interpol_params(frequencies, pin, baud_rates, pref)
|
||||
|
||||
si.pref = si.pref._replace(p_span0=0, p_spani=-gain)
|
||||
edfa.interpol_params(si)
|
||||
assert pytest.approx(nf_expected, abs=0.01) == edfa.nf[0]
|
||||
|
||||
|
||||
def test_si(si, nch_and_spacing):
|
||||
"""basic total power check of the channel comb generation"""
|
||||
nb_channel = nch_and_spacing[0]
|
||||
pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers])
|
||||
p_tot = pin.sum()
|
||||
expected_p_tot = si.carriers[0].power.signal * nb_channel
|
||||
p_tot = sum(si.signal + si.ase + si.nli)
|
||||
expected_p_tot = si.signal[0] * nb_channel
|
||||
assert pytest.approx(expected_p_tot, abs=0.01) == p_tot
|
||||
|
||||
|
||||
@@ -122,14 +120,13 @@ def test_compare_nf_models(gain, setup_edfa_variable_gain, si):
|
||||
between gain_min and gain_flatmax some discrepancy is expected but target < 0.5dB
|
||||
=> unitary test for Edfa._calc_nf (and Edfa.interpol_params)"""
|
||||
edfa = setup_edfa_variable_gain
|
||||
frequencies = array([c.frequency for c in si.carriers])
|
||||
pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers])
|
||||
pin = pin / db2lin(gain)
|
||||
baud_rates = array([c.baud_rate for c in si.carriers])
|
||||
si.signal /= db2lin(gain)
|
||||
si.nli /= db2lin(gain)
|
||||
si.ase /= db2lin(gain)
|
||||
edfa.operational.gain_target = gain
|
||||
# edfa is variable gain type
|
||||
pref = Pref(0, -gain, lin2db(len(frequencies)))
|
||||
edfa.interpol_params(frequencies, pin, baud_rates, pref)
|
||||
si.pref = si.pref._replace(p_span0=0, p_spani=-gain)
|
||||
edfa.interpol_params(si)
|
||||
nf_model = edfa.nf[0]
|
||||
|
||||
# change edfa type variety to a polynomial
|
||||
@@ -155,7 +152,7 @@ def test_compare_nf_models(gain, setup_edfa_variable_gain, si):
|
||||
edfa = Edfa(**el_config)
|
||||
|
||||
# edfa is variable gain type
|
||||
edfa.interpol_params(frequencies, pin, baud_rates, pref)
|
||||
edfa.interpol_params(si)
|
||||
nf_poly = edfa.nf[0]
|
||||
print(nf_poly, nf_model)
|
||||
assert pytest.approx(nf_model, abs=0.5) == nf_poly
|
||||
@@ -183,21 +180,16 @@ def test_ase_noise(gain, si, setup_trx, bw):
|
||||
si = span(si)
|
||||
print(span)
|
||||
|
||||
frequencies = array([c.frequency for c in si.carriers])
|
||||
pin = array([c.power.signal + c.power.nli + c.power.ase for c in si.carriers])
|
||||
baud_rates = array([c.baud_rate for c in si.carriers])
|
||||
pref = Pref(0, -gain, lin2db(len(frequencies)))
|
||||
edfa.interpol_params(frequencies, pin, baud_rates, pref)
|
||||
si.pref = si.pref._replace(p_span0=0, p_spani=-gain)
|
||||
edfa.interpol_params(si)
|
||||
nf = edfa.nf
|
||||
print('nf', nf)
|
||||
pin = lin2db(pin[0] * 1e3)
|
||||
pin = lin2db((si.signal[0] + si.ase[0] + si.nli[0]) * 1e3)
|
||||
osnr_expected = pin - nf[0] + 58
|
||||
|
||||
si = edfa(si)
|
||||
print(edfa)
|
||||
pout = array([c.power.signal for c in si.carriers])
|
||||
pase = array([c.power.ase for c in si.carriers])
|
||||
osnr = lin2db(pout[0] / pase[0]) - lin2db(12.5e9 / bw)
|
||||
osnr = lin2db(si.signal[0] / si.ase[0]) - lin2db(12.5e9 / bw)
|
||||
assert pytest.approx(osnr_expected, abs=0.01) == osnr
|
||||
|
||||
trx = setup_trx
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
# License: BSD 3-Clause Licence
|
||||
# Copyright (c) 2018, Telecom Infra Project
|
||||
|
||||
"""
|
||||
'''
|
||||
@author: esther.lerouzic
|
||||
checks that computed paths are disjoint as specified in the json service file
|
||||
that computed paths do not loop
|
||||
that include node constraints are correctly taken into account
|
||||
"""
|
||||
'''
|
||||
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
from gnpy.core.equipment import trx_mode_params
|
||||
from gnpy.core.network import build_network
|
||||
from gnpy.core.exceptions import ServiceError
|
||||
from gnpy.core.exceptions import ServiceError, DisjunctionError
|
||||
from gnpy.core.utils import automatic_nch, lin2db
|
||||
from gnpy.core.elements import Roadm
|
||||
from gnpy.topology.request import (compute_path_dsjctn, isdisjoint, find_reversed_path, PathRequest,
|
||||
@@ -31,8 +31,8 @@ EQPT_LIBRARY_NAME = Path(__file__).parent.parent / 'tests/data/eqpt_config.json'
|
||||
|
||||
@pytest.fixture()
|
||||
def serv(test_setup):
|
||||
""" common setup for service list
|
||||
"""
|
||||
''' common setup for service list
|
||||
'''
|
||||
network, equipment = test_setup
|
||||
data = load_requests(SERVICE_FILE_NAME, equipment, bidir=False, network=network, network_filename=NETWORK_FILE_NAME)
|
||||
rqs = requests_from_json(data, equipment)
|
||||
@@ -43,12 +43,12 @@ def serv(test_setup):
|
||||
|
||||
@pytest.fixture()
|
||||
def test_setup():
|
||||
""" common setup for tests: builds network, equipment and oms only once
|
||||
"""
|
||||
''' common setup for tests: builds network, equipment and oms only once
|
||||
'''
|
||||
equipment = load_equipment(EQPT_LIBRARY_NAME)
|
||||
network = load_network(NETWORK_FILE_NAME, equipment)
|
||||
# Build the network once using the default power defined in SI in eqpt config
|
||||
# power density : db2linp(ower_dbm": 0)/power_dbm": 0 * nb channels as defined by
|
||||
# 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
|
||||
|
||||
@@ -61,9 +61,9 @@ def test_setup():
|
||||
|
||||
|
||||
def test_disjunction(serv):
|
||||
""" service_file contains sevaral combination of disjunction constraint. The test checks
|
||||
''' service_file contains sevaral combination of disjunction constraint. The test checks
|
||||
that computed paths with disjunction constraint are effectively disjoint
|
||||
"""
|
||||
'''
|
||||
network, equipment, rqs, dsjn = serv
|
||||
pths = compute_path_dsjctn(network, equipment, rqs, dsjn)
|
||||
print(dsjn)
|
||||
@@ -86,8 +86,8 @@ def test_disjunction(serv):
|
||||
|
||||
|
||||
def test_does_not_loop_back(serv):
|
||||
""" check that computed paths do not loop back ie each element appears only once
|
||||
"""
|
||||
''' check that computed paths do not loop back ie each element appears only once
|
||||
'''
|
||||
network, equipment, rqs, dsjn = serv
|
||||
pths = compute_path_dsjctn(network, equipment, rqs, dsjn)
|
||||
test = True
|
||||
@@ -107,33 +107,35 @@ def test_does_not_loop_back(serv):
|
||||
#
|
||||
|
||||
|
||||
def create_rq(equipment, srce, dest, bdir, nd_list, ls_list):
|
||||
""" create the usual request list according to parameters
|
||||
"""
|
||||
def create_rq(equipment, srce, dest, bdir, node_list, loose_list, rqid='test_request'):
|
||||
''' create the usual request list according to parameters
|
||||
'''
|
||||
requests_list = []
|
||||
params = {}
|
||||
params['request_id'] = 'test_request'
|
||||
params['source'] = srce
|
||||
params['bidir'] = bdir
|
||||
params['destination'] = dest
|
||||
params['trx_type'] = 'Voyager'
|
||||
params['trx_mode'] = 'mode 1'
|
||||
params = {
|
||||
'request_id': rqid,
|
||||
'source': srce,
|
||||
'bidir': bdir,
|
||||
'destination': dest,
|
||||
'trx_type': 'Voyager',
|
||||
'trx_mode': 'mode 1',
|
||||
'spacing': 50000000000.0,
|
||||
'nodes_list': node_list,
|
||||
'loose_list': loose_list,
|
||||
'path_bandwidth': 100.0e9,
|
||||
'power': 1.0,
|
||||
'effective_freq_slot': None,
|
||||
}
|
||||
params['format'] = params['trx_mode']
|
||||
params['spacing'] = 50000000000.0
|
||||
params['nodes_list'] = nd_list
|
||||
params['loose_list'] = ls_list
|
||||
trx_params = trx_mode_params(equipment, params['trx_type'], params['trx_mode'], True)
|
||||
params.update(trx_params)
|
||||
params['power'] = 1.0
|
||||
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'])
|
||||
params['path_bandwidth'] = 100000000000.0
|
||||
requests_list.append(PathRequest(**params))
|
||||
return requests_list
|
||||
|
||||
|
||||
@pytest.mark.parametrize('srce, dest, result, pth, nd_list, ls_list', [
|
||||
@pytest.mark.parametrize('srce, dest, result, pth, node_list, loose_list', [
|
||||
['a', 'trx h', 'fail', 'no_path', [], []],
|
||||
['trx a', 'h', 'fail', 'no_path', [], []],
|
||||
['trx a', 'trx h', 'pass', 'found_path', [], []],
|
||||
@@ -148,8 +150,8 @@ def create_rq(equipment, srce, dest, bdir, nd_list, ls_list):
|
||||
['trx a', 'trx h', 'pass', 'found_path', ['trx a', 'roadm g'], ['STRICT', 'STRICT']],
|
||||
['trx a', 'trx h', 'pass', 'found_path', ['trx h'], ['STRICT']],
|
||||
['trx a', 'trx h', 'pass', 'found_path', ['roadm a'], ['STRICT']]])
|
||||
def test_include_constraints(test_setup, srce, dest, result, pth, nd_list, ls_list):
|
||||
""" check that all combinations of constraints are correctly handled:
|
||||
def test_include_constraints(test_setup, srce, dest, result, pth, node_list, loose_list):
|
||||
''' check that all combinations of constraints are correctly handled:
|
||||
- STRICT/LOOSE
|
||||
- correct names/incorrect names -> pass/fail
|
||||
- possible include/impossible include
|
||||
@@ -161,20 +163,82 @@ def test_include_constraints(test_setup, srce, dest, result, pth, nd_list, ls_li
|
||||
| cannot be applied | no_path | found_path
|
||||
----------------------------------------------------------------------------------
|
||||
0 | | computation stops
|
||||
"""
|
||||
'''
|
||||
network, equipment = test_setup
|
||||
dsjn = []
|
||||
bdir = False
|
||||
rqs = create_rq(equipment, srce, dest, bdir, nd_list, ls_list)
|
||||
rqs = create_rq(equipment, srce, dest, bdir, node_list, loose_list)
|
||||
print(rqs)
|
||||
if result == 'fail':
|
||||
with pytest.raises(ServiceError):
|
||||
rqs = correct_json_route_list(network, rqs)
|
||||
else:
|
||||
rqs = correct_json_route_list(network, rqs)
|
||||
pths = compute_path_dsjctn(network, equipment, rqs, dsjn)
|
||||
paths = compute_path_dsjctn(network, equipment, rqs, dsjn)
|
||||
# if loose, one path can be returned
|
||||
if pths[0]:
|
||||
if paths[0]:
|
||||
assert pth == 'found_path'
|
||||
else:
|
||||
assert pth == 'no_path'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('dis1, dis2, node_list1, loose_list1, result, expected_paths', [
|
||||
[['1', '2', '3'], ['2', '3'], [], [], 'pass',
|
||||
[['roadm a', 'roadm c', 'roadm d', 'roadm e', 'roadm g'],
|
||||
['roadm c', 'roadm f'],
|
||||
['roadm a', 'roadm b', 'roadm f', 'roadm h']]],
|
||||
[['1', '2', '3'], ['2', '3'], ['b'], ['STRICT'], 'fail', []],
|
||||
[['1', '2'], ['2', '3'], [], [], 'pass',
|
||||
[['roadm a', 'roadm c', 'roadm d', 'roadm e', 'roadm g'],
|
||||
['roadm c', 'roadm f'],
|
||||
['roadm a', 'roadm b', 'roadm f', 'roadm h']]],
|
||||
[['1', '2'], ['2', '3'], ['roadm e'], ['LOOSE'], 'pass',
|
||||
[['roadm a', 'roadm c', 'roadm d', 'roadm e', 'roadm g'],
|
||||
['roadm c', 'roadm f'],
|
||||
['roadm a', 'roadm b', 'roadm f', 'roadm h']]],
|
||||
[['1', '2'], ['2', '3'], ['roadm c | roadm f'], ['LOOSE'], 'pass',
|
||||
[['roadm a', 'roadm c', 'roadm d', 'roadm e', 'roadm g'],
|
||||
['roadm c', 'roadm f'],
|
||||
['roadm a', 'roadm b', 'roadm f', 'roadm h']]]])
|
||||
def test_create_disjunction(test_setup, dis1, dis2, node_list1, loose_list1, result, expected_paths):
|
||||
""" verifies that the expected result is obtained for a set of particular constraints:
|
||||
in particular, verifies that:
|
||||
- multiple disjunction constraints are correcly handled
|
||||
- in case a loose constraint can not be met, the first alternate candidate is selected
|
||||
instead of the last one (last case).
|
||||
"""
|
||||
network, equipment = test_setup
|
||||
|
||||
json_data = {
|
||||
'synchronization': [{
|
||||
'synchronization-id': 'x',
|
||||
'svec': {
|
||||
'relaxable': 'false',
|
||||
'disjointness': 'node link',
|
||||
'request-id-number': dis1
|
||||
}
|
||||
}, {
|
||||
'synchronization-id': 'y',
|
||||
'svec': {
|
||||
'relaxable': 'false',
|
||||
'disjointness': 'node link',
|
||||
'request-id-number': dis2
|
||||
}
|
||||
}]}
|
||||
dsjn = disjunctions_from_json(json_data)
|
||||
bdir = False
|
||||
rqs = create_rq(equipment, 'trx a', 'trx g', bdir, node_list1, loose_list1, '1') +\
|
||||
create_rq(equipment, 'trx c', 'trx f', bdir, [], [], '2') +\
|
||||
create_rq(equipment, 'trx a', 'trx h', bdir, [], [], '3')
|
||||
|
||||
if result == 'fail':
|
||||
with pytest.raises(DisjunctionError):
|
||||
paths = compute_path_dsjctn(network, equipment, rqs, dsjn)
|
||||
else:
|
||||
paths = compute_path_dsjctn(network, equipment, rqs, dsjn)
|
||||
path_names = []
|
||||
for path in paths:
|
||||
roadm_names = [e.uid for e in path if isinstance(e, Roadm)]
|
||||
path_names.append(roadm_names)
|
||||
assert path_names == expected_paths
|
||||
# if loose, one path can be returned
|
||||
|
||||
588
tests/test_equalization.py
Normal file
588
tests/test_equalization.py
Normal file
@@ -0,0 +1,588 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2019-05-22
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks that new equalization option give the same output as old one:
|
||||
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
from numpy.testing import assert_allclose, assert_array_equal, assert_raises
|
||||
from numpy import array
|
||||
|
||||
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.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
|
||||
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/testTopology_expected.json'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('degree, equalization_type, target, expected_pch_out_dbm, expected_si',
|
||||
[('east edfa in Lannion_CAS to Morlaix', 'target_pch_out_db', -20, -20, [-20, -20, -20, -20, -20]),
|
||||
('east edfa in Lannion_CAS to Morlaix', 'target_psd_out_mWperGHz', 5e-4, -17.9588,
|
||||
[-17.9588, -16.7778, -14.9485, -16.7778, -17.9588]),
|
||||
('east edfa in Lannion_CAS to Morlaix', 'target_out_mWperSlotWidth', 3e-4, -18.2390,
|
||||
[-19.4885, -18.2390, -16.4781, -18.2390, -19.4885]),
|
||||
('east edfa in Lannion_CAS to Corlay', 'target_pch_out_db', -20, -16, [-16, -16, -16, -16, -16]),
|
||||
('east edfa in Lannion_CAS to Corlay', 'target_psd_out_mWperGHz', 5e-4, -16, [-16, -16, -16, -16, -16]),
|
||||
('east edfa in Lannion_CAS to Corlay', 'target_out_mWperSlotWidth', 5e-4, -16, [-16, -16, -16, -16, -16]),
|
||||
('east edfa in Lannion_CAS to Stbrieuc', 'target_pch_out_db', -20, -17.16699,
|
||||
[-17.16698771, -15.98599459, -14.15668776, -15.98599459, -17.16698771]),
|
||||
('east edfa in Lannion_CAS to Stbrieuc', 'target_psd_out_mWperGHz', 5e-4, -17.16699,
|
||||
[-17.16698771, -15.98599459, -14.15668776, -15.98599459, -17.16698771]),
|
||||
('east edfa in Lannion_CAS to Stbrieuc', 'target_out_mWperSlotWidth', 5e-4, -17.16699,
|
||||
[-17.16698771, -15.98599459, -14.15668776, -15.98599459, -17.16698771])])
|
||||
@pytest.mark.parametrize('delta_pdb_per_channel', [[0, 0, 0, 0, 0], [1, 3, 0, -5, 0]])
|
||||
def test_equalization_combination_degree(delta_pdb_per_channel, degree, equalization_type, target,
|
||||
expected_pch_out_dbm, expected_si):
|
||||
"""Check that ROADM correctly computes power of thr reference channel based on different
|
||||
combination of equalization for ROADM and per degree
|
||||
"""
|
||||
|
||||
roadm_config = {
|
||||
"uid": "roadm Lannion_CAS",
|
||||
"params": {
|
||||
"per_degree_pch_out_db": {
|
||||
"east edfa in Lannion_CAS to Corlay": -16
|
||||
},
|
||||
"per_degree_psd_out_mWperGHz": {
|
||||
"east edfa in Lannion_CAS to Stbrieuc": 6e-4
|
||||
},
|
||||
equalization_type: target,
|
||||
"add_drop_osnr": 38,
|
||||
"pmd": 0,
|
||||
"pdl": 0,
|
||||
"restrictions": {
|
||||
"preamp_variety_list": [],
|
||||
"booster_variety_list": []
|
||||
}
|
||||
}
|
||||
}
|
||||
roadm = Roadm(**roadm_config)
|
||||
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)
|
||||
to_json_before_propagation = {
|
||||
'uid': 'roadm Lannion_CAS',
|
||||
'type': 'Roadm',
|
||||
'params': {
|
||||
equalization_type: target,
|
||||
'restrictions': {'preamp_variety_list': [], 'booster_variety_list': []},
|
||||
'per_degree_pch_out_db': {
|
||||
'east edfa in Lannion_CAS to Corlay': -16},
|
||||
"per_degree_psd_out_mWperGHz": {
|
||||
"east edfa in Lannion_CAS to Stbrieuc": 6e-4
|
||||
}
|
||||
},
|
||||
'metadata': {'location': {'latitude': 0, 'longitude': 0, 'city': None, 'region': None}}
|
||||
}
|
||||
assert roadm.to_json == to_json_before_propagation
|
||||
si = roadm(si, degree)
|
||||
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)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('equalization_type', ["target_psd_out_mWperGHz", "target_out_mWperSlotWidth"])
|
||||
def test_wrong_element_config(equalization_type):
|
||||
"""Check that 2 equalization correcty raise a config error
|
||||
"""
|
||||
roadm_config = {
|
||||
"uid": "roadm Brest_KLA",
|
||||
"params": {
|
||||
"per_degree_pch_out_db": {},
|
||||
"target_pch_out_db": -20,
|
||||
equalization_type: 3.125e-4,
|
||||
"add_drop_osnr": 38,
|
||||
"pmd": 0,
|
||||
"pdl": 0,
|
||||
"restrictions": {
|
||||
"preamp_variety_list": [],
|
||||
"booster_variety_list": []
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Brest_KLA",
|
||||
"region": "RLD",
|
||||
"latitude": 4.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
with pytest.raises(ConfigurationError):
|
||||
_ = Roadm(**roadm_config)
|
||||
|
||||
|
||||
def test_merge_equalization():
|
||||
"""Check that if equalization is not defined default one is correctly take and
|
||||
else that it is not overwritten
|
||||
"""
|
||||
json_data = {
|
||||
"elements": [{
|
||||
"uid": "roadm Brest_KLA",
|
||||
"type": "Roadm"}],
|
||||
"connections": []
|
||||
}
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
network = network_from_json(json_data, equipment)
|
||||
roadm = [n for n in network.nodes()][0]
|
||||
assert roadm.target_pch_out_dbm == -20
|
||||
delattr(equipment['Roadm']['default'], 'target_pch_out_db')
|
||||
setattr(equipment['Roadm']['default'], 'target_psd_out_mWperGHz', power_dbm_to_psd_mw_ghz(-20, 32e9))
|
||||
# json_data is changed (type is popped from json_data with network_from_json_function). Create a new one:
|
||||
json_data = {
|
||||
"elements": [{
|
||||
"uid": "roadm Brest_KLA",
|
||||
"type": "Roadm"}],
|
||||
"connections": []
|
||||
}
|
||||
network = network_from_json(json_data, equipment)
|
||||
roadm = [n for n in network.nodes()][0]
|
||||
assert roadm.target_pch_out_dbm is None
|
||||
assert roadm.target_psd_out_mWperGHz == 3.125e-4
|
||||
assert roadm.target_out_mWperSlotWidth is None
|
||||
json_data = {
|
||||
"elements": [{
|
||||
"uid": "roadm Brest_KLA",
|
||||
"type": "Roadm",
|
||||
"params": {"target_pch_out_db": -18}}],
|
||||
"connections": []
|
||||
}
|
||||
network = network_from_json(json_data, equipment)
|
||||
roadm = [n for n in network.nodes()][0]
|
||||
assert roadm.target_pch_out_dbm == -18
|
||||
assert roadm.target_psd_out_mWperGHz is None
|
||||
assert roadm.target_out_mWperSlotWidth is None
|
||||
json_data = {
|
||||
"elements": [{
|
||||
"uid": "roadm Brest_KLA",
|
||||
"type": "Roadm",
|
||||
"params": {"target_psd_out_mWperGHz": 5e-4}}],
|
||||
"connections": []
|
||||
}
|
||||
network = network_from_json(json_data, equipment)
|
||||
roadm = [n for n in network.nodes()][0]
|
||||
assert roadm.target_pch_out_dbm is None
|
||||
assert roadm.target_psd_out_mWperGHz == 5e-4
|
||||
assert roadm.target_out_mWperSlotWidth is None
|
||||
json_data = {
|
||||
"elements": [{
|
||||
"uid": "roadm Brest_KLA",
|
||||
"type": "Roadm",
|
||||
"params": {"target_out_mWperSlotWidth": 3e-4}}],
|
||||
"connections": []
|
||||
}
|
||||
network = network_from_json(json_data, equipment)
|
||||
roadm = [n for n in network.nodes()][0]
|
||||
assert roadm.target_pch_out_dbm is None
|
||||
assert roadm.target_psd_out_mWperGHz is None
|
||||
assert roadm.target_out_mWperSlotWidth == 3e-4
|
||||
|
||||
|
||||
@pytest.mark.parametrize('target_out, delta_pdb_per_channel, correction',
|
||||
[(-20, [0, 1, 3, 0.5, -2], [0, 0, 5, 5.5, 0]),
|
||||
(-20, [0, 0, 0, 0, 0], [0, 0, 2, 5, 0]),
|
||||
(-20, [-2, -2, -2, -2, -2], [0, 0, 0, 3, 0]),
|
||||
(-20, [0, 2, -2, -5, 4], [0, 0, 0, 0, 0]),
|
||||
(-25.5, [0, 1, 3, 0.5, -2], [0, 0, 0, 0, 0]), ])
|
||||
def test_low_input_power(target_out, delta_pdb_per_channel, correction):
|
||||
"""check that ROADM correctly equalizes on small examples, assumes p_span_0 = 0
|
||||
case of power equalisation
|
||||
"""
|
||||
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]))
|
||||
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)
|
||||
roadm_config = {
|
||||
"uid": "roadm Brest_KLA",
|
||||
"params": {
|
||||
"per_degree_pch_out_db": {},
|
||||
"target_pch_out_db": target_out,
|
||||
"add_drop_osnr": 38,
|
||||
"pmd": 0,
|
||||
"pdl": 0,
|
||||
"restrictions": {
|
||||
"preamp_variety_list": [],
|
||||
"booster_variety_list": []
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Brest_KLA",
|
||||
"region": "RLD",
|
||||
"latitude": 4.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
roadm = Roadm(**roadm_config)
|
||||
si = roadm(si, 'toto')
|
||||
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),
|
||||
watt2dbm(si.signal), rtol=1e-5)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('target_out, delta_pdb_per_channel, correction',
|
||||
[(3.125e-4,
|
||||
[0, 0, 0, 0, 0],
|
||||
[0, 0, 2 + lin2db(64 / 32), 5 + lin2db(42 / 32), 0]),
|
||||
(3.125e-4,
|
||||
[1, 3, 0, -5, 0],
|
||||
[1, 1 + lin2db(42 / 32), 2 + lin2db(64 / 32), 0 + lin2db(42 / 32), 0]), ])
|
||||
def test_2low_input_power(target_out, delta_pdb_per_channel, correction):
|
||||
"""check that ROADM correctly equalizes on small examples, assumes p_span_0 = 0
|
||||
case of PSD equalisation
|
||||
"""
|
||||
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]))
|
||||
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)
|
||||
roadm_config = {
|
||||
"uid": "roadm Brest_KLA",
|
||||
"params": {
|
||||
"per_degree_pch_out_db": {},
|
||||
"target_psd_out_mWperGHz": target_out,
|
||||
"add_drop_osnr": 38,
|
||||
"pmd": 0,
|
||||
"pdl": 0,
|
||||
"restrictions": {
|
||||
"preamp_variety_list": [],
|
||||
"booster_variety_list": []
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"location": {
|
||||
"city": "Brest_KLA",
|
||||
"region": "RLD",
|
||||
"latitude": 4.0,
|
||||
"longitude": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
roadm = Roadm(**roadm_config)
|
||||
si = roadm(si, 'toto')
|
||||
assert_allclose(watt2dbm(si.signal), target - correction, rtol=1e-5)
|
||||
|
||||
|
||||
def net_setup(equipment):
|
||||
""" 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_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_voyager_req(equipment, source, dest, bidir, nodes_list, loose_list, mode, spacing, power_dbm):
|
||||
""" create the usual request list according to parameters
|
||||
"""
|
||||
params = {'request_id': 'test_request',
|
||||
'source': source,
|
||||
'bidir': bidir,
|
||||
'destination': dest,
|
||||
'trx_type': 'Voyager',
|
||||
'trx_mode': mode,
|
||||
'format': mode,
|
||||
'spacing': spacing,
|
||||
'nodes_list': nodes_list,
|
||||
'loose_list': loose_list,
|
||||
'path_bandwidth': 100.0e9,
|
||||
'effective_freq_slot': None}
|
||||
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'])
|
||||
return PathRequest(**params)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('power_dbm', [0, 1, -2, None])
|
||||
@pytest.mark.parametrize('mode, slot_width', (['mode 1', 50e9], ['mode 2', 75e9]))
|
||||
def test_initial_spectrum(mode, slot_width, power_dbm):
|
||||
""" checks that propagation using the user defined spectrum identical to SI, gives same result as SI
|
||||
"""
|
||||
# first propagate without any req.initial_spectrum attribute
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'],
|
||||
mode, slot_width, power_dbm)
|
||||
network = net_setup(equipment)
|
||||
path = compute_constrained_path(network, req)
|
||||
infos_expected = propagate(path, req, equipment)
|
||||
# then creates req.initial_spectrum attribute exactly corresponding to -spectrum option files
|
||||
temp = [{
|
||||
"f_min": 191.35e12 + slot_width,
|
||||
"f_max": 196.15e12 - slot_width,
|
||||
"baud_rate": req.baud_rate,
|
||||
"slot_width": slot_width,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
}]
|
||||
req.initial_spectrum = _spectrum_from_json(temp)
|
||||
infos_actual = propagate(path, req, equipment)
|
||||
print(infos_actual.frequency[0], infos_actual.frequency[-1])
|
||||
print(infos_expected.frequency[0], infos_expected.frequency[-1])
|
||||
|
||||
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_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)
|
||||
|
||||
|
||||
def test_initial_spectrum_not_identical():
|
||||
""" checks that user defined spectrum overrides spectrum defined in SI
|
||||
"""
|
||||
# first propagate without any req.initial_spectrum attribute
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'],
|
||||
'mode 1', 50e9, 0)
|
||||
network = net_setup(equipment)
|
||||
path = compute_constrained_path(network, req)
|
||||
infos_expected = propagate(path, req, equipment)
|
||||
# then creates req.initial_spectrum attribute exactly corresponding to -spectrum option files
|
||||
temp = [{
|
||||
"f_min": 191.4e12, # align f_min , f_max on Voyager f_min, f_mix and not SI !
|
||||
"f_max": 196.1e12,
|
||||
"baud_rate": 40e9,
|
||||
"slot_width": 62.5e9,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
}]
|
||||
req.initial_spectrum = _spectrum_from_json(temp)
|
||||
infos_actual = propagate(path, req, equipment)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.frequency, infos_actual.frequency)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.baud_rate, infos_actual.baud_rate)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.slot_width, infos_actual.slot_width)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.signal, infos_actual.signal)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.nli, infos_actual.nli)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.ase, infos_actual.ase)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.channel_number, infos_actual.channel_number)
|
||||
assert_raises(AssertionError, assert_array_equal, infos_expected.number_of_channels, infos_actual.number_of_channels)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('equalization, target_value', [
|
||||
('target_out_mWperSlotWidth', power_dbm_to_psd_mw_ghz(-20, 50e9)),
|
||||
('target_psd_out_mWperGHz', power_dbm_to_psd_mw_ghz(-20, 32e9))])
|
||||
@pytest.mark.parametrize('power_dbm', [0, 2, -0.5])
|
||||
def test_target_psd_or_psw(power_dbm, equalization, target_value):
|
||||
""" checks that if target_out_mWperSlotWidth or target_psd_out_mWperGHz is defined, it is used as equalization
|
||||
and it gives same result if computed target is the same
|
||||
"""
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
network = net_setup(equipment)
|
||||
req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'],
|
||||
'mode 1', 50e9, power_dbm)
|
||||
path = compute_constrained_path(network, req)
|
||||
infos_expected = propagate(path, req, equipment)
|
||||
# change default equalization to power spectral density
|
||||
delattr(equipment['Roadm']['default'], 'target_pch_out_db')
|
||||
setattr(equipment['Roadm']['default'], equalization, target_value)
|
||||
# create a second instance with this roadm settings,
|
||||
network2 = net_setup(equipment)
|
||||
path2 = compute_constrained_path(network2, req)
|
||||
infos_actual = propagate(path2, req, equipment)
|
||||
# since baudrate is the same, resulting propagation should be the same as for power equalization
|
||||
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_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)
|
||||
|
||||
|
||||
def ref_network():
|
||||
""" Create a network instance with a instance of propagated path
|
||||
"""
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
network = net_setup(equipment)
|
||||
req0 = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'],
|
||||
'mode 1', 50e9, 0)
|
||||
path0 = compute_constrained_path(network, req0)
|
||||
_ = propagate(path0, req0, equipment)
|
||||
return network
|
||||
|
||||
|
||||
@pytest.mark.parametrize('deltap', [0, +1.2, -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
|
||||
"""
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
network = net_setup(equipment)
|
||||
req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'],
|
||||
'mode 1', 50e9, deltap)
|
||||
temp = [{
|
||||
"f_min": 191.35e12, # align f_min , f_max on Voyager f_min, f_mix and not SI !
|
||||
"f_max": 196.05e12,
|
||||
"baud_rate": req.baud_rate,
|
||||
"slot_width": 50e9,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
}]
|
||||
req.initial_spectrum = _spectrum_from_json(temp)
|
||||
path = compute_constrained_path(network, req)
|
||||
_ = propagate(path, req, equipment)
|
||||
# check that gain of booster is changed accordingly whereas gain of preamp and ila is not (no saturation case)
|
||||
boosters = ['east edfa in Brest_KLA to Quimper', 'east edfa in Lorient_KMA to Vannes_KBE']
|
||||
ila_preamps = ['east edfa in Quimper to Lorient_KMA', 'west edfa in Lorient_KMA to Quimper',
|
||||
'west edfa in Vannes_KBE to Lorient_KMA']
|
||||
for amp in boosters + ila_preamps:
|
||||
expected_amp = next(n for n in ref_network() if n.uid == amp)
|
||||
actual_amp = next(n for n in network.nodes() if n.uid == amp)
|
||||
expected_gain = expected_amp.pout_db - expected_amp.pin_db
|
||||
actual_gain = actual_amp.pout_db - actual_amp.pin_db
|
||||
print(actual_amp)
|
||||
if amp in boosters:
|
||||
assert expected_gain + deltap == pytest.approx(actual_gain, rel=1e-3)
|
||||
if amp in ila_preamps:
|
||||
assert expected_gain == pytest.approx(actual_gain, rel=1e-3)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('equalization', ['target_psd_out_mWperGHz', 'target_out_mWperSlotWidth'])
|
||||
@pytest.mark.parametrize('case', ['SI', 'nodes'])
|
||||
@pytest.mark.parametrize('deltap', [0, +2, -0.5])
|
||||
@pytest.mark.parametrize('target', [-20, -21, -18])
|
||||
@pytest.mark.parametrize('mode, slot_width', (['mode 1', 50e9], ['mode 2', 75e9]))
|
||||
def test_equalization(case, deltap, target, mode, slot_width, equalization):
|
||||
"""check that power target on roadm is correct for these cases; check on booster
|
||||
- SI : target_pch_out_db / target_psd_out_mWperGHz
|
||||
- node : target_pch_out_db / target_psd_out_mWperGHz
|
||||
- per degree : target_pch_out_db / target_psd_out_mWperGHz
|
||||
for these cases with and without power from user
|
||||
"""
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
setattr(equipment['Roadm']['default'], 'target_pch_out_db', target)
|
||||
req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Rennes_STA', False,
|
||||
['east edfa in Brest_KLA to Quimper', 'roadm Lannion_CAS', 'trx Rennes_STA'],
|
||||
['STRICT', 'STRICT', 'STRICT'],
|
||||
mode, slot_width, deltap)
|
||||
roadms = ['roadm Brest_KLA', 'roadm Lorient_KMA', 'roadm Lannion_CAS', 'roadm Rennes_STA']
|
||||
# degree = {'roadm Brest_KLA': 'east edfa in Brest_KLA to Quimper',
|
||||
# 'roadm Lorient_KMA': 'east edfa in Lorient_KMA to Loudeac'}
|
||||
# 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)
|
||||
network = net_setup(equipment)
|
||||
elif case == 'nodes':
|
||||
json_data = load_json(NETWORK_FILENAME)
|
||||
for el in json_data['elements']:
|
||||
if el['uid'] in roadms:
|
||||
el['params'] = {equalization: target_psd}
|
||||
network = network_from_json(json_data, 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)
|
||||
# check that nodes not in roadms have target_pch_out_db not None
|
||||
pw_roadms = [r for r in network.nodes() if r.uid not in roadms and isinstance(r, Roadm)]
|
||||
for roadm in pw_roadms:
|
||||
assert roadm.target_psd_out_mWperGHz is None
|
||||
assert roadm.target_pch_out_dbm == target
|
||||
for roadm in [r for r in network.nodes() if r.uid in roadms and isinstance(r, Roadm)]:
|
||||
assert roadm.target_pch_out_dbm is None
|
||||
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)
|
||||
for i, el in enumerate(path):
|
||||
if isinstance(el, Roadm):
|
||||
si = el(si, 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),
|
||||
target_psd, rtol=1e-3)
|
||||
if equalization == 'target_out_mWperSlotWidth':
|
||||
assert_allclose(power_dbm_to_psd_mw_ghz(watt2dbm(si.signal + si.ase + si.nli), si.slot_width),
|
||||
target_psd, rtol=1e-3)
|
||||
else:
|
||||
si = el(si)
|
||||
print(el.uid)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('req_power', [0, 2, -1.5])
|
||||
def test_power_option(req_power):
|
||||
"""check that --po option adds correctly power with spectral information
|
||||
"""
|
||||
equipment = load_equipment(EQPT_FILENAME)
|
||||
setattr(equipment['Roadm']['default'], 'target_pch_out_db', None)
|
||||
setattr(equipment['Roadm']['default'], 'target_psd_out_mWperGHz', power_dbm_to_psd_mw_ghz(-20, 32e9))
|
||||
network = net_setup(equipment)
|
||||
req = create_voyager_req(equipment, 'trx Brest_KLA', 'trx Vannes_KBE', False, ['trx Vannes_KBE'], ['STRICT'],
|
||||
'mode 1', 50e9, req_power)
|
||||
path = compute_constrained_path(network, req)
|
||||
infos_expected = propagate(path, req, equipment)
|
||||
|
||||
temp = [{
|
||||
"f_min": 191.4e12, # align f_min , f_max on Voyager f_min, f_max and not SI !
|
||||
"f_max": 196.1e12,
|
||||
"baud_rate": req.baud_rate,
|
||||
"slot_width": 50e9,
|
||||
"roll_off": 0.15,
|
||||
"tx_osnr": 40
|
||||
}]
|
||||
req.initial_spectrum = _spectrum_from_json(temp)
|
||||
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_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_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)
|
||||
59
tests/test_info.py
Normal file
59
tests/test_info.py
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
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.exceptions import SpectrumError
|
||||
|
||||
|
||||
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))
|
||||
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))
|
||||
assert_array_equal(si.nli, zeros(3))
|
||||
assert_array_equal(si.ase, zeros(3))
|
||||
assert_array_equal(si.delta_pdb_per_channel, ones(3))
|
||||
assert_array_equal(si.roll_off, zeros(3))
|
||||
assert_array_equal(si.chromatic_dispersion, zeros(3))
|
||||
assert_array_equal(si.pmd, zeros(3))
|
||||
assert_array_equal(si.channel_number, array([1, 2, 3]))
|
||||
assert_array_equal(si.number_of_channels, 3)
|
||||
assert_array_equal(si.df, array([[0, 50e9, 100e9], [-50e9, 0, 50e9], [-100e9, -50e9, 0]]))
|
||||
assert_array_equal(si.tx_osnr, array([40.0, 40.0, 40.0]))
|
||||
|
||||
with pytest.raises(SpectrumError, match='Spectra cannot be summed: channels overlapping.'):
|
||||
si += si
|
||||
|
||||
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))
|
||||
|
||||
assert_array_equal(si.signal, array([3, 2, 1]))
|
||||
|
||||
with pytest.raises(SpectrumError, match='Spectrum baud rate, including the roll off, '
|
||||
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))
|
||||
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))
|
||||
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))
|
||||
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))
|
||||
@@ -11,20 +11,32 @@ SRC_ROOT = Path(__file__).parent.parent
|
||||
|
||||
@pytest.mark.parametrize("output, handler, args", (
|
||||
('transmission_main_example', transmission_main_example, []),
|
||||
('transmission_saturated', transmission_main_example,
|
||||
['tests/data/testTopology_expected.json', 'lannion', 'lorient', '-e', 'tests/data/eqpt_config.json', '--pow', '3']),
|
||||
('path_requests_run', path_requests_run, []),
|
||||
('transmission_main_example__raman', transmission_main_example,
|
||||
['gnpy/example-data/raman_edfa_example_network.json', '--sim', 'gnpy/example-data/sim_params.json', '--show-channels', ]),
|
||||
('openroadm-Stockholm-Gothenburg', transmission_main_example,
|
||||
['-e', 'gnpy/example-data/eqpt_config_openroadm.json', 'gnpy/example-data/Sweden_OpenROADM_example_network.json', ]),
|
||||
))
|
||||
def test_example_invocation(capfdbinary, output, handler, args):
|
||||
('openroadm-v4-Stockholm-Gothenburg', transmission_main_example,
|
||||
['-e', 'gnpy/example-data/eqpt_config_openroadm_ver4.json', 'gnpy/example-data/Sweden_OpenROADMv4_example_network.json', ]),
|
||||
('openroadm-v5-Stockholm-Gothenburg', transmission_main_example,
|
||||
['-e', 'gnpy/example-data/eqpt_config_openroadm_ver5.json', 'gnpy/example-data/Sweden_OpenROADMv5_example_network.json', ]),
|
||||
('transmission_main_example_long', transmission_main_example,
|
||||
['-e', 'tests/data/eqpt_config.json', 'tests/data/test_long_network.json']),
|
||||
('spectrum1_transmission_main_example', transmission_main_example,
|
||||
['--spectrum', 'gnpy/example-data/initial_spectrum1.json', 'gnpy/example-data/meshTopologyExampleV2.xls', ]),
|
||||
('spectrum2_transmission_main_example', transmission_main_example,
|
||||
['--spectrum', 'gnpy/example-data/initial_spectrum2.json', 'gnpy/example-data/meshTopologyExampleV2.xls', '--show-channels', ]),
|
||||
))
|
||||
|
||||
|
||||
def test_example_invocation(capfd, output, handler, args):
|
||||
'''Make sure that our examples produce useful output'''
|
||||
os.chdir(SRC_ROOT)
|
||||
expected = open(SRC_ROOT / 'tests' / 'invocation' / output, mode='rb').read()
|
||||
expected = open(SRC_ROOT / 'tests' / 'invocation' / output, mode='r', encoding='utf-8').read()
|
||||
handler(args)
|
||||
captured = capfdbinary.readouterr()
|
||||
captured = capfd.readouterr()
|
||||
assert captured.out == expected
|
||||
assert captured.err == b''
|
||||
assert captured.err == ''
|
||||
|
||||
|
||||
@pytest.mark.parametrize('program', ('gnpy-transmission-example', 'gnpy-path-request'))
|
||||
@@ -39,7 +51,7 @@ def test_run_wrapper(program):
|
||||
|
||||
def test_conversion_xls():
|
||||
proc = subprocess.run(
|
||||
('gnpy-convert-xls', SRC_ROOT / 'tests' / 'data' / 'testTopology.xls', '--output', '/dev/null'),
|
||||
('gnpy-convert-xls', SRC_ROOT / 'tests' / 'data' / 'testTopology.xls', '--output', os.path.devnull),
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True, universal_newlines=True)
|
||||
assert proc.stderr == ''
|
||||
assert '/dev/null' in proc.stdout
|
||||
assert os.path.devnull in proc.stdout
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from pathlib import Path
|
||||
"""
|
||||
Checks that the class SimParams behaves as a mutable Singleton.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from gnpy.core.parameters import SimParams
|
||||
from gnpy.core.science_utils import Simulation
|
||||
from gnpy.tools.json_io import load_json
|
||||
|
||||
TEST_DIR = Path(__file__).parent
|
||||
DATA_DIR = TEST_DIR / 'data'
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('set_sim_params')
|
||||
def test_sim_parameters():
|
||||
j = load_json(DATA_DIR / 'sim_params.json')
|
||||
sim_params = SimParams(**j)
|
||||
Simulation.set_params(sim_params)
|
||||
s1 = Simulation.get_simulation()
|
||||
assert s1.sim_params.raman_params.flag_raman
|
||||
s2 = Simulation.get_simulation()
|
||||
assert s2.sim_params.raman_params.flag_raman
|
||||
j['raman_parameters']['flag_raman'] = False
|
||||
sim_params = SimParams(**j)
|
||||
Simulation.set_params(sim_params)
|
||||
assert not s2.sim_params.raman_params.flag_raman
|
||||
assert not s1.sim_params.raman_params.flag_raman
|
||||
sim_params = {'nli_params': {}, 'raman_params': {}}
|
||||
SimParams.set_params(sim_params)
|
||||
s1 = SimParams.get()
|
||||
assert s1.nli_params.method == 'gn_model_analytic'
|
||||
s2 = SimParams.get()
|
||||
assert not s1.raman_params.flag
|
||||
sim_params['raman_params']['flag'] = True
|
||||
SimParams.set_params(sim_params)
|
||||
assert s2.raman_params.flag
|
||||
assert s1.raman_params.flag
|
||||
|
||||
@@ -21,7 +21,6 @@ import shutil
|
||||
from pandas import read_csv
|
||||
from xlrd import open_workbook
|
||||
import pytest
|
||||
from tests.compare import compare_networks, compare_services
|
||||
from copy import deepcopy
|
||||
from gnpy.core.utils import automatic_nch, lin2db
|
||||
from gnpy.core.network import build_network
|
||||
@@ -56,15 +55,7 @@ def test_excel_json_generation(tmpdir, xls_input, expected_json_output):
|
||||
actual_json_output = xls_copy.with_suffix('.json')
|
||||
actual = load_json(actual_json_output)
|
||||
unlink(actual_json_output)
|
||||
expected = load_json(expected_json_output)
|
||||
|
||||
results = compare_networks(expected, actual)
|
||||
assert not results.elements.missing
|
||||
assert not results.elements.extra
|
||||
assert not results.elements.different
|
||||
assert not results.connections.missing
|
||||
assert not results.connections.extra
|
||||
assert not results.connections.different
|
||||
assert actual == load_json(expected_json_output)
|
||||
|
||||
# assume xls entries
|
||||
# test that the build network gives correct results in gain mode
|
||||
@@ -95,15 +86,7 @@ def test_auto_design_generation_fromxlsgainmode(tmpdir, xls_input, expected_json
|
||||
save_network(network, actual_json_output)
|
||||
actual = load_json(actual_json_output)
|
||||
unlink(actual_json_output)
|
||||
expected = load_json(expected_json_output)
|
||||
|
||||
results = compare_networks(expected, actual)
|
||||
assert not results.elements.missing
|
||||
assert not results.elements.extra
|
||||
assert not results.elements.different
|
||||
assert not results.connections.missing
|
||||
assert not results.connections.extra
|
||||
assert not results.connections.different
|
||||
assert actual == load_json(expected_json_output)
|
||||
|
||||
# test that autodesign creates same file as an input file already autodesigned
|
||||
|
||||
@@ -134,15 +117,7 @@ def test_auto_design_generation_fromjson(tmpdir, json_input, power_mode):
|
||||
save_network(network, actual_json_output)
|
||||
actual = load_json(actual_json_output)
|
||||
unlink(actual_json_output)
|
||||
expected = load_json(json_input)
|
||||
|
||||
results = compare_networks(expected, actual)
|
||||
assert not results.elements.missing
|
||||
assert not results.elements.extra
|
||||
assert not results.elements.different
|
||||
assert not results.connections.missing
|
||||
assert not results.connections.extra
|
||||
assert not results.connections.different
|
||||
assert actual == load_json(json_input)
|
||||
|
||||
# test services creation
|
||||
|
||||
@@ -162,15 +137,7 @@ def test_excel_service_json_generation(xls_input, expected_json_output):
|
||||
equipment['SI']['default'].f_max, equipment['SI']['default'].spacing))
|
||||
build_network(network, equipment, p_db, p_total_db)
|
||||
from_xls = read_service_sheet(xls_input, equipment, network, network_filename=DATA_DIR / 'testTopology.xls')
|
||||
expected = load_json(expected_json_output)
|
||||
|
||||
results = compare_services(expected, from_xls)
|
||||
assert not results.requests.missing
|
||||
assert not results.requests.extra
|
||||
assert not results.requests.different
|
||||
assert not results.synchronizations.missing
|
||||
assert not results.synchronizations.extra
|
||||
assert not results.synchronizations.different
|
||||
assert from_xls == load_json(expected_json_output)
|
||||
|
||||
# TODO verify that requested bandwidth is not zero !
|
||||
|
||||
@@ -243,35 +210,6 @@ def test_csv_response_generation(tmpdir, json_input):
|
||||
print(type(list(resp[column])[-1]))
|
||||
|
||||
|
||||
def compare_response(exp_resp, act_resp):
|
||||
""" False if the keys are different in the nested dicts as well
|
||||
"""
|
||||
print(exp_resp)
|
||||
print(act_resp)
|
||||
test = True
|
||||
for key in act_resp.keys():
|
||||
if key not in exp_resp.keys():
|
||||
print(f'{key} is not expected')
|
||||
return False
|
||||
if isinstance(act_resp[key], dict):
|
||||
test = compare_response(exp_resp[key], act_resp[key])
|
||||
if test:
|
||||
for key in exp_resp.keys():
|
||||
if key not in act_resp.keys():
|
||||
print(f'{key} is expected')
|
||||
return False
|
||||
if isinstance(exp_resp[key], dict):
|
||||
test = compare_response(exp_resp[key], act_resp[key])
|
||||
|
||||
# at this point exp_resp and act_resp have the same keys. Check if their values are the same
|
||||
for key in act_resp.keys():
|
||||
if not isinstance(act_resp[key], dict):
|
||||
if exp_resp[key] != act_resp[key]:
|
||||
print(f'expected value :{exp_resp[key]}\n actual value: {act_resp[key]}')
|
||||
return False
|
||||
return test
|
||||
|
||||
|
||||
# test json answers creation
|
||||
@pytest.mark.parametrize('xls_input, expected_response_file', {
|
||||
DATA_DIR / 'testTopology.xls': DATA_DIR / 'testTopology_response.json',
|
||||
@@ -304,11 +242,12 @@ def test_json_response_generation(xls_input, expected_response_file):
|
||||
|
||||
result = []
|
||||
for i, pth in enumerate(propagatedpths):
|
||||
# test ServiceError handling : when M is zero at this point, the
|
||||
# test ServiceError handling : when M is None at this point, the
|
||||
# json result should not be created if there is no blocking reason
|
||||
if i == 1:
|
||||
my_rq = deepcopy(rqs[i])
|
||||
my_rq.M = 0
|
||||
my_rq.M = None
|
||||
my_rq.N = None
|
||||
with pytest.raises(ServiceError):
|
||||
ResultElement(my_rq, pth, reversed_propagatedpths[i]).json
|
||||
|
||||
@@ -327,7 +266,7 @@ def test_json_response_generation(xls_input, expected_response_file):
|
||||
if i == 2:
|
||||
# compare response must be False because z-a metric is missing
|
||||
# (request with bidir option to cover bidir case)
|
||||
assert not compare_response(expected['response'][i], response)
|
||||
assert expected['response'][i] != response
|
||||
print(f'response {response["response-id"]} should not match')
|
||||
expected['response'][2]['path-properties']['z-a-path-metric'] = [
|
||||
{'metric-type': 'SNR-bandwidth', 'accumulative-value': 22.809999999999999},
|
||||
@@ -338,8 +277,7 @@ def test_json_response_generation(xls_input, expected_response_file):
|
||||
{'metric-type': 'path_bandwidth', 'accumulative-value': 60000000000.0}]
|
||||
# test should be OK now
|
||||
else:
|
||||
assert compare_response(expected['response'][i], response)
|
||||
print(f'response {response["response-id"]} is not correct')
|
||||
assert expected['response'][i] == response
|
||||
|
||||
# test the correspondance names dict in case of excel input
|
||||
# test that using the created json network still works with excel input
|
||||
@@ -420,10 +358,12 @@ def test_excel_ila_constraints(source, destination, route_list, hoptype, expecte
|
||||
'cost': None,
|
||||
'roll_off': 0,
|
||||
'tx_osnr': 0,
|
||||
'penalties': None,
|
||||
'min_spacing': None,
|
||||
'nb_channel': 0,
|
||||
'power': 0,
|
||||
'path_bandwidth': 0,
|
||||
'effective_freq_slot': None
|
||||
}
|
||||
request = PathRequest(**params)
|
||||
|
||||
@@ -566,3 +506,71 @@ def test_eqpt_creation(tmpdir):
|
||||
# check that all amp in the converted files corresponds to an eqpt line
|
||||
for ampuid in jsonconverted.keys():
|
||||
assert ampuid in possiblename
|
||||
|
||||
|
||||
def test_service_json_constraint_order():
|
||||
"""test that the constraints are read in correct order"""
|
||||
|
||||
unsorted_request = {
|
||||
"request-id": "unsorted",
|
||||
"source": "trx Brest_KLA",
|
||||
"destination": "trx Vannes_KBE",
|
||||
"src-tp-id": "trx Brest_KLA",
|
||||
"dst-tp-id": "trx Vannes_KBE",
|
||||
"bidirectional": False,
|
||||
"path-constraints": {
|
||||
"te-bandwidth": {
|
||||
"technology": "flexi-grid",
|
||||
"trx_type": "Voyager",
|
||||
"trx_mode": "mode 1",
|
||||
"spacing": 50000000000.0,
|
||||
"output-power": 0.001,
|
||||
"path_bandwidth": 10000000000.0
|
||||
}
|
||||
},
|
||||
"explicit-route-objects": {
|
||||
"route-object-include-exclude": [
|
||||
{
|
||||
"explicit-route-usage": "route-include-ero",
|
||||
"index": 2,
|
||||
"num-unnum-hop": {
|
||||
"node-id": "roadm Lorient_KMA",
|
||||
"link-tp-id": "link-tp-id is not used",
|
||||
"hop-type": "STRICT"
|
||||
}
|
||||
},
|
||||
{
|
||||
"explicit-route-usage": "route-include-ero",
|
||||
"index": 3,
|
||||
"num-unnum-hop": {
|
||||
"node-id": "roadm Vannes_KBE",
|
||||
"link-tp-id": "link-tp-id is not used",
|
||||
"hop-type": "STRICT"
|
||||
}
|
||||
},
|
||||
{
|
||||
"explicit-route-usage": "route-include-ero",
|
||||
"index": 1,
|
||||
"num-unnum-hop": {
|
||||
"node-id": "roadm Lannion_CAS",
|
||||
"link-tp-id": "link-tp-id is not used",
|
||||
"hop-type": "LOOSE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"explicit-route-usage": "route-include-ero",
|
||||
"index": 0,
|
||||
"num-unnum-hop": {
|
||||
"node-id": "roadm Brest_KLA",
|
||||
"link-tp-id": "link-tp-id is not used",
|
||||
"hop-type": "STRICT"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
data = {'path-request': [unsorted_request]}
|
||||
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']
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
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
|
||||
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
|
||||
@@ -45,7 +45,9 @@ def propagation(input_power, con_in, con_out, dest):
|
||||
p = input_power
|
||||
p = db2lin(p) * 1e-3
|
||||
spacing = 50e9 # THz
|
||||
si = create_input_spectral_information(191.3e12, 191.3e12 + 79 * spacing, 0.15, 32e9, p, spacing)
|
||||
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))
|
||||
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)
|
||||
|
||||
@@ -12,12 +12,14 @@ checks that restrictions in roadms are correctly applied during autodesign
|
||||
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
from numpy.testing import assert_allclose
|
||||
|
||||
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.equipment import trx_mode_params
|
||||
from gnpy.topology.request import PathRequest, compute_constrained_path
|
||||
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
|
||||
|
||||
@@ -207,8 +209,9 @@ def test_restrictions(restrictions, equipment):
|
||||
raise AssertionError()
|
||||
|
||||
|
||||
@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):
|
||||
def test_roadm_target_power(prev_node_type, effective_pch_out_db, power_dbm):
|
||||
''' 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
|
||||
@@ -225,51 +228,58 @@ def test_roadm_target_power(prev_node_type, effective_pch_out_db):
|
||||
prev_node['params'] = {'loss': 0}
|
||||
json_network['elements'].append(prev_node)
|
||||
network = network_from_json(json_network, equipment)
|
||||
# Build the network once using the default power defined in SI in eqpt config
|
||||
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))
|
||||
nb_channel = automatic_nch(equipment['SI']['default'].f_min, equipment['SI']['default'].f_max,
|
||||
equipment['SI']['default'].spacing)
|
||||
p_total_db = power_dbm + lin2db(nb_channel)
|
||||
|
||||
build_network(network, equipment, p_db, p_total_db)
|
||||
build_network(network, equipment, power_dbm, p_total_db)
|
||||
|
||||
params = {}
|
||||
params['request_id'] = 0
|
||||
params['trx_type'] = ''
|
||||
params['trx_mode'] = ''
|
||||
params['source'] = 'trx node A'
|
||||
params['destination'] = 'trx node C'
|
||||
params['bidir'] = False
|
||||
params['nodes_list'] = ['trx node C']
|
||||
params['loose_list'] = ['strict']
|
||||
params['format'] = ''
|
||||
params['path_bandwidth'] = 100e9
|
||||
params = {'request_id': 0,
|
||||
'trx_type': '',
|
||||
'trx_mode': '',
|
||||
'source': 'trx node A',
|
||||
'destination': 'trx node C',
|
||||
'bidir': False,
|
||||
'nodes_list': ['trx node C'],
|
||||
'loose_list': ['strict'],
|
||||
'format': '',
|
||||
'path_bandwidth': 100e9,
|
||||
'effective_freq_slot': None,
|
||||
'nb_channel': nb_channel
|
||||
}
|
||||
trx_params = trx_mode_params(equipment)
|
||||
params.update(trx_params)
|
||||
req = PathRequest(**params)
|
||||
req.power = db2lin(power_dbm - 30)
|
||||
path = compute_constrained_path(network, req)
|
||||
si = create_input_spectral_information(
|
||||
req.f_min, req.f_max, req.roll_off, req.baud_rate,
|
||||
req.power, req.spacing)
|
||||
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))
|
||||
for i, el in enumerate(path):
|
||||
if isinstance(el, Roadm):
|
||||
carriers_power_in_roadm = min([c.power.signal + c.power.nli + c.power.ase for c in si.carriers])
|
||||
si = el(si, degree=path[i+1].uid)
|
||||
power_in_roadm = si.signal + si.ase + si.nli
|
||||
si = el(si, degree=path[i + 1].uid)
|
||||
power_out_roadm = si.signal + si.ase + si.nli
|
||||
if el.uid == 'roadm node B':
|
||||
print('input', carriers_power_in_roadm)
|
||||
assert el.effective_pch_out_db == effective_pch_out_db
|
||||
for carrier in si.carriers:
|
||||
print(carrier.power.signal + carrier.power.nli + carrier.power.ase)
|
||||
power = carrier.power.signal + carrier.power.nli + carrier.power.ase
|
||||
if prev_node_type == 'edfa':
|
||||
# edfa prev_node sets input power to roadm to a high enough value:
|
||||
# Check that egress power of roadm is equal to target power
|
||||
assert power == pytest.approx(db2lin(effective_pch_out_db - 30), rel=1e-3)
|
||||
elif prev_node_type == 'fused':
|
||||
# fused prev_node does reamplfy power after fiber propagation, so input power
|
||||
# to roadm is low.
|
||||
# Check that egress power of roadm is equalized to the min carrier input power.
|
||||
assert power == pytest.approx(carriers_power_in_roadm, rel=1e-3)
|
||||
# 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 !
|
||||
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
|
||||
# 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)
|
||||
else:
|
||||
si = el(si)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Alessio Ferrari
|
||||
|
||||
"""
|
||||
Checks that RamanFiber propagates properly the spectral information. In this way, also the RamanSolver and the NliSolver
|
||||
are tested.
|
||||
@@ -9,40 +9,127 @@ are tested.
|
||||
from pathlib import Path
|
||||
from pandas import read_csv
|
||||
from numpy.testing import assert_allclose
|
||||
from numpy import array, genfromtxt
|
||||
import pytest
|
||||
|
||||
from gnpy.core.info import create_input_spectral_information
|
||||
from gnpy.core.elements import RamanFiber
|
||||
from gnpy.core.info import create_input_spectral_information, create_arbitrary_spectral_information, Pref, ReferenceCarrier
|
||||
from gnpy.core.elements import Fiber, RamanFiber
|
||||
from gnpy.core.parameters import SimParams
|
||||
from gnpy.core.science_utils import Simulation
|
||||
from gnpy.tools.json_io import load_json
|
||||
from gnpy.core.exceptions import NetworkTopologyError
|
||||
from gnpy.core.science_utils import RamanSolver
|
||||
|
||||
TEST_DIR = Path(__file__).parent
|
||||
|
||||
|
||||
def test_raman_fiber():
|
||||
""" Test the accuracy of propagating the RamanFiber."""
|
||||
# spectral information generation
|
||||
power = 1e-3
|
||||
eqpt_params = load_json(TEST_DIR / 'data' / 'eqpt_config.json')
|
||||
spectral_info_params = eqpt_params['SI'][0]
|
||||
spectral_info_params.pop('power_dbm')
|
||||
spectral_info_params.pop('power_range_db')
|
||||
spectral_info_params.pop('tx_osnr')
|
||||
spectral_info_params.pop('sys_margins')
|
||||
spectral_info_input = create_input_spectral_information(power=power, **spectral_info_params)
|
||||
def test_fiber():
|
||||
""" Test the accuracy of propagating the Fiber."""
|
||||
fiber = Fiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json'))
|
||||
|
||||
sim_params = SimParams(**load_json(TEST_DIR / 'data' / 'sim_params.json'))
|
||||
Simulation.set_params(sim_params)
|
||||
fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'raman_fiber_config.json'))
|
||||
# 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))
|
||||
# propagation
|
||||
spectral_info_out = fiber(spectral_info_input)
|
||||
|
||||
p_signal = spectral_info_out.signal
|
||||
p_nli = spectral_info_out.nli
|
||||
|
||||
expected_results = read_csv(TEST_DIR / 'data' / 'test_fiber_fix_expected_results.csv')
|
||||
assert_allclose(p_signal, expected_results['signal'], rtol=1e-3)
|
||||
assert_allclose(p_nli, expected_results['nli'], rtol=1e-3)
|
||||
|
||||
# flex grid spectral information generation
|
||||
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 = 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)
|
||||
|
||||
# propagation
|
||||
spectral_info_out = fiber(spectral_info_input)
|
||||
|
||||
p_signal = [carrier.power.signal for carrier in spectral_info_out.carriers]
|
||||
p_ase = [carrier.power.ase for carrier in spectral_info_out.carriers]
|
||||
p_nli = [carrier.power.nli for carrier in spectral_info_out.carriers]
|
||||
p_signal = spectral_info_out.signal
|
||||
p_nli = spectral_info_out.nli
|
||||
|
||||
expected_results = read_csv(TEST_DIR / 'data' / 'test_science_utils_expected_results.csv')
|
||||
expected_results = read_csv(TEST_DIR / 'data' / 'test_fiber_flex_expected_results.csv')
|
||||
assert_allclose(p_signal, expected_results['signal'], rtol=1e-3)
|
||||
assert_allclose(p_nli, expected_results['nli'], rtol=1e-3)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('set_sim_params')
|
||||
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))
|
||||
SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json'))
|
||||
fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json'))
|
||||
|
||||
# propagation
|
||||
spectral_info_out = fiber(spectral_info_input)
|
||||
|
||||
p_signal = spectral_info_out.signal
|
||||
p_ase = spectral_info_out.ase
|
||||
p_nli = spectral_info_out.nli
|
||||
|
||||
expected_results = read_csv(TEST_DIR / 'data' / 'test_raman_fiber_expected_results.csv')
|
||||
assert_allclose(p_signal, expected_results['signal'], rtol=1e-3)
|
||||
assert_allclose(p_ase, expected_results['ase'], rtol=1e-3)
|
||||
assert_allclose(p_nli, expected_results['nli'], rtol=1e-3)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"loss, position, errmsg",
|
||||
((0.5, -2, "Lumped loss positions must be between 0 and the fiber length (80.0 km), boundaries excluded."),
|
||||
(0.5, 81, "Lumped loss positions must be between 0 and the fiber length (80.0 km), boundaries excluded.")))
|
||||
@pytest.mark.usefixtures('set_sim_params')
|
||||
def test_fiber_lumped_losses(loss, position, errmsg, set_sim_params):
|
||||
""" Lumped losses length sanity checking."""
|
||||
SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json'))
|
||||
fiber_dict = load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json')
|
||||
fiber_dict['params']['lumped_losses'] = [{'position': position, 'loss': loss}]
|
||||
with pytest.raises(NetworkTopologyError) as e:
|
||||
Fiber(**fiber_dict)
|
||||
assert str(e.value) == errmsg
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('set_sim_params')
|
||||
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))
|
||||
|
||||
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'))
|
||||
raman_fiber = RamanFiber(**load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json'))
|
||||
|
||||
# propagation
|
||||
# without Raman pumps
|
||||
stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(
|
||||
spectral_info_input, fiber)
|
||||
power_profile = stimulated_raman_scattering.power_profile
|
||||
expected_power_profile = genfromtxt(TEST_DIR / 'data' / 'test_lumped_losses_fiber_no_pumps.csv', delimiter=',')
|
||||
assert_allclose(power_profile, expected_power_profile, rtol=1e-3)
|
||||
|
||||
# with Raman pumps
|
||||
expected_power_profile = genfromtxt(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber.csv', delimiter=',')
|
||||
stimulated_raman_scattering = RamanSolver.calculate_stimulated_raman_scattering(
|
||||
spectral_info_input, raman_fiber)
|
||||
power_profile = stimulated_raman_scattering.power_profile
|
||||
assert_allclose(power_profile, expected_power_profile, rtol=1e-3)
|
||||
|
||||
# without Stimulated Raman Scattering
|
||||
expected_power_profile = genfromtxt(TEST_DIR / 'data' / 'test_lumped_losses_fiber_no_raman.csv', delimiter=',')
|
||||
stimulated_raman_scattering = RamanSolver.calculate_attenuation_profile(spectral_info_input, fiber)
|
||||
power_profile = stimulated_raman_scattering.power_profile
|
||||
assert_allclose(power_profile, expected_power_profile, rtol=1e-3)
|
||||
|
||||
@@ -17,11 +17,12 @@ import pytest
|
||||
from gnpy.core.network import build_network
|
||||
from gnpy.core.utils import lin2db, automatic_nch
|
||||
from gnpy.core.elements import Roadm, Transceiver
|
||||
from gnpy.core.exceptions import SpectrumError
|
||||
from gnpy.topology.request import compute_path_dsjctn, find_reversed_path, deduplicate_disjunctions
|
||||
from gnpy.core.exceptions import ServiceError, SpectrumError
|
||||
from gnpy.topology.request import compute_path_dsjctn, find_reversed_path, deduplicate_disjunctions, PathRequest
|
||||
from gnpy.topology.spectrum_assignment import (build_oms_list, align_grids, nvalue_to_frequency,
|
||||
bitmap_sum, Bitmap, spectrum_selection, pth_assign_spectrum)
|
||||
from gnpy.tools.json_io import load_equipment, load_network, requests_from_json, disjunctions_from_json
|
||||
from gnpy.tools.json_io import (load_equipment, load_network, requests_from_json, disjunctions_from_json,
|
||||
_check_one_request)
|
||||
|
||||
TEST_DIR = Path(__file__).parent
|
||||
DATA_DIR = TEST_DIR / 'data'
|
||||
@@ -267,6 +268,109 @@ def test_spectrum_assignment_on_path(equipment, setup, requests):
|
||||
assert center_n is not None and startn is not None and stopn is not None
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def request_set():
|
||||
""" creates default request dict
|
||||
"""
|
||||
return {
|
||||
'request_id': '0',
|
||||
'source': 'trx a',
|
||||
'bidir': False,
|
||||
'destination': 'trx g',
|
||||
'trx_type': 'Voyager',
|
||||
'trx_mode': 'mode 1',
|
||||
'format': 'mode1',
|
||||
'spacing': 50e9,
|
||||
'nodes_list': [],
|
||||
'loose_list': [],
|
||||
'f_min': 191.1e12,
|
||||
'f_max': 196.3e12,
|
||||
'baud_rate': 32e9,
|
||||
'OSNR': 14,
|
||||
'bit_rate': 100e9,
|
||||
'cost': 1,
|
||||
'roll_off': 0.15,
|
||||
'tx_osnr': 38,
|
||||
'penalties': {},
|
||||
'min_spacing': 37.5e9,
|
||||
'nb_channel': None,
|
||||
'power': 0,
|
||||
'path_bandwidth': 800e9}
|
||||
|
||||
|
||||
def test_freq_slot_exist(setup, equipment, request_set):
|
||||
""" test that assignment works even if effective_freq_slot is not populated
|
||||
"""
|
||||
network, oms_list = setup
|
||||
params = request_set
|
||||
params['effective_freq_slot'] = None
|
||||
rqs = [PathRequest(**params)]
|
||||
paths = compute_path_dsjctn(network, equipment, rqs, [])
|
||||
pth_assign_spectrum(paths, rqs, oms_list, [find_reversed_path(paths[0])])
|
||||
assert rqs[0].N == -256
|
||||
assert rqs[0].M == 32
|
||||
|
||||
|
||||
def test_inconsistant_freq_slot(setup, equipment, request_set):
|
||||
""" test that an inconsistant M correctly raises an error
|
||||
"""
|
||||
network, oms_list = setup
|
||||
params = request_set
|
||||
# minimum required nb of slots is 32 (800Gbit/100Gbit/s channels each occupying 50GHz ie 4 slots)
|
||||
params['effective_freq_slot'] = {'N': 0, 'M': 4}
|
||||
with pytest.raises(ServiceError):
|
||||
_check_one_request(params, 196.05e12)
|
||||
params['trx_mode'] = None
|
||||
rqs = [PathRequest(**params)]
|
||||
paths = compute_path_dsjctn(network, equipment, rqs, [])
|
||||
pth_assign_spectrum(paths, rqs, oms_list, [find_reversed_path(paths[0])])
|
||||
assert rqs[0].blocking_reason == 'NOT_ENOUGH_RESERVED_SPECTRUM'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('n, m, final_n, final_m, blocking_reason', [
|
||||
# regular requests that should be correctly assigned:
|
||||
(-100, 32, -100, 32, None),
|
||||
(150, 50, 150, 50, None),
|
||||
# if n is None, there should be an assignment (enough spectrum cases)
|
||||
# and the center frequency should be set on the lower part of the spectrum based on m value if it exists
|
||||
# or based on 32
|
||||
(None, 32, -256, 32, None),
|
||||
(None, 40, -248, 40, None),
|
||||
(-100, None, -100, 32, None),
|
||||
(None, None, -256, 32, None),
|
||||
# -280 and 60 center indexes should result in unfeasible spectrum, either out of band or
|
||||
# overlapping with occupied spectrum. The requested spectrum is not available
|
||||
(-280, None, None, None, 'NO_SPECTRUM'),
|
||||
(-60, 40, None, None, 'NO_SPECTRUM'),
|
||||
# 20 is smaller than min 32 required nb of slots so should also be blocked
|
||||
(-60, 20, None, None, 'NOT_ENOUGH_RESERVED_SPECTRUM')
|
||||
])
|
||||
def test_n_m_requests(setup, equipment, n, m, final_n, final_m, blocking_reason, request_set):
|
||||
""" test that various N and M values for a request end up with the correct path assgnment
|
||||
"""
|
||||
network, oms_list = setup
|
||||
# add an occupation on one of the span of the expected path OMS list on both directions
|
||||
# as defined by its offsets within the OMS list: [17, 20, 13, 22] and reversed path [19, 16, 21, 26]
|
||||
expected_path = [17, 20, 13, 22]
|
||||
expected_oms = [13, 16, 17, 19, 20, 21, 22, 26]
|
||||
some_oms = oms_list[expected_oms[3]]
|
||||
some_oms.assign_spectrum(-30, 32) # means that spectrum is occupied from indexes -62 to 1 on reversed path
|
||||
params = request_set
|
||||
params['effective_freq_slot'] = {'N': n, 'M': m}
|
||||
rqs = [PathRequest(**params)]
|
||||
|
||||
paths = compute_path_dsjctn(network, equipment, rqs, [])
|
||||
# check that the computed path is the expected one (independant of blocking issues due to spectrum)
|
||||
path_oms = list(set([e.oms_id for e in paths[0] if not isinstance(e, (Transceiver, Roadm))]))
|
||||
assert path_oms == expected_path
|
||||
# function to be tested:
|
||||
pth_assign_spectrum(paths, rqs, oms_list, [find_reversed_path(paths[0])])
|
||||
# check that spectrum is correctly assigned
|
||||
assert rqs[0].N == final_n
|
||||
assert rqs[0].M == final_m
|
||||
assert getattr(rqs[0], 'blocking_reason', None) == blocking_reason
|
||||
|
||||
|
||||
def test_reversed_direction(equipment, setup, requests, services):
|
||||
""" checks that if spectrum is selected on one direction it is also selected on reversed
|
||||
direction
|
||||
|
||||
5
tox.ini
5
tox.ini
@@ -4,7 +4,7 @@ skipsdist = True
|
||||
[testenv]
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
pytest>=5.0.0,<6
|
||||
-r{toxinidir}/tests/requirements.txt
|
||||
cover: pytest-cov
|
||||
linters: flake8
|
||||
linters: pep8-naming
|
||||
@@ -19,7 +19,7 @@ commands =
|
||||
pytest {env:CI_COVERAGE_OPTS:} -vv {posargs}
|
||||
cover: coverage html -d cover
|
||||
cover: coverage xml -o cover/coverage.xml
|
||||
python setup.py bdist_wheel
|
||||
python -m build
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
@@ -43,3 +43,4 @@ commands =
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
max-complexity = 15
|
||||
ignore = N806 W503
|
||||
|
||||
Reference in New Issue
Block a user