Skip to content

Commit

Permalink
fix new issues
Browse files Browse the repository at this point in the history
Signed-off-by: Caio Luke <[email protected]>
  • Loading branch information
caioluke committed Oct 15, 2024
1 parent a2ec0bd commit b6a9610
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,19 @@ private LoadFlowRunningService.Result runAcLoadFlow(Network network) {
}

private void saveAcLoadFlowResults(FlowDecompositionResults.PerStateBuilder flowDecompositionResultsBuilder, Network network, Set<Branch> xnecList, boolean fallbackHasBeenActivated) {
saveAcReferenceFlows(flowDecompositionResultsBuilder, network, xnecList, fallbackHasBeenActivated);
saveAcCurrents(flowDecompositionResultsBuilder, network, xnecList, fallbackHasBeenActivated);
saveAcReferenceFlows(flowDecompositionResultsBuilder, xnecList, fallbackHasBeenActivated);
saveAcCurrents(flowDecompositionResultsBuilder, xnecList, fallbackHasBeenActivated);
observers.computedAcLoadFlowResults(network, fallbackHasBeenActivated);
}

private void saveAcReferenceFlows(FlowDecompositionResults.PerStateBuilder flowDecompositionResultsBuilder, Network network, Set<Branch> xnecList, boolean fallbackHasBeenActivated) {
private void saveAcReferenceFlows(FlowDecompositionResults.PerStateBuilder flowDecompositionResultsBuilder, Set<Branch> xnecList, boolean fallbackHasBeenActivated) {
Map<String, Double> acTerminal1ReferenceFlows = FlowComputerUtils.calculateAcTerminalReferenceFlows(xnecList, fallbackHasBeenActivated, TwoSides.ONE);
Map<String, Double> acTerminal2ReferenceFlows = FlowComputerUtils.calculateAcTerminalReferenceFlows(xnecList, fallbackHasBeenActivated, TwoSides.TWO);
flowDecompositionResultsBuilder.saveAcTerminal1ReferenceFlow(acTerminal1ReferenceFlows);
flowDecompositionResultsBuilder.saveAcTerminal2ReferenceFlow(acTerminal2ReferenceFlows);
}

private void saveAcCurrents(FlowDecompositionResults.PerStateBuilder flowDecompositionResultBuilder, Network network, Set<Branch> xnecList, boolean fallbackHasBeenActivated) {
private void saveAcCurrents(FlowDecompositionResults.PerStateBuilder flowDecompositionResultBuilder, Set<Branch> xnecList, boolean fallbackHasBeenActivated) {
Map<String, Double> acTerminal1Currents = FlowComputerUtils.calculateAcTerminalCurrents(xnecList, fallbackHasBeenActivated, TwoSides.ONE);
Map<String, Double> acTerminal2Currents = FlowComputerUtils.calculateAcTerminalCurrents(xnecList, fallbackHasBeenActivated, TwoSides.TWO);
flowDecompositionResultBuilder.saveAcCurrentTerminal1(acTerminal1Currents);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ public void computedDcLoadFlowResults(Network network) {

private void computedAcNodalInjections(Network network) {
addEvent(Event.COMPUTED_AC_NODAL_INJECTIONS);
Map<String, Double> nodalInjections = new ReferenceNodalInjectionComputer().run(NetworkUtil.getNodeList(network));
this.acNodalInjections.put(currentContingency, nodalInjections);
Map<String, Double> injections = new ReferenceNodalInjectionComputer().run(NetworkUtil.getNodeList(network));
this.acNodalInjections.put(currentContingency, injections);
}

private void computedDcNodalInjections(Network network) {
addEvent(Event.COMPUTED_DC_NODAL_INJECTIONS);
Map<String, Double> nodalInjections = new ReferenceNodalInjectionComputer().run(NetworkUtil.getNodeList(network));
this.dcNodalInjections.put(currentContingency, nodalInjections);
Map<String, Double> injections = new ReferenceNodalInjectionComputer().run(NetworkUtil.getNodeList(network));
this.dcNodalInjections.put(currentContingency, injections);
}

private void computedAcFlowsTerminal1(Network network, boolean fallbackHasBeenActivated) {
Expand Down

0 comments on commit b6a9610

Please sign in to comment.