Skip to content

Commit

Permalink
Solve compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
murgeyseb committed Jul 9, 2019
1 parent 315797d commit caa0df8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ private void decomposeFlow(MonitoredBranch monitoredBranch, FlowDecompositionRes
int branchIndex = branchMapper.get(branch);
for (Bus busFrom : busesOfInterest) {
for (Bus busTo : busesOfInterest) {
Country countryFrom = busFrom.getVoltageLevel().getSubstation().getCountry();
Country countryTo = busTo.getVoltageLevel().getSubstation().getCountry();
Country countryFrom = busFrom.getVoltageLevel().getSubstation().getCountry().orElse(null);
Country countryTo = busTo.getVoltageLevel().getSubstation().getCountry().orElse(null);
int busFromIndex = busMapper.get(busFrom);
int busToIndex = busMapper.get(busTo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static boolean branchIsPst(Branch branch) {
}

public static Country getBranchSideCountry(Branch branch, Branch.Side side) {
return branch.getTerminal(side).getVoltageLevel().getSubstation().getCountry();
return branch.getTerminal(side).getVoltageLevel().getSubstation().getCountry().orElse(null);
}

public static Injection getInjectionFrom(Network network, String id) {
Expand Down

0 comments on commit caa0df8

Please sign in to comment.