92 Commits

Author SHA1 Message Date
Jan Kundrát
72f300ab94 CI: Build and upload a PyPI package upon tagging
Change-Id: Idcd84a9f8e03ffc4ea27b37add8e5e59d1da7509
2021-06-09 20:03:57 +02:00
Jan Kundrát
2c3b0d8c82 CI: GitHub: build Docker images
Pushes to master should create a "development" tag. Tags should create
something prettier.

We need the git checkout for proper package versioning, hence that magic
`context` thing, and also that magic `echo`.

Change-Id: I79fcb800cc079e8486c3795f36aa1993676cee49
2021-06-09 19:53:53 +02:00
Jan Kundrát
11dab614a9 CI: GitHub: prevent duplicate runs
Change-Id: I09d55937d553d097b0440bb3c7d0f7dcc709abe3
2021-06-09 19:53:53 +02:00
Jan Kundrát
11d88bf09a CI: random bikeshedding about the name
Change-Id: I7ce2b32cb30f2b1a5e402c1dc999b02d2a1588de
2021-06-09 19:46:23 +02:00
Jan Kundrát
af3cc4736e setup metadata: fix description
Our landing page on PyPI was not displaying the longer version of the
README, just a one-sentence summary. It turns out that `pbr` can indeed
read the README file, but specifying the `description` overrides that
with no warning. Yay.

Change-Id: Ic03412928fe09f5edab4a7b9f4297a485a740cd0
2021-06-09 16:34:24 +02:00
Jan Kundrát
50cb82ee18 packaging: fix the long description
Fixes: e45a54c2 (README: rewrite in Markdown)
Change-Id: Ifefd78ba1008f0a37299dca07b53b5481ebeac27
2021-06-09 16:34:17 +02:00
Jan Kundrát
c80aca6696 CI: GitHub: ensure tags are present
We're using PBR, so let's make sure we don't get a package that's marked
as version 0.0.0.

Bug: https://github.com/actions/checkout/issues/217
Change-Id: Icd8264a798f9a1a404e21a9b64317c57662d53fe
2021-06-09 16:34:11 +02:00
Jan Kundrát
dfca35d4ae CI: always try to build a release wheel
This might be a wee bit controversial, I guess, because the Zuul jobs
look like there's a dedicated playbook for that
(playbooks/python/release.yaml). However, that would be one extra VM
launch, which feels wasteful. Let's waste the CPU cycles elsewhere --
during each "regular test build", produce a wheel as well.

It looks that these "wheels" are *the* format for distributing Python
packages now -- including the source code, of course. Since there's no
real support for tag review in Gerrit, I don't think I need Zuul for
release management, either, so I'll just rely on GitHub actions for
release upload, I guess. And for that, I need to "somehow" create a
wheel anyway, so let's just do this all the time to ensure that it
really works and never stops working.

Change-Id: Ib86852a386673cd4929a8059b19fa527cd4d5955
2021-06-09 16:34:02 +02:00
Jan Kundrát
1fbdaef58a CI: Run on GitHub Actions
We have Zuul, and we're happy with it; however, every now and then
there's a problem with the managed infrastructure, and there's also
people who contribute patches as GitHub PRs.

Change-Id: I405c5806ed9ad2e7f59f9b2394daf068b373e425
2021-06-09 16:33:50 +02:00
Jan Kundrát
225cafa8b7 Floating point formatting of elements' operational parameters
The current JSON data loader preserves (some) integers as integers. When
printed, the value might not contain any decimal points. The YANG patch
series, however, forces floats when floats are expected (while still
allowing None). This makes the output subtly different.

Change-Id: I0e0c013eb3abddb4aeac1ba43bf0d473fed731d4
2021-06-04 23:10:09 +02:00
Jan Kundrát
ad9cbb8a93 Merge "Use the term GSNR in result outputs" 2021-06-04 20:54:58 +00:00
Jonas Mårtensson
581b4a726f Use the term GSNR in result outputs
The term "GSNR" is well established by now. I think it's time we start
using it in our own result outputs instead of alternatives like "total
SNR" or just "SNR".

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I1fc65f6db1e3b2d7cfe974875174132fe5b28d3b
2021-06-04 12:48:50 +02:00
Jan Kundrát
ce92d4e1b8 JSON: don't sleep when there are warnings in the input topology
Well, sleeping ain't fun. A red warning is plenty. In case of API
access, there's none, but that's just the APIs are.

Change-Id: I2fb0c051a9c3bb7f2ef2264083686e929c27ec2c
Fixes: 6a6591e4 (Add a warning message when attributes are missing in eqpt_config.json)
2021-06-04 00:04:16 +02:00
Jan Kundrát
eb17b74ea4 Merge "Fix behavior when there's no EDFA DGT" 2021-06-03 21:58:52 +00:00
Jan Kundrát
051359ad77 Merge changes I7596efae,I3633a59d
* changes:
  Remove unused property Fiber.fiber_loss
  Remove unused property
2021-06-03 21:49:58 +00:00
Jan Kundrát
912eb712c3 Fix behavior when there's no EDFA DGT
We ship "some" DGT values which effectively mask this, but it's possible
to provide a "trivial" DGT vector such as [0, 0]. When that happens, the
code was failing with a numpy-level warning related to a division by
zero.

The code tried to be ready for this by trying to catch an exception, but
this relied on a particular numpy behavior upon zero division which was
not set up properly. For the added fun, there are two possible cases of
division by zero:

- on a zero tilt, it's a case of `0.0 / np.float64(0.)`, which is
controlled via "invalid",
- on a non-zero tilt, it's a case of `<float> / np.float64(0.)`, which
leads to "divide".

Let's just check for zero instead of wrestling exceptions.

Change-Id: I7a3c0b6b9b85e90a8a7201b7c7a56a5a44c27d69
2021-06-03 10:57:25 +02:00
Jan Kundrát
ce4ea9d6e3 README: shuffle elements around a wee bit
Let's start with some brief introduction, and only then push the picture
with the schematics.

Change-Id: I7e8662c3afe5076c73411def97d0fcb1f1a03e7f
2021-06-03 02:22:46 +02:00
Jan Kundrát
39c894bb6a Remove unused property Fiber.fiber_loss
Change-Id: I7596efaeaa1c6cdef15118521662e54db34fd9e6
2021-06-03 01:54:06 +02:00
Jan Kundrát
be95496f85 Remove unused property
I dig through the git log, and it looks like something which was never
used after some refactorings 3+ years ago.

Change-Id: I3633a59d8f2720932fa32c885ee5be643e640a46
2021-06-03 01:52:44 +02:00
Jan Kundrát
d38dabc824 Merge changes I8523fb93,Ia832cd8f,Id92bda62
* changes:
  Remove unused variables
  remove unused variable
  remove unused import
2021-06-02 21:55:34 +00:00
Jan Kundrát
5ad6336fda Docker: use a newer Python
Change-Id: I2e6725f7a009690f1a49a77d9ec4ff696141d5b5
2021-06-02 23:22:32 +02:00
Jan Kundrát
8ec9aca559 equipment: remember NF_min, NF_max when using the operator model
...so that these original values are accessible to the YANG conversion
later on, if needed.

Change-Id: I254127f9641a39a0478d0ef27b9f2e524bf60bda
2021-06-02 23:18:54 +02:00
Jan Kundrát
9abec6c9b7 docs: convert something into MarkDown
Change-Id: I5880e6675657dfc52d01cce529aba6563f9ca75f
2021-06-02 23:18:54 +02:00
Jan Kundrát
e3b904fb06 docs: allow writing Sphinx docs in Markdown
...because it's less annoying than the ReStructuredText.

Change-Id: Ic3db1fe1834580b0f31190b3bf96d6ab95c3b40e
2021-06-02 23:18:54 +02:00
Jan Kundrát
5d13b9bfb6 docs: remove a dependency on PBR
In the past, we had some manual version info in this file, but
apparently it never got updated past the 0.1 release (yay). The, in
4d5d10935 I changed this to retrieve the version information via PBR's
existing magic. That worked well, showing the abbreviated commit hash at
the footer on ReadTheDocs, but I don't think it was terribly useful:

- it was just a hash, nothing like the output of `git describe` (i.e.,
no tag info was there),
- it wasn't showing up in local docs builds which use the Alabaster
default theme.

Now, in 1b2eb9a5 I split the dependency handling. The idea was to make
sure that a "regular installation" would not pull the docs in
needlessly. Unfortunately, the way I set up the RTD builds, the common
dependencies were skipped, and as a result, the `pbr` package was not
available to RTD, and stuff failed.

I could have configured RTD to *also* install from the main deps, but I
don't think this is actually needed. Given that the version info is
rather subtle, let's skip it altogether. Instead, it's better to use
RTD's built-in features for switching between docs for a particular
release (via a git tag) and for the generic "master branch".

Change-Id: Iab0cc9608fa6c24eba93d772370ecd379cf65b1e
Fixes: 1b2eb9a5 (docs: separate out dependencies)
2021-06-02 23:10:05 +02:00
Jan Kundrát
0c26fd24b5 Travis: fix the build
Builds on Travis-CI do not use Tox, and I forgot to fix the dependencies
there.

Change-Id: I8a75e82dd0832d6a1e55257722e7e98b5ed57655
2021-06-02 22:36:48 +02:00
Jan Kundrát
1b2eb9a5a8 docs: separate out dependencies
The intention is to separate "stuff that's needed by this package" from
"stuff that's needed to build the docs".

Change-Id: I7baf27e6f814880ea241ccbd3de4b87a6e7c4d1b
2021-06-01 01:26:53 +02:00
Jan Kundrát
219204e320 docs: use a newer Python on readthedocs
They do not seem [1] to support 3.9 yet, so let's stick with the 3.8
version for now.

[1] https://docs.readthedocs.io/en/stable/config-file/v1.html#python-version

Change-Id: I581bde3057a2a33b1ac419cdca3d110d196bdcfe
2021-05-31 20:28:29 +02:00
Jan Kundrát
38fc1fdc6d Remove unused variables
Change-Id: I8523fb938123ec9767eb9f540b229ddca23b9da5
2021-05-31 20:15:25 +02:00
Jan Kundrát
e25e1fbe50 remove unused variable
It was only assigned to in `read_service_sheet`, and it's safe to remove
it also in `convert_service_sheet`.

Change-Id: Ia832cd8fea2d864e920907e455e834a3c3a724dd
2021-05-31 20:13:38 +02:00
Jan Kundrát
8a96ff563e remove unused import
Change-Id: Id92bda6263a1b8db70d9142970522c504c10126d
2021-05-31 20:11:28 +02:00
Jan Kundrát
27d4fb0811 docs: add a blurb about OpenROADM
The discoverability can be improved, but hey, I guess this is better
than nothing.

Change-Id: I57792b50adb93321eff7bf301107f67cb9a8747d
2021-05-31 20:01:46 +02:00
Jan Kundrát
b5a8ae3f06 badges: link to Gerrit
Change-Id: I7e9e72bdae304f5b96567c98d12aa9564f126fb5
2021-05-31 19:58:58 +02:00
Jan Kundrát
e45a54c2b5 README: rewrite in Markdown
I find this about 666x more readable than the ReStructuredText.

Change-Id: Ic07cf129e0052b0083fff6899650e54b627efde7
2021-05-31 19:50:14 +02:00
Jan Kundrát
172697a2aa docs: move the introduction from the README to an extra docs chapter
Change-Id: Ifefbcb35e0e53f5d664b5720943f90fab34e1380
2021-05-31 19:37:36 +02:00
Jan Kundrát
9762b6e610 docs: move the project meta-stuff into the docs
The README should be just that, a README. Ours was about four pages
long, that's a bit too much I'm afraid.

Change-Id: I646e9d09e512384898271e10ff628906299b75a9
2021-05-31 19:37:36 +02:00
Jan Kundrát
4675a74e02 docs: tweak the shields on the landing page
Change-Id: I8cb320c0c10390af4f7d209ded5f3acee34b9790
2021-05-31 19:37:36 +02:00
Jan Kundrát
a268c219ed docs: show the Python versions used on the latest release
Change-Id: I028166bf830d3229066cb04f7c6ed9d4028b9644
2021-05-31 19:05:49 +02:00
Jan Kundrát
a47f069d97 PyPI: Python 3.9 is supported as well
We've been testing with Python 3.9 via Travis since this February, so
let's mark the project accordingly. Once a release which contains this
commit gets uploaded to PyPI, it will be propagated to the pip's web
interface.

Change-Id: I84635157565f1dbe9936231fa32ef3f6a0605e2f
2021-05-31 19:02:19 +02:00
Jan Kundrát
8fcead4294 docs: add some latex fanciness
Change-Id: I39348e0994fe576ce33d8b241ab9cedd0fd184c8
2021-05-31 18:56:17 +02:00
Jan Kundrát
b6daa15356 tests: include the OpenROADM amplifiers
Change-Id: I26d6ad422917fa6fd5943ffaa5da933c2acec80e
2021-05-31 16:41:13 +02:00
Jan Kundrát
469c0f5218 Merge changes If2545b5d,I3b182f1a,I77494833
* changes:
  Add OpenROADM example network
  Add OpenROADM equipment config file
  Update gain_min of OpenROADM ILAs in eqpt_config.json to match MSA spec
2021-05-31 14:38:15 +00:00
Jonas Mårtensson
830ed22690 Add OpenROADM example network
Change-Id: If2545b5d102778404b44a11576054284eb52bea6
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
2021-05-31 15:59:48 +02:00
Jonas Mårtensson
a386262bfd Add OpenROADM equipment config file
The config file has the following properties:

* Includes only OpenROADM EDFA types (ILA / booster / preamp) and sets
allowed_for_design to true for ILAs.

* Sets ROADM restrictions to OpenROADM booster and preamp.

* Adds an OpenROADM transceiver type_variety with mode parameters
following the MSA spec.

* Sets other parameters (power_dbm, padding, add_drop_osnr, etc.)
according to OpenROADM MSA spec.

Using this config file together with auto-design should result in an
"OpenROADM compliant" network. Specifically, compliant fiber input
power levels for 50 GHz spacing are obtained by setting power_dbm = 2
and padding = 11. For other spacings than 50 GHz, power_dbm should be
changed accordingly.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I3b182f1abcc22fd77d7ec073a6c87fad320957ae
2021-05-31 15:59:48 +02:00
Jan Kundrát
ede3c1a943 Merge changes I58d7e13a,Icf9a33db
* changes:
  CI: produce a HTML report with all linter warnings
  tox: do not pass envlist
2021-05-28 19:50:18 +00:00
Jan Kundrát
af767dd38a CI: produce a HTML report with all linter warnings
Change-Id: I58d7e13a20bd114277c6267653d44897c221526b
Depends-on: https://review.gerrithub.io/c/Telecominfraproject/oopt-zuul-jobs/+/517864
2021-05-28 20:36:39 +02:00
Jan Kundrát
6dcc5a8524 docs: document the f_min/f_max idiosyncrasies
Thanks to Jonas for pointing this out during the review of the OpenROADM
patches.

Change-Id: I4e3f973c9a4d4d01565210dd22bfec84794f0a26
2021-05-28 19:21:59 +02:00
Jan Kundrát
7b5878e2f2 tox: do not pass envlist
...because it's ignored by the CI, and it's kind of up to the invoker to
specify which env they want. We have not relied upon the multiple
environment feature of tox.

Change-Id: Icf9a33dbb5e3df641bd85e3aa7482dfb85f13e5f
2021-05-27 19:41:55 +02:00
Jan Kundrát
8c0eac1bdc Merge changes If02e7f18,I9eec3a10
* changes:
  tests: activate mccabe the complexity checker
  CI: flake8: check invalid "noqa" comments
2021-05-26 23:56:52 +00:00
Jan Kundrát
d09938c1b8 Merge "Fix wrong parameter name in error message raised in compute_nli" 2021-05-26 23:56:41 +00:00
Jonas Mårtensson
dba4da0169 Fix wrong parameter name in error message raised in compute_nli
The error message was refering to method_nli which does not exist. The
correct parameter name is nli_method_name.

Change-Id: I24f24a2c5251317e1a80dda60aa27ec151628172
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
2021-05-26 22:29:34 +02:00
Jan Kundrát
998249be61 Merge "Round fiber length to two decimal places in Fiber string representation" 2021-05-26 09:32:53 +00:00
Jonas Mårtensson
ebdba47660 Round fiber length to two decimal places in Fiber string representation
The __str__ method of the Fiber element class rounded the fiber length
to an integer but then formatted it with two decimal places, which
doesn't make sense. With this patch, two decimal places are kept.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I03b886dff7ba624929ccc85b4d77d8d6a7cbcfb4
2021-05-26 10:47:21 +02:00
AndreaDAmico
6072203afb Fix z position array creation within Raman solver
The Raman solver gave the wrong loss profile when the fiber length was
not a multiple of the simulation parameter space_resolution as,
in this case, the fiber termination position was not included within
the considered z position array and the output loss profile was
evaluated at the wrong position.

Additionally, the Raman solver failed when the simulation parameter
space_resolution was greater than the fiber length as the z position
array contained only one element.

With this version the fiber termination position is always included
in the z position array and is composed of multiple uniformly spaced
positions and the final position (in general, the latter is not
uniformly spaced).

Example:
* fiber_length = 5, space_resolution = 4 => old version z = [0, 4]
                                          => new version z = [0, 4, 5]

* fiber_length = 5, space_resolution = 6 => old version z = [0]
                                          => new version z = [0, 5]

Alternative:

z = linespace(0, fiber_length, int(ceil(fiber_length/space_resolution)))

PROS
* Solves the first issue
* Returns a uniformly spaced z position array (there is not a
  straightforward advantage in the simulation)

CONS
* Does not solve the second issue
* It is slightly more involved

Change-Id: I8886c3563ac7305c49cb5915712777ef561c5d4f
Bug: https://github.com/Telecominfraproject/oopt-gnpy/discussions/400
2021-05-25 16:16:39 +00:00
EstherLerouzic
b867c57bee bugfix: don't check a reversed path that has no baudrate
without this change if a request was blocked on main path due to 'NO_FEASIBLE_BAUDRATE_WITH_SPACING'
and if the request was bidir, there was a propagation tentative on the reversed path
despite the fact that no baudrate was selected, which ended up with a program crash.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ie4e578aab944e534d8b2d99fb02c4e28a242e717
2021-05-20 16:53:16 +02:00
Jan Kundrát
4396a4efe9 docs: link to patches-in-progress in GerritHub from the README
Change-Id: Ie0e302c96973e26fafe61d4160e135fee23e7bc1
2021-05-20 16:24:55 +02:00
Jan Kundrát
afe686c666 GitHub: link to a faster landing page in GerritHub
The dashboards have changed in Gerrit 3.4 which got deployed to
GerritHub earlier today. Now there's no pagination and no is:mergeable
operator. Let's just link to a (paginated) list of all open changes,
that's probably better value for now.

Change-Id: I22ad68becfc33d3829bcd8aaccb5203e76faeded
2021-05-20 15:31:49 +02:00
Jonas Mårtensson
e0faf6107d Fix order of except clauses in cli_examples.py
ParametersError is a sub class of ConfigurationError so the
corresponding except clause should be placed before. Otherwise the
ConfigurationError will be matched first instead of the more specific
ParametersError.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I67156dd7321101693fdf061d77937d4e75462593
2021-05-20 11:43:56 +02:00
Jan Kundrát
441f566964 tests: activate mccabe the complexity checker
It turns out that my text editor has been warning about "excessive code
complexity" via the python-language-server plugin that uses pycodestyle
underneath. As the test suite is configured to use `flake8` instead,
let's make sure that the results are consistent, and configure the code
complexity threshold for the CI linter run as well.

I'm not sure if this is usable when run incrementally, though (such as
in the CI). I *think* that `flake8 --diff` disregards warnings issued on
lines which have not been changed in the corresponding diff, while
mccabe reports its warnings for the line with the function signature --
and that one is not included in the output of `git diff -U0`. As a
result, I suspect that if a patch increases the code complexity of a
function over the threshold, our CI setup might not report that.

However, a non-diff run of the linters via `flake8` will now start
reporting C901 warnings. For those using `python-language-server` to
integrate with their IDEs and text editors, install `pyls-flake8` to
preserve the existing functionality.

Change-Id: If02e7f189514077aca3e865e1882a4a3fabb4dba
2021-05-16 18:21:22 +02:00
Jan Kundrát
2ca92f1aaa CI: flake8: check invalid "noqa" comments
There are some (unmerged) patches which selectively mute some linter
warnings via the `# noqa: something` stanza. It makes sense to configure
the linter in such a way that it checks the format of that `something`
to make sure that the linter override is valid and selective.

Change-Id: I9eec3a1024d3df88f4f44d4df746ff514670f71f
2021-05-16 18:21:22 +02:00
EstherLerouzic
c4235fa61c Add a test case for the case of 2 adjacent fibers
make sure that their loss is not concatenated

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I63678dd5b72f7f6984101c4367320f3f981cb573
2021-05-12 13:07:47 +02:00
Jonas Mårtensson
41c53fbc5a Update gain_min of OpenROADM ILAs in eqpt_config.json to match MSA spec
Change-Id: I77494833d76cad6759e791ee1de6de025024f114
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
2021-05-12 09:40:29 +02:00
Jonas Mårtensson
44f8cdbf20 Fix span loss calculation for auto-design
I believe a previous commit, 3ac08f5, changed the behaviour of span
loss calculation in an unintended way, since now it adds the loss of
consecutive fiber elements even when there is no fused element in
between. This means for example that no padding is added when the loss
of consecutive fibers is higher than the padding specified in the
equipment file even though inline amplifiers will be added between the
fibers in a later step. This patch changes the conditions in the next_
and prev_node_generator so that they stop when two consecutive fibers
are found.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I42c9188c789a98a9b3d7e51d5aae15774d40dde7
2021-05-12 09:19:05 +02:00
Jan Kundrát
07ef8e4e10 Fix (some) pep8 warnings
Change-Id: I3fd709b0b12617d534ce9edd5b287539ee036b38
2021-05-11 11:48:36 +02:00
Jonas Mårtensson
bf0e435542 Include ILA nodes when converting from xls to json
Fix GitHub issue #217

Currently, if a user specifies an ILA node in an xls file, including
city name and coordinates, but does not specify type of amplifier,
etc., in the Eqpt sheet, the ILA node is not preserved when converting
to json. This patch proposes to include all ILA nodes to prevent loss
of information.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: Id169348cce185e4d33d5b80068270b36043e3353
2021-05-11 11:35:00 +02:00
Jan Kundrát
b688493e98 Merge "Specifying a list of EDFA type varieties for auto-design" 2021-05-11 09:27:58 +00:00
Jan Kundrát
1ad01963c8 Merge "Better positioning of fibers after splitting" 2021-05-07 14:56:15 +00:00
Jan Kundrát
493de58e65 Merge changes Ifc3ec5f9,I7344ff53,I2971b975,Ia2ee3fdd,Ie57340d4, ...
* changes:
  equipment: make sure all OpenROADM EDFAs have "openroadm" in their names
  Introduce OpenROADM preamp and booster models
  The "openroadm" NF model only applies to inline amps
  docs: OpenROADM-ILA parameters in the JSON equipment library
  docs: JSON: do not claim that the default NF implementation is "advanced_model"
  docs: line wrapping
2021-05-07 14:03:51 +00:00
Jonas Mårtensson
7e97547774 Better positioning of fibers after splitting
Currently, calculated new fiber coordinates, after splitting a fiber by
auto-design, are evenly distibuted. Since coordinates for added inline
edfas are the midpoint between neighboring nodes, this makes the edfas
"look" non-equidistant even if all spans have the same length. I think
it would make more sense to have the fiber coordinates represent the
midpoint of the fiber. That way, the edfa positions will look more
"natural". Here is an attempt to illustrate the difference for a link
with three fiber spans:

Before this patch:

r-----f--e--f--e--f-----r

After this patch:
r---f---e---f---e---f---r

r = roadm
e = edfa
f = fiber

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I6eafe3fcd4c718b0b995a046dbff0fd04bdc42d7
2021-05-07 08:53:16 +02:00
Jan Kundrát
0f73a8f810 equipment: make sure all OpenROADM EDFAs have "openroadm" in their names
This could be (potentially) annoying to those users who rely on the
default equipment library. However, it brings at least some order into
the current state -- which was rather disorganized.

Suggested-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: Ifc3ec5f9e0e2526b8621d905160fc82af6a469f2
2021-05-06 21:10:43 +02:00
Jonas Mårtensson
fa834338ab Introduce OpenROADM preamp and booster models
The NF calculated by the preamp model is compliant with the MW-MW noise
mask in the OpenROADM MSA spec. The booster is noise-free, which is
modeled by setting the NF to zero (-inf in dB units). This is obviously
unphysical but it is the simplest way to model the total noise
contribution from a ROADM, including preamp and booster, that is
compliant with the the OpenROADM MSA.

This also introduces two new EDFA type varieties,
"openroadm_mw_mw_preamp" and "openroadm_mw_mw_booster" in the equipment
library. I would prefer to also change the names of the existing
"openroadm" type_def and "standard"/"low_noise" type_variety,
representing an OpenROADM inline-amplifier, for better consistency but
this probably needs to be discussed first.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I7344ff53623f166649efb389c95c04ff92718e35
Signed-off-by: Jan Kundrát <jan.kundrat@telecominfraproject.com>
Co-authored-by: Jan Kundrát <jan.kundrat@telecominfraproject.com>
2021-05-06 19:54:59 +02:00
Jan Kundrát
fc82f43b89 The "openroadm" NF model only applies to inline amps
Change-Id: I2971b97506c8d0a778b3007fd5bd092c3ba83601
2021-05-06 19:54:19 +02:00
Jan Kundrát
3d9d5d7a8d docs: OpenROADM-ILA parameters in the JSON equipment library
Change-Id: Ia2ee3fdde1c4eed0b7ef1de77153959230ba1c01
2021-05-06 19:54:17 +02:00
Jan Kundrát
eef2cdc81c docs: JSON: do not claim that the default NF implementation is "advanced_model"
As Jonas pointed out in Ia2ee3fdde1c4eed0b7ef1de77153959230ba1c01, the
documentation was wrong and the default NF implementation was not the
advanced_model. Let's not describe what the backwards-compatible
behavior is (we do not want our users to rely on that), and instead just
say that "adavnced_model" activates, well, the advanced model.

Change-Id: Ie57340d491a6f73d696d77c07091f85952cb4a08
2021-05-06 19:53:32 +02:00
Jan Kundrát
487ca8c2d6 docs: line wrapping
The numbered list was very hard to read; split that into one sentence
per line. Also do that everywhere else but in the tables (in RST I'm
afraid this would be super-painful).

Change-Id: Ib80c05b66cbc98af2d0dda612943f91d923425b0
2021-05-06 19:51:45 +02:00
Jan Kundrát
ec66d628f0 CI: do not "fail" branches upon coverage decrease
Right now the project homepage on GitHub shows an red failure due to
[1]. While I agree that coverage reports are a useful metric, they are
most relevant when considering patches (or changes) on their own. I do
not think it makes any sense to show them on branches. When we merged
that commit, the reviewer had the info about the coverage change, and we
just do not have 100% coverage. Let's not pretend that that is a
blocker.

[1] 924c56850d

Change-Id: I652ada3357e521c9a3351faac2f9c2e8e4aa5773
2021-05-06 17:02:33 +02:00
Jan Kundrát
924c56850d Merge "Properly remove duplicate links in XLS conversion" 2021-05-04 09:32:55 +00:00
Jan Kundrát
21385cbf03 Merge "docs: Fix a typo" 2021-05-04 08:14:20 +00:00
Jan Kundrát
87c617b602 Merge "Better naming and location of Roadm preamp/booster Edfas in auto-design" 2021-05-04 08:13:40 +00:00
Jonas Mårtensson
4fce4ea7d8 Simplify plotting code
Remove unused code.

Change-Id: I2d3dc62d578912b69d3b5d45634ba5d3f271538d
2021-05-02 23:11:44 +02:00
Jonas Mårtensson
2ddbd961ff Fix plotting bug
See GitHub issue #391

There has been a change in the networkx drawing API, which means
'figure' is no longer an accepted keyword argument.

Change-Id: I8600e8cd5eb2cb378a529c7857f664c1ebed8337
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
2021-05-02 11:28:18 +02:00
Jan Kundrát
05a044dc2c Merge changes I6962b9f1,I41a65e89
* changes:
  Detect unconnected nodes via span generators
  Fix bug on iteration within a span
2021-04-30 15:01:32 +00:00
Jan Kundrát
340840840f Detect unconnected nodes via span generators
Change-Id: I6962b9f193723dc7856b324d5da94d2f46b21c06
2021-04-30 16:33:44 +02:00
EstherLerouzic
3ac08f59e2 Fix bug on iteration within a span
The old code assumed that the Fused node only connects Fiber nodes. In a
sequence of Fused - Amplifier - Fused - Fiber, the Amplifier would be
included by a mistake. In addition, the code was not that easy to read,
and it just instantiated StopIteration without raising that (which would
be an error in a generator context). It was also rather strict, failing
if the iterator was requested for an "edge node" (a transponder), and
one of the exceptions was not actually an f-string.

Finally, the span_loss function would occasionally report wrong values
(for example in the provided test case, span_loss("fused7") would say 1
instead of 17).

Fix this by making sure that prev_node_generator() and
next_node_generator() never return anything but Fiber and Fused nodes,
which made it possible to simplify the span_loss() function. This should
now properly account for the accumulated losses of an arbitrary sequence
of Fiber and Fused elements.

I went over this a few times because set_egress_amplifier() calls
span_loss() on a *ROADM* node type. That does not make any sense, and
the code deals with this "properly" by returning a loss of 0 dB. It was
a bit confusing for me to see that it's actually OK to ask for a "span
loss" that's identified by a ROADM.

A side effect of this code is that Fused instances that are isolated
from the rest of the topology no longer raise an exception. I was
thinking about preserving this (because for GNPy, the only element with
no previous or no next nodes are the transceivers, but then Esther's
test topology contains an isolated `fused4` element. If we want to make
this strict, we can do that easily like this:

 --- a/gnpy/core/network.py
 +++ b/gnpy/core/network.py
 @@ -162,10 +162,12 @@ _fiber_fused_types = (elements.Fused, elements.Fiber)
  def prev_node_generator(network, node):
      """fused spans interest:
      iterate over all predecessors while they are Fused or Fiber type"""
      try:
          prev_node = next(network.predecessors(node))
      except StopIteration:
 -        return
 +        if isinstance(node, elements.Transceiver):
 +            return
 +        raise NetworkTopologyError(f'Node {node.uid} is not properly connected, please check network topology')
      if isinstance(prev_node, _fiber_fused_types) and isinstance(node, _fiber_fused_types):
          yield prev_node
          yield from prev_node_generator(network, prev_node)

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Co-authored-by: Jan Kundrát <jan.kundrat@telecominfraproject.com>
Change-Id: I41a65e89eef763f82e41e52bc325ed2d488cb601
2021-04-30 16:03:21 +02:00
Jonas Mårtensson
3bcafc2345 Add some documentation about amplifier tilt setting
It is added to the Excel input files documentation.
(We should also have a topology json input file documentation but it
currently does not exist.)

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I3184e36090388155e826d1b09bc9c6bf28d623d0
2021-04-22 15:19:48 +02:00
Jonas Mårtensson
b58c089945 Change sign convention for amplifier tilt
As pointed out in GitHub issue #390, the normal convention for the sign
of amplifier tilt is to define it with regard to wavelength, i.e.
negative tilt means lower gain for longer wavelengths (lower
frequencies). Currently GNPy uses the opposite convention, which this
patch proposes to change.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I8f7829a3b0b0b710f7da013c525630a60b22a2b5
2021-04-21 13:19:56 +02:00
Jonas Mårtensson
a211e305c3 Define tilt target over the full amplifier bandwidth
Currently the tilt_target defined by a user is applied over the band of
propagating channels. This means for example that if only two channels
are propagated, the difference in gain between the two channels will be
equal to the tilt_target, independently of how close the two channels
are in frequency. I think it makes more sense to always define the
tilt_target over the full operational bandwidth of the amplifier.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I4f29de2edc4d0de239b34e0d8d678d964b6a0af3
2021-04-21 12:59:24 +02:00
Jonas Mårtensson
3a72ce84d0 Reverse order of values in example amplifier config files
As identified in GitHub issue #390, the dgt values (as well as gain and
nf ripple values) in example config json files are listed in order of
increasing wavelength (decreasing frequency) while the code assumes
values listed in the opposite order. This patch reverses the order of
values in affected files so that they are consistent with existing use
in the code.

Also, the f_min value in the Juniper-BoosterHG.json file is updated to
match measurement data so that interpolation is performed correctly.

Change-Id: I97a9d2f9be81380d1658bee5fa1ef4def3e1c537
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
2021-04-20 21:17:26 +02:00
Jan Kundrát
de09b4f8ce docs: Fix a typo
Change-Id: I370f6887872c268416623e93141fca3eb902499a
2021-04-20 17:58:18 +02:00
Jonas Mårtensson
b37248077c Specifying a list of EDFA type varieties for auto-design
This allows users to limit the choice of type_variety by auto-design
for an EDFA node by setting a "variety_list" attribute in the input
topology json file. One use-case is switchable gain EDFAs where the
two gain ranges can be modeled by two separate type varieties in the
equipment library. A user may know that such an EDFA will be used in
a node but not which gain range is optimal. The choice of gain range
can then be left to auto-design while not allowing any other
type_variety by specifying the node e.g. like this in the topology:

{
  "uid": "Edfa1",
  "type": "Edfa",
  "variety_list": ["foo_gain_range_1", "foo_gain_range_2"],
  ...
}

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: Ia69ef78f885e3a61310530b6b80da64e43758211
2021-01-21 13:09:48 +01:00
Jonas Mårtensson
b8e72511de Properly remove duplicate links in XLS conversion
The sanity_check function in convert.py removes duplicate links in the
input XLS file. However, it doesn't remove them from the links_by_city
dict. This has two consequences. Firstly, the output json will still
have duplicate connections. Since networkx.DiGraph.add_edge will only
add one edge anyway, this has no major impact. Secondly, sanity_check
will think that a degree-2 ILA node with duplicate links is higher
degree and change it to a ROADM node.

With this patch, duplicate links are removed also from links_by_city.

Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
Change-Id: I4be9ab225bc89277aec467a5bd60216b4aa31993
2021-01-09 17:39:33 +01:00
Jonas Mårtensson
549e04e925 Better naming and location of Roadm preamp/booster Edfas in auto-design
Currently when an Edfa is inserted by auto-design after a Roadm (i.e.
booster) it gets the same city attribute as the Roadm while an Edfa
inserted before a Roadm (preamp) gets the city attribute from the
preceding fiber. This is illogical and confusing. Also both the Edfa
preamp and booster get coordinates different from the Roadm (halfway
between the Roadm and the neighbor node). Since in practice the preamp
and booster are always colocated with the Roadm I think it makes more
sense to give them the same coordinates.

Also change how uid is assigned to an Edfa connected to a Roadm so that
it indicates whether it is a booster or a preamp.

Change-Id: I98718fe1e2914b5628e7cfd23fc28fb5708a8889
Signed-off-by: Jonas Mårtensson <jonas.martensson@ri.se>
2020-12-28 21:00:44 +01:00
48 changed files with 45524 additions and 38075 deletions

View File

@@ -1 +1,9 @@
comment: off
coverage:
status:
project:
default:
threshold: 5%
patch:
default:
only_pulls: true

View File

@@ -1,7 +1,7 @@
# Thanks for contributing to GNPy
If it isn't much trouble, please send your contribution as patches to our Gerrit.
Here's [how to submit patches](https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html), and here's a [list of stuff we are currently working on](https://review.gerrithub.io/p/Telecominfraproject/oopt-gnpy/+/dashboard/main:main).
Here's [how to submit patches](https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html), and here's a [list of stuff we are currently working on](https://review.gerrithub.io/q/project:Telecominfraproject/oopt-gnpy+status:open).
Just sign in via your existing GitHub account.
However, if you feel more comfortable with filing GitHub PRs, we can work with that too.

87
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,87 @@
on:
push:
pull_request:
branches:
- master
name: CI
jobs:
build:
name: Tox test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: fedora-python/tox-github-action@v0.4
with:
tox_env: ${{ matrix.tox_env }}
dnf_install: ${{ matrix.dnf_install }}
strategy:
matrix:
tox_env:
- py38
- py39
include:
- tox_env: docs
dnf_install: graphviz
pypi:
needs: build
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
name: PyPI packaging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'
- uses: casperdcl/deploy-pypi@bb869aafd89f657ceaafe9561d3b5584766c0f95
with:
password: ${{ secrets.PYPI_API_TOKEN }}
pip: wheel -w dist/ --no-deps .
upload: true
docker:
needs: build
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
name: Docker image
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: jktjkt
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Extract tag name
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'
with:
context: .
push: true
tags: |
telecominfraproject/oopt-gnpy:dev-${{ 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')
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')
with:
context: .
push: true
tags: |
telecominfraproject/oopt-gnpy:${{ steps.extract_tag_name.outputs.GIT_DESC }}

View File

@@ -1,4 +1,5 @@
build:
image: latest
python:
version: 3.6
version: 3.8
requirements_file: docs/requirements.txt

View File

@@ -14,6 +14,7 @@ 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:

View File

@@ -11,7 +11,7 @@
vars:
coverage_job_name_previous: tox-py38-cover-previous
coverage_job_name_current: tox-py38-cover
- tox-linters-diff:
- tox-linters-diff-n-report:
voting: false
- tox-py36-el8
- tox-docs-f32

View File

@@ -1,4 +1,4 @@
FROM python:3.7-slim
FROM python:3.9-slim
COPY . /oopt-gnpy
WORKDIR /oopt-gnpy
RUN apt update; apt install -y git

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
# GNPy: Optical Route Planning and DWDM Network Optimization
[![Install via pip](https://img.shields.io/pypi/v/gnpy)](https://pypi.org/project/gnpy/)
[![Python versions](https://img.shields.io/pypi/pyversions/gnpy)](https://pypi.org/project/gnpy/)
[![Documentation status](https://readthedocs.org/projects/gnpy/badge/?version=master)](http://gnpy.readthedocs.io/en/master/?badge=master)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Telecominfraproject/oopt-gnpy/build)](https://github.com/Telecominfraproject/oopt-gnpy/actions/workflows/main.yml)
[![Gerrit](https://img.shields.io/badge/patches-via%20Gerrit-blue)](https://review.gerrithub.io/q/project:Telecominfraproject/oopt-gnpy+is:open)
[![Contributors](https://img.shields.io/github/contributors-anon/Telecominfraproject/oopt-gnpy)](https://github.com/Telecominfraproject/oopt-gnpy/graphs/contributors)
[![Code Quality via LGTM.com](https://img.shields.io/lgtm/grade/python/github/Telecominfraproject/oopt-gnpy)](https://lgtm.com/projects/g/Telecominfraproject/oopt-gnpy/)
[![Code Coverage via codecov](https://img.shields.io/codecov/c/github/Telecominfraproject/oopt-gnpy)](https://codecov.io/gh/Telecominfraproject/oopt-gnpy)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3458319.svg)](https://doi.org/10.5281/zenodo.3458319)
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.
Together, we are building this tool for rapid development of production-grade route planning tools which is easily extensible to include custom network elements and performant to the scale of real-world mesh optical networks.
![GNPy with an OLS system](docs/images/GNPy-banner.png)
## Quick Start
Install either via [Docker](docs/install.rst#install-docker), or as a [Python package](docs/install.rst#install-pip).
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:
[![Running a simple simulation example](https://telecominfraproject.github.io/oopt-gnpy/docs/images/transmission_main_example.svg)](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/).

View File

@@ -1,248 +0,0 @@
.. image:: docs/images/GNPy-banner.png
:width: 100%
:align: left
:alt: GNPy with an OLS system
====================================================================
`gnpy`: mesh optical network route planning and optimization library
====================================================================
|pypi| |docs| |travis| |doi| |contributors| |codacy-quality| |codecov|
**`gnpy` is an open-source, community-developed library for building route
planning and optimization tools in real-world mesh optical networks.**
`gnpy <http://github.com/telecominfraproject/oopt-gnpy>`__ is:
--------------------------------------------------------------
- a sponsored project of the `OOPT/PSE <https://telecominfraproject.com/open-optical-packet-transport/>`_ working group of the `Telecom Infra Project <http://telecominfraproject.com>`_
- fully community-driven, fully open source library
- driven by a consortium of operators, vendors, and academic researchers
- intended for rapid development of production-grade route planning tools
- easily extensible to include custom network elements
- performant to the scale of real-world mesh optical networks
Documentation: https://gnpy.readthedocs.io
Get In Touch
~~~~~~~~~~~~
There are `weekly calls <https://telecominfraproject.workplace.com/events/702894886867547/>`__ 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/>`__.
How to Install
--------------
Install either via `Docker <docs/install.rst#install-docker>`__, or as a `Python package <docs/install.rst#install-pip>`__.
Instructions for First Use
--------------------------
``gnpy`` is a library for building route planning and optimization tools.
It ships with a number of example programs. Release versions will ship with
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
specific, delineated use cases to drive requirements for future
development.*
This example demonstrates how GNPy can be used to check the expected SNR at the end of the line by varying the channel input power:
.. image:: https://telecominfraproject.github.io/oopt-gnpy/docs/images/transmission_main_example.svg
: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>`_
You can specify a different network at the command line as follows. For
example, to use the CORONET Global network defined in
`gnpy/example-data/CORONET_Global_Topology.json <gnpy/example-data/CORONET_Global_Topology.json>`_:
.. code-block:: shell-session
$ gnpy-transmission-example $(gnpy-example-data)/CORONET_Global_Topology.json
It is also possible to use an Excel file input (for example
`gnpy/example-data/CORONET_Global_Topology.xls <gnpy/example-data/CORONET_Global_Topology.xls>`_).
The Excel file will be processed into a JSON file with the same prefix.
Further details about the Excel data structure are available `in the documentation <docs/excel.rst>`__.
The main transmission example will calculate the average signal OSNR and SNR
across network elements (transceiver, ROADMs, fibers, and amplifiers)
between two transceivers selected by the user. Additional details are provided by doing ``gnpy-transmission-example -h``. (By default, for the CORONET Global
network, it will show the transmission of spectral information between Abilene and Albany)
This script calculates the average signal OSNR = |OSNR| and SNR = |SNR|.
.. |OSNR| replace:: P\ :sub:`ch`\ /P\ :sub:`ase`
.. |SNR| replace:: P\ :sub:`ch`\ /(P\ :sub:`nli`\ +\ P\ :sub:`ase`)
|Pase| is the amplified spontaneous emission noise, and |Pnli| the non-linear
interference noise.
.. |Pase| replace:: P\ :sub:`ase`
.. |Pnli| replace:: P\ :sub:`nli`
Further Instructions for Use
----------------------------
Simulations are driven by a set of `JSON <docs/json.rst>`__ or `XLS <docs/excel.rst>`__ files.
The ``gnpy-transmission-example`` script propagates a spectrum of channels at 32 Gbaud, 50 GHz spacing and 0 dBm/channel.
Launch power can be overridden by using the ``--power`` argument.
Spectrum information is not yet parametrized but can be modified directly in the ``eqpt_config.json`` (via the ``SpectralInformation`` -SI- structure) to accommodate any baud rate or spacing.
The number of channel is computed based on ``spacing`` and ``f_min``, ``f_max`` values.
An experimental support for Raman amplification is available:
.. code-block:: shell-session
$ gnpy-transmission-example \
$(gnpy-example-data)/raman_edfa_example_network.json \
--sim $(gnpy-example-data)/sim_params.json --show-channels
Configuration of Raman pumps (their frequencies, power and pumping direction) is done via the `RamanFiber element in the network topology <gnpy/example-data/raman_edfa_example_network.json>`_.
General numeric parameters for simulaiton control are provided in the `gnpy/example-data/sim_params.json <gnpy/example-data/sim_params.json>`_.
Use ``gnpy-path-request`` to request several paths at once:
.. code-block:: shell-session
$ cd $(gnpy-example-data)
$ gnpy-path-request -o output_file.json \
meshTopologyExampleV2.xls meshTopologyExampleV2_services.json
This program operates on a network topology (`JSON <docs/json.rst>`__ or `Excel <docs/excel.rst>`__ format), processing the list of service requests (JSON or XLS again).
The service requests and reply formats are based on the `draft-ietf-teas-yang-path-computation-01 <https://tools.ietf.org/html/draft-ietf-teas-yang-path-computation-01>`__ with custom extensions (e.g., for transponder modes).
An example of the JSON input is provided in file `service-template.json`, while results are shown in `path_result_template.json`.
Important note: ``gnpy-path-request`` is not a network dimensionning tool: each service does not reserve spectrum, or occupy ressources such as transponders. It only computes path feasibility assuming the spectrum (between defined frequencies) is loaded with "nb of channels" spaced by "spacing" values as specified in the system parameters input in the service file, each cannel having the same characteristics in terms of baudrate, format,... as the service transponder. The transceiver element acts as a "logical starting/stopping point" for the spectral information propagation. At that point it is not meant to represent the capacity of add drop ports.
As a result transponder type is not part of the network info. it is related to the list of services requests.
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.
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
<jan.kundrat@telecominfraproject.com> or Gert Grammel <ggrammel@juniper.net>.
``gnpy`` contributions are currently limited to members of `TIP
<http://telecominfraproject.com>`_. Membership is free and open to all.
See the `Onboarding Guide
<https://github.com/Telecominfraproject/gnpy/wiki/Onboarding-Guide>`_ for
specific details on code contributions, or just `upload patches to our Gerrit
<https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html>`_.
See `AUTHORS.rst <AUTHORS.rst>`_ for past and present contributors.
Project Background
------------------
Data Centers are built upon interchangeable, highly standardized node and
network architectures rather than a sum of isolated solutions. This also
translates to optical networking. It leads to a push in enabling multi-vendor
optical network by disaggregating HW and SW functions and focusing on
interoperability. In this paradigm, the burden of responsibility for ensuring
the performance of such disaggregated open optical systems falls on the
operators. Consequently, operators and vendors are collaborating in defining
control models that can be readily used by off-the-shelf controllers. However,
node and network models are only part of the answer. To take reasonable
decisions, controllers need to incorporate logic to simulate and assess optical
performance. Hence, a vendor-independent optical quality estimator is required.
Given its vendor-agnostic nature, such an estimator needs to be driven by a
consortium of operators, system and component suppliers.
Founded in February 2016, the Telecom Infra Project (TIP) is an
engineering-focused initiative which is operator driven, but features
collaboration across operators, suppliers, developers, integrators, and
startups with the goal of disaggregating the traditional network deployment
approach. The groups ultimate goal is to help provide better connectivity for
communities all over the world as more people come on-line and demand more
bandwidth- intensive experiences like video, virtual reality and augmented
reality.
Within TIP, the Open Optical Packet Transport (OOPT) project group is chartered
with unbundling monolithic packet-optical network technologies in order to
unlock innovation and support new, more flexible connectivity paradigms.
The key to unbundling is the ability to accurately plan and predict the
performance of optical line systems based on an accurate simulation of optical
parameters. Under that OOPT umbrella, the Physical Simulation Environment (PSE)
working group set out to disrupt the planning landscape by providing an open
source simulation model which can be used freely across multiple vendor
implementations.
.. |docs| image:: https://readthedocs.org/projects/gnpy/badge/?version=master
:target: http://gnpy.readthedocs.io/en/master/?badge=master
:alt: Documentation Status
:scale: 100%
.. |travis| image:: https://travis-ci.com/Telecominfraproject/oopt-gnpy.svg?branch=master
:target: https://travis-ci.com/Telecominfraproject/oopt-gnpy
:alt: Build Status via Travis CI
:scale: 100%
.. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3458319.svg
:target: https://doi.org/10.5281/zenodo.3458319
:alt: DOI
:scale: 100%
.. |contributors| image:: https://img.shields.io/github/contributors-anon/Telecominfraproject/oopt-gnpy
:target: https://github.com/Telecominfraproject/oopt-gnpy/graphs/contributors
:alt: Code Contributors via GitHub
:scale: 100%
.. |codacy-quality| image:: https://img.shields.io/lgtm/grade/python/github/Telecominfraproject/oopt-gnpy
:target: https://lgtm.com/projects/g/Telecominfraproject/oopt-gnpy/
:alt: Code Quality via LGTM.com
:scale: 100%
.. |codecov| image:: https://img.shields.io/codecov/c/github/Telecominfraproject/oopt-gnpy
:target: https://codecov.io/gh/Telecominfraproject/oopt-gnpy
:alt: Code Coverage via codecov
:scale: 100%
.. |pypi| image:: https://img.shields.io/pypi/v/gnpy
:target: https://pypi.org/project/gnpy/
:alt: Install via PyPI
:scale: 100%
TIP OOPT/PSE & PSE WG Charter
-----------------------------
We believe that openly sharing ideas, specifications, and other intellectual
property is the key to maximizing innovation and reducing complexity
TIP OOPT/PSE's goal is to build an end-to-end simulation environment which
defines the network models of the optical device transfer functions and their
parameters. This environment will provide validation of the optical
performance requirements for the TIP OLS building blocks.
- The model may be approximate or complete depending on the network complexity.
Each model shall be validated against the proposed network scenario.
- The environment must be able to process network models from multiple vendors,
and also allow users to pick any implementation in an open source framework.
- The PSE will influence and benefit from the innovation of the DTC, API, and
OLS working groups.
- The PSE represents a step along the journey towards multi-layer optimization.
License
-------
``gnpy`` is distributed under a standard BSD 3-Clause License.
See `LICENSE <LICENSE>`__ for more details.

58
docs/about-project.md Normal file
View File

@@ -0,0 +1,58 @@
(about-gnpy)=
# About the project
GNPy is a sponsored project of the [OOPT/PSE](https://telecominfraproject.com/open-optical-packet-transport/) working group of the [Telecom Infra Project](http://telecominfraproject.com).
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
`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).
`gnpy` contributions are currently limited to members of [TIP](http://telecominfraproject.com).
Membership is free and open to all.
See the [Onboarding Guide](https://github.com/Telecominfraproject/gnpy/wiki/Onboarding-Guide) for specific details on code contributions, or just [upload patches to our Gerrit](https://review.gerrithub.io/Documentation/intro-gerrit-walkthrough-github.html).
Here is [what we are currently working on](https://review.gerrithub.io/q/project:Telecominfraproject/oopt-gnpy+status:open).
## Project Background
Data Centers are built upon interchangeable, highly standardized node and network architectures rather than a sum of isolated solutions.
This also translates to optical networking.
It leads to a push in enabling multi-vendor optical network by disaggregating HW and SW functions and focusing on interoperability.
In this paradigm, the burden of responsibility for ensuring the performance of such disaggregated open optical systems falls on the operators.
Consequently, operators and vendors are collaborating in defining control models that can be readily used by off-the-shelf controllers.
However, node and network models are only part of the answer.
To take reasonable decisions, controllers need to incorporate logic to simulate and assess optical performance.
Hence, a vendor-independent optical quality estimator is required.
Given its vendor-agnostic nature, such an estimator needs to be driven by a consortium of operators, system and component suppliers.
Founded in February 2016, the Telecom Infra Project (TIP) is an engineering-focused initiative which is operator driven, but features collaboration across operators, suppliers, developers, integrators, and startups with the goal of disaggregating the traditional network deployment approach.
The groups ultimate goal is to help provide better connectivity for communities all over the world as more people come on-line and demand more bandwidth-intensive experiences like video, virtual reality and augmented reality.
Within TIP, the Open Optical Packet Transport (OOPT) project group is chartered with unbundling monolithic packet-optical network technologies in order to unlock innovation and support new, more flexible connectivity paradigms.
The key to unbundling is the ability to accurately plan and predict the performance of optical line systems based on an accurate simulation of optical parameters.
Under that OOPT umbrella, the Physical Simulation Environment (PSE) working group set out to disrupt the planning landscape by providing an open source simulation model which can be used freely across multiple vendor implementations.
## TIP OOPT/PSE & PSE WG Charter
We believe that openly sharing ideas, specifications, and other intellectual property is the key to maximizing innovation and reducing complexity
TIP OOPT/PSE's goal is to build an end-to-end simulation environment which defines the network models of the optical device transfer functions and their parameters.
This environment will provide validation of the optical performance requirements for the TIP OLS building blocks.
- The model may be approximate or complete depending on the network complexity.
Each model shall be validated against the proposed network scenario.
- The environment must be able to process network models from multiple vendors, and also allow users to pick any implementation in an open source framework.
- The PSE will influence and benefit from the innovation of the DTC, API, and OLS working groups.
- The PSE represents a step along the journey towards multi-layer optimization.
License
-------
GNPy is distributed under a standard BSD 3-Clause License.

View File

@@ -237,7 +237,7 @@ GNPy supports several different noise models with varying level of accuracy.
When in doubt, contact your vendor's technical support and ask them to :ref:`contribute their equipment descriptions<extending-edfa>` to GNPy.
The most accurate noise models describe the resulting NF of an EDFA as a third-degree polynomial.
GNPy understands polynomials as a NF-yielding function of the :ref:`gain difference from the optimal gain<ext-nf-model-polynomial-NF>`, or as a function of the input power resulting in an :ref:`incremental OSNR as used in OpenROADM<ext-nf-model-polynomial-OSNR-OpenROADM>`.
GNPy understands polynomials as a NF-yielding function of the :ref:`gain difference from the optimal gain<ext-nf-model-polynomial-NF>`, or as a function of the input power resulting in an incremental OSNR as used in :ref:`OpenROADM inline amplifiers<ext-nf-model-polynomial-OSNR-OpenROADM>` and :ref:`OpenROADM booster/preamps in the ROADMs<ext-nf-model-noise-mask-OpenROADM>`.
For scenarios where the vendor has not yet contributed an accurate EDFA NF description to GNPy, it is possible to approximate the characteristics via an operator-focused, min-max NF model.
.. _nf-model-min-max-NF:

View File

@@ -34,10 +34,15 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.githubpages',
'sphinxcontrib.bibtex',
'pbr.sphinxext',
'sphinx.ext.graphviz',
'myst_parser',
]
myst_enable_extensions = [
"deflist",
"dollarmath",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@@ -185,7 +185,8 @@ This generates a text file meshTopologyExampleV2_eqt_sheet.txt whose content ca
- *att_in* and *att_out* are not mandatory and are not used yet. They are the value of the attenuator at input and output of amplifier (in dB).
If filled they must contain positive numbers.
- *tilt* --TODO--
- **tilt**, in dB, is not mandatory. It is the target gain tilt over the full amplfifier bandwidth and is defined with regard to wavelength, i.e. negative tilt means lower gain
for higher wavelengths (lower frequencies). If not filled, the default value is 0.
- **delta_p**, in dBm, is not mandatory. If filled it is used to set the output target power per channel at the output of the amplifier, if power_mode is True. The output power is then set to power_dbm + delta_power.

View File

@@ -42,16 +42,31 @@ In that case, use:
.. _ext-nf-model-polynomial-OSNR-OpenROADM:
Polynomial OSNR (OpenROADM-style)
*********************************
Polynomial OSNR (OpenROADM-style for inline amplifier)
******************************************************
This model is useful for amplifiers compliant to the OpenROADM specification for ILA.
In OpenROADM, amplifier performance is evaluated via its incremental OSNR, which is a function of the input power.
This model is useful for amplifiers compliant to the OpenROADM specification for ILA (an in-line amplifier).
The amplifier performance is evaluated via its incremental OSNR, which is a function of the input power.
.. math::
\text{OSNR}_\text{inc}(P_\text{in}) = \text{a}P_\text{in}^3 + \text{b}P_\text{in}^2 + \text{c}P_\text{in} + \text{d}
.. _ext-nf-model-noise-mask-OpenROADM:
Noise mask (OpenROADM-style for combined preamp and booster)
************************************************************
Unlike GNPy which simluates the preamplifier and the booster separately as two amplifiers for best accuracy, the OpenROADM specification mandates a certain performance level for a combination of these two amplifiers.
For the express path, the effective noise mask comprises the preamplifier and the booster.
When terminating a channel, the same effective noise mask is mandated for a combination of the preamplifier and the drop stage.
GNPy emulates this specification via two special NF models:
- The ``openroadm_preamp`` NF model for preamplifiers.
This NF model provides all of the linear impairments to the signal, including those which are incured by the booster in a real network.
- The ``openroadm_booster`` NF model is a special "zero noise" faux amplifier in place of the booster.
.. _ext-nf-model-min-max-NF:
Min-max NF

View File

@@ -8,11 +8,13 @@ in real-world mesh optical networks. It is based on the Gaussian Noise Model.
.. toctree::
:maxdepth: 4
intro
concepts
install
json
excel
extending
about-project
model
gnpy-api

95
docs/intro.rst Normal file
View File

@@ -0,0 +1,95 @@
.. _intro:
Introduction
============
``gnpy`` is a library for building route planning and optimization tools.
It ships with a number of example programs. Release versions will ship with
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
specific, delineated use cases to drive requirements for future
development.*
This example demonstrates how GNPy can be used to check the expected SNR at the end of the line by varying the channel input power:
.. image:: https://telecominfraproject.github.io/oopt-gnpy/docs/images/transmission_main_example.svg
: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>`_
You can specify a different network at the command line as follows. For
example, to use the CORONET Global network defined in
`gnpy/example-data/CORONET_Global_Topology.json <gnpy/example-data/CORONET_Global_Topology.json>`_:
.. code-block:: shell-session
$ gnpy-transmission-example $(gnpy-example-data)/CORONET_Global_Topology.json
It is also possible to use an Excel file input (for example
`gnpy/example-data/CORONET_Global_Topology.xls <gnpy/example-data/CORONET_Global_Topology.xls>`_).
The Excel file will be processed into a JSON file with the same prefix.
Further details about the Excel data structure are available `in the documentation <docs/excel.rst>`__.
The main transmission example will calculate the average signal OSNR and SNR
across network elements (transceiver, ROADMs, fibers, and amplifiers)
between two transceivers selected by the user. Additional details are provided by doing ``gnpy-transmission-example -h``. (By default, for the CORONET Global
network, it will show the transmission of spectral information between Abilene and Albany)
This script calculates the average signal OSNR = |OSNR| and SNR = |SNR|.
.. |OSNR| replace:: P\ :sub:`ch`\ /P\ :sub:`ase`
.. |SNR| replace:: P\ :sub:`ch`\ /(P\ :sub:`nli`\ +\ P\ :sub:`ase`)
|Pase| is the amplified spontaneous emission noise, and |Pnli| the non-linear
interference noise.
.. |Pase| replace:: P\ :sub:`ase`
.. |Pnli| replace:: P\ :sub:`nli`
Further Instructions for Use
----------------------------
Simulations are driven by a set of `JSON <docs/json.rst>`__ or `XLS <docs/excel.rst>`__ files.
The ``gnpy-transmission-example`` script propagates a spectrum of channels at 32 Gbaud, 50 GHz spacing and 0 dBm/channel.
Launch power can be overridden by using the ``--power`` argument.
Spectrum information is not yet parametrized but can be modified directly in the ``eqpt_config.json`` (via the ``SpectralInformation`` -SI- structure) to accommodate any baud rate or spacing.
The number of channel is computed based on ``spacing`` and ``f_min``, ``f_max`` values.
An experimental support for Raman amplification is available:
.. code-block:: shell-session
$ gnpy-transmission-example \
$(gnpy-example-data)/raman_edfa_example_network.json \
--sim $(gnpy-example-data)/sim_params.json --show-channels
Configuration of Raman pumps (their frequencies, power and pumping direction) is done via the `RamanFiber element in the network topology <gnpy/example-data/raman_edfa_example_network.json>`_.
General numeric parameters for simulation control are provided in the `gnpy/example-data/sim_params.json <gnpy/example-data/sim_params.json>`_.
Use ``gnpy-path-request`` to request several paths at once:
.. code-block:: shell-session
$ cd $(gnpy-example-data)
$ gnpy-path-request -o output_file.json \
meshTopologyExampleV2.xls meshTopologyExampleV2_services.json
This program operates on a network topology (`JSON <docs/json.rst>`__ or `Excel <docs/excel.rst>`__ format), processing the list of service requests (JSON or XLS again).
The service requests and reply formats are based on the `draft-ietf-teas-yang-path-computation-01 <https://tools.ietf.org/html/draft-ietf-teas-yang-path-computation-01>`__ with custom extensions (e.g., for transponder modes).
An example of the JSON input is provided in file `service-template.json`, while results are shown in `path_result_template.json`.
Important note: ``gnpy-path-request`` is not a network dimensionning tool: each service does not reserve spectrum, or occupy ressources such as transponders. It only computes path feasibility assuming the spectrum (between defined frequencies) is loaded with "nb of channels" spaced by "spacing" values as specified in the system parameters input in the service file, each cannel having the same characteristics in terms of baudrate, format,... as the service transponder. The transceiver element acts as a "logical starting/stopping point" for the spectral information propagation. At that point it is not meant to represent the capacity of add drop ports.
As a result transponder type is not part of the network info. it is related to the list of services requests.
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.

View File

@@ -11,8 +11,7 @@ Design and transmission parameters are defined in a dedicated json file.
By default, this information is read from `gnpy/example-data/eqpt_config.json <https://github.com/Telecominfraproject/oopt-gnpy/blob/master/gnpy/example-data/eqpt_config.json>`_.
This file defines the equipment libraries that can be customized (EDFAs, fibers, and transceivers).
It also defines the simulation parameters (spans, ROADMs, and the spectral
information to transmit.)
It also defines the simulation parameters (spans, ROADMs, and the spectral information to transmit.)
EDFA
~~~~
@@ -20,9 +19,20 @@ EDFA
The EDFA equipment library is a list of supported amplifiers. New amplifiers
can be added and existing ones removed. Three different noise models are available:
1. ``'type_def': 'variable_gain'`` is a simplified model simulating a 2-coil EDFA with internal, input and output VOAs. The NF vs gain response is calculated accordingly based on the input parameters: ``nf_min``, ``nf_max``, and ``gain_flatmax``. It is not a simple interpolation but a 2-stage NF calculation.
2. ``'type_def': 'fixed_gain'`` is a fixed gain model. `NF == Cte == nf0` if `gain_min < gain < gain_flatmax`
3. ``'type_def': None`` is an advanced model. A detailed JSON configuration file is required (by default `gnpy/example-data/std_medium_gain_advanced_config.json <https://github.com/Telecominfraproject/oopt-gnpy/blob/master/gnpy/example-data/std_medium_gain_advanced_config.json>`_). It uses a 3rd order polynomial where NF = f(gain), NF_ripple = f(frequency), gain_ripple = f(frequency), N-array dgt = f(frequency). Compared to the previous models, NF ripple and gain ripple are modelled.
1. ``'type_def': 'variable_gain'`` is a simplified model simulating a 2-coil EDFA with internal, input and output VOAs.
The NF vs gain response is calculated accordingly based on the input parameters: ``nf_min``, ``nf_max``, and ``gain_flatmax``.
It is not a simple interpolation but a 2-stage NF calculation.
2. ``'type_def': 'fixed_gain'`` is a fixed gain model.
`NF == Cte == nf0` if `gain_min < gain < gain_flatmax`
3. ``'type_def': 'openroadm'`` models the incremental OSNR contribution as a function of input power.
It is suitable for inline amplifiers that conform to the OpenROADM specification.
The input parameters are coefficients of the :ref:`third-degree polynomial<ext-nf-model-polynomial-OSNR-OpenROADM>`.
4. ``'type_def': 'openroadm_preamp'`` and ``openroadm_booster`` approximate the :ref:`preamp and booster within an OpenROADM network<ext-nf-model-noise-mask-OpenROADM>`.
No extra parameters specific to the NF model are accepted.
5. ``'type_def': 'advanced_model'`` is an advanced model.
A detailed JSON configuration file is required (by default `gnpy/example-data/std_medium_gain_advanced_config.json <https://github.com/Telecominfraproject/oopt-gnpy/blob/master/gnpy/example-data/std_medium_gain_advanced_config.json>`_).
It uses a 3rd order polynomial where NF = f(gain), NF_ripple = f(frequency), gain_ripple = f(frequency), N-array dgt = f(frequency).
Compared to the previous models, NF ripple and gain ripple are modelled.
For all amplifier models:
@@ -49,22 +59,25 @@ Fiber
The fiber library currently describes SSMF and NZDF but additional fiber types can be entered by the user following the same model:
+----------------------+-----------+-----------------------------------------+
| field | type | description |
+======================+===========+=========================================+
| ``type_variety`` | (string) | a unique name to ID the fiber in the |
| | | JSON or Excel template topology input |
| | | file |
+----------------------+-----------+-----------------------------------------+
| ``dispersion`` | (number) | (s.m-1.m-1) |
+----------------------+-----------+-----------------------------------------+
| ``dispersion_slope`` | (number) | (s.m-1.m-1.m-1) |
+----------------------+-----------+-----------------------------------------+
| ``gamma`` | (number) | 2pi.n2/(lambda*Aeff) (w-1.m-1) |
+----------------------+-----------+-----------------------------------------+
| ``pmd_coef`` | (number) | Polarization mode dispersion (PMD) |
| | | coefficient. (s.sqrt(m)-1) |
+----------------------+-----------+-----------------------------------------+
+----------------------+-----------+------------------------------------------+
| field | type | description |
+======================+===========+==========================================+
| ``type_variety`` | (string) | a unique name to ID the fiber in the |
| | | JSON or Excel template topology input |
| | | file |
+----------------------+-----------+------------------------------------------+
| ``dispersion`` | (number) | In :math:`s \times m^{-1} \times m^{-1}`.|
+----------------------+-----------+------------------------------------------+
| ``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}`. |
+----------------------+-----------+------------------------------------------+
| ``pmd_coef`` | (number) | Polarization mode dispersion (PMD) |
| | | coefficient. In |
| | | :math:`s\times\sqrt{m}^{-1}`. |
+----------------------+-----------+------------------------------------------+
Transceiver
~~~~~~~~~~~
@@ -81,7 +94,7 @@ used to determine the service list path feasibility when running the
| | | the JSON or Excel template topology |
| | | input file |
+----------------------+-----------+-----------------------------------------+
| ``frequency`` | (number) | Min/max as below. |
| ``frequency`` | (number) | Min/max central channel frequency. |
+----------------------+-----------+-----------------------------------------+
| ``mode`` | (number) | A list of modes supported by the |
| | | transponder. New modes can be added at |
@@ -154,24 +167,17 @@ Global parameters
The following options are still defined in ``eqpt_config.json`` for legacy reasons, but
they do not correspond to tangible network devices.
Auto-design automatically creates EDFA amplifier network elements when they are
missing, after a fiber, or between a ROADM and a fiber. This auto-design
functionality can be manually and locally deactivated by introducing a ``Fused``
network element after a ``Fiber`` or a ``Roadm`` that doesn't need amplification.
The amplifier is chosen in the EDFA list of the equipment library based on
gain, power, and NF criteria. Only the EDFA that are marked
``'allowed_for_design': true`` are considered.
Auto-design automatically creates EDFA amplifier network elements when they are missing, after a fiber, or between a ROADM and a fiber.
This auto-design functionality can be manually and locally deactivated by introducing a ``Fused`` network element after a ``Fiber`` or a ``Roadm`` that doesn't need amplification.
The amplifier is chosen in the EDFA list of the equipment library based on gain, power, and NF criteria.
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.
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.
Span
~~~~
Span configuration is not a list (which may change
in later releases) and the user can only modify the value of existing
parameters:
Span configuration is not a list (which may change in later releases) and the user can only modify the value of existing parameters:
+-------------------------------------+-----------+---------------------------------------------+
| field | type | description |
@@ -297,16 +303,18 @@ parameters:
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.
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.
+----------------------+-----------+-------------------------------------------+
| field | type | description |
+======================+===========+===========================================+
| ``f_min``, | (number) | In Hz. Carrier min max excursion. |
| ``f_max`` | | |
| ``f_min``, | (number) | In Hz. Define spectrum boundaries. Note |
| ``f_max`` | | that due to backward compatibility, the |
| | | first channel central frequency is placed |
| | | at :math:`f_{min} + spacing` and the last |
| | | one at :math:`f_{max}`. |
+----------------------+-----------+-------------------------------------------+
| ``baud_rate`` | (number) | In Hz. Simulated baud rate. |
+----------------------+-----------+-------------------------------------------+

7
docs/requirements.txt Normal file
View File

@@ -0,0 +1,7 @@
alabaster>=0.7.12,<1
docutils>=0.15.2,<1
myst-parser>=0.14.0,<1
Pygments>=2.7.4,<3
rstcheck
Sphinx>=3.5.0,<4
sphinxcontrib-bibtex>=0.4.2,<1

View File

@@ -52,10 +52,6 @@ class _Node:
if type_variety:
self.type_variety = type_variety
@property
def coords(self):
return self.lng, self.lat
@property
def location(self):
return self.metadata['location']
@@ -169,10 +165,10 @@ class Transceiver(_Node):
return '\n'.join([f'{type(self).__name__} {self.uid}',
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' SNR total (signal bw, dB): {snr:.2f}',
f' SNR total (0.1nm, dB): {snr_01nm:.2f}',
f' CD (ps/nm): {cd:.2f}',
f' PMD (ps): {pmd:.2f}'])
@@ -221,7 +217,7 @@ class Roadm(_Node):
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!r}'])
f' pch out (dBm): {self.effective_pch_out_db:.2f}'])
def propagate(self, pref, *carriers, degree):
# pin_target and loss are read from eqpt_config.json['Roadm']
@@ -345,18 +341,12 @@ class Fiber(_Node):
return '\n'.join([f'{type(self).__name__} {self.uid}',
f' type_variety: {self.type_variety}',
f' length (km): '
f'{round(self.params.length * 1e-3):.2f}',
f' length (km): {self.params.length * 1e-3:.2f}',
f' pad att_in (dB): {self.params.att_in:.2f}',
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!r}'])
@property
def fiber_loss(self):
"""Fiber loss in dB, not including padding attenuator"""
return self.params.loss_coef * self.params.length + self.params.con_in + self.params.con_out
f' pch out (dBm): {self.pch_out_db:.2f}'])
@property
def loss(self):
@@ -557,6 +547,7 @@ class Edfa(_Node):
params = {}
if operational is None:
operational = {}
self.variety_list = kwargs.pop('variety_list', None)
super().__init__(
*args,
params=EdfaParams(**params),
@@ -623,9 +614,9 @@ 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): {self.delta_p!r}',
f' target pch (dBm): {self.target_pch_out_db!r}',
f' effective pch (dBm): {self.effective_pch_out_db!r}',
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' output VOA (dB): {self.out_voa:.2f}'])
def interpol_params(self, frequencies, pin, baud_rates, pref):
@@ -685,6 +676,13 @@ class Edfa(_Node):
pin_ch = self.pin_db - lin2db(self.nch)
# model OSNR = f(Pin)
nf_avg = pin_ch - polyval(nf_model.nf_coef, pin_ch) + 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
elif type_def == 'openroadm_booster':
# model a zero-noise amp with "infinitely negative" (in dB) NF
nf_avg = float('-inf')
elif type_def == 'advanced_model':
nf_avg = polyval(nf_fit_coeff, -dg)
return nf_avg + pad, pad
@@ -805,25 +803,19 @@ class Edfa(_Node):
if len(self.interpol_dgt) == 1:
return array([self.effective_gain])
nb_channel = arange(len(self.interpol_dgt))
# TODO|jla: find a way to use these or lose them. Primarily we should have
# a way to determine if exceeding the gain or output power of the amp
tot_in_power_db = self.pin_db # Pin in W
# linear fit to get the
p = polyfit(nb_channel, self.interpol_dgt, 1)
p = polyfit(self.channel_freq, self.interpol_dgt, 1)
dgt_slope = p[0]
# Calculate the target slope - currently assumes equal spaced channels
# TODO|jla: support arbitrary channel spacing
targ_slope = self.tilt_target / (len(nb_channel) - 1)
# Calculate the target slope
targ_slope = -self.tilt_target / (self.params.f_max - self.params.f_min)
# first estimate of DGT scaling
if abs(dgt_slope) > 0.001: # check for zero value due to flat dgt
dgts1 = targ_slope / dgt_slope
else:
dgts1 = 0
dgts1 = targ_slope / dgt_slope if dgt_slope != 0. else 0.
# when simple_opt is true, make 2 attempts to compute gain and
# the internal voa value. This is currently here to provide direct

View File

@@ -156,52 +156,45 @@ def target_power(network, node, equipment): # get_fiber_dp
return dp
_fiber_fused_types = (elements.Fused, elements.Fiber)
def prev_node_generator(network, node):
"""fused spans interest:
iterate over all predecessors while they are Fused or Fiber type"""
iterate over all predecessors while they are either Fused or Fibers succeeded by Fused"""
try:
prev_node = next(network.predecessors(node))
except StopIteration:
if isinstance(node, elements.Transceiver):
return
raise NetworkTopologyError(f'Node {node.uid} is not properly connected, please check network topology')
# yield and re-iterate
if isinstance(prev_node, elements.Fused) or isinstance(node, elements.Fused):
if ((isinstance(prev_node, elements.Fused) and isinstance(node, _fiber_fused_types)) or
(isinstance(prev_node, _fiber_fused_types) and isinstance(node, elements.Fused))):
yield prev_node
yield from prev_node_generator(network, prev_node)
else:
StopIteration
def next_node_generator(network, node):
"""fused spans interest:
iterate over all successors while they are Fused or Fiber type"""
iterate over all predecessors while they are either Fused or Fibers preceded by Fused"""
try:
next_node = next(network.successors(node))
except StopIteration:
raise NetworkTopologyError('Node {node.uid} is not properly connected, please check network topology')
# yield and re-iterate
if isinstance(next_node, elements.Fused) or isinstance(node, elements.Fused):
if isinstance(node, elements.Transceiver):
return
raise NetworkTopologyError(f'Node {node.uid} is not properly connected, please check network topology')
if ((isinstance(next_node, elements.Fused) and isinstance(node, _fiber_fused_types)) or
(isinstance(next_node, _fiber_fused_types) and isinstance(node, elements.Fused))):
yield next_node
yield from next_node_generator(network, next_node)
else:
StopIteration
def span_loss(network, node):
"""Fused span interest:
return the total span loss of all the fibers spliced by a Fused node"""
"""Total loss of a span (Fiber and Fused nodes) which contains the given node"""
loss = node.loss if node.passive else 0
try:
prev_node = next(network.predecessors(node))
if isinstance(prev_node, elements.Fused):
loss += sum(n.loss for n in prev_node_generator(network, node))
except StopIteration:
pass
try:
next_node = next(network.successors(node))
if isinstance(next_node, elements.Fused):
loss += sum(n.loss for n in next_node_generator(network, node))
except StopIteration:
pass
loss += sum(n.loss for n in prev_node_generator(network, node))
loss += sum(n.loss for n in next_node_generator(network, node))
return loss
@@ -294,22 +287,17 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
else:
raman_allowed = False
# implementation of restrictions on roadm boosters
if isinstance(prev_node, elements.Roadm):
if prev_node.restrictions['booster_variety_list']:
if node.params.type_variety == '':
if node.variety_list and isinstance(node.variety_list, list):
restrictions = node.variety_list
elif isinstance(prev_node, elements.Roadm) and prev_node.restrictions['booster_variety_list']:
# implementation of restrictions on roadm boosters
restrictions = prev_node.restrictions['booster_variety_list']
else:
restrictions = None
elif isinstance(next_node, elements.Roadm):
# implementation of restrictions on roadm preamp
if next_node.restrictions['preamp_variety_list']:
elif isinstance(next_node, elements.Roadm) and next_node.restrictions['preamp_variety_list']:
# implementation of restrictions on roadm preamp
restrictions = next_node.restrictions['preamp_variety_list']
else:
restrictions = None
else:
restrictions = None
if node.params.type_variety == '':
edfa_variety, power_reduction = select_edfa(raman_allowed, gain_target, power_target, equipment, node.uid, restrictions)
extra_params = equipment['Edfa'][edfa_variety]
node.params.update_params(extra_params.__dict__)
@@ -342,21 +330,22 @@ def set_egress_amplifier(network, this_node, equipment, pref_ch_db, pref_total_d
if isinstance(this_node, elements.Roadm):
this_node.per_degree_pch_out_db = {k: v for k, v in this_node_degree.items()}
def add_egress_amplifier(network, node):
next_nodes = [n for n in network.successors(node)
def add_roadm_booster(network, roadm):
next_nodes = [n for n in network.successors(roadm)
if not (isinstance(n, elements.Transceiver) or isinstance(n, elements.Fused) or isinstance(n, elements.Edfa))]
# no amplification for fused spans or TRX
for i, next_node in enumerate(next_nodes):
network.remove_edge(node, next_node)
for next_node in next_nodes:
network.remove_edge(roadm, next_node)
amp = elements.Edfa(
uid=f'Edfa{i}_{node.uid}',
uid=f'Edfa_booster_{roadm.uid}_to_{next_node.uid}',
params={},
metadata={
'location': {
'latitude': (node.lat + next_node.lat) / 2,
'longitude': (node.lng + next_node.lng) / 2,
'city': node.loc.city,
'region': node.loc.region,
'latitude': roadm.lat,
'longitude': roadm.lng,
'city': roadm.loc.city,
'region': roadm.loc.region,
}
},
operational={
@@ -364,11 +353,62 @@ def add_egress_amplifier(network, node):
'tilt_target': 0,
})
network.add_node(amp)
if isinstance(node, elements.Fiber):
edgeweight = node.params.length
network.add_edge(roadm, amp, weight=0.01)
network.add_edge(amp, next_node, weight=0.01)
def add_roadm_preamp(network, roadm):
prev_nodes = [n for n in network.predecessors(roadm)
if not (isinstance(n, elements.Transceiver) or isinstance(n, elements.Fused) or isinstance(n, elements.Edfa))]
# no amplification for fused spans or TRX
for prev_node in prev_nodes:
network.remove_edge(prev_node, roadm)
amp = elements.Edfa(
uid=f'Edfa_preamp_{roadm.uid}_from_{prev_node.uid}',
params={},
metadata={
'location': {
'latitude': roadm.lat,
'longitude': roadm.lng,
'city': roadm.loc.city,
'region': roadm.loc.region,
}
},
operational={
'gain_target': None,
'tilt_target': 0,
})
network.add_node(amp)
if isinstance(prev_node, elements.Fiber):
edgeweight = prev_node.params.length
else:
edgeweight = 0.01
network.add_edge(node, amp, weight=edgeweight)
network.add_edge(prev_node, amp, weight=edgeweight)
network.add_edge(amp, roadm, weight=0.01)
def add_inline_amplifier(network, fiber):
next_node = next(network.successors(fiber))
if isinstance(next_node, elements.Fiber) or isinstance(next_node, elements.RamanFiber):
# no amplification for fused spans or TRX
network.remove_edge(fiber, next_node)
amp = elements.Edfa(
uid=f'Edfa_{fiber.uid}',
params={},
metadata={
'location': {
'latitude': (fiber.lat + next_node.lat) / 2,
'longitude': (fiber.lng + next_node.lng) / 2,
'city': fiber.loc.city,
'region': fiber.loc.region,
}
},
operational={
'gain_target': None,
'tilt_target': 0,
})
network.add_node(amp)
network.add_edge(fiber, amp, weight=fiber.params.length)
network.add_edge(amp, next_node, weight=0.01)
@@ -407,8 +447,8 @@ def split_fiber(network, fiber, bounds, target_length, equipment):
fiber.params.length = new_length
xpos = [prev_node.lng + (next_node.lng - prev_node.lng) * (n + 1) / (n_spans + 1) for n in range(n_spans)]
ypos = [prev_node.lat + (next_node.lat - prev_node.lat) * (n + 1) / (n_spans + 1) for n in range(n_spans)]
xpos = [prev_node.lng + (next_node.lng - prev_node.lng) * (n + 0.5) / n_spans for n in range(n_spans)]
ypos = [prev_node.lat + (next_node.lat - prev_node.lat) * (n + 0.5) / n_spans for n in range(n_spans)]
for span, lng, lat in zip(range(n_spans), xpos, ypos):
new_span = elements.Fiber(uid=f'{fiber.uid}_({span+1}/{n_spans})',
type_variety=fiber.type_variety,
@@ -487,12 +527,15 @@ def build_network(network, equipment, pref_ch_db, pref_total_db):
for fiber in fibers:
split_fiber(network, fiber, bounds, target_length, equipment)
amplified_nodes = [n for n in network.nodes() if isinstance(n, elements.Fiber) or isinstance(n, elements.Roadm)]
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)
for node in amplified_nodes:
add_egress_amplifier(network, node)
fibers = [f for f in network.nodes() if isinstance(f, elements.Fiber)]
for fiber in fibers:
add_inline_amplifier(network, fiber)
roadms = [r for r in amplified_nodes if isinstance(r, elements.Roadm)]
for roadm in roadms:
set_egress_amplifier(network, roadm, equipment, pref_ch_db, pref_total_db)

View File

@@ -359,7 +359,7 @@ class RamanSolver:
cr = interp_cr(freq_diff)
# z propagation axis
z = arange(0, fiber_length + 1, z_resolution)
z = append(arange(0, fiber_length, z_resolution), fiber_length)
def ode_function(z, p):
return self._ode_stimulated_raman(z, p, alphap_fiber, freq_array, cr, prop_direct)
@@ -484,7 +484,7 @@ class NliSolver:
eta_matrix = self._compute_eta_matrix(carrier, *carriers)
carrier_nli = self._carrier_nli_from_eta_matrix(eta_matrix, carrier, *carriers)
else:
raise ValueError(f'Method {sim_params.nli_params.method_nli} not implemented.')
raise ValueError(f'Method {sim_params.nli_params.nli_method_name} not implemented.')
return carrier_nli

View File

@@ -1,13 +1,13 @@
{
"nf_fit_coeff": [
"nf_fit_coeff": [
0.0008,
0.0272,
-0.2249,
6.4902
],
"f_min": 191.35e12,
"f_max": 196.1e12,
"nf_ripple": [
],
"f_min": 191.4e12,
"f_max": 196.1e12,
"nf_ripple": [
0.0,
0.0,
0.0,
@@ -58,103 +58,103 @@
0.0
],
"gain_ripple": [
0.15017064489112,
0.14157768006701,
0.00223094639866,
-0.06701528475711,
-0.05982935510889,
-0.01028161641541,
0.02740682579566,
0.02795958961474,
0.00107516750419,
-0.02199015912898,
-0.00877407872698,
0.0453465242881,
0.1204721524288,
0.18936662479061,
0.23826109715241,
0.26956762981574,
0.27836159966498,
0.26941687604691,
0.23579878559464,
0.18147717755444,
0.1191656197655,
0.05921587102177,
0.01509526800668,
-0.01053287269681,
-0.02475397822447,
-0.01847257118928,
-0.00420121440538,
0.01584903685091,
0.0399193886097,
0.04494451423784,
0.04961788107202,
0.03378873534338,
0.01027114740367,
-0.01319618927973,
-0.04962835008375,
-0.0765630234506,
-0.10606051088777,
-0.13550774706866,
-0.15460322445561,
-0.17113588777219,
-0.18053287269681,
-0.18324644053602,
-0.19440221943049,
-0.20897508375209,
-0.23575900335007,
-0.25188965661642,
-0.15656302345061,
-0.22244242043552,
-0.15656302345061
-0.25188965661642,
-0.23575900335007,
-0.20897508375209,
-0.19440221943049,
-0.18324644053602,
-0.18053287269681,
-0.17113588777219,
-0.15460322445561,
-0.13550774706866,
-0.10606051088777,
-0.0765630234506,
-0.04962835008375,
-0.01319618927973,
0.01027114740367,
0.03378873534338,
0.04961788107202,
0.04494451423784,
0.0399193886097,
0.01584903685091,
-0.00420121440538,
-0.01847257118928,
-0.02475397822447,
-0.01053287269681,
0.01509526800668,
0.05921587102177,
0.1191656197655,
0.18147717755444,
0.23579878559464,
0.26941687604691,
0.27836159966498,
0.26956762981574,
0.23826109715241,
0.18936662479061,
0.1204721524288,
0.0453465242881,
-0.00877407872698,
-0.02199015912898,
0.00107516750419,
0.02795958961474,
0.02740682579566,
-0.01028161641541,
-0.05982935510889,
-0.06701528475711,
0.00223094639866,
0.14157768006701,
0.15017064489112
],
"dgt": [
2.4553191172498,
2.44342862248888,
2.41879254989742,
2.38192717604575,
2.33147727493671,
2.26678136721453,
2.19013043016015,
2.10336369905543,
2.01414465424155,
1.92915262384742,
1.85543800978691,
1.79748596476494,
1.75428006928365,
1.72461030013125,
1.70379790088896,
1.68845480656382,
1.6761448370895,
1.66286684904577,
1.64799163036252,
1.63068023161292,
1.61073904908309,
1.58973304612691,
1.56750088631614,
1.54578500307573,
1.5242627235492,
1.50335352244996,
1.48420288841848,
1.46637521309853,
1.44977369463316,
1.43476940680732,
1.42089447397912,
1.40864903907609,
1.3966294751726,
1.38430337205545,
1.3710092503689,
1.35690844654118,
1.3405812000038,
1.32210817897091,
1.30069883494415,
1.27657903892303,
1.24931318255134,
1.21911100318577,
1.18632744096844,
1.15209185089701,
1.11575888725852,
1.07773189112355,
1.0,
1.03941448941778,
1.0
1.07773189112355,
1.11575888725852,
1.15209185089701,
1.18632744096844,
1.21911100318577,
1.24931318255134,
1.27657903892303,
1.30069883494415,
1.32210817897091,
1.3405812000038,
1.35690844654118,
1.3710092503689,
1.38430337205545,
1.3966294751726,
1.40864903907609,
1.42089447397912,
1.43476940680732,
1.44977369463316,
1.46637521309853,
1.48420288841848,
1.50335352244996,
1.5242627235492,
1.54578500307573,
1.56750088631614,
1.58973304612691,
1.61073904908309,
1.63068023161292,
1.64799163036252,
1.66286684904577,
1.6761448370895,
1.68845480656382,
1.70379790088896,
1.72461030013125,
1.75428006928365,
1.79748596476494,
1.85543800978691,
1.92915262384742,
2.01414465424155,
2.10336369905543,
2.19013043016015,
2.26678136721453,
2.33147727493671,
2.38192717604575,
2.41879254989742,
2.44342862248888,
2.4553191172498
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -6,101 +6,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
]
}

View File

@@ -227,7 +227,7 @@ In an opensource and multi-vendor environnement, it is needed to support differe
.. code-block:: json-object
"Edfa":[{
"type_variety": "low_noise",
"type_variety": "openroadm_ila_low_noise",
"type_def": "openroadm",
"gain_flatmax": 27,
"gain_min": 12,

View File

@@ -29,24 +29,40 @@
"allowed_for_design": false
},
{
"type_variety": "low_noise",
"type_variety": "openroadm_ila_low_noise",
"type_def": "openroadm",
"gain_flatmax": 27,
"gain_min": 12,
"gain_min": 0,
"p_max": 22,
"nf_coef": [-8.104e-4,-6.221e-2,-5.889e-1,37.62],
"allowed_for_design": false
},
{
"type_variety": "standard",
"type_variety": "openroadm_ila_standard",
"type_def": "openroadm",
"gain_flatmax": 27,
"gain_min": 12,
"gain_min": 0,
"p_max": 22,
"nf_coef": [-5.952e-4,-6.250e-2,-1.071,28.99],
"allowed_for_design": false
},
{
"type_variety": "openroadm_mw_mw_preamp",
"type_def": "openroadm_preamp",
"gain_flatmax": 27,
"gain_min": 0,
"p_max": 22,
"allowed_for_design": false
},
{
"type_variety": "openroadm_mw_mw_booster",
"type_def": "openroadm_booster",
"gain_flatmax": 32,
"gain_min": 0,
"p_max": 22,
"allowed_for_design": false
},
{
"type_variety": "std_high_gain",
"type_def": "variable_gain",
"gain_flatmax": 35,

View File

@@ -0,0 +1,190 @@
{ "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
}
]
}
]
}

View File

@@ -624,6 +624,70 @@
"con_out": null
}
},
{
"uid": "west edfa in Quimper",
"metadata": {
"location": {
"city": "Quimper",
"region": "RLD",
"latitude": 1.0,
"longitude": 1.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "west edfa in Ploermel",
"metadata": {
"location": {
"city": "Ploermel",
"region": "RLD",
"latitude": 1.0,
"longitude": 2.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "east edfa in Quimper",
"metadata": {
"location": {
"city": "Quimper",
"region": "RLD",
"latitude": 1.0,
"longitude": 1.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "east edfa in Ploermel",
"metadata": {
"location": {
"city": "Ploermel",
"region": "RLD",
"latitude": 1.0,
"longitude": 2.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "east edfa in Lannion_CAS to Corlay",
"metadata": {
@@ -1190,18 +1254,34 @@
},
{
"from_node": "fiber (Brest_KLA → Quimper)-",
"to_node": "west edfa in Quimper"
},
{
"from_node": "west edfa in Quimper",
"to_node": "fiber (Quimper → Lorient_KMA)-"
},
{
"from_node": "fiber (Lorient_KMA → Quimper)-",
"to_node": "east edfa in Quimper"
},
{
"from_node": "east edfa in Quimper",
"to_node": "fiber (Quimper → Brest_KLA)-"
},
{
"from_node": "fiber (Vannes_KBE → Ploermel)-",
"to_node": "west edfa in Ploermel"
},
{
"from_node": "west edfa in Ploermel",
"to_node": "fiber (Ploermel → Rennes_STA)-"
},
{
"from_node": "fiber (Rennes_STA → Ploermel)-",
"to_node": "east edfa in Ploermel"
},
{
"from_node": "east edfa in Ploermel",
"to_node": "fiber (Ploermel → Vannes_KBE)-"
},
{

View File

@@ -1,303 +1,304 @@
{ "nf_fit_coeff": [
0.000168241,
0.0469961,
0.0359549,
5.82851
],
"f_min": 191.35e12,
"f_max": 196.1e12,
"nf_ripple": [
-0.3110761646066259,
-0.3110761646066259,
-0.31110274831665313,
-0.31419329378173544,
-0.3172854168606314,
-0.32037911876162584,
-0.3233255190215882,
-0.31624321721895354,
-0.30915729645781326,
-0.30206775396360075,
-0.2949045115165272,
-0.26632156113294336,
-0.23772399031437283,
-0.20911178784023846,
-0.18048410390821285,
-0.14379944379052215,
-0.10709599992470213,
-0.07037375788020579,
-0.03372858157230583,
-0.015660302006048,
0.0024172385953583004,
0.020504047353947653,
0.03860013139908377,
0.05670549786742816,
0.07482015390297145,
0.0838762040768461,
0.09284481475528361,
0.1018180306253394,
0.11079585523492333,
0.1020395478432815,
0.09310160456603413,
0.08415906712621996,
0.07521193198077789,
0.0676340601339394,
0.06005437964543287,
0.052470799141237305,
0.044883315610536455,
0.037679759069084225,
0.03047647598902483,
0.02326948274513522,
0.01605877647020772,
0.021248462316134083,
0.02657315875107553,
0.03190060058247842,
0.03723078993416436,
0.04256372893215024,
0.047899419704645264,
0.03915515813685565,
0.030289222542492025,
0.021418708618354456,
0.012573926129294415,
0.006240488799898697,
-9.622162373026585e-05,
-0.006436207679519103,
-0.012779471908040341,
-0.02038153550619876,
-0.027999803010447587,
-0.035622012697103154,
-0.043236398934156144,
-0.04493583574805963,
-0.04663615264317309,
-0.048337350303318156,
-0.050039429413028365,
-0.051742390657545205,
-0.05342028484370278,
-0.05254242298580185,
-0.05166410580536087,
-0.05078533294804249,
-0.04990610405914272,
-0.05409792133358102,
-0.05832916277634124,
-0.06256260169582961,
-0.06660356886269536,
-0.04779792991567815,
-0.028982516728038848,
-0.010157321677553965,
0.00861320615127981,
0.01913736978785662,
0.029667009055877668,
0.04020212822983975,
0.050742731588695494,
0.061288823415841555,
0.07184040799914815,
0.1043252636301016,
0.13687829834471027,
0.1694483010211072,
0.202035284929368,
0.23624619427167134,
0.27048596623174515,
0.30474360397422756,
0.3390191214858807,
0.36358851509924695,
0.38814205928193013,
0.41270842850729195,
0.4372876328262819,
0.4372876328262819
],
"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.017807767853702,
1.0
],
"gain_ripple": [
0.1359703369791596,
0.11822862697916037,
0.09542181697916163,
0.06245819697916133,
0.02602813697916062,
-0.0036199830208403228,
-0.018326963020840026,
-0.0246928330208398,
-0.016792253020838643,
-0.0028138630208403015,
0.017572956979162058,
0.038328296979159404,
0.054956336979159914,
0.0670723869791594,
0.07091459697916136,
0.07094413697916124,
0.07114372697916238,
0.07533675697916209,
0.08731066697916035,
0.10313984697916112,
0.12276252697916235,
0.14239527697916188,
0.15945681697916214,
0.1739275269791598,
0.1767381569791624,
0.17037189697916233,
0.15216302697916007,
0.13114358697916018,
0.10802383697916085,
0.08548825697916129,
0.06916723697916183,
0.05848224697916038,
0.05447361697916264,
0.05154489697916276,
0.04946107697915991,
0.04717897697916129,
0.04551704697916037,
0.04467697697916151,
0.04072968697916224,
0.03285456697916089,
0.023488786979161347,
0.01659282697915998,
0.013321846979160057,
0.011234826979162449,
0.01030063697916006,
0.00936596697916059,
0.00874012697916271,
0.00842583697916055,
0.006965146979162284,
0.0040435869791615175,
0.0007104669791608842,
-0.0015763130208377163,
-0.006936193020838033,
-0.016475303020840215,
-0.028748483020837767,
-0.039618433020837784,
-0.051112303020840244,
-0.06468462302083822,
-0.07868024302083754,
-0.09101254302083817,
-0.10103437302083762,
-0.11041488302083735,
-0.11916081302083725,
-0.12789859302083784,
-0.1353792530208402,
-0.14160178302083892,
-0.1455411330208385,
-0.1484450830208388,
-0.14823350302084037,
-0.14591937302083835,
-0.1409032730208395,
-0.13525493302083902,
-0.1279646530208396,
-0.11963431302083904,
-0.11089282302084058,
-0.1027863830208382,
-0.09717347302083823,
-0.09343261302083761,
-0.0913487130208388,
-0.08906007302083907,
-0.0865687230208394,
-0.08407607302083875,
-0.07844600302084004,
-0.06968090302083851,
-0.05947139302083926,
-0.05095282302083959,
-0.042428283020839785,
-0.03218106302083967,
-0.01819858302084043,
-0.0021726530208390216,
0.01393231697916164,
0.028098946979159933,
0.040326236979161934,
0.05257029697916238,
0.06479749697916048,
0.07704745697916238
]
}
{
"nf_fit_coeff": [
0.000168241,
0.0469961,
0.0359549,
5.82851
],
"f_min": 191.35e12,
"f_max": 196.1e12,
"nf_ripple": [
0.4372876328262819,
0.4372876328262819,
0.41270842850729195,
0.38814205928193013,
0.36358851509924695,
0.3390191214858807,
0.30474360397422756,
0.27048596623174515,
0.23624619427167134,
0.202035284929368,
0.1694483010211072,
0.13687829834471027,
0.1043252636301016,
0.07184040799914815,
0.061288823415841555,
0.050742731588695494,
0.04020212822983975,
0.029667009055877668,
0.01913736978785662,
0.00861320615127981,
-0.010157321677553965,
-0.028982516728038848,
-0.04779792991567815,
-0.06660356886269536,
-0.06256260169582961,
-0.05832916277634124,
-0.05409792133358102,
-0.04990610405914272,
-0.05078533294804249,
-0.05166410580536087,
-0.05254242298580185,
-0.05342028484370278,
-0.051742390657545205,
-0.050039429413028365,
-0.048337350303318156,
-0.04663615264317309,
-0.04493583574805963,
-0.043236398934156144,
-0.035622012697103154,
-0.027999803010447587,
-0.02038153550619876,
-0.012779471908040341,
-0.006436207679519103,
-9.622162373026585e-05,
0.006240488799898697,
0.012573926129294415,
0.021418708618354456,
0.030289222542492025,
0.03915515813685565,
0.047899419704645264,
0.04256372893215024,
0.03723078993416436,
0.03190060058247842,
0.02657315875107553,
0.021248462316134083,
0.01605877647020772,
0.02326948274513522,
0.03047647598902483,
0.037679759069084225,
0.044883315610536455,
0.052470799141237305,
0.06005437964543287,
0.0676340601339394,
0.07521193198077789,
0.08415906712621996,
0.09310160456603413,
0.1020395478432815,
0.11079585523492333,
0.1018180306253394,
0.09284481475528361,
0.0838762040768461,
0.07482015390297145,
0.05670549786742816,
0.03860013139908377,
0.020504047353947653,
0.0024172385953583004,
-0.015660302006048,
-0.03372858157230583,
-0.07037375788020579,
-0.10709599992470213,
-0.14379944379052215,
-0.18048410390821285,
-0.20911178784023846,
-0.23772399031437283,
-0.26632156113294336,
-0.2949045115165272,
-0.30206775396360075,
-0.30915729645781326,
-0.31624321721895354,
-0.3233255190215882,
-0.32037911876162584,
-0.3172854168606314,
-0.31419329378173544,
-0.31110274831665313,
-0.3110761646066259,
-0.3110761646066259
],
"dgt": [
1.0,
1.017807767853702,
1.0356155337864215,
1.0534217504465226,
1.0712204022764056,
1.0895983485572227,
1.108555289615659,
1.1280891949729075,
1.1476135933863398,
1.1672278304018044,
1.1869318618366975,
1.2067249615595257,
1.2264996957264114,
1.2428104897182262,
1.2556591482982988,
1.2650555289898042,
1.2744470198196236,
1.2838336236692311,
1.2932153453410835,
1.3040618749785347,
1.316383926863083,
1.3301807335621048,
1.3439818461440451,
1.3598972673004606,
1.3779439775587023,
1.3981208704326855,
1.418273806730323,
1.4340878115214444,
1.445565137158368,
1.45273959485914,
1.4599103316162523,
1.4670307626366115,
1.474100442252211,
1.48111939735681,
1.488134243479226,
1.495145456062699,
1.502153039909686,
1.5097346239790443,
1.5178910621476225,
1.5266220576235803,
1.5353620432989845,
1.545374152761467,
1.5566577309558969,
1.569199764184379,
1.5817353179379183,
1.5986915141218316,
1.6201194134191075,
1.6460167077689267,
1.6719047669939942,
1.6918150918099673,
1.7057507692361864,
1.7137640932265894,
1.7217732861435076,
1.7297783508684146,
1.737780757913635,
1.7459181197626403,
1.7541903672600494,
1.7625959636196327,
1.7709972329654864,
1.7793941781790852,
1.7877868031023945,
1.7961751115773796,
1.8045606557581335,
1.8139629377087627,
1.824381436842932,
1.835814081380705,
1.847275503201129,
1.862235672444246,
1.8806927939516411,
1.9026104247588487,
1.9245345552113182,
1.9482128147680253,
1.9736443063300082,
2.0008103857988204,
2.0279625371819305,
2.055100772005235,
2.082225099873648,
2.1183028432496016,
2.16337565384239,
2.2174389328192197,
2.271520771371253,
2.322373696229342,
2.3699990328716107,
2.414398437185221,
2.4587748041127506,
2.499446286796604,
2.5364027376452056,
2.5696460593920065,
2.602860350286428,
2.630396440815385,
2.6521732021128046,
2.6681935771243177,
2.6841217449620203,
2.6947834587664494,
2.705443819238505,
2.714526681131686
],
"gain_ripple": [
0.07704745697916238,
0.06479749697916048,
0.05257029697916238,
0.040326236979161934,
0.028098946979159933,
0.01393231697916164,
-0.0021726530208390216,
-0.01819858302084043,
-0.03218106302083967,
-0.042428283020839785,
-0.05095282302083959,
-0.05947139302083926,
-0.06968090302083851,
-0.07844600302084004,
-0.08407607302083875,
-0.0865687230208394,
-0.08906007302083907,
-0.0913487130208388,
-0.09343261302083761,
-0.09717347302083823,
-0.1027863830208382,
-0.11089282302084058,
-0.11963431302083904,
-0.1279646530208396,
-0.13525493302083902,
-0.1409032730208395,
-0.14591937302083835,
-0.14823350302084037,
-0.1484450830208388,
-0.1455411330208385,
-0.14160178302083892,
-0.1353792530208402,
-0.12789859302083784,
-0.11916081302083725,
-0.11041488302083735,
-0.10103437302083762,
-0.09101254302083817,
-0.07868024302083754,
-0.06468462302083822,
-0.051112303020840244,
-0.039618433020837784,
-0.028748483020837767,
-0.016475303020840215,
-0.006936193020838033,
-0.0015763130208377163,
0.0007104669791608842,
0.0040435869791615175,
0.006965146979162284,
0.00842583697916055,
0.00874012697916271,
0.00936596697916059,
0.01030063697916006,
0.011234826979162449,
0.013321846979160057,
0.01659282697915998,
0.023488786979161347,
0.03285456697916089,
0.04072968697916224,
0.04467697697916151,
0.04551704697916037,
0.04717897697916129,
0.04946107697915991,
0.05154489697916276,
0.05447361697916264,
0.05848224697916038,
0.06916723697916183,
0.08548825697916129,
0.10802383697916085,
0.13114358697916018,
0.15216302697916007,
0.17037189697916233,
0.1767381569791624,
0.1739275269791598,
0.15945681697916214,
0.14239527697916188,
0.12276252697916235,
0.10313984697916112,
0.08731066697916035,
0.07533675697916209,
0.07114372697916238,
0.07094413697916124,
0.07091459697916136,
0.0670723869791594,
0.054956336979159914,
0.038328296979159404,
0.017572956979162058,
-0.0028138630208403015,
-0.016792253020838643,
-0.0246928330208398,
-0.018326963020840026,
-0.0036199830208403228,
0.02602813697916062,
0.06245819697916133,
0.09542181697916163,
0.11822862697916037,
0.1359703369791596
]
}

View File

@@ -9,7 +9,6 @@ Common code for CLI examples
'''
import argparse
from json import dumps
import logging
import os.path
import sys
@@ -72,12 +71,12 @@ def load_common_data(equipment_filename, topology_filename, simulation_filename,
except exceptions.NetworkTopologyError as e:
print(f'{ansi_escapes.red}Invalid network definition:{ansi_escapes.reset} {e}')
sys.exit(1)
except exceptions.ConfigurationError as e:
print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}')
sys.exit(1)
except exceptions.ParametersError as e:
print(f'{ansi_escapes.red}Simulation parameters error:{ansi_escapes.reset} {e}')
sys.exit(1)
except exceptions.ConfigurationError as e:
print(f'{ansi_escapes.red}Configuration error:{ansi_escapes.reset} {e}')
sys.exit(1)
except exceptions.ServiceError as e:
print(f'{ansi_escapes.red}Service error:{ansi_escapes.reset} {e}')
sys.exit(1)
@@ -113,7 +112,7 @@ def transmission_main_example(args=None):
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
_add_common_options(parser, network_default=_examples_dir / 'edfa_example_network.json')
parser.add_argument('--show-channels', action='store_true', help='Show final per-channel OSNR summary')
parser.add_argument('--show-channels', action='store_true', help='Show final per-channel OSNR and GSNR summary')
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')
@@ -240,7 +239,7 @@ def transmission_main_example(args=None):
print(f'\nTransmission result for input power = {lin2db(req.power*1e3):.2f} dBm:')
else:
print(f'\nTransmission results:')
print(f' Final SNR total (0.1 nm): {ansi_escapes.cyan}{mean(destination.snr_01nm):.02f} dB{ansi_escapes.reset}')
print(f' Final GSNR (0.1 nm): {ansi_escapes.cyan}{mean(destination.snr_01nm):.02f} dB{ansi_escapes.reset}')
else:
print(path[-1])
@@ -249,7 +248,7 @@ def transmission_main_example(args=None):
print(f'{ansi_escapes.blue}Network (after autodesign) saved to {args.save_network}{ansi_escapes.reset}')
if args.show_channels:
print('\nThe total SNR per channel at the end of the line is:')
print('\nThe GSNR per channel at the end of the line is:')
print(
'{:>5}{:>26}{:>26}{:>28}{:>28}{:>28}' .format(
'Ch. #',
@@ -257,7 +256,7 @@ def transmission_main_example(args=None):
'Channel power (dBm)',
'OSNR ASE (signal bw, dB)',
'SNR NLI (signal bw, dB)',
'SNR total (signal bw, dB)'))
'GSNR (signal bw, dB)'))
for final_carrier, ch_osnr, ch_snr_nl, ch_snr in zip(
infos.carriers, path[-1].osnr_ase, path[-1].osnr_nli, path[-1].snr):
ch_freq = final_carrier.frequency * 1e-12
@@ -384,7 +383,7 @@ def path_requests_run(args=None):
pth_assign_spectrum(pths, rqs, oms_list, reversed_pths)
print(f'{ansi_escapes.blue}Result summary{ansi_escapes.reset}')
header = ['req id', ' demand', ' snr@bandwidth A-Z (Z-A)', ' snr@0.1nm A-Z (Z-A)',
header = ['req id', ' demand', ' GSNR@bandwidth A-Z (Z-A)', ' GSNR@0.1nm A-Z (Z-A)',
' Receiver minOSNR', ' mode', ' Gbit/s', ' nb of tsp pairs',
'N,M or blocking reason']
data = []
@@ -423,7 +422,7 @@ def path_requests_run(args=None):
secondcol = ''.join(row[1].ljust(secondcol_width))
remainingcols = ''.join(word.center(col_width, ' ') for word in row[2:])
print(f'{firstcol} {secondcol} {remainingcols}')
print(f'{ansi_escapes.yellow}Result summary shows mean SNR and OSNR (average over all channels){ansi_escapes.reset}')
print(f'{ansi_escapes.yellow}Result summary shows mean GSNR and OSNR (average over all channels){ansi_escapes.reset}')
if args.output:
result = []

View File

@@ -225,6 +225,8 @@ def sanity_check(nodes, links, nodes_by_city, links_by_city, eqpts_by_city):
duplicate_links.append(l1)
for l in duplicate_links:
links.remove(l)
links_by_city[l.from_city].remove(l)
links_by_city[l.to_city].remove(l)
unreferenced_nodes = [n for n in nodes_by_city if n not in links_by_city]
if unreferenced_nodes:
@@ -423,10 +425,27 @@ def xls_to_json_data(input_filename, filter_region=[]):
'params': {'length': round(x.west_distance, 3),
'length_units': x.distance_units,
'loss_coef': x.west_lineic,
'con_in':x.west_con_in,
'con_out':x.west_con_out}
} # missing ILA construction
for x in links] +
'con_in': x.west_con_in,
'con_out': x.west_con_out}
} for x in links] +
[{'uid': f'west edfa in {x.city}',
'metadata': {'location': {'city': x.city,
'region': x.region,
'latitude': x.latitude,
'longitude': x.longitude}},
'type': 'Edfa',
'operational': {'gain_target': None,
'tilt_target': 0}
} for x in nodes_by_city.values() if x.node_type.lower() == 'ila' and x.city not in eqpts_by_city] +
[{'uid': f'east edfa in {x.city}',
'metadata': {'location': {'city': x.city,
'region': x.region,
'latitude': x.latitude,
'longitude': x.longitude}},
'type': 'Edfa',
'operational': {'gain_target': None,
'tilt_target': 0}
} for x in nodes_by_city.values() if x.node_type.lower() == 'ila' and x.city not in eqpts_by_city] +
[create_east_eqpt_element(e) for e in eqpts] +
[create_west_eqpt_element(e) for e in eqpts],
'connections':
@@ -675,8 +694,6 @@ def connect_eqpt(from_, in_, to_):
def eqpt_in_city_to_city(in_city, to_city, direction='east'):
rev_direction = 'west' if direction == 'east' else 'east'
amp_direction = f'{direction}_amp_type'
amp_rev_direction = f'{rev_direction}_amp_type'
return_eqpt = ''
if in_city in eqpts_by_city:
for e in eqpts_by_city[in_city]:
@@ -686,8 +703,9 @@ def eqpt_in_city_to_city(in_city, to_city, direction='east'):
elif nodes_by_city[in_city].node_type.lower() == 'ila':
if e.to_city != to_city:
direction = rev_direction
amp_direction = amp_rev_direction
return_eqpt = f'{direction} edfa in {e.from_city} to {e.to_city}'
elif nodes_by_city[in_city].node_type.lower() == 'ila':
return_eqpt = f'{direction} edfa in {in_city}'
if nodes_by_city[in_city].node_type.lower() == 'fused':
return_eqpt = f'{direction} fused spans in {in_city}'
return return_eqpt

View File

@@ -21,15 +21,14 @@ from gnpy.core.utils import automatic_nch, automatic_fmax, merge_amplifier_restr
from gnpy.topology.request import PathRequest, Disjunction
from gnpy.tools.convert import xls_to_json_data
from gnpy.tools.service_sheet import read_service_sheet
import time
_logger = getLogger(__name__)
Model_vg = namedtuple('Model_vg', 'nf1 nf2 delta_p')
Model_vg = namedtuple('Model_vg', 'nf1 nf2 delta_p orig_nf_min orig_nf_max')
Model_fg = namedtuple('Model_fg', 'nf0')
Model_openroadm = namedtuple('Model_openroadm', 'nf_coef')
Model_openroadm_ila = namedtuple('Model_openroadm_ila', 'nf_coef')
Model_hybrid = namedtuple('Model_hybrid', 'nf_ram gain_ram edfa_variety')
Model_dual_stage = namedtuple('Model_dual_stage', 'preamp_variety booster_variety')
@@ -44,7 +43,6 @@ class _JsonThing:
f'\n WARNING missing {k} attribute in eqpt_config.json[{name}]' +
f'\n default value is {k} = {v}' +
ansi_escapes.reset)
time.sleep(1)
class SI(_JsonThing):
@@ -196,13 +194,15 @@ class Amp(_JsonThing):
except KeyError:
pass # nf0 is not needed for variable gain amp
nf1, nf2, delta_p = estimate_nf_model(type_variety, gain_min, gain_max, nf_min, nf_max)
nf_def = Model_vg(nf1, nf2, delta_p)
nf_def = Model_vg(nf1, nf2, delta_p, nf_min, nf_max)
elif type_def == 'openroadm':
try:
nf_coef = kwargs.pop('nf_coef')
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(nf_coef)
nf_def = Model_openroadm_ila(nf_coef)
elif type_def in ('openroadm_preamp', 'openroadm_booster'):
pass # no extra parameters needed
elif type_def == 'dual_stage':
try: # nf_ram and gain_ram are expected for a hybrid amp
preamp_variety = kwargs.pop('preamp_variety')
@@ -532,10 +532,9 @@ def convert_service_sheet(
network,
network_filename=None,
output_filename='',
bidir=False,
filter_region=None):
bidir=False):
if output_filename == '':
output_filename = f'{str(input_filename)[0:len(str(input_filename))-len(str(input_filename.suffixes[0]))]}_services.json'
data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir, filter_region)
data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir)
save_json(data, output_filename)
return data

View File

@@ -5,11 +5,11 @@
gnpy.tools.plots
================
Graphs and plots usable form a CLI application
Graphs and plots usable from a CLI application
'''
from matplotlib.pyplot import show, axis, figure, title, text
from networkx import draw_networkx_nodes, draw_networkx_edges, draw_networkx_labels
from networkx import draw_networkx
from gnpy.core.elements import Transceiver
@@ -18,21 +18,10 @@ def _try_city(node):
def plot_baseline(network):
edges = set(network.edges())
pos = {n: (n.lng, n.lat) for n in network.nodes()}
labels = {n: _try_city(n) for n in network.nodes() if isinstance(n, Transceiver)}
city_labels = set(labels.values())
for n in network.nodes():
if n.location.city and n.location.city not in city_labels:
labels[n] = n.location.city
city_labels.add(n.location.city)
label_pos = pos
fig = figure()
kwargs = {'figure': fig, 'pos': pos}
plot = draw_networkx_nodes(network, nodelist=network.nodes(), node_color='#ababab', **kwargs)
draw_networkx_edges(network, edgelist=edges, edge_color='#ababab', **kwargs)
draw_networkx_labels(network, labels=labels, font_size=14, **{**kwargs, 'pos': label_pos})
draw_networkx(network, pos=pos, node_size=50, node_color='#ababab', edge_color='#ababab',
labels=labels, font_size=14)
axis('off')
show()
@@ -40,27 +29,21 @@ def plot_baseline(network):
def plot_results(network, path, source, destination):
path_edges = set(zip(path[:-1], path[1:]))
edges = set(network.edges()) - path_edges
nodes = [n for n in network.nodes() if n not in path]
pos = {n: (n.lng, n.lat) for n in network.nodes()}
nodes = {}
nodes_by_pos = {}
for k, (x, y) in pos.items():
nodes.setdefault((round(x, 1), round(y, 1)), []).append(k)
nodes_by_pos.setdefault((round(x, 1), round(y, 1)), []).append(k)
labels = {n: _try_city(n) for n in network.nodes() if isinstance(n, Transceiver)}
city_labels = set(labels.values())
for n in network.nodes():
if n.location.city and n.location.city not in city_labels:
labels[n] = n.location.city
city_labels.add(n.location.city)
label_pos = pos
fig = figure()
kwargs = {'figure': fig, 'pos': pos}
all_nodes = [n for n in network.nodes() if n not in path]
plot = draw_networkx_nodes(network, nodelist=all_nodes, node_color='#ababab', node_size=50, **kwargs)
draw_networkx_nodes(network, nodelist=path, node_color='#ff0000', node_size=55, **kwargs)
draw_networkx_edges(network, edgelist=edges, edge_color='#ababab', **kwargs)
draw_networkx_edges(network, edgelist=path_edges, edge_color='#ff0000', **kwargs)
draw_networkx_labels(network, labels=labels, font_size=14, **{**kwargs, 'pos': label_pos})
draw_networkx(network, pos=pos, labels=labels, font_size=14,
nodelist=nodes, node_color='#ababab', node_size=50,
edgelist=edges, edge_color='#ababab')
draw_networkx(network, pos=pos, with_labels=False,
nodelist=path, node_color='#ff0000', node_size=55,
edgelist=path_edges, edge_color='#ff0000')
title(f'Propagating from {_try_city(source)} to {_try_city(destination)}')
axis('off')
@@ -70,7 +53,7 @@ def plot_results(network, path, source, destination):
bbox={'boxstyle': 'round', 'facecolor': 'wheat', 'alpha': 0.5})
msgs = {(x, y): heading + '\n\n'.join(str(n) for n in ns if n in path)
for (x, y), ns in nodes.items()}
for (x, y), ns in nodes_by_pos.items()}
def hover(event):
if event.xdata is None or event.ydata is None:

View File

@@ -178,12 +178,9 @@ def read_service_sheet(
eqpt,
network,
network_filename=None,
bidir=False,
filter_region=None):
bidir=False):
""" converts a service sheet into a json structure
"""
if filter_region is None:
filter_region = []
if network_filename is None:
network_filename = input_filename
service = parse_excel(input_filename)

View File

@@ -1133,9 +1133,8 @@ def compute_path_with_disjunction(network, equipment, pathreqlist, pathlist):
# reversed path is needed for correct spectrum assignment
reversed_path = find_reversed_path(pathlist[i])
if pathreq.bidir:
# only propagate if bidir is true, but needs the reversed path anyway for
# correct spectrum assignment
if pathreq.bidir and pathreq.baud_rate is not None:
# Both directions requested, and a feasible mode was found
rev_p = deepcopy(reversed_path)
print(f'\n\tPropagating Z to A direction {pathreq.destination} to {pathreq.source}')

View File

@@ -141,7 +141,7 @@ location is in **gnpy-transmission-example** folder:
.. code-block:: json-object
"Edfa":[{
"type_variety": "low_noise",
"type_variety": "openroadm_ila_low_noise",
"type_def": "openroadm",
"gain_flatmax": 27,
"gain_min": 12,

View File

@@ -1,12 +1,7 @@
alabaster>=0.7.12,<1
docutils==0.15.2
matplotlib>=3.3.3,<4
networkx>=2.5,<3
numpy>=1.19.4,<2
pandas>=1.1.5,<2
pbr>=5.5.1,<6
Pygments>=2.7.4,<3
scipy>=1.5.4,<2
Sphinx>=3.5.0,<4
sphinxcontrib-bibtex>=0.4.2,<1
xlrd>=1.2.0,<2

View File

@@ -1,8 +1,7 @@
[metadata]
name = gnpy
description = Route planning and optimization tool for mesh optical networks
description-file = README.rst
description-content-type = text/x-rst; charset=UTF-8
description-file = README.md
description-content-type = text/markdown; variant=GFM
author = Telecom Infra Project
author-email = jan.kundrat@telecominfraproject.com
license = BSD-3-Clause
@@ -23,6 +22,7 @@ classifier =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Physics

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,446 @@
{
"elements": [
{
"uid": "Site_A",
"type": "Transceiver",
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": "Site A",
"region": ""
}
}
},
{
"uid": "nodeA",
"type": "Roadm",
"params": {
"target_pch_out_db": -18,
"restrictions": {
"preamp_variety_list": [],
"booster_variety_list": []
},
"per_degree_pch_out_db": {}
},
"metadata": {
"location": {
"latitude": 0.0,
"longitude": 0.0,
"city": "Zion",
"region": ""
}
}
},
{
"uid": "fiber1",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 50.0,
"loss_coef": 0.2,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fiber7",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 1.0,
"loss_coef": 0.2,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fiber8",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 60.0,
"loss_coef": 0.2,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fused1",
"type": "Fused",
"params": {
"loss": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fiber2",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 1.0,
"loss_coef": 0.5,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "amp2",
"type": "Edfa",
"type_variety": "std_medium_gain",
"metadata": {
"location": {
"latitude": 0.0,
"longitude": 0.0,
"city": "Zion",
"region": ""
}
}
},
{
"uid": "fiber3",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 80.0,
"loss_coef": 0.2,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fused7",
"type": "Fused",
"params": {
"loss": 1.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fiber6",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 80.0,
"loss_coef": 0.2,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "nodeC",
"type": "Roadm",
"params": {
"target_pch_out_db": -18,
"restrictions": {
"preamp_variety_list": [],
"booster_variety_list": []
},
"per_degree_pch_out_db": {}
},
"metadata": {
"location": {
"latitude": 0.0,
"longitude": 0.0,
"city": "Zion",
"region": ""
}
}
},
{
"uid": "Site_C",
"type": "Transceiver",
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": "Site A",
"region": ""
}
}
},
{
"uid": "amp3",
"type": "Edfa",
"type_variety": "std_medium_gain",
"metadata": {
"location": {
"latitude": 0.0,
"longitude": 0.0,
"city": "Zion",
"region": ""
}
}
},
{
"uid": "fused4",
"type": "Fused",
"params": {
"loss": 1.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "fiber4",
"type": "Fiber",
"type_variety": "SSMF",
"params": {
"length": 80.0,
"loss_coef": 0.2,
"length_units": "km",
"att_in": 0,
"con_in": 0.0,
"con_out": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "amp4",
"type": "Edfa",
"type_variety": "std_medium_gain",
"operational": {
"gain_target": 13.31,
"delta_p": 1.18,
"tilt_target": -0.81,
"out_voa": 2.0
},
"metadata": {
"location": {
"latitude": 0.0,
"longitude": 0.0,
"city": "Zion",
"region": ""
}
}
},
{
"uid": "fused5",
"type": "Fused",
"params": {
"loss": 0.0
},
"metadata": {
"location": {
"latitude": 0,
"longitude": 0,
"city": null,
"region": null
}
}
},
{
"uid": "nodeB",
"type": "Roadm",
"params": {
"target_pch_out_db": -15,
"restrictions": {
"preamp_variety_list": [],
"booster_variety_list": []
},
"per_degree_pch_out_db": {}
},
"metadata": {
"location": {
"latitude": 0.0,
"longitude": 0.0,
"city": "Zion",
"region": ""
}
}
},
{
"uid": "Site_B",
"type": "Transceiver",
"metadata": {
"location": {
"latitude": 2,
"longitude": 0,
"city": "Site B",
"region": ""
}
}
}
],
"connections": [
{
"from_node": "Site_A",
"to_node": "nodeA"
},
{
"from_node": "nodeA",
"to_node": "Site_A"
},
{
"from_node": "nodeA",
"to_node": "fiber1"
},
{
"from_node": "fiber1",
"to_node": "fused1"
},
{
"from_node": "fused1",
"to_node": "fiber2"
},
{
"from_node": "fiber2",
"to_node": "amp2"
},
{
"from_node": "amp2",
"to_node": "fiber3"
},
{
"from_node": "fiber3",
"to_node": "nodeC"
},
{
"from_node": "nodeC",
"to_node": "Site_C"
},
{
"from_node": "Site_C",
"to_node": "nodeC"
},
{
"from_node": "nodeC",
"to_node": "amp3"
},
{
"from_node": "amp3",
"to_node": "fiber4"
},
{
"from_node": "fiber4",
"to_node": "amp4"
},
{
"from_node": "amp4",
"to_node": "fused5"
},
{
"from_node": "fused5",
"to_node": "nodeB"
},
{
"from_node": "nodeB",
"to_node": "fused7"
},
{
"from_node": "fused7",
"to_node": "fiber6"
},
{
"from_node": "fiber6",
"to_node": "nodeA"
},
{
"from_node": "Site_B",
"to_node": "nodeB"
},
{
"from_node": "nodeB",
"to_node": "Site_B"
},
{
"from_node": "nodeA",
"to_node": "fiber7"
},
{
"from_node": "fiber7",
"to_node": "fiber8"
},
{
"from_node": "fiber8",
"to_node": "nodeB"
}
]
}

View File

@@ -64,8 +64,8 @@
"uid": "roadm Lannion_CAS",
"params": {
"per_degree_pch_out_db": {
"east edfa in Lannion_CAS to Corlay": -18.6,
"east edfa in Lannion_CAS to Morlaix": -23.0
"east edfa in Lannion_CAS to Corlay": -18.6,
"east edfa in Lannion_CAS to Morlaix": -23.0
}
},
"metadata": {
@@ -82,7 +82,7 @@
"uid": "roadm Lorient_KMA",
"params": {
"per_degree_pch_out_db": {
"east edfa in Lorient_KMA to Vannes_KBE": -12.0
"east edfa in Lorient_KMA to Vannes_KBE": -12.0
}
},
"metadata": {
@@ -99,7 +99,7 @@
"uid": "roadm Vannes_KBE",
"params": {
"per_degree_pch_out_db": {
"east edfa in Vannes_KBE to Lorient_KMA": -10.0
"east edfa in Vannes_KBE to Lorient_KMA": -10.0
}
},
"metadata": {
@@ -116,7 +116,7 @@
"uid": "roadm Rennes_STA",
"params": {
"per_degree_pch_out_db": {
"east edfa in Rennes_STA to Stbrieuc": -20.0
"east edfa in Rennes_STA to Stbrieuc": -20.0
}
},
"metadata": {
@@ -648,6 +648,70 @@
"con_out": null
}
},
{
"uid": "west edfa in Quimper",
"metadata": {
"location": {
"city": "Quimper",
"region": "RLD",
"latitude": 1.0,
"longitude": 1.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "west edfa in Ploermel",
"metadata": {
"location": {
"city": "Ploermel",
"region": "RLD",
"latitude": 1.0,
"longitude": 2.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "east edfa in Quimper",
"metadata": {
"location": {
"city": "Quimper",
"region": "RLD",
"latitude": 1.0,
"longitude": 1.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "east edfa in Ploermel",
"metadata": {
"location": {
"city": "Ploermel",
"region": "RLD",
"latitude": 1.0,
"longitude": 2.0
}
},
"type": "Edfa",
"operational": {
"gain_target": null,
"tilt_target": 0
}
},
{
"uid": "east edfa in Lannion_CAS to Corlay",
"metadata": {
@@ -1200,18 +1264,34 @@
},
{
"from_node": "fiber (Brest_KLA → Quimper)-",
"to_node": "west edfa in Quimper"
},
{
"from_node": "west edfa in Quimper",
"to_node": "fiber (Quimper → Lorient_KMA)-"
},
{
"from_node": "fiber (Lorient_KMA → Quimper)-",
"to_node": "east edfa in Quimper"
},
{
"from_node": "east edfa in Quimper",
"to_node": "fiber (Quimper → Brest_KLA)-"
},
{
"from_node": "fiber (Vannes_KBE → Ploermel)-",
"to_node": "west edfa in Ploermel"
},
{
"from_node": "west edfa in Ploermel",
"to_node": "fiber (Ploermel → Rennes_STA)-"
},
{
"from_node": "fiber (Rennes_STA → Ploermel)-",
"to_node": "east edfa in Ploermel"
},
{
"from_node": "east edfa in Ploermel",
"to_node": "fiber (Ploermel → Vannes_KBE)-"
},
{

View File

@@ -0,0 +1,239 @@
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 = 2.00 dBm:
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
Roadm roadm_Stockholm
effective loss (dB): 22.00
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
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)
pch out (dBm): -14.33
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
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)
pch out (dBm): -14.33
Edfa Edfa_preamp_roadm_Norrköping_from_fiber (Stockholm → Norrköping)_(2/2)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 16.33
(before att_in and before output VOA)
noise figure (dB): 12.59
(including att_in)
pad att_in (dB): 0.00
Power In (dBm): 5.53
Power Out (dBm): 21.87
Delta_P (dB): 0.00
target pch (dBm): 2.00
effective pch (dBm): 2.00
output VOA (dB): 0.00
Roadm roadm_Norrköping
effective loss (dB): 22.00
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
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)
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
(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
output VOA (dB): 0.00
Roadm roadm_Linköping
effective loss (dB): 22.00
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
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)
pch out (dBm): -24.80
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
(before att_in and before output VOA)
noise figure (dB): 8.09
(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
output VOA (dB): 0.00
Roadm roadm_Jönköping
effective loss (dB): 22.00
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
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)
pch out (dBm): -15.82
Edfa Edfa_preamp_roadm_Borås_from_fiber (Jönköping → Borås)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 17.82
(before att_in and before output VOA)
noise figure (dB): 11.94
(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
output VOA (dB): 0.00
Roadm roadm_Borås
effective loss (dB): 22.00
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
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)
pch out (dBm): -11.53
Edfa Edfa_preamp_roadm_Gothenburg_from_fiber (Borås → Gothenburg)
type_variety: openroadm_mw_mw_preamp
effective gain(dB): 13.53
(before att_in and before output VOA)
noise figure (dB): 13.78
(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
output VOA (dB): 0.00
Roadm roadm_Gothenburg
effective loss (dB): 22.00
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
Transmission result for input power = 2.00 dBm:
Final GSNR (0.1 nm): 18.90 dB
(No source node specified: picked trx_Stockholm)
(No destination node specified: picked trx_Gothenburg)

View File

@@ -143,7 +143,7 @@ with path constraint: ['trx Lannion_CAS', 'trx Lorient_KMA']
Computed path (roadms):['roadm Lannion_CAS', 'roadm Lorient_KMA']
Result summary
req id demand snr@bandwidth A-Z (Z-A) snr@0.1nm A-Z (Z-A) Receiver minOSNR mode Gbit/s nb of tsp pairs N,M or blocking reason
req id demand GSNR@bandwidth A-Z (Z-A) GSNR@0.1nm A-Z (Z-A) Receiver minOSNR mode Gbit/s nb of tsp pairs N,M or blocking reason
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)
@@ -151,4 +151,4 @@ req id demand snr@bandwidth A-Z (Z-A) snr@0
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)
Result summary shows mean SNR and OSNR (average over all channels)
Result summary shows mean GSNR and OSNR (average over all channels)

View File

@@ -8,10 +8,10 @@ Now propagating between Site_A and Site_B:
Propagating with input power = 0.00 dBm:
Transceiver Site_A
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
SNR total (signal bw, dB): 35.92
SNR total (0.1nm, dB): 40.00
CD (ps/nm): 0.00
PMD (ps): 0.00
Fiber Span1
@@ -21,7 +21,7 @@ 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.0
pch out (dBm): -17.00
Edfa Edfa1
type_variety: std_low_gain
effective gain(dB): 15.00
@@ -31,20 +31,20 @@ Edfa Edfa1
pad att_in (dB): 0.00
Power In (dBm): 1.81
Power Out (dBm): 16.82
Delta_P (dB): -2
target pch (dBm): -2.0
effective pch (dBm): -2.0
Delta_P (dB): -2.00
target pch (dBm): -2.00
effective pch (dBm): -2.00
output VOA (dB): 0.00
Transceiver Site_B
GSNR (0.1nm, dB): 31.17
GSNR (signal bw, dB): 27.09
OSNR ASE (0.1nm, dB): 33.30
OSNR ASE (signal bw, dB): 29.21
SNR total (signal bw, dB): 27.09
SNR total (0.1nm, dB): 31.17
CD (ps/nm): 1336.00
PMD (ps): 0.36
Transmission result for input power = 0.00 dBm:
Final SNR total (0.1 nm): 31.17 dB
Final GSNR (0.1 nm): 31.17 dB
(No source node specified: picked Site_A)

View File

@@ -8,10 +8,10 @@ Now propagating between Site_A and Site_B:
Propagating with input power = 0.00 dBm:
Transceiver Site_A
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
SNR total (signal bw, dB): 35.92
SNR total (0.1nm, dB): 40.00
CD (ps/nm): 0.00
PMD (ps): 0.00
RamanFiber Span1
@@ -31,23 +31,23 @@ Edfa Edfa1
pad att_in (dB): 2.26
Power In (dBm): 11.07
Power Out (dBm): 16.82
Delta_P (dB): -2
target pch (dBm): -2.0
effective pch (dBm): -2.0
Delta_P (dB): -2.00
target pch (dBm): -2.00
effective pch (dBm): -2.00
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
SNR total (signal bw, dB): 27.35
SNR total (0.1nm, dB): 31.43
CD (ps/nm): 1336.00
PMD (ps): 0.36
Transmission result for input power = 0.00 dBm:
Final SNR total (0.1 nm): 31.43 dB
Final GSNR (0.1 nm): 31.43 dB
The total SNR 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) SNR total (signal bw, dB)
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

View File

@@ -14,6 +14,8 @@ SRC_ROOT = Path(__file__).parent.parent
('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):
'''Make sure that our examples produce useful output'''

View File

@@ -0,0 +1,64 @@
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (C) 2020 Telecom Infra Project and GNPy contributors
# see LICENSE.md for a list of contributors
#
from pathlib import Path
import pytest
from gnpy.core.exceptions import NetworkTopologyError
from gnpy.core.network import span_loss
from gnpy.tools.json_io import load_equipment, load_network
TEST_DIR = Path(__file__).parent
EQPT_FILENAME = TEST_DIR / 'data/eqpt_config.json'
NETWORK_FILENAME = TEST_DIR / 'data/bugfixiteratortopo.json'
@pytest.mark.parametrize("node, attenuation", [
# first fiber span
['fiber1', 10.5],
['fiber2', 10.5],
['fused1', 10.5],
# second span
['fiber3', 16.0],
# third span
['fiber4', 16.0],
# direct link between a ROADM and an amplifier
['fused5', 0],
# fourth span
['fiber6', 17],
['fused7', 17],
# fifth span
['fiber7', 0.2],
['fiber8', 12],
# all other nodes
['Site_A', 0],
['nodeA', 0],
['amp2', 0],
['nodeC', 0],
['Site_C', 0],
['amp3', 0],
['amp4', 0],
['nodeB', 0],
['Site_B', 0],
])
def test_span_loss(node, attenuation):
equipment = load_equipment(EQPT_FILENAME)
network = load_network(NETWORK_FILENAME, equipment)
for x in network.nodes():
if x.uid == node:
assert attenuation == span_loss(network, x)
return
assert not f'node "{node}" referenced from test but not found in the topology' # pragma: no cover
@pytest.mark.parametrize("node", ['fused4'])
def test_span_loss_unconnected(node):
'''Fused node that has no next and no previous nodes should be detected'''
equipment = load_equipment(EQPT_FILENAME)
network = load_network(NETWORK_FILENAME, equipment)
x = next(x for x in network.nodes() if x.uid == node)
with pytest.raises(NetworkTopologyError):
span_loss(network, x)

10
tox.ini
View File

@@ -1,5 +1,4 @@
[tox]
envlist = py36,py37
skipsdist = True
[testenv]
@@ -10,6 +9,8 @@ deps =
linters: flake8
linters: pep8-naming
linters: mccabe
linters: flake8-noqa
linters-diff-ci: flake8-html
changedir = {toxinidir}
usedevelop = True
setenv =
@@ -18,10 +19,11 @@ 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
[testenv:docs]
deps =
rstcheck
-r{toxinidir}/docs/requirements.txt
whitelist_externals =
/bin/sh
commands =
@@ -32,10 +34,12 @@ commands =
commands =
flake8 {posargs}
[testenv:linters-diff]
[testenv:linters-diff-ci]
whitelist_externals = bash
commands =
flake8 {posargs} --format html --htmldir linters --exit-zero
bash -c "git diff -U0 origin/$(git rev-parse --abbrev-ref HEAD) | flake8 --diff {posargs}"
[flake8]
max-line-length = 120
max-complexity = 15