Repository navigation
Apply the apparent power limit at both ends in bus injection solved as a non-linear program - #211
Merged
Merged
Conversation
…s a non-linear program IndACApparentPowerLimit was read but applied in branch flow only, so in bus injection the far end of a branch had no apparent power limit. The constraints move into one function used by both formulations. Bus injection applies them, as the circle, where the model is solved as a non-linear program anyway: rectangular coordinates, W space with the loop condition, and the exact model type. In the W-space cone solved with Gurobi the option is not applied and a warning says so, because the inscribed polygon made the barrier stop with numerical trouble on 9n_AC although ipopt solved the same model. Three tests: the limit holds in both non-linear bus-injection models on 9n_AC, and the cone reports that it is not applied. The AC test files pass (112).
The only conflict was the option comment in openTEPES_InputData.py: master added the IndACRestoreWarmStart line below the IndACApparentPowerLimit one, which this branch had reworded. Both lines are kept.
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.
Problem
IndACApparentPowerLimitlimits the apparent power at both ends of each AC branch to its rating. It was read for every AC formulation but applied only in branch flow (IndACPowerFlow = 1). In bus injection (IndACPowerFlow = 2and3), the far end of a branch had no apparent power limit, and the near end onlyeBIMSLimit, the counterpart of the current limit, which admits up to the rating times V/Vmin. A case could turn the option on in bus injection and get branches above their rating, with no message.Observed behaviour
9n_AC, first 12 hours, option on in every row:Solution
The constraints move from the branch flow block into one function,
_ApparentPowerLimit, used by both formulations; both name their far-end flowsvFlowElecBckandvFlowReactBck. Bus injection applies them as the circle where the model is solved as a non-linear program anyway: rectangular coordinates, W space with the loop condition (IndACCycle = 1), andIndACModelType = 2.In the W-space cone solved with Gurobi, the option is not applied, and a warning says so. There the inscribed polygon made Gurobi's barrier stop with numerical trouble on
9n_ACafter five iterations, although ipopt solved the same model with every branch within its rating, andBarHomogeneous = 1did not help.After the change
The same case:
Notes
9n_AC, and the W-space cone reports that it is not applied.tests/test_ac_input.pyandtests/test_ac_hvdc_and_setpoints.pypass (112).openTEPES_InputData.py, where master added theIndACRestoreWarmStartline; both lines are kept. The two moduleschanged here are dated October 09, 2026.
tests/test_ac_input.pyandtests/test_ac_hvdc_and_setpoints.pypass onthe merged tree (114).