-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration of reactive slacks repartition (#41)
Signed-off-by: parvy <[email protected]> Co-authored-by: Anne Tilloy <[email protected]>
- Loading branch information
Showing
31 changed files
with
295 additions
and
102 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
32 changes: 32 additions & 0 deletions
32
...src/main/java/com/powsybl/openreac/parameters/input/ConfiguredBusesWithReactiveSlack.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,32 @@ | ||
/** | ||
* 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.openreac.parameters.input; | ||
|
||
import com.powsybl.ampl.converter.AmplSubset; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Pierre Arvy <pierre.arvy at artelys.com> | ||
*/ | ||
public class ConfiguredBusesWithReactiveSlack extends AbstractElementsInput { | ||
public static final String PARAM_BUSES_FILE_NAME = "param_buses_with_reactive_slack.txt"; | ||
|
||
public ConfiguredBusesWithReactiveSlack(List<String> elementIds) { | ||
super(elementIds); | ||
} | ||
|
||
@Override | ||
public String getFileName() { | ||
return PARAM_BUSES_FILE_NAME; | ||
} | ||
|
||
@Override | ||
AmplSubset getElementAmplSubset() { | ||
return AmplSubset.BUS; | ||
} | ||
} |
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
32 changes: 32 additions & 0 deletions
32
...reac/src/main/java/com/powsybl/openreac/parameters/input/algo/ReactiveSlackBusesMode.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,32 @@ | ||
/** | ||
* 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.openreac.parameters.input.algo; | ||
|
||
/** | ||
* @author Pierre Arvy <pierre.arvy at artelys.com> | ||
*/ | ||
public enum ReactiveSlackBusesMode { | ||
CONFIGURED("CONFIGURED"), | ||
NO_GENERATION("NO_GENERATION"), | ||
ALL("ALL"); | ||
|
||
private static final String REACTIVE_SLACK_BUSES_KEY = "buses_with_reactive_slacks"; | ||
|
||
private final String amplKey; | ||
|
||
/** | ||
* @param amplKey value used in param_algo.txt to define the slacks repartition. | ||
*/ | ||
ReactiveSlackBusesMode(String amplKey) { | ||
this.amplKey = amplKey; | ||
} | ||
|
||
public OpenReacAlgoParam toParam() { | ||
return new OpenReacAlgoParamImpl(REACTIVE_SLACK_BUSES_KEY, amplKey); | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.