-
Notifications
You must be signed in to change notification settings - Fork 11
Hvdc AC emulation limits outer loop #1319
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
bdbf0a6
First commit from previous outerloop implementation
SylvestreSakti fcc3efe
WIP
SylvestreSakti fffe70d
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 8a62eb3
Left FreezingHvdcACEmulationOuterloop as it was (reinitializing angle…
SylvestreSakti e63d523
Clean code
SylvestreSakti 0b658be
Fix incorrect HvdcState saving and restoring
SylvestreSakti 8221457
Better handling of disable change
SylvestreSakti 702d732
Clean and add reports and add unit tests
SylvestreSakti 26b8799
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 27b365f
Add coverage
SylvestreSakti 37d033c
Fix minor issues
SylvestreSakti b7c00e9
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 643faee
Store values in per unit
SylvestreSakti 29c540e
Remove unused method
SylvestreSakti 46e6875
Missing Bus2 in NaN condition
SylvestreSakti 5578cbe
Remove freezingHvdc outer loop back to initial angles
SylvestreSakti 3977abb
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 36d47a6
Reports FR
SylvestreSakti 1102065
Update authors
SylvestreSakti 2eef767
Checkstyle
SylvestreSakti 0d2ac94
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 7a1dd65
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti baf5a92
Add docs and comments
SylvestreSakti e72d1ad
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 97a0498
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 2761d23
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti 339b9f0
Merge branch 'main' into hvdc_ac_emulation_outerloop
SylvestreSakti a5c18e9
Merge remote-tracking branch 'origin/main' into hvdc_ac_emulation_out…
Hadrien-Godard 2e6a626
Refacto
Hadrien-Godard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
60 changes: 60 additions & 0 deletions
60
src/main/java/com/powsybl/openloadflow/ac/outerloop/AcHvdcAcEmulationLimitsOuterLoop.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| * SPDX-License-Identifier: MPL-2.0 | ||
| */ | ||
| package com.powsybl.openloadflow.ac.outerloop; | ||
|
|
||
| import com.powsybl.commons.report.ReportNode; | ||
| import com.powsybl.openloadflow.ac.AcLoadFlowContext; | ||
| import com.powsybl.openloadflow.ac.AcLoadFlowParameters; | ||
| import com.powsybl.openloadflow.ac.AcOuterLoopContext; | ||
| import com.powsybl.openloadflow.ac.equations.AcEquationType; | ||
| import com.powsybl.openloadflow.ac.equations.AcVariableType; | ||
| import com.powsybl.openloadflow.lf.outerloop.AbstractHvdcAcEmulationLimitsOuterLoop; | ||
| import com.powsybl.openloadflow.lf.outerloop.OuterLoopResult; | ||
| import com.powsybl.openloadflow.lf.outerloop.OuterLoopStatus; | ||
| import com.powsybl.openloadflow.network.LfHvdc; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| /** | ||
| * @author Sylvestre Prabakaran {@literal <sylvestre.prabakaran at rte-france.com>} | ||
| * @author Hadrien Godard {@literal <hadrien.godard at artelys.com>} | ||
|
vidaldid-rte marked this conversation as resolved.
|
||
| */ | ||
| public class AcHvdcAcEmulationLimitsOuterLoop | ||
| extends AbstractHvdcAcEmulationLimitsOuterLoop<AcVariableType, AcEquationType, AcLoadFlowParameters, AcLoadFlowContext, AcOuterLoopContext> | ||
| implements AcOuterLoop { | ||
|
|
||
| private static final Logger LOGGER = LoggerFactory.getLogger(AcHvdcAcEmulationLimitsOuterLoop.class); | ||
| public static final String NAME = "AcHvdcAcEmulationLimits"; | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return NAME; | ||
| } | ||
|
|
||
| @Override | ||
| public OuterLoopResult check(AcOuterLoopContext context, ReportNode reportNode) { | ||
| OuterLoopStatus status = OuterLoopStatus.STABLE; | ||
|
|
||
| for (LfHvdc hvdc : context.getNetwork().getHvdcs()) { | ||
| if (!hvdc.isAcEmulation() || hvdc.getBus1().isDisabled() || hvdc.getBus2().isDisabled() || hvdc.isDisabled()) { | ||
| continue; | ||
| } | ||
| if (checkAcEmulationMode(hvdc, true, LOGGER, reportNode)) { | ||
| LOGGER.trace("Hvdc '{}' AC emulation state is changed to {}", hvdc.getId(), hvdc.getAcEmulationControl().getAcEmulationStatus()); | ||
| status = OuterLoopStatus.UNSTABLE; | ||
| } | ||
| } | ||
| return new OuterLoopResult(this, status); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isNeeded(AcLoadFlowContext context) { | ||
| // Needed if the network contains an lfHVDC in AC Emulation mode | ||
| return context.getNetwork().getHvdcs().stream().anyMatch(LfHvdc::isAcEmulation); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.