Skip to content

Commit

Permalink
migration to next version of core and open-loadflow
Browse files Browse the repository at this point in the history
Signed-off-by: Luma <zamarrenolm@aia.es>
  • Loading branch information
zamarrenolm committed Sep 21, 2023
1 parent 0b3e8a5 commit bed0a60
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,20 @@ jobs:
uses: actions/checkout@v1
with:
repository: powsybl/powsybl-core
ref: refs/heads/adapt-cgmes-export-subnetworks-2
ref: refs/heads/main

- name: Build and install powsybl-core with Maven
run: mvn --batch-mode -DskipTests=true --file ../powsybl-core/pom.xml install

- name: Checkout powsybl-open-loadflow latest sources
uses: actions/checkout@v1
with:
repository: powsybl/powsybl-open-loadflow
ref: refs/heads/main

- name: Build and install powsybl-open-loadflow with Maven
run: mvn --batch-mode -DskipTests=true --file ../powsybl-open-loadflow/pom.xml install

- name: Build with Maven
if: matrix.os == 'ubuntu-latest'
run: mvn --batch-mode -Pjacoco install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CgmesVoltageLevelsArea implements NetworkArea {
private final List<String> voltageLevelIds = new ArrayList<>();

private final List<DanglingLine> danglingLineBordersCache; // paired and unpaired.
private final List<Branch<?>> branchBordersCache; // other branches.
private final List<? extends Branch<?>> branchBordersCache; // other branches.

private final Set<Bus> busesCache;

Expand Down Expand Up @@ -51,14 +51,14 @@ private List<DanglingLine> createDanglingLinesCache(Network network, CgmesContro
})
.filter(dl -> {
if (excludedXnodes != null) {
return excludedXnodes.stream().noneMatch(xnodeCode -> dl.getUcteXnodeCode().equals(xnodeCode)); // There is the possibility to exclude dangling lines associated with boundary nodes with given X-node codes
return excludedXnodes.stream().noneMatch(xnodeCode -> dl.getPairingKey().equals(xnodeCode)); // There is the possibility to exclude dangling lines associated with boundary nodes with given X-node codes
}
return true;
})
.collect(Collectors.toList());
.toList();
}

private List<Branch<?>> createBranchesCache(Network network, CgmesControlArea area) {
private List<? extends Branch<?>> createBranchesCache(Network network, CgmesControlArea area) {
return network.getLineStream()
.filter(this::isAreaBorder)
.filter(b -> b.getTerminal1().getBusView().getBus() != null && b.getTerminal1().getBusView().getBus().isInMainSynchronousComponent()
Expand All @@ -70,7 +70,7 @@ private List<Branch<?>> createBranchesCache(Network network, CgmesControlArea ar
}
return true;
})
.collect(Collectors.toList());
.toList();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<properties>
<java.version>17</java.version>
<powsyblcore.version>6.0.0-SNAPSHOT</powsyblcore.version>
<powsyblopenloadflow.version>1.2.3</powsyblopenloadflow.version>
<powsyblopenloadflow.version>1.3.0-SNAPSHOT</powsyblopenloadflow.version>
<sonar.coverage.jacoco.xmlReportPaths>
../distribution-entsoe/target/site/jacoco-aggregate/jacoco.xml,
../../distribution-entsoe/target/site/jacoco-aggregate/jacoco.xml,
Expand Down

0 comments on commit bed0a60

Please sign in to comment.