powsybl-core
powsybl-core copied to clipboard
Matpower: fix pv buses
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
Does this PR already have an issue describing the problem?
What kind of change does this PR introduce?
Feature
What is the current behavior?
PV
buses are defined before the matpower generators are created and the code is based on attributes of the iidm
model.
Only generators were considered, although other equipment (staticVarCompensator, danglingLines, ..) creates also generators. Additionally, some of the features used later when matpower generators are created must be considered.
What is the new behavior (if this is a feature change)?
Initially, all non-slack buses are defined as PQ buses.
Then, the future matpower generators are recorded by bus.
Finally, the PV
buses are defined and the matpower generators are created after analyzing the voltageRegulation of all the generators of the bus.
Does this PR introduce a breaking change or deprecate an API?
- [ ] Yes
- [x] No
If yes, please check if the following requirements are fulfilled
- [ ] The Breaking Change or Deprecated label has been added
- [ ] The migration steps are described in the following section
What changes might users need to make in their application due to this PR? (migration steps)
Other information: