Skip to content

Commit

Permalink
undo useless changes
Browse files Browse the repository at this point in the history
Signed-off-by: jamal-khey <[email protected]>
  • Loading branch information
jamal-khey committed Sep 24, 2024
1 parent e2d2f1e commit 0c294d0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ protected abstract void add3wtFeeder(Middle3WTNode middleNode, FeederNode firstO
FeederNode secondOtherLegNode, Terminal terminal);

private FeederNode createFeederLineNode(VoltageLevelGraph graph, Line line, TwoSides side) {
FeederNode feederNode = createFeederBranchNode(graph, line, side, LINE);
return feederNode;
return createFeederBranchNode(graph, line, side, LINE);
}

private FeederNode createFeederTieLineNode(VoltageLevelGraph graph, TieLine tieLine, TwoSides side) {
Expand Down Expand Up @@ -267,22 +266,20 @@ private FeederNode createFeeder2wtNode(VoltageLevelGraph graph, TwoWindingsTrans
TwoSides otherSide = side == TwoSides.ONE ? TwoSides.TWO : TwoSides.ONE;
VoltageLevel vlOtherSide = branch.getTerminal(otherSide).getVoltageLevel();
VoltageLevelInfos otherSideVoltageLevelInfos = new VoltageLevelInfos(vlOtherSide.getId(), vlOtherSide.getNameOrId(), vlOtherSide.getNominalV());
FeederNode transformerNode;

if (graph.isForVoltageLevelDiagram() && isNotInternalToVoltageLevel(branch)) {
if (!branch.hasPhaseTapChanger()) {
transformerNode = NodeFactory.createFeeder2WTNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos);
return NodeFactory.createFeeder2WTNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos);
} else {
transformerNode = NodeFactory.createFeeder2WTNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos);
return NodeFactory.createFeeder2WTNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()), otherSideVoltageLevelInfos);
}
} else {
if (!branch.hasPhaseTapChanger()) {
transformerNode = NodeFactory.createFeeder2WTLegNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()));
return NodeFactory.createFeeder2WTLegNode(graph, id, name, equipmentId, NodeSide.valueOf(side.name()));
} else {
transformerNode = NodeFactory.createFeeder2WTLegNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()));
return NodeFactory.createFeeder2WTLegNodeWithPhaseShifter(graph, id, name, equipmentId, NodeSide.valueOf(side.name()));
}
}

return transformerNode;
}

private void addFeeder3wtNode(VoltageLevelGraph graph,
Expand Down Expand Up @@ -406,14 +403,13 @@ public void visitStaticVarCompensator(StaticVarCompensator svc) {

@Override
public void visitTwoWindingsTransformer(TwoWindingsTransformer transformer, TwoSides side) {
FeederNode transformerNode = createFeeder2wtNode(graph, transformer, side);
Node transformerNode = createFeeder2wtNode(graph, transformer, side);
addTerminalNode(transformerNode, transformer.getTerminal(side));
}

@Override
public void visitLine(Line line, TwoSides side) {
FeederNode feederNode = createFeederLineNode(graph, line, side);
addTerminalNode(feederNode, line.getTerminal(side));
addTerminalNode(createFeederLineNode(graph, line, side), line.getTerminal(side));
}

private static VoltageLevelInfos createVoltageLevelInfos(Terminal terminal) {
Expand Down Expand Up @@ -507,7 +503,6 @@ protected void add3wtFeeder(Middle3WTNode middleNode, FeederNode firstOtherLegNo
@Override
public void visitBusbarSection(BusbarSection busbarSection) {
BusbarSectionPosition extension = busbarSection.getExtension(BusbarSectionPosition.class);
//check if we have a constraint on the busbar section
BusNode node = NodeFactory.createBusNode(graph, busbarSection.getId(), busbarSection.getNameOrId());
if (extension != null) {
node.setBusBarIndexSectionIndex(extension.getBusbarIndex(), extension.getSectionIndex());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ private void insertNode(Node nodeA, Node nodeToInsert, Node nodeB) {
addEdge(nodeB, nodeToInsert);
addEdge(nodeToInsert, nodeA);
}

}

public void insertHookNodesAtBuses() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.powsybl.sld.svg.styles.StyleClassConstants;

import java.util.*;
import java.util.stream.Stream;

/**
* @author Franck Lecuyer {@literal <franck.lecuyer at rte-france.com>}
Expand All @@ -34,11 +33,9 @@ public HighlightLineStateStyleProvider(Network network) {

@Override
public List<String> getEdgeStyles(Graph graph, Edge edge) {
Optional<String> stateStyle = getHighlightLineStateStyle(graph, edge);
return Stream.of(stateStyle)
.filter(Optional::isPresent)
.map(Optional::get)
.toList();
return getHighlightLineStateStyle(graph, edge)
.map(List::of)
.orElse(Collections.emptyList());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public abstract class AbstractTestCase {

protected boolean debugJsonFiles = false;
protected boolean debugSvgFiles = true;
protected boolean debugSvgFiles = false;
protected boolean overrideTestReferences = false;

protected final ResourcesComponentLibrary componentLibrary = getResourcesComponentLibrary();
Expand Down

0 comments on commit 0c294d0

Please sign in to comment.