From d1ccd1d276c31620d178d14a1a1925742f4f7bc9 Mon Sep 17 00:00:00 2001 From: Jerry Guo Date: Sun, 1 Jun 2025 17:41:42 +0200 Subject: [PATCH 1/3] removed experimental flag for ILSE: api, test, doc Signed-off-by: Jerry Guo --- docs/user_manual/calculations.md | 2 +- docs/user_manual/components.md | 4 ---- .../include/power_grid_model/main_model_impl.hpp | 8 +++----- tests/native_api_tests/test_api_model.cpp | 5 ++--- tests/unit/test_error_handling.py | 5 ++--- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/docs/user_manual/calculations.md b/docs/user_manual/calculations.md index 38d9f304d5..7c4b1f1e09 100644 --- a/docs/user_manual/calculations.md +++ b/docs/user_manual/calculations.md @@ -108,7 +108,7 @@ In observable systems this helps better outputting correct results. On the other ``` ```{warning} -At the time of writing, the component [current sensor](./components.md#generic-current-sensor) is not supported in the calculation of [Newton-Raphson state estimation](#newton-raphson-state-estimation). The support in the calculation of [Iterative Linear state estimation](#iterative-linear-state-estimation) is experimental. +At the time of writing, the component [current sensor](./components.md#generic-current-sensor) is not supported in the calculation of [Newton-Raphson state estimation](#newton-raphson-state-estimation). ``` ##### Necessary observability condition diff --git a/docs/user_manual/components.md b/docs/user_manual/components.md index 315647ef48..3e8fe7d52e 100644 --- a/docs/user_manual/components.md +++ b/docs/user_manual/components.md @@ -863,10 +863,6 @@ $$ ### Generic Current Sensor -```{warning} -At the time of writing, this feature is still experimental and is not yet publicly available. -``` - ```{warning} At the time of writing, state estimation with current sensors is not supported by the Newton-Raphson calculation method. ``` diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/main_model_impl.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/main_model_impl.hpp index df35e2a867..da511facdf 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/main_model_impl.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/main_model_impl.hpp @@ -803,11 +803,9 @@ class MainModelImpl, ComponentLis void check_no_experimental_features_used(Options const& options) const { if (options.calculation_type == CalculationType::state_estimation && - state_.components.template size() > 0) { - if (options.calculation_method == CalculationMethod::newton_raphson) { - throw ExperimentalFeature{"Newton-Raphson state estimation is not implemented for current sensors"}; - } - throw ExperimentalFeature{"State estimation with current sensors is experimental"}; + state_.components.template size() > 0 && + options.calculation_method == CalculationMethod::newton_raphson) { + throw ExperimentalFeature{"Newton-Raphson state estimation is not implemented for current sensors"}; } } diff --git a/tests/native_api_tests/test_api_model.cpp b/tests/native_api_tests/test_api_model.cpp index d090aadbdf..74a8489989 100644 --- a/tests/native_api_tests/test_api_model.cpp +++ b/tests/native_api_tests/test_api_model.cpp @@ -1063,7 +1063,7 @@ TEST_CASE("API Model") { } } - SUBCASE("Current sensor is experimental") { + SUBCASE("Current sensor for NRSE is experimental: not implemented") { auto const input_data_se_json = R"json({ "version": "1.0", "type": "input", @@ -1103,8 +1103,7 @@ TEST_CASE("API Model") { "Newton-Raphson state estimation is not implemented for current sensors", PowerGridRegularError); } else { - CHECK_THROWS_WITH_AS(run_se_with_current_sensor(method, PGM_experimental_features_disabled), - "State estimation with current sensors is experimental", PowerGridRegularError); + CHECK_NOTHROW(run_se_with_current_sensor(method, PGM_experimental_features_disabled)); } CHECK_NOTHROW(run_se_with_current_sensor(method, PGM_experimental_features_enabled)); } diff --git a/tests/unit/test_error_handling.py b/tests/unit/test_error_handling.py index 3d02c23259..867211689f 100644 --- a/tests/unit/test_error_handling.py +++ b/tests/unit/test_error_handling.py @@ -14,7 +14,6 @@ LoadGenType, MeasuredTerminalType, TapChangingStrategy, - _ExperimentalFeatures, ) from power_grid_model.errors import ( AutomaticTapInputError, @@ -422,7 +421,7 @@ def test_conflicting_angle_measurement_type() -> None: ) with pytest.raises(ConflictingAngleMeasurementType): - model._calculate_state_estimation(decode_error=True, experimental_features=_ExperimentalFeatures.enabled) + model._calculate_state_estimation(decode_error=True) def test_global_current_measurement_without_voltage_angle() -> None: @@ -470,7 +469,7 @@ def test_global_current_measurement_without_voltage_angle() -> None: ) with pytest.raises(NotObservableError): - model._calculate_state_estimation(decode_error=True, experimental_features=_ExperimentalFeatures.enabled) + model._calculate_state_estimation(decode_error=True) @pytest.mark.skip(reason="TODO") From df042925340f22260ba968e165413b689a1cecb6 Mon Sep 17 00:00:00 2001 From: Jerry Guo Date: Mon, 2 Jun 2025 10:21:39 +0200 Subject: [PATCH 2/3] missed one warning in doc Signed-off-by: Jerry Guo --- docs/user_manual/components.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/user_manual/components.md b/docs/user_manual/components.md index 3e8fe7d52e..129f3c3778 100644 --- a/docs/user_manual/components.md +++ b/docs/user_manual/components.md @@ -894,10 +894,6 @@ However, such mixing of sensor types is allowed as long as they are on different #### Current Sensor Concrete Types -```{warning} -At the time of writing, this feature is still experimental and is not yet publicly available. -``` - ```{warning} At the time of writing, state estimation with current sensors is not supported by the Newton-Raphson calculation method. ``` From efc62a1d4c4b34460f910c14a2b3a07070daa919 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 4 Jun 2025 16:04:43 +0200 Subject: [PATCH 3/3] remove experimental feature flag from ILSE validation cases Signed-off-by: Martijn Govers --- .../current-sensor/global-current-sensor/params.json | 3 --- .../current-sensor/local-current-sensor/params.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/tests/data/state_estimation/current-sensor/global-current-sensor/params.json b/tests/data/state_estimation/current-sensor/global-current-sensor/params.json index df59b65483..aecd114cec 100644 --- a/tests/data/state_estimation/current-sensor/global-current-sensor/params.json +++ b/tests/data/state_estimation/current-sensor/global-current-sensor/params.json @@ -9,9 +9,6 @@ ".+_residual": 5e-4 }, "extra_params": { - "iterative_linear": { - "experimental_features": "enabled" - }, "newton_raphson": { "experimental_features": "enabled", "fail": { diff --git a/tests/data/state_estimation/current-sensor/local-current-sensor/params.json b/tests/data/state_estimation/current-sensor/local-current-sensor/params.json index df59b65483..aecd114cec 100644 --- a/tests/data/state_estimation/current-sensor/local-current-sensor/params.json +++ b/tests/data/state_estimation/current-sensor/local-current-sensor/params.json @@ -9,9 +9,6 @@ ".+_residual": 5e-4 }, "extra_params": { - "iterative_linear": { - "experimental_features": "enabled" - }, "newton_raphson": { "experimental_features": "enabled", "fail": {