Commit Graph

1511 Commits

Author SHA1 Message Date
EstherLerouzic
4ef01d54a5 fix plot bug: do not overwrite the path used for plot
The plot function failed to recognize 'path' as part
of the network due to the reuse of the 'path' variable.
This led to errors when attempting to plot.

Solution is to use a different name for the deepcopy of
path elements used to record the propagation results
'propagated_path'.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0351c37de0d74391ebeb68e974b777b1f51572aa
v2.11.1
2025-01-10 11:08:04 +01:00
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
33a289e22b fix: restore uid info in warning logs
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I2fdd29a4461b250661b1ccaa9737836fc3fe8695
2024-12-06 16:35:46 +01:00
EstherLerouzic
e593b8c9ec fix case where there are multiple multiband amps matching the sub amp type
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ibe86499866f2f9e3dfd70b51a33b919d584b812b
2024-12-06 16:35:46 +01:00
EstherLerouzic
94a6f922cd fix typing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0f1621b669b4db833d0760368cd834f3186ee2db
2024-12-06 16:35:46 +01:00
EstherLerouzic
fbe387915b fix: offset was not correctly taken into account on reversed path
TODO: write a test!

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I7ac909bb9b8c9700c3841f133245f17f49ba3467
2024-12-06 16:35:46 +01:00
EstherLerouzic
fce9d1d293 chore: refactor json_io
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If764ba7b520a060deb855c0b55e17c78fa22f841
2024-12-06 16:35:46 +01:00
EstherLerouzic
a59db8fd12 fix: cli_examples linter issues
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Id7e2f8b7282913b885062a01f1bd018bbc85e39c
2024-12-06 16:35:46 +01:00
EstherLerouzic
de509139b3 fix: linter issues on json_io
add docstrings, typing, small fixes

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I01d0fabe5e34103077ec2de829e96829e6202e1e
2024-12-06 16:35:46 +01:00
EstherLerouzic
bb77b3f4a8 fix: remove unused _automatic_spacing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ie3c2fc226f8a549622933cbd1ba8a6b8be213f92
2024-12-06 16:35:46 +01:00
EstherLerouzic
34c7fd1b60 fix: save autodesign file after autodesign!
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: If1c82c8cb7ff9dbb8bf5c2d5c4b96beaa59dc402
2024-12-06 16:35:46 +01:00
EstherLerouzic
89a962ffaf fix remove unnecessary else after return
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I61dc58f15c8f03a686437e19a36ac0afe35904e9
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
abf42afaf8 fix ci: The macOS-12 environment is deprecated
remove this check and add one for The macOS-14 instead

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ief1c990cbc67ec4d7912404c24d67f9f2fa6d96e
2024-12-06 16:35:46 +01:00
EstherLerouzic
310995045e fix: linter issues in convert and service_sheet
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I5f7490ed61b53cea8d2923a8a54d38b3fbb5fa0a
2024-12-06 16:35:43 +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
4b6f4af3a5 Refactor to reduce cognitive complexity
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia9992ebbe06498ed53b3987edd4eb139d960ff75
2024-11-25 17:07:33 +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
defe3bee5c feat: documentation for ROADM excel sheet input
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ie662015c9cd0a90aff46c63fce47d678ffe1d4db
2024-11-25 12:09:14 +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
EstherLerouzic
4796266657 fix bug in roadm to_json: move per_degree_impairments in params
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I75ed610f201608a3cb651e8c0604de444113bc25
2024-11-25 08:55:00 +01:00
EstherLerouzic
c35104c184 Add documentation for multiband
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Iadf6d9edd8c67c1389c4a0d482466a8c52198621
v2.11
2024-11-21 09:26:51 +01:00
AndreaDAmico
7b1354ee24 fix: avoid using cumtrapz from scipy
cumtrapz has been replaced with cumulative_trapezoid in the scipy version currently required by GNPy.

Change-Id: I6790f7aa8d8e8d171faa48db4b20e6a93141c471
2024-11-15 22:25:27 +00: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
24f4503020 Preselect multiband amplifiers based on band gain and power targets
To ensure that the multiband amplifier meets the required gain and
power targets for each band, this commit introduces a preselection
process for the amplifiers type variety. The preselection ensures
that only compatible amplifiers are considered, avoiding that
an amplifier is selected for one band that is not part of the same
multiband amplifier type variety of the amplifier selected for the
other band(s).

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I8de7e0b7c165e6edfe47d7f4cda80db23924a9c9
2024-10-16 17:46:34 +00:00
EstherLerouzic
520c3615e4 Refactor select_edfa
Objective is to reuse the functions that lists suitable type variety candidates
for each amplifier of the multiband amplifier

restrictions are processed before entering select_edfa.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I8c784cef6bfed9a2e95bc39434a32191678db81f
2024-10-16 17:40:29 +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
64a91256fc Propagate power per band during autodesign
Target setting computation is done going through each element of the OMS
and computing resulting delta power after each amplifier element. In order
to account for different delta power per band (multi band autodesign), the
computation must be made per band. The previous introduction of a standard
name for bands ("CBAND", "LBAND") ensures a stable key to index these
delta power computation.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ida4b2486ebde4f2a1fb21a44458d1fe34a788d1f
2024-10-16 17:37:35 +00:00
EstherLerouzic
bdcffc2a5e Refactor: define a separate function to compute targets
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I5698feb059f13b90c1ab3d0843fb000c4e0b6b59
2024-10-16 17:36:52 +00:00
EstherLerouzic
c384af8062 Refactor: create a function to set one single band amplifier
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I00018c38b0cc0ceefcd21d50dd0cdc639019cc70
2024-10-16 17:36:25 +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
920ac30aa5 Refactor and simplify network functions
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ifa0949a8b7739036639e1a4b006ceb08804558ce
2024-10-16 17:24:52 +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
ae858b911a fix: capture warning to show the ROADM uid
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ie13bf4c3436a5a0b8ec730698920eee2c7fb81e8
2024-10-16 17:10:34 +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
v2.10
2024-10-16 16:42:09 +00:00
EstherLerouzic
9a84e29433 fix: remove freq2wavelength that is already defined
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I8ef480460e689bfcb33116cd393ad92ed0e03338
2024-10-08 11:07:13 +00:00
‘Renato
143f63170e FIX: json indentation in example-data
Change-Id: If3585fc554638cb1e5f7e4564d10af29420b6159
2024-09-20 13:49:26 +00:00
EstherLerouzic
b2d7f883a1 Add documentation for topology, service and sim-params files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I0d917b742acd91aa52403f1ac96a378bb3cd8497
2024-06-02 19:26:33 +02:00