MCPcopy Create free account
hub / github.com/PowerGridModel/power-grid-model / PowerGridModelWithExt

Class PowerGridModelWithExt

tests/unit/utils.py:96–112  ·  view source on GitHub ↗

Wrapper class around the power grid model to expose extended features.

Source from the content-addressed store, hash-verified

94
95
96class PowerGridModelWithExt(PowerGridModel):
97 """Wrapper class around the power grid model to expose extended features."""
98
99 def __init__(self, *args, **kwargs):
100 super().__init__(*args, **kwargs)
101
102 def calculate_power_flow_with_ext(self, *args, **kwargs):
103 """calculate_power_flow with extended features."""
104 return self._calculate_power_flow(*args, **kwargs)
105
106 def calculate_state_estimation_with_ext(self, *args, **kwargs):
107 """calculate_state_estimation with extended features."""
108 return self._calculate_state_estimation(*args, **kwargs)
109
110 def calculate_short_circuit_with_ext(self, *args, **kwargs):
111 """calculate_short_circuit with extended features."""
112 return self._calculate_short_circuit(*args, **kwargs)
113
114
115def get_output_type(calculation_type: str, sym: bool) -> str:

Callers 3

test_single_validationFunction · 0.85
test_batch_validationFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_single_validationFunction · 0.68
test_batch_validationFunction · 0.68