Skip to content

Commit f2db321

Browse files
committed
down merge
Signed-off-by: Tony Xiang <[email protected]>
2 parents 0a4e808 + 12e49ae commit f2db321

File tree

5 files changed

+29
-28
lines changed

5 files changed

+29
-28
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
uses: docker/setup-qemu-action@v2
154154

155155
- name: Build wheels
156-
uses: pypa/cibuildwheel@2.7.0
156+
uses: pypa/cibuildwheel@v2.8.0
157157

158158
- name: Keep wheel files
159159
uses: actions/upload-artifact@v3

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ Neither anonymous contributors nor those utilizing pseudonyms will be accepted.
9696

9797
There are other great tools out there to manage DCO signoffs for developers to make it much easier to do signoffs:
9898
* Git makes it easy to add this line to your commit messages. Make sure the `user.name` and `user.email` are set in your git configs. Use `-s` or `--signoff` to add the Signed-off-by line to the end of the commit message.
99-
* [GitHub UI integrations]( https://github.com/scottrigby/dco-gh-ui ) for adding the signoff automatically to commits made with the GitHub browser UI
99+
* [Github UI automatic signoff capabilities](https://github.blog/changelog/2022-06-08-admins-can-require-sign-off-on-web-based-commits/) for adding the signoff automatically to commits made with the GitHub browser UI. This one can only be activated by the github org or repo admin.
100+
* [GitHub UI automatic signoff capabilities via custom plugin]( https://github.com/scottrigby/dco-gh-ui ) for adding the signoff automatically to commits made with the GitHub browser UI
100101
* Additionally, it is possible to use shell scripting to automatically apply the sign-off. For an example for bash to be put into a .bashrc file, see [here](https://wiki.lfenergy.org/display/HOME/Contribution+and+Compliance+Guidelines+for+LF+Energy+Foundation+hosted+projects).
101102
* Alternatively, you can add `prepare-commit-msg hook` in .git/hooks directory. For an example, see [here](https://github.com/Samsung/ONE-vscode/wiki/ONE-vscode-Developer's-Certificate-of-Origin).
102103

docs/graph-data-model.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ The base type for all power grid components.
152152
| name | data type | unit | description | required | input | update | output |
153153
| --- | --- | --- | --- | :---: | :---: | :---: | :---: |
154154
| `id` | `int32_t` | - | ID of a component, the id should be unique along all components, i.e. you cannot have a node with `id` 5 and a line with `id` 5. | &#10004; | &#10004; | &#10060; (id needs to be specified in the update query, but cannot be changed) | &#10004; |
155-
| `energized` | `int8_t` | - | Indicates if a component is energized, i.e. connected to a source | &#10004; | &#10060; | &#10060; | &#10004; |
155+
| `energized` | `int8_t` | - | Indicates if a component is energized, i.e. connected to a source | | &#10060; | &#10060; | &#10004; |
156156

157157
## Node
158158

@@ -163,9 +163,9 @@ The base type for all power grid components.
163163
| name | data type | unit | description | required | input | update | output | valid values |
164164
| --- | --- | --- | --- | :---: | :---: | :---: | :---: | :---: |
165165
| `u_rated` | `double` | volt (V) | rated line-line voltage | &#10004; | &#10004; | &#10060; | &#10060; | `> 0` |
166-
| `u_pu` | `RealValueOutput` | - | per-unit voltage magnitude | &#10004; | &#10060; | &#10060; | &#10004; | |
167-
| `u_angle` | `RealValueOutput` | rad | voltage angle | &#10004; | &#10060; | &#10060; | &#10004; | |
168-
| `u` | `RealValueOutput` | volt (V) | voltage magnitude, line-line for symmetric calculation, line-neutral for asymmetric calculation | &#10004; | &#10060; | &#10060; | &#10004; | |
166+
| `u_pu` | `RealValueOutput` | - | per-unit voltage magnitude | | &#10060; | &#10060; | &#10004; | |
167+
| `u_angle` | `RealValueOutput` | rad | voltage angle | | &#10060; | &#10060; | &#10004; | |
168+
| `u` | `RealValueOutput` | volt (V) | voltage magnitude, line-line for symmetric calculation, line-neutral for asymmetric calculation | | &#10060; | &#10060; | &#10004; | |
169169

170170

171171
## Branch
@@ -184,15 +184,15 @@ In this case, the attribute `from_status` and `to_status` is always 1.
184184
| `to_node` | `int32_t` | - | ID of node at to-side | &#10004; | &#10004; | &#10060; | &#10060; | a valid node id |
185185
| `from_status` | `int8_t` | - | connection status at from-side | &#10004; | &#10004; | &#10004; | &#10060; | `0` or `1` |
186186
| `to_status` | `int8_t` | - | connection status at to-side | &#10004; | &#10004; | &#10004; | &#10060; | `0` or `1` |
187-
| `p_from` | `RealValueOutput` | watt (W) | active power flowing into the branch at from-side | &#10004; | &#10060; | &#10060; | &#10004; | |
188-
| `q_from` | `RealValueOutput` | volt-ampere-reactive (var) | reactive power flowing into the branch at from-side | &#10004; | &#10060; | &#10060; | &#10004; | |
189-
| `i_from` | `RealValueOutput` | ampere (A) | current at from-side | &#10004; | &#10060; | &#10060; | &#10004; | |
190-
| `s_from` | `RealValueOutput` | volt-ampere (VA) | apparent power flowing at from-side | &#10004; | &#10060; | &#10060; | &#10004; | |
191-
| `p_to` | `RealValueOutput` | watt (W) | active power flowing into the branch at to-side | &#10004; | &#10060; | &#10060; | &#10004; | |
192-
| `q_to` | `RealValueOutput` | volt-ampere-reactive (var) | reactive power flowing into the branch at to-side | &#10004; | &#10060; | &#10060; | &#10004; | |
193-
| `i_to` | `RealValueOutput` | ampere (A) | current at to-side | &#10004; | &#10060; | &#10060; | &#10004; | |
194-
| `s_to` | `RealValueOutput` | volt-ampere (VA) | apparent power flowing at to-side | &#10004; | &#10060; | &#10060; | &#10004; | |
195-
| `loading` | `double` | - | relative loading of the line, `1.0` meaning 100% loaded. | &#10004; | &#10060; | &#10060; | &#10004; | |
187+
| `p_from` | `RealValueOutput` | watt (W) | active power flowing into the branch at from-side | | &#10060; | &#10060; | &#10004; | |
188+
| `q_from` | `RealValueOutput` | volt-ampere-reactive (var) | reactive power flowing into the branch at from-side | | &#10060; | &#10060; | &#10004; | |
189+
| `i_from` | `RealValueOutput` | ampere (A) | current at from-side | | &#10060; | &#10060; | &#10004; | |
190+
| `s_from` | `RealValueOutput` | volt-ampere (VA) | apparent power flowing at from-side | | &#10060; | &#10060; | &#10004; | |
191+
| `p_to` | `RealValueOutput` | watt (W) | active power flowing into the branch at to-side | | &#10060; | &#10060; | &#10004; | |
192+
| `q_to` | `RealValueOutput` | volt-ampere-reactive (var) | reactive power flowing into the branch at to-side | | &#10060; | &#10060; | &#10004; | |
193+
| `i_to` | `RealValueOutput` | ampere (A) | current at to-side | | &#10060; | &#10060; | &#10004; | |
194+
| `s_to` | `RealValueOutput` | volt-ampere (VA) | apparent power flowing at to-side | | &#10060; | &#10060; | &#10004; | |
195+
| `loading` | `double` | - | relative loading of the line, `1.0` meaning 100% loaded. | | &#10060; | &#10060; | &#10004; | |
196196

197197

198198
### Line
@@ -249,7 +249,7 @@ In this case the winding voltage is decreased if the tap position is increased.*
249249
| `tap_min` | `int8_t` | - | position of tap changer at minimum voltage | &#10004; | &#10004; | &#10060; | &#10060; | |
250250
| `tap_max` | `int8_t` | - | position of tap changer at maximum voltage | &#10004; | &#10004; | &#10060; | &#10060; | |
251251
| `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)` |
252-
| `tap_size` | `double` | volt (V) | size of each tap of the tap changer | &#10004; | &#10004; | &#10060; | &#10060; | `> 0` |
252+
| `tap_size` | `double` | volt (V) | size of each tap of the tap changer | &#10004; | &#10004; | &#10060; | &#10060; | `>= 0` |
253253
| `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` |
254254
| `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` |
255255
| `pk_min` | `double` | watt (W) | short circuit (copper) loss at minimum tap | &#10060; default same as `pk` | &#10004; | &#10060; | &#10060; | `>= 0` |
@@ -275,11 +275,11 @@ For each `appliance` a switch is defined between the `appliance` and the `node`.
275275
| --- | --- | --- | --- | :---: | :---: | :---: | :---: | :---: |
276276
| `node` | `int32_t` | - | ID of the coupled node | &#10004; | &#10004; | &#10060; | &#10060; | a valid node id |
277277
| `status` | `int8_t` | - | connection status to the node | &#10004; | &#10004; | &#10004; | &#10060; | `0` or `1` |
278-
| `p` | `RealValueOutput` | watt (W) | active power | &#10004; | &#10060; | &#10060; | &#10004; | |
279-
| `q` | `RealValueOutput` | volt-ampere-reactive (var) | reactive power | &#10004; | &#10060; | &#10060; | &#10004; | |
280-
| `i` | `RealValueOutput` | ampere (A) | current | &#10004; | &#10060; | &#10060; | &#10004; | |
281-
| `s` | `RealValueOutput` | volt-ampere (VA) | apparent power | &#10004; | &#10060; | &#10060; | &#10004; | |
282-
| `pf` | `RealValueOutput` | - | power factor | &#10004; | &#10060; | &#10060; | &#10004; | |
278+
| `p` | `RealValueOutput` | watt (W) | active power | | &#10060; | &#10060; | &#10004; | |
279+
| `q` | `RealValueOutput` | volt-ampere-reactive (var) | reactive power | | &#10060; | &#10060; | &#10004; | |
280+
| `i` | `RealValueOutput` | ampere (A) | current | | &#10060; | &#10060; | &#10004; | |
281+
| `s` | `RealValueOutput` | volt-ampere (VA) | apparent power | | &#10060; | &#10060; | &#10004; | |
282+
| `pf` | `RealValueOutput` | - | power factor | | &#10060; | &#10060; | &#10004; | |
283283

284284
### Source
285285

@@ -387,8 +387,8 @@ The table below shows a list of attributes.
387387
| --- | --- | --- | --- | :---: | :---: | :---: | :---: | :---: |
388388
| `u_measured` | `RealValueInput` | volt (V) | measured voltage magnitude | &#10024; only for state estimation | &#10004; | &#10004; | &#10060; | `> 0` |
389389
| `u_angle_measured` | `RealValueInput` | rad | measured voltage angle (only possible with phasor measurement units) |&#10060; | &#10004; | &#10004; | &#10060; | |
390-
| `u_residual` | `RealValueOutput` | volt (V) | residual value between measured voltage magnitude and calculated voltage magnitude | &#10004; | &#10060; | &#10060; | &#10004; | |
391-
| `u_angle_residual` | `RealValueOutput` | rad | residual value between measured voltage angle and calculated voltage angle (only possible with phasor measurement units) | &#10060; | &#10060; | &#10060; | &#10004; | |
390+
| `u_residual` | `RealValueOutput` | volt (V) | residual value between measured voltage magnitude and calculated voltage magnitude | | &#10060; | &#10060; | &#10004; | |
391+
| `u_angle_residual` | `RealValueOutput` | rad | residual value between measured voltage angle and calculated voltage angle (only possible with phasor measurement units) | | &#10060; | &#10060; | &#10004; | |
392392

393393

394394
### Generic Power Sensor
@@ -427,8 +427,8 @@ The table below shows a list of attributes.
427427
| --- | --- | --- | --- | :---: | :---: | :---: | :---: |
428428
| `p_measured` | `RealValueInput` | watt (W) | measured active power | &#10024; only for state estimation | &#10004; | &#10004; | &#10060; |
429429
| `q_measured` | `RealValueInput` | volt-ampere-reactive (var) | measured reactive power | &#10024; only for state estimation | &#10004; | &#10004; | &#10060; |
430-
| `p_residual` | `RealValueOutput` | watt (W) | residual value between measured active power and calculated active power | &#10004; | &#10060; | &#10060; | &#10004; |
431-
| `q_residual` | `RealValueOutput` | volt-ampere-reactive (var) | residual value between measured reactive power and calculated reactive power | &#10004; | &#10060; | &#10060; | &#10004; |
430+
| `p_residual` | `RealValueOutput` | watt (W) | residual value between measured active power and calculated active power | | &#10060; | &#10060; | &#10004; |
431+
| `q_residual` | `RealValueOutput` | volt-ampere-reactive (var) | residual value between measured reactive power and calculated reactive power | | &#10060; | &#10060; | &#10004; |
432432

433433

434434
# Selection of calculation method
@@ -462,4 +462,4 @@ Following are guidelines to be considered while selecting a state estimation `Ca
462462

463463
Every iteration of power-flow or state estimation has a step of solving large number of sparse linear equations i.e. `AX=b` in matrix form. Computation wise this is a very expensive step. One major component of this step is factorization of the `A` matrix. In certain calculation methods, this `A` matrix and its factorization remains unchanged over iterations and batches (only specific cases) which makes it possible reuse the factorization, skip this step and improve performance.
464464

465-
**Note:** Prefactorization over batches is possible when switching status or specified power values of load/generation or source reference voltage is modified. It is not possible when topology or grid parameters are modified, i.e. in switching of branches, shunt, sources or change in transformer tap positions.
465+
**Note:** Prefactorization over batches is possible when switching status or specified power values of load/generation or source reference voltage is modified. It is not possible when topology or grid parameters are modified, i.e. in switching of branches, shunt, sources or change in transformer tap positions.

src/power_grid_model/validation/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def validate_transformer(data: InputData) -> List[ValidationError]:
364364
errors += all_valid_enum_values(data, "transformer", "tap_side", BranchSide)
365365
errors += all_between_or_at(data, "transformer", "tap_pos", "tap_min", "tap_max")
366366
errors += all_between_or_at(data, "transformer", "tap_nom", "tap_min", "tap_max")
367-
errors += all_greater_than_zero(data, "transformer", "tap_size")
367+
errors += all_greater_than_or_equal_to_zero(data, "transformer", "tap_size")
368368
errors += all_greater_or_equal(data, "transformer", "uk_min", "pk_min/sn")
369369
errors += all_between(data, "transformer", "uk_min", 0, 1)
370370
errors += all_greater_or_equal(data, "transformer", "uk_max", "pk_max/sn")

tests/unit/validation/test_input_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def test_validate_input_data_sym_calculation(input_data):
242242
assert NotBetweenOrAtError("transformer", "clock", [1, 14], (0, 12)) in validation_errors
243243
assert NotBetweenOrAtError("transformer", "tap_pos", [14, 15], ("tap_min", "tap_max")) in validation_errors
244244
assert NotBetweenOrAtError("transformer", "tap_nom", [1, 15], ("tap_min", "tap_max")) in validation_errors
245-
assert NotGreaterThanError("transformer", "tap_size", [14, 15], 0) in validation_errors
245+
assert NotGreaterOrEqualError("transformer", "tap_size", [15], 0) in validation_errors
246246
assert NotGreaterOrEqualError("transformer", "uk_min", [1], "pk_min/sn") in validation_errors
247247
assert NotBetweenError("transformer", "uk_min", [14], (0, 1)) in validation_errors
248248
assert NotGreaterOrEqualError("transformer", "uk_max", [1], "pk_max/sn") in validation_errors

0 commit comments

Comments
 (0)