-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter out invalid contingencies in Eurostag impact analysis and expo…
…rt tool
- Loading branch information
Showing
3 changed files
with
34 additions
and
3 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
30 changes: 30 additions & 0 deletions
30
...ntegration/src/main/java/eu/itesla_project/eurostag/FilterValidContingenciesProvider.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,30 @@ | ||
/** | ||
* Copyright (c) 2018, 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 eu.itesla_project.eurostag; | ||
|
||
import com.powsybl.contingency.ContingenciesProvider; | ||
import com.powsybl.contingency.Contingency; | ||
import com.powsybl.iidm.network.Network; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Christian Biasuzzi <christian.biasuzzi@techrain.it> | ||
*/ | ||
public class FilterValidContingenciesProvider implements ContingenciesProvider { | ||
|
||
final ContingenciesProvider wrappedProvider; | ||
|
||
public FilterValidContingenciesProvider(ContingenciesProvider wrappedProvider) { | ||
this.wrappedProvider = wrappedProvider; | ||
} | ||
|
||
@Override | ||
public List<Contingency> getContingencies(Network network) { | ||
return Contingency.checkValidity(wrappedProvider.getContingencies(network), network); | ||
} | ||
} |