power-grid-model icon indicating copy to clipboard operation
power-grid-model copied to clipboard

[BUG] Output tap position when voltage band is small

Open mgovers opened this issue 9 months ago • 0 comments

In #586 , it was discovered that, when a small voltage band is provided, the Tap Position Optimizer starts oscillating indefinitely. This is captured by the code in https://github.com/PowerGridModel/power-grid-model/pull/586/files#diff-e3cb2a7b8db22693560826087f2c675630f9cd51a2337191aadc986dd50c4249R803-R812 , e.g.:

SUBCASE("no valid value in band") {
    // TODO(mgovers): this causes an infinite loop
    state_b.tap_min = 1;
    state_b.tap_max = 5;
    state_b.tap_pos = 3;

    u_set = 0.4;
    u_set = 0.01;
    check_b = test::check_exact_per_strategy(3, 4, 3);
}

A couple possible solutions exist:

  • [ ] cutoff at max_iter, which should be a different value from the max_iter provided for the actual math solver
  • [ ] saturate at either the lower limit or the upper limit, depending on strategy and rank
  • [ ] a different optimization strategy all together

mgovers avatar May 13 '24 09:05 mgovers