Repository navigation
split consumer and cp standby threshold - #4204
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The load-specific threshold changes are covered by regression tests across the affected control paths, with no active review issues identified.
No open issues 🎉
What changed in this PR
This pull request separates standby-current thresholds for consumers and chargepoints, allowing low-power consumers to remain recognized as active while preserving the existing chargepoint behavior.
Changes:
- Adds load-specific
get_mean_current()behavior:0.15 Afor consumers and0.5 Afor chargepoints. - Updates counter, consumer, chargepoint, surplus-control, and common algorithm logic to use load-specific current calculations.
- Adds regression coverage for small consumer currents and threshold behavior.
- An unresolved boundary inconsistency remains for consumers reporting exactly
0.15 A; the mean-current calculation andcharge_stateclassification use different comparisons.
| File | Description |
|---|---|
packages/control/load_protocol.py |
Adds the shared load-specific mean-current implementation and default threshold. The exact-threshold comparison is inconsistent with consumer state classification. |
packages/control/load_protocol_test.py |
Tests consumer and chargepoint threshold differences. |
packages/control/counter.py |
Uses load-specific current calculations in counter handling. |
packages/control/counter_test.py |
Covers small consumers with unknown phase configuration. |
packages/control/consumer/consumer.py |
Applies the consumer threshold when determining minimum and required current. |
packages/control/consumer/consumer_test.py |
Tests that small running consumers remain enabled. |
packages/control/chargepoint/chargepoint.py |
Uses the chargepoint-specific current calculation for logging. |
packages/control/algorithm/utils.py |
Makes the charging-current threshold configurable. |
packages/control/algorithm/utils_test.py |
Verifies the unchanged default threshold behavior. |
packages/control/algorithm/surplus_controlled.py |
Uses load-specific current values in surplus regulation. |
packages/control/algorithm/surplus_controlled_test.py |
Tests current limiting for small consumers. |
packages/control/algorithm/common.py |
Uses load-specific current values in load-management calculations. |
packages/control/algorithm/common_test.py |
Tests that small consumer current is retained during load management. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
references #4203 (comment)