power-grid-model
power-grid-model copied to clipboard
[FEATURE] Automatic tap changer in step-up transformer support
What need to happen:
- [x] Figure out the meeth
- [ ] Control side at the node with higher rated voltage
- [ ] Tap side and the control side at the same side
Most changes will happen in power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp
What need to happen:
- [x] validation to check for unsupported scenarios when it comes to enabled tap controllers:
- [x] more than one enabled tap controller on the same transformer
- [x] ~~an enabled tap controller is coupled with a not-energized transformer~~
- [x] ~~an enabled tap controller is coupled with a two/three winding transformer with disconnected tap side or control side~~
- [x] ~~an enabled tap controller is coupled with a two winding transformer which are not fully connected~~
- [x] ~~an enabled tap controller is coupled with a three winding transformer with two sides disconnected~~
- [x] ~~an enabled tap controller is coupled with a transformer which is not reachable by transformer ranking graph, see logic below~~ (should not happen in the validation, but in the core itself - already implemented after bug report of Steffan #703)
- [x] un-regulated transformers given weight of
0instead of1: in lines https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L119-L120 and https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L157-L158
to
add_to_edge(state, edges, edge_props, from_node, to_node, {unregulated_idx, 0});
add_to_edge(state, edges, edge_props, to_node, from_node, {unregulated_idx, 0});
- [x] logic determining direction of transformer tap/control sides needs update:
- [x] two winding transformer in lines https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L151-L153
- [x] three winding transformer in lines https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L107-L109
- [x] after assigning ranks of all regulated transformers, one round of check: https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L274-L276
- [x] two winding transformers: for every enabled such transformer, rank at the control side (node connected to it) should be 1 greater than the other side, throw exception if not the case.
- [x] three winding transformers:
- [x] control side == tap side: rank at the control side (node connected to it) should be 1 greater than any one of the two secondary sides, throw exception if not the case.
- [x] control side != tap side: rank at the control side (node connected to it) should be 1 greater than the secondary side with tap, throw exception if not the case.
- [x] Adjust control logic
- [x] https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L941-L950 linear search would have to include logic to go the opposite way if control side == tap side
- [x] https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L634-L667 binary search would have to add new state
control_tap_same_sidein the binary logic
line numbers can change. can you add permalinks? (you can create them using the GitHub viewer)