Commit Graph

302 Commits

Author SHA1 Message Date
EstherLerouzic
4b50ee0c2d fix: do not assume 0 dB default value for tilt-target
Instead keep the None value, it user has not stated anything

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I45fcff92caabbfbe514fbe30deac60426b7eb16b
2024-12-06 16:35:46 +01:00
EstherLerouzic
1722fbec13 feat: add more warnings on amplifiers
when user settings do not match library

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id387b7781d9637f1d18c453dae75330962229902
2024-12-06 16:35:46 +01:00
EstherLerouzic
e48aa57c35 Improve error reporting by including uid of elements
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ief4125322e4db02765974c43159a014749cdab2e
2024-12-06 16:35:46 +01:00
EstherLerouzic
e3e37b1986 feat: skip path computation when path is explicit
and add tests for explicit path

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I95aaf5b56a7ea04f24153d5cb6612cd09401401c
2024-12-06 16:35:46 +01:00
EstherLerouzic
c840bb1a44 Improve test coverage on ila constraint cases
explicitely check the corrections for all cases
ila defined in eqpt or not,
ila defined on the link with same direction as request or not
constraint loose or strict
several or one ila in the OMS

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I4d4b5167e7327c9aea4b13879f4e00d30e60d643
2024-11-25 17:07:36 +01:00
EstherLerouzic
dc68d38293 fix ila names
auto design were changed long ago and these functions did not
apply the changes. Besides there was a confusion between request_element
class where loose is a string, and PathRequest from topology.requests
where loose_list is a list of strings.
This patch corrects the naming and also the tests,
because it used the wrong class to gererate xls services

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I564b77576459d6cb47767398a2db8138ba6ad1e4
2024-11-25 16:55:25 +01:00
EstherLerouzic
32adc0fc53 feat: enables reading per degree impairment from xls input
- read per degre roadm-path impairment from roadm sheet
add additional optional columns: type_variety and 'from degrees'
and 'from degree to degree impairment id'
'from degrees' can contain a list of degrees separated with ' | ', then the
'from degree to degree impairment id' must contain a list of ids of the same
length.
Impairment ids are expected to be in the ROADM equipment spec and
from degree must be the previous node (no verification of user input).

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I7d326bb3d4f366835249089e9537747c7d3ec2fd
2024-11-25 12:09:09 +01:00
AndreaDAmico
39d3f0f483 Perturbative Raman Solver
Raman effect evaluation based on a perturbative solution for faster computation

Change-Id: Ie6d4ea4d9f95d8755dc8dfd004c954d4c2c5f759
2024-11-08 19:55:20 +00:00
AndreaDAmico
bbe9ef7356 Increasing precision in Raman tests
Change-Id: I7a4de449a673d2e2ac23376d7fe64399c65e1246
2024-11-08 18:12:49 +00:00
AndreaDAmico
42a8f018cd GGN approximation formula defined
An approximated version of the GGN is implemented to reduce the computational time enabling fast multi-band transmission simulations

Change-Id: I2951a878aa04b5eb4a33ba86d626a788c4cbb100
2024-11-08 18:09:44 +00:00
EstherLerouzic
29f5dd1dc4 Add frequency dependency on ROADM impairments
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Icb88bf9c42c09deb0064e3299b78b080462fef79
2024-10-16 17:49:00 +00:00
EstherLerouzic
03da959724 insert multiband_amplifier if needed
the automatic add_missing_elements function is updated to insert
multiband booster, preamp or inline amplifiers based on the OMS
nature. If nothing is stated, then uses Edfas.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I968a2fc0a3da97aecb7b513ff211491b20cdd4f2
2024-10-16 17:47:29 +00:00
EstherLerouzic
f621ca6fe7 Add tilt computation for design targets
Compute the tilts only if raman-flag in sim_params is turned on.
Use actual input power in fiber (according to expected propagation
during design).
Creates a function that computes the expected tilt after propagation
in a span, and returns the normalized power difference at the center
frequency of each band, and the tilt experenced between lower and
upper frequency in each band.
Include the expected tilt when computing target gains of amplifiers.
Current function requires that the bands remain in the same order.
(ordering is ensured when creating the objects).

Change-Id: I28bdf13f2010153175e8b6d199fd8eea15d7b292
2024-10-16 17:46:59 +00:00
EstherLerouzic
548626a9f2 preselect amplifiers based on restrictions and bands
make sure that selected amplifiers (single or multiband) have a band
that encompasses design_band.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I8b66755efbe8413f32328b9e02099ffdedd4b7ed
2024-10-16 17:40:01 +00:00
EstherLerouzic
7a26833a5a Add some test on select_edfa
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia54c62fe76175f16048992ca1f67439dd32c6e5e
2024-10-16 17:39:39 +00:00
EstherLerouzic
c2f6f9c6a0 Add an invocation test with multiband case
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0a98175f0c6b4333fae6bea40dac826032a25233
2024-10-16 17:39:13 +00:00
EstherLerouzic
0813332adc Enable differentiated design band per OMS
Introduce a design_band parameter in ROADM and Transceiver.
- if nothing is defined, use SI band(s)
- if design band is defined in ROADM, use this one for all degrees
- if per degree design band is defined, use this one instead

unsupported case: single band OMS with default multiband design band.
Check that these definitions are consistent with actual amplifiers

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ibea4ce6e72d2b1e96ef8cf4efaf499530d24179c
2024-10-16 17:31:33 +00:00
EstherLerouzic
22fe9ead55 Introduce multi band amps
Introduce a new multi-band element that contains a list of Edfa element:
- reads multiple amps out of the element config.
- deduces frequency band from the amp in the list.

no autodesign yet: multi-band amps must have type_variety.

- checks that type variety of individual EDFAs is consistent with multiband
type variety
- demux and mux spectrum when propagate in multiband
- don't add a preamp or booster if a multiband amp is already defined.

The print of channel number is removed from equipment, since the channel number
may now depend on the path's amplifiers. This changes invocation results layout.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I44e77ff82e622cdee4021a7984d660317cb90cf9
2024-10-16 17:26:11 +00:00
EstherLerouzic
ac8fd770ab Only propagates carriers that belong to Amp bandwidth
The commit introduces mux/demux functions in amps and ensures that the
propagation is only done on carriers that are in the Amp bandwitdh, ie
with all their spectrum including slot width is in bandwidth.

For consistency, default amp f_min is changed:
Objective is to use amplifiers' band to bound the possible frequencies
to be propagated. Since the current default f_min of Amp in json_io.py is
higher than the SI one, this would result in a different nb of channels
than currently used in tests, and a change in all tests. In order to
avoid this, I preferred to change this value and have consistency
between SI f_min and Amp f_min.

The commits adds a set of functions to make amps band the useable
spectrum on each OMS. Thee OMS generation is changed to use the amp band.

The commit adds filtering functions (demux and mux) to filter out spectrum
which is not in the amplifier band.

Spectrum assignment is also corrected to correctly match the amp bandwidth
constraint with guardband: center frequency index must be within the
usable part of the amp band. This changes a bit the notion of freq_index
and guardband in the functions, but this is transparent to user:
f_min, f_max represent the amp band, while self.freq_index_min/max
represent the center frequency boundary for a reference 50GHz channel.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I225b2b2dc0e1f1992c0460f6e08fa9c9bc641edf
2024-10-16 17:16:21 +00:00
EstherLerouzic
5277ae2005 Add a redesign option
redesign True means that network is redesigned using each request
as reference channel. When False it means that the design is made
once and successive propagation use the settings computed with this
design.

Default propogation is without redesign, so that path-request-script
must use the ----redesign-per-request option to behave as before this
commit.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0084185106d14659a846136620cd17791d551a7d
2024-10-16 17:15:20 +00:00
EstherLerouzic
30ead40e76 Creates a set of functions to be called by CLI and API
Instead of copying the CLI script in API code, use functions shared
by CLI and API

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I3f9b30b8700b68237d0e80768db015d8dec3deb5
2024-10-16 17:13:25 +00:00
EstherLerouzic
0d236fd31e fix: remove unused invocation test file
Wrongly added by commit #4a071c5

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I337b8d4560cd7f2634fca7d242783da327127de5
2024-10-16 16:42:09 +00:00
EstherLerouzic
4a071c53d7 feat: transform roadm-paths into list indexed with frequency band
to be conformed with ietf + to prepare for next multiband case

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If71857ef7dff9eaaa4c16e3837d3500bcef2fa72
2024-06-02 19:26:33 +02:00
EstherLerouzic
38cc0e3cc5 feat: separate span power from tx power
gnpy currently uses the same parameter for tx output power and span
input power: this prevents from modelling low tx power effect.
This patch introduces a new tx-cannel-power and uses it to
propagate in ROADM.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id3ac75e2cb617b513bdb38b51a52e05d15af46f5
2024-06-02 19:26:33 +02:00
EstherLerouzic
fb70413784 Refactor equipment and add some tests
This fixes error message for wrong trx type,  catches the case of
KeyError when trx_type is not part of the library.

removes power setting from this function: power out of transceiver or
at the input of span is nor defined in equipment Transceiver

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I15fa7cc772ab5c1a8c7637738eb83c2ddffa1219
2024-06-02 19:26:33 +02:00
EstherLerouzic
87e10c240e Add test on blocking due to PDL penalty
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I2d6a7f9ed0ff8ad6977bcfe1b78ed620bb0e848d
2024-06-02 19:26:33 +02:00
EstherLerouzic
4ace60bea2 Feat: apply roadm-path loss
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I87e27d5b653bdce814f43e4c9c1183fb51fbcc1e
2024-06-02 19:26:33 +02:00
EstherLerouzic
f950a6aee8 Feat: add detailed ROADM impairments per roadm-path
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I09c55dcff53ffb264609654cde0f1d8b9dc7fe9b
2024-06-02 19:26:33 +02:00
EstherLerouzic
fb4195c775 Feat: Enable multiple type_varieties for ROADM
This commit introduces the 'type_variety' attribute for ROADM elements,
allowing the use of different types of ROADM specifications instead of
being limited to the default one.

If no type variety name is provided in the eqpt_config, the 'default'
name is used for backward compatibility with libraries. Additionally,
if no type variety is defined in the ROADM element in the topology,
the default one is used for backward compatibility with topologies.

The 'type_variety' attribute is included in the 'to_json' and
'display' methods for ROADM elements.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I61a2491f994e47ad0b08cf8eaef30d6d855aa706
2024-06-02 19:26:33 +02:00
EstherLerouzic
29f42666e5 remove whites spaces and align parentheses
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0f5f389a3cf20155ceb0e9d9f071d1334a5ad688
2024-06-02 19:26:33 +02:00
EstherLerouzic
2b4a4ab72c fix Raman gain estimation during design
- Replaced multiple calls to the span_loss function
  with recording the span loss result in the fiber elements,
  reducing computation time.
- Updated Raman gain estimation based on design target powers to ensure
  accurate Edfa gain calculation or gain reduction during design.
- display the computed and design Raman gain in RamanFiber string output
- do not add padding on Raman fibers
- Added to_json function to preserve user input SimParams values,
  which were previously overwritten by initializing SimParams
  with fake values during design.

Next step is to allow users to balance computation time and
target accuracy of the design by inputing their own SimParams
and ref channels design values.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I1ca4954d0621858cefb3d776a538131992cae3e3
2024-04-12 08:58:16 +02:00
AndreaDAmico
2a800b781f Bug fix: Raman coefficient properly scaled in non SSMF case
Before the Raman coefficient was normalized with respect the given effective area, instead of the reference.

Change-Id: I4c0547db4fbd0f823a9058022b93c1ca37d67b51
2024-04-11 01:21:02 -04:00
Jan Kundrát
2d68b94a46 build: specify dependencies directly in setup.cfg
In tox v4, "reuse of environments" was disabled [1]. This is then later
explained [2] to refer to exactly that thing which we were using for
inheriting the dependencies from the top-level testenv all the way to
the docs build. That's why the docs build in GitHub CI started failing.

IMHO, The Correct Way™ of specifying what dependencies are used for
which feature are the so-called "extra dependencies". Once they are in
place, it is be possible to install gnpy via, e.g., `pip install
oopt-gnpy[docs]`. However, this process is (as far as I can tell)
incompatible with `requirements.txt`; all my attempts at using the
standard dependency syntax in that file have failed for me.

So, in order to make this happen, let's move all the dependencies from a
more-or-less ad-hoc collection of files to this declarative approach
right in setup.cfg. That way, the deps are listed on a single place, in
a declarative manner, and as a result, the installation is now a trivial
pip oneliner.

As a result, one can also remove that duplication of dependencies in
docs requirements.

[1] https://tox.wiki/en/4.11.4/upgrading.html#reuse-of-environments
[2] https://tox.wiki/en/4.11.4/upgrading.html#packaging-configuration-and-inheritance

Change-Id: I34aa0c71e993b39e2b805a7de40e133b4d290318
Fixes: 47c89626 fix docs requirements
2024-03-13 21:28:01 +01:00
EstherLerouzic
5481b93728 Fix frequency scaling for fiber
- wrong parameter was used in parameter
- error message could not read 0-dimensional arrey for 0 and -1 element
- add a test that makes use of the feature

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id7f6d6766d5b91a4b9410ad23aaa5e472b8ebb6f
2024-01-16 09:10:31 +00:00
EstherLerouzic
f195d5f496 fix: use ref power on transceiver to Roadm (or transceivers) links
The recent refactor removed a default pref in case of transceivers-OMS
(amplified links starting with a transceiver).
This resulted in a mismatch between input power during design
(default 0 forced in the function) and the design ref power using SI
power_dbm.

This change ensures that the same power is used for the input power
and for the design ref power, and avoid inconsistent gain computatiion.

The code has been using the same power input (SI power_dbm) to define the
power target out of a transceiver and the target out of amplifiers
(at the input of fibers). This will be changed in a future patch.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I610c8df19039bcf156a8ba77c79114b22913a538
2023-12-08 12:27:05 +01:00
Esther Le Rouzic
56569f866f Merge changes from topics "mixed-rate", "refactor_remove_pref"
* changes:
  Add a test on EOL
  add invocation test with the 3 equalization settings
  Add a test on out_voa optimisation function
  Clean a bit, add docstrings
  Remove Pref, and move ref_carrier definition
  Remove p_span0 from SI
  Remove p_spani from Pref
  Use design delta_p and gains instead of p_spani
  restore initial power sweep behaviour
  refactor cli to use a common design function
  Parametrize verbose in autodesign
  refactor build_network: create a separate function to add elements
  Computes reference input power in fiber during design
  Computes reference input power in ROADM during design
  Add a variable to hold delta_p even if gain mode is selected
  Add frequency range in default_edfa profile
  Add a test on gain mode behaviour
  Check element setting before and after propagation
  Correct design: apply saturation in all cases
  Add more tests on amp saturation
2023-12-04 16:09:37 +00:00
Esther Le Rouzic
bf1f293043 Merge "Add test in amplifier behaviour" 2023-12-04 16:08:14 +00:00
Esther Le Rouzic
28871c6f2d Merge pull request #480 from jktjkt/python-3.12
CI: Python 3.12 and extended platform coverage
2023-11-23 17:54:02 +01:00
EstherLerouzic
d7c1a6b75e Add a test on EOL
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Iddce655a64623a42cdaeaa2e8c269e3a737dd935
2023-11-20 17:07:53 +01:00
EstherLerouzic
c69c2a3af2 add invocation test with the 3 equalization settings
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0aee8da7bbf71991c68e163c7188efe1ddf29ff9
2023-11-20 17:07:53 +01:00
EstherLerouzic
fb29d72906 Add a test on out_voa optimisation function
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I36d71d85e5837965f6d5ae47820506d06b3cb94e
2023-11-20 17:07:53 +01:00
EstherLerouzic
139c8cc1e7 Remove Pref, and move ref_carrier definition
Finally, ref_carrier is not meant to change after design since
it is the carrier used for design. So let's move its definition
to networks function. Only ROADM need the ref_carrier baud rate
so let's define a dedicated variable in ROADM to hold it.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ida7e42dd534a04c8df8792b44980f3fd2165ecb6
2023-11-20 17:07:53 +01:00
EstherLerouzic
7034d4c686 Remove p_span0 from SI
reference channel is defined during design. No need to convey it
anymore during propagation.

move target_pch_out_db definition to the design phase and change
its name to be consistent with what it contains (dbm)

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I350e4557e8488a614674042de26152ab89b2d245
2023-11-20 17:07:53 +01:00
EstherLerouzic
10164495b9 Remove p_spani from Pref
next step: remove Pref

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I7cc17253a2d7ab3fb42e3d07c1665991cffa6222
2023-11-20 17:07:53 +01:00
EstherLerouzic
87211b35e9 Use design delta_p and gains instead of p_spani
Remove the visualisation of the effective_pch in amp because actual
and target are the relevant ones. effective_pch was artificially
related to a mix of reference channel and noisy channel (mixed between
on the fly redesign but using actual ROADM equalisation which includes noise
in its actual loss).

the change does no more rely on the target power (which is rounded)
but on the designed gain, which is not rounded.

Propagations are slightly changed for openroadm simulations because of that.
(I verified)

The gain of amp was estimated on the fly with p_spni also in case of
RamanFiber preceding elements. removing p_spani requies that an estimation
of Raman gain be done during design.

This commit also adds this estimation.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I960b85e99f85a7d168ac5349e325c4928fa5673b
2023-11-20 17:07:46 +01:00
EstherLerouzic
e9f9ddb4d6 restore initial power sweep behaviour
if user define a delta_p that is reduced because of saturation,
then this initial setting is still kept for power sweep to be sure
that the full amplitude of sweep is used.

SI power = 0 dBm
max power amp1 = 20 dBm,
user_defined_delta_p set by user = 3
80 channels, so pch_max = 20 - 10log10(80) = 0.96 dBm
power_sweep -> power range [-3, 0] dBm

then for initial design,
   pref = 0 dBm
   computed_delta_p =
      min(pch_max, pref + user_defined_delta_p) - pref = 0.96

but for -3 power sweep
   pref = -3 dBm
   computed_delta_p =
      min(pch_max, pref + user_defined_delta_p) - pref =
      min(0.96,    -3 + 3) - (-3) = 3
   so the user defined delta_p is applied as much as possible

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I8fd459c29aa9754ff9d4868af1d8be8642a31913
2023-11-20 11:10:07 +01:00
EstherLerouzic
6ac3a517cf refactor build_network: create a separate function to add elements
separate function that adds element, from function that configure them

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ica332223bdf7fc599cb007d7513d7cd62d9c5f9c
2023-11-20 10:25:07 +01:00
EstherLerouzic
2f2920a716 Computes reference input power in fiber during design
input power is computed at design time: so let's record it and
use it instead of p_span_i for reference channel fiber loss computation.
Note that this loss parameter is only used for visualisation purpose.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I16bd792bd6079ce521aafadcf5e21922aa3b4c81
2023-11-20 10:23:21 +01:00
EstherLerouzic
07fd89351b Computes reference input power in ROADM during design
input power is computed at design time: so let's record it and
use it instead of p_span_i for ROADM reference channel loss computation.
Note that this loss parameter is only used for visualisation purpose.
No impact on propagation.

Since this loss is computed for the reference channel used for
design, we need to record input power based on input degrees,
and indicate this information within the call function.

Note that this will be also usefull later on to implement ROADM
parameters

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I64d510fc20df72f07158f400964d592d76dc0ce4
2023-11-20 10:23:21 +01:00
EstherLerouzic
537eb017b5 Add frequency range in default_edfa profile
This range is the property of amps and is independant from user propagation range.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ib89f1987910aa3121a3b8c859a0a785f7d5e27eb
2023-11-20 10:23:21 +01:00