Skip to content

Commit ca56983

Browse files
remove experimental flag
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
1 parent a24a680 commit ca56983

3 files changed

Lines changed: 3 additions & 50 deletions

File tree

power_grid_model_c/power_grid_model/include/power_grid_model/main_model_impl.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -801,12 +801,7 @@ class MainModelImpl<ExtraRetrievableTypes<ExtraRetrievableType...>, ComponentLis
801801

802802
CalculationInfo calculation_info() const { return calculation_info_; }
803803

804-
void check_no_experimental_features_used(Options const& options) const {
805-
if (options.calculation_type == CalculationType::state_estimation &&
806-
state_.components.template size<GenericCurrentSensor>() > 0) {
807-
throw ExperimentalFeature{"State estimation", "current sensors"};
808-
}
809-
}
804+
void check_no_experimental_features_used(Options const& options) const {}
810805

811806
private:
812807
template <typename Component, typename MathOutputType, typename ResIt>

tests/native_api_tests/test_api_model.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,47 +1062,6 @@ TEST_CASE("API Model") {
10621062
}
10631063
}
10641064
}
1065-
1066-
SUBCASE("Current sensor is experimental") {
1067-
auto const input_data_se_json = R"json({
1068-
"version": "1.0",
1069-
"type": "input",
1070-
"is_batch": false,
1071-
"attributes": {},
1072-
"data": {
1073-
"node": [
1074-
{"id": 1, "u_rated": 10000},
1075-
{"id": 2, "u_rated": 10000}
1076-
],
1077-
"line": [
1078-
{"id": 3, "from_node": 1, "to_node": 2, "from_status": 0, "to_status": 0, "r1": 0.000416, "x1": 0.000136, "c1": 1e-09, "tan1": 0}
1079-
],
1080-
"sym_current_sensor": [
1081-
{"id": 4, "measured_object": 3, "measured_terminal_type": 0, "angle_measurement_type": 0, "i_sigma": 1, "i_angle_sigma": 0.05, "i_measured": 10, "i_angle_measured": 0.3}
1082-
]
1083-
}
1084-
})json";
1085-
1086-
auto const owning_input_dataset_se = load_dataset(input_data_se_json);
1087-
auto const& input_dataset_se = owning_input_dataset_se.dataset;
1088-
1089-
auto const run_se_with_current_sensor = [&input_dataset_se](PGM_CalculationMethod method,
1090-
PGM_ExperimentalFeatures experimental_features) {
1091-
Model model_with_current_sensor{50.0, input_dataset_se};
1092-
Options experimental_options{};
1093-
experimental_options.set_calculation_type(PGM_state_estimation);
1094-
experimental_options.set_calculation_method(method);
1095-
experimental_options.set_experimental_features(experimental_features);
1096-
DatasetMutable const output_dataset{"sym_output", false, 1};
1097-
model_with_current_sensor.calculate(experimental_options, output_dataset);
1098-
};
1099-
for (auto const method : {PGM_default_method, PGM_iterative_linear, PGM_newton_raphson}) {
1100-
CAPTURE(method);
1101-
CHECK_THROWS_WITH_AS(run_se_with_current_sensor(method, PGM_experimental_features_disabled),
1102-
"State estimation is not implemented for current sensors!\n", PowerGridRegularError);
1103-
CHECK_NOTHROW(run_se_with_current_sensor(method, PGM_experimental_features_enabled));
1104-
}
1105-
}
11061065
}
11071066

11081067
} // namespace power_grid_model_cpp

tests/unit/test_error_handling.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
LoadGenType,
1515
MeasuredTerminalType,
1616
TapChangingStrategy,
17-
_ExperimentalFeatures,
1817
)
1918
from power_grid_model.errors import (
2019
AutomaticTapInputError,
@@ -422,7 +421,7 @@ def test_conflicting_angle_measurement_type() -> None:
422421
)
423422

424423
with pytest.raises(ConflictingAngleMeasurementType):
425-
model._calculate_state_estimation(decode_error=True, experimental_features=_ExperimentalFeatures.enabled)
424+
model._calculate_state_estimation(decode_error=True)
426425

427426

428427
def test_global_current_measurement_without_voltage_angle() -> None:
@@ -470,7 +469,7 @@ def test_global_current_measurement_without_voltage_angle() -> None:
470469
)
471470

472471
with pytest.raises(NotObservableError):
473-
model._calculate_state_estimation(decode_error=True, experimental_features=_ExperimentalFeatures.enabled)
472+
model._calculate_state_estimation(decode_error=True)
474473

475474

476475
@pytest.mark.skip(reason="TODO")

0 commit comments

Comments
 (0)