Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Handle fictitious bus injections #1114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeandemanged
Copy link
Member

Please check if the PR fulfills these requirements

  • 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?

No

What kind of change does this PR introduce?

Feature

What is the current behavior?

We don't support fictitious bus injections introduced in powsybl/powsybl-core#2001

What is the new behavior (if this is a feature change)?
We support fictitious bus injections

Does this PR introduce a breaking change or deprecate an API?

  • No

Signed-off-by: Damien Jeandemange <[email protected]>
Copy link

sonarqubecloud bot commented Nov 5, 2024

@vidaldid-rte
Copy link
Collaborator

vidaldid-rte commented Nov 21, 2024

Is thie fictive injection feature working well ?
I do not understand this implementation in mergedBus. If there are several buses are get (sets P0 to each bus) and set (returns the sum of bus's P0) be consistent ? Same for computedBus.

public double getFictitiousP0() {
    return buses.stream().map(Bus::getFictitiousP0).reduce(0.0, Double::sum);
}

@Override
public Bus setFictitiousP0(double p0) {
    buses.forEach(b -> b.setFictitiousP0(0.0));
    buses.iterator().next().setFictitiousP0(p0);
    return this;
}

EDIT: OK I now see how get and set can be consistent if there is no topology change. However, setting a fictive injection on a bus - not on a bus breaker or a node, seems very fragile to me and a source of bugs, as opposed to the unambiguous use of a fictive load that is attached to something that is not volatile like a merged bus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants