-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shunt incremental voltage control (#692)
Signed-off-by: Hadrien <hadrien.godard@artelys.com> Co-authored-by: Anne Tilloy <anne.tilloy@rte-france.com> Co-authored-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
- Loading branch information
1 parent
14423ae
commit 8bfdc55
Showing
23 changed files
with
712 additions
and
146 deletions.
There are no files selected for viewing
This file contains 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 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
45 changes: 45 additions & 0 deletions
45
src/main/java/com/powsybl/openloadflow/ac/IncrementalContextData.java
This file contains 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,45 @@ | ||
/** | ||
* Copyright (c) 2023, 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/. | ||
*/ | ||
package com.powsybl.openloadflow.ac; | ||
|
||
import com.powsybl.openloadflow.network.AllowedDirection; | ||
import org.apache.commons.lang3.mutable.MutableInt; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
/** | ||
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com> | ||
*/ | ||
class IncrementalContextData { | ||
|
||
static final class ControllerContext { | ||
|
||
private final MutableInt directionChangeCount = new MutableInt(); | ||
|
||
private AllowedDirection allowedDirection = AllowedDirection.BOTH; | ||
|
||
MutableInt getDirectionChangeCount() { | ||
return directionChangeCount; | ||
} | ||
|
||
AllowedDirection getAllowedDirection() { | ||
return allowedDirection; | ||
} | ||
|
||
void setAllowedDirection(AllowedDirection allowedDirection) { | ||
this.allowedDirection = Objects.requireNonNull(allowedDirection); | ||
} | ||
} | ||
|
||
private final Map<String, ControllerContext> controllersContexts = new HashMap<>(); | ||
|
||
Map<String, ControllerContext> getControllersContexts() { | ||
return controllersContexts; | ||
} | ||
} |
Oops, something went wrong.