77from typing import Dict
88
99from pypowsybl import _pypowsybl
10- from pypowsybl ._pypowsybl import ShortCircuitStudyType
10+ from pypowsybl ._pypowsybl import ShortCircuitStudyType , InitialVoltageProfileMode
1111
1212ShortCircuitStudyType .__module__ = __name__
1313ShortCircuitStudyType .__name__ = 'ShortCircuitStudyType'
14+ InitialVoltageProfileMode .__module__ = __name__
15+ InitialVoltageProfileMode .__name__ = 'InitialVoltageProfileMode'
1416
1517
1618class Parameters : # pylint: disable=too-few-public-methods
@@ -35,6 +37,7 @@ class Parameters: # pylint: disable=too-few-public-methods
3537 min_voltage_drop_proportional_threshold: specifies a threshold for filtering the voltage results.
3638 Only nodes where the voltage drop due to the short circuit is greater than this property are retained.
3739 study_type: specifies the type of short-circuit study. It can be SUB_TRANSIENT, TRANSIENT or STEADY_STATE.
40+ initial_voltage_profile_mode: specify how the computation is initialized. It can be NOMINAL, CONFIGURED or PREVIOUS_VALUE
3841 """
3942
4043 def __init__ (self ,
@@ -44,7 +47,8 @@ def __init__(self,
4447 min_voltage_drop_proportional_threshold : float = None ,
4548 study_type : ShortCircuitStudyType = None ,
4649 provider_parameters : Dict [str , str ] = None ,
47- with_fortescue_result : bool = None ):
50+ with_fortescue_result : bool = None ,
51+ initial_voltage_profile_mode : InitialVoltageProfileMode = None ):
4852 self ._init_with_default_values ()
4953 if with_feeder_result is not None :
5054 self .with_feeder_result = with_feeder_result
@@ -60,6 +64,8 @@ def __init__(self,
6064 self .provider_parameters = provider_parameters
6165 if with_fortescue_result is not None :
6266 self .with_fortescue_result = with_fortescue_result
67+ if initial_voltage_profile_mode is not None :
68+ self .initial_voltage_profile_mode = initial_voltage_profile_mode
6369
6470 def _init_from_c (self , c_parameters : _pypowsybl .ShortCircuitAnalysisParameters ) -> None :
6571 self .with_feeder_result = c_parameters .with_feeder_result
@@ -70,6 +76,7 @@ def _init_from_c(self, c_parameters: _pypowsybl.ShortCircuitAnalysisParameters)
7076 self .provider_parameters = dict (
7177 zip (c_parameters .provider_parameters_keys , c_parameters .provider_parameters_values ))
7278 self .with_fortescue_result = c_parameters .with_fortescue_result
79+ self .initial_voltage_profile_mode = c_parameters .initial_voltage_profile_mode
7380
7481 def _init_with_default_values (self ) -> None :
7582 self ._init_from_c (_pypowsybl .ShortCircuitAnalysisParameters ())
@@ -79,6 +86,7 @@ def _init_with_default_values(self) -> None:
7986 self .min_voltage_drop_proportional_threshold = 0
8087 self .study_type = ShortCircuitStudyType .TRANSIENT
8188 self .with_fortescue_result = False
89+ self .initial_voltage_profile_mode = InitialVoltageProfileMode .NOMINAL
8290
8391 def _to_c_parameters (self ) -> _pypowsybl .ShortCircuitAnalysisParameters :
8492 c_parameters = _pypowsybl .ShortCircuitAnalysisParameters ()
@@ -88,6 +96,7 @@ def _to_c_parameters(self) -> _pypowsybl.ShortCircuitAnalysisParameters:
8896 c_parameters .study_type = self .study_type
8997 c_parameters .with_fortescue_result = self .with_fortescue_result
9098 c_parameters .min_voltage_drop_proportional_threshold = self .min_voltage_drop_proportional_threshold
99+ c_parameters .initial_voltage_profile_mode = self .initial_voltage_profile_mode
91100 c_parameters .provider_parameters_keys = []
92101 c_parameters .provider_parameters_values = []
93102 return c_parameters
@@ -100,4 +109,5 @@ def __repr__(self) -> str:
100109 f", min_voltage_drop_proportional_threshold={ self .min_voltage_drop_proportional_threshold !r} " \
101110 f", study_type={ self .study_type !r} " \
102111 f", with_fortescue_result={ self .with_fortescue_result !r} " \
112+ f", initial_voltage_profile_mode={ self .initial_voltage_profile_mode !r} " \
103113 f")"
0 commit comments