mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-31 18:18:00 +00:00
raman tag in eqpt description
manage raman restrictions Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
This commit is contained in:
@@ -114,7 +114,8 @@ class Amp(common):
|
|||||||
'dgt': None,
|
'dgt': None,
|
||||||
'gain_ripple': None,
|
'gain_ripple': None,
|
||||||
'out_voa_auto': False,
|
'out_voa_auto': False,
|
||||||
'allowed_for_design': False
|
'allowed_for_design': False,
|
||||||
|
'raman': False
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
|||||||
@@ -91,14 +91,14 @@ def select_edfa(raman_allowed, gain_target, power_target, equipment, uid):
|
|||||||
"""amplifer selection algorithm
|
"""amplifer selection algorithm
|
||||||
@Orange Jean-Luc Augé
|
@Orange Jean-Luc Augé
|
||||||
"""
|
"""
|
||||||
Edfa_list = namedtuple('Edfa_list', 'type_def variety power gain_max gain_min nf')
|
Edfa_list = namedtuple('Edfa_list', 'raman variety power gain_max gain_min nf')
|
||||||
TARGET_EXTENDED_GAIN = 2.1
|
TARGET_EXTENDED_GAIN = 2.1
|
||||||
#MAX_EXTENDED_GAIN = 5
|
#MAX_EXTENDED_GAIN = 5
|
||||||
edfa_dict = equipment['Edfa']
|
edfa_dict = equipment['Edfa']
|
||||||
pin = power_target - gain_target
|
pin = power_target - gain_target
|
||||||
|
|
||||||
edfa_list = [Edfa_list(
|
edfa_list = [Edfa_list(
|
||||||
type_def = edfa.type_def,
|
raman = edfa.raman,
|
||||||
variety=edfa_variety,
|
variety=edfa_variety,
|
||||||
power=min(
|
power=min(
|
||||||
pin
|
pin
|
||||||
@@ -120,9 +120,9 @@ def select_edfa(raman_allowed, gain_target, power_target, equipment, uid):
|
|||||||
|
|
||||||
#filter on max gain limitation:
|
#filter on max gain limitation:
|
||||||
|
|
||||||
raman = lambda x : (x.type_def == "dual_stage" and raman_allowed) \
|
raman_filter = lambda x : (x.raman and raman_allowed) \
|
||||||
or (x.type_def != "dual_stage")
|
or not x.raman
|
||||||
edfa_list = list(filter(raman, edfa_list))
|
edfa_list = list(filter(raman_filter, edfa_list))
|
||||||
|
|
||||||
acceptable_gain_list = \
|
acceptable_gain_list = \
|
||||||
list(filter(lambda x : x.gain_max>0, edfa_list))
|
list(filter(lambda x : x.gain_max>0, edfa_list))
|
||||||
|
|||||||
Reference in New Issue
Block a user