From 410114ab6586d9a6914117247789c93d10ffd2ad Mon Sep 17 00:00:00 2001 From: paulf81 Date: Mon, 15 Dec 2025 11:20:20 -0700 Subject: [PATCH 1/5] set high soc default to 1 --- hycon/controllers/battery_controller.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hycon/controllers/battery_controller.py b/hycon/controllers/battery_controller.py index 8314faee..a4209a45 100644 --- a/hycon/controllers/battery_controller.py +++ b/hycon/controllers/battery_controller.py @@ -213,18 +213,23 @@ def __init__(self, interface, input_dict, controller_parameters={}, verbose=True def set_controller_parameters( self, - high_soc=0.8, + high_soc=1.0, low_soc=0.2, **_, # <- Allows arbitrary additional parameters to be passed, which are ignored ): """ Set parameters for BatteryPriceSOCController. - high_soc is the SOC threshold above which the battery will only charge if the price is above - the highest (hourly) DA price of the day. + high_soc is the SOC threshold above which the battery will only charge if the price is below + the lowest (hourly) DA price of the day. Defaults to 1.0. low_soc is the SOC threshold below which the battery will only discharge if the price is - below the lowest (hourly) DA price of the day. + above the highest (hourly) DA price of the day. Defaults to 0.2. + + Note high_soc defaults to 1.0 (effictively disabled) since experience suggests waiting for + very low prices is not worthwhile. On the other hand, + low_soc defaults to 0.2 since experience suggests waiting for + very high prices is worthwhile. Args: high_soc (float): High SOC threshold (0 to 1). From 5344fe3c23f4d3d5f6b3d0aac014a70425ea7d7d Mon Sep 17 00:00:00 2001 From: paulf81 Date: Mon, 15 Dec 2025 11:26:08 -0700 Subject: [PATCH 2/5] add defaults --- hycon/controllers/battery_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hycon/controllers/battery_controller.py b/hycon/controllers/battery_controller.py index a4209a45..65b71cad 100644 --- a/hycon/controllers/battery_controller.py +++ b/hycon/controllers/battery_controller.py @@ -232,8 +232,8 @@ def set_controller_parameters( very high prices is worthwhile. Args: - high_soc (float): High SOC threshold (0 to 1). - low_soc (float): Low SOC threshold (0 to 1). + high_soc (float): High SOC threshold (0 to 1). Defaults to 1.0. + low_soc (float): Low SOC threshold (0 to 1). Defaults to 0.2. """ self.high_soc = high_soc self.low_soc = low_soc From f13344292806664fcdba014f17ec451d96d86afb Mon Sep 17 00:00:00 2001 From: paulf81 Date: Mon, 15 Dec 2025 11:27:38 -0700 Subject: [PATCH 3/5] linting --- hycon/controllers/battery_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hycon/controllers/battery_controller.py b/hycon/controllers/battery_controller.py index 65b71cad..82cf0bb5 100644 --- a/hycon/controllers/battery_controller.py +++ b/hycon/controllers/battery_controller.py @@ -226,9 +226,9 @@ def set_controller_parameters( low_soc is the SOC threshold below which the battery will only discharge if the price is above the highest (hourly) DA price of the day. Defaults to 0.2. - Note high_soc defaults to 1.0 (effictively disabled) since experience suggests waiting for - very low prices is not worthwhile. On the other hand, - low_soc defaults to 0.2 since experience suggests waiting for + Note high_soc defaults to 1.0 (effictively disabled) since experience suggests waiting for + very low prices is not worthwhile. On the other hand, + low_soc defaults to 0.2 since experience suggests waiting for very high prices is worthwhile. Args: From 30d97a715b87949b06d174c168c3a1678253cdf0 Mon Sep 17 00:00:00 2001 From: paulf81 Date: Mon, 15 Dec 2025 11:27:57 -0700 Subject: [PATCH 4/5] sp --- hycon/controllers/battery_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hycon/controllers/battery_controller.py b/hycon/controllers/battery_controller.py index 82cf0bb5..8209f713 100644 --- a/hycon/controllers/battery_controller.py +++ b/hycon/controllers/battery_controller.py @@ -226,7 +226,7 @@ def set_controller_parameters( low_soc is the SOC threshold below which the battery will only discharge if the price is above the highest (hourly) DA price of the day. Defaults to 0.2. - Note high_soc defaults to 1.0 (effictively disabled) since experience suggests waiting for + Note high_soc defaults to 1.0 (effectively disabled) since experience suggests waiting for very low prices is not worthwhile. On the other hand, low_soc defaults to 0.2 since experience suggests waiting for very high prices is worthwhile. From 10c48692e0cbf5ff4771fc3d53678ca41624d1fd Mon Sep 17 00:00:00 2001 From: misi9170 Date: Fri, 19 Dec 2025 08:26:44 -0700 Subject: [PATCH 5/5] Minor docstring cleanup --- hycon/controllers/battery_controller.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hycon/controllers/battery_controller.py b/hycon/controllers/battery_controller.py index 8209f713..7dec25ae 100644 --- a/hycon/controllers/battery_controller.py +++ b/hycon/controllers/battery_controller.py @@ -226,10 +226,9 @@ def set_controller_parameters( low_soc is the SOC threshold below which the battery will only discharge if the price is above the highest (hourly) DA price of the day. Defaults to 0.2. - Note high_soc defaults to 1.0 (effectively disabled) since experience suggests waiting for - very low prices is not worthwhile. On the other hand, - low_soc defaults to 0.2 since experience suggests waiting for - very high prices is worthwhile. + high_soc defaults to 1.0 (effectively disabled) as experience suggests waiting for + very low prices is not worthwhile. low_soc defaults to 0.2 as experience suggests waiting + for very high prices is worthwhile. Args: high_soc (float): High SOC threshold (0 to 1). Defaults to 1.0.