Skip to content

Commit

Permalink
Merge pull request #94 from alliander-opensource/bugfix/tap-size-zero
Browse files Browse the repository at this point in the history
tap_size: all_greater_than_zero -> all_greater_than_or_equal_to_zero
  • Loading branch information
TonyXiang8787 authored Jul 14, 2022
2 parents 20e5235 + eb123be commit 59b5a5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/graph-data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ In this case the winding voltage is decreased if the tap position is increased.*
| `tap_min` | `int8_t` | - | position of tap changer at minimum voltage | ✔ | ✔ | ❌ | ❌ | |
| `tap_max` | `int8_t` | - | position of tap changer at maximum voltage | ✔ | ✔ | ❌ | ❌ | |
| `tap_nom` | `int8_t` | - | nominal position of tap changer | &#10060; default zero | &#10004; | &#10060; | &#10060; | `(tap_min <= tap_nom <= tap_max)` or `(tap_min >= tap_nom >= tap_max)` |
| `tap_size` | `double` | volt (V) | size of each tap of the tap changer | &#10004; | &#10004; | &#10060; | &#10060; | `> 0` |
| `tap_size` | `double` | volt (V) | size of each tap of the tap changer | &#10004; | &#10004; | &#10060; | &#10060; | `>= 0` |
| `uk_min` | `double` | - | relative short circuit voltage at minimum tap | &#10060; default same as `uk` | &#10004; | &#10060; | &#10060; | `>= pk_min / sn` and `> 0` and `< 1` |
| `uk_max` | `double` | - | relative short circuit voltage at maximum tap | &#10060; default same as `uk` | &#10004; | &#10060; | &#10060; | `>= pk_max / sn` and `> 0` and `< 1` |
| `pk_min` | `double` | watt (W) | short circuit (copper) loss at minimum tap | &#10060; default same as `pk` | &#10004; | &#10060; | &#10060; | `>= 0` |
Expand Down
2 changes: 1 addition & 1 deletion src/power_grid_model/validation/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def validate_transformer(data: InputData) -> List[ValidationError]:
errors += all_valid_enum_values(data, "transformer", "tap_side", BranchSide)
errors += all_between_or_at(data, "transformer", "tap_pos", "tap_min", "tap_max")
errors += all_between_or_at(data, "transformer", "tap_nom", "tap_min", "tap_max")
errors += all_greater_than_zero(data, "transformer", "tap_size")
errors += all_greater_than_or_equal_to_zero(data, "transformer", "tap_size")
errors += all_greater_or_equal(data, "transformer", "uk_min", "pk_min/sn")
errors += all_between(data, "transformer", "uk_min", 0, 1)
errors += all_greater_or_equal(data, "transformer", "uk_max", "pk_max/sn")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/validation/test_input_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_validate_input_data_sym_calculation(input_data):
assert NotBetweenOrAtError("transformer", "clock", [1, 14], (0, 12)) in validation_errors
assert NotBetweenOrAtError("transformer", "tap_pos", [14, 15], ("tap_min", "tap_max")) in validation_errors
assert NotBetweenOrAtError("transformer", "tap_nom", [1, 15], ("tap_min", "tap_max")) in validation_errors
assert NotGreaterThanError("transformer", "tap_size", [14, 15], 0) in validation_errors
assert NotGreaterOrEqualError("transformer", "tap_size", [15], 0) in validation_errors
assert NotGreaterOrEqualError("transformer", "uk_min", [1], "pk_min/sn") in validation_errors
assert NotBetweenError("transformer", "uk_min", [14], (0, 1)) in validation_errors
assert NotGreaterOrEqualError("transformer", "uk_max", [1], "pk_max/sn") in validation_errors
Expand Down

0 comments on commit 59b5a5d

Please sign in to comment.