improve power mode and gain mode

power mode no longer reads operational_gain:
	now reads operational.dp_db
	or calculate optimum dp_db from next span loss
gain_mode:
	reads operational.gain_target
	or use gain_from_dp

Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>

squash to dp

Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
This commit is contained in:
Jean-Luc Auge
2019-02-15 18:56:53 +01:00
parent ab69cf5bf4
commit a0f6380f90
3 changed files with 33 additions and 37 deletions

View File

@@ -490,7 +490,7 @@ class Edfa(Node):
self.pin_db = None
self.nch = None
self.pout_db = None
self.dp_db = None #delta P with Pref (power swwep) in power mode
self.dp_db = self.operational.dp_db #delta P with Pref (power swwep) in power mode
self.target_pch_out_db = None
self.effective_pch_out_db = None
self.passive = False
@@ -584,8 +584,6 @@ class Edfa(Node):
if self.dp_db is not None:
self.target_pch_out_db = round(self.dp_db + pref.p0, 2)
self.effective_gain = self.target_pch_out_db - pref.pi
else:
self.effective_gain = self.operational.gain_target
"""check power saturation and correct effective gain & power accordingly:"""
self.effective_gain = min(