mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-01 18:47:48 +00:00
EDFA Parameters restructuring
The parameters of the EDFA are explicitely retrieved in the EDFAParams class. All the defaults are set instead in the gnpy.tool.json_io.AMP class. Where required, the AMP.default_values are used instead of an empty dictionary. Change-Id: Iba80a6a56bc89feb7e959b54b9bd424ec9b0bf06 Co-authored-by: Vittorio Gatto <vittoriogatto98@gmail.com>
This commit is contained in:
committed by
EstherLerouzic
parent
bbe5fb7821
commit
4ab5bac45f
@@ -9,12 +9,14 @@ Working with networks which consist of network elements
|
||||
"""
|
||||
|
||||
from operator import attrgetter
|
||||
from collections import namedtuple
|
||||
from logging import getLogger
|
||||
|
||||
from gnpy.core import elements
|
||||
from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError
|
||||
from gnpy.core.utils import round2float, convert_length
|
||||
from gnpy.core.info import ReferenceCarrier
|
||||
from collections import namedtuple
|
||||
from logging import getLogger
|
||||
from gnpy.tools.json_io import Amp
|
||||
|
||||
|
||||
logger = getLogger(__name__)
|
||||
@@ -361,7 +363,7 @@ def add_roadm_booster(network, roadm):
|
||||
network.remove_edge(roadm, next_node)
|
||||
amp = elements.Edfa(
|
||||
uid=f'Edfa_booster_{roadm.uid}_to_{next_node.uid}',
|
||||
params={},
|
||||
params=Amp.default_values,
|
||||
metadata={
|
||||
'location': {
|
||||
'latitude': roadm.lat,
|
||||
@@ -387,7 +389,7 @@ def add_roadm_preamp(network, roadm):
|
||||
network.remove_edge(prev_node, roadm)
|
||||
amp = elements.Edfa(
|
||||
uid=f'Edfa_preamp_{roadm.uid}_from_{prev_node.uid}',
|
||||
params={},
|
||||
params=Amp.default_values,
|
||||
metadata={
|
||||
'location': {
|
||||
'latitude': roadm.lat,
|
||||
@@ -416,7 +418,7 @@ def add_inline_amplifier(network, fiber):
|
||||
network.remove_edge(fiber, next_node)
|
||||
amp = elements.Edfa(
|
||||
uid=f'Edfa_{fiber.uid}',
|
||||
params={},
|
||||
params=Amp.default_values,
|
||||
metadata={
|
||||
'location': {
|
||||
'latitude': (fiber.lat + next_node.lat) / 2,
|
||||
|
||||
Reference in New Issue
Block a user