Package com.powsybl.sld.model.graphs
Class VoltageLevelGraph
- java.lang.Object
-
- com.powsybl.sld.model.graphs.AbstractGraph
-
- com.powsybl.sld.model.graphs.AbstractBaseGraph
-
- com.powsybl.sld.model.graphs.VoltageLevelGraph
-
public class VoltageLevelGraph extends AbstractBaseGraph
This class builds the connectivity among the elements of a voltageLevel buildGraphAndDetectCell establishes the List of nodes, edges and nodeBuses cells is built by the PatternCellDetector Class- Author:
- Benoit Jeanson
, Nicolas Duchene, Geoffroy Jamgotchian , Franck Lecuyer
-
-
Field Summary
-
Fields inherited from class com.powsybl.sld.model.graphs.AbstractBaseGraph
multiTermNodes, twtEdges
-
-
Constructor Summary
Constructors Constructor Description VoltageLevelGraph(VoltageLevelInfos voltageLevelInfos, Graph parentGraph)
-
Method Summary
-
Methods inherited from class com.powsybl.sld.model.graphs.AbstractBaseGraph
addMultiTermNode, addTwtEdge, getMultiTermNodes, getTwtEdges, writeBranchFields
-
Methods inherited from class com.powsybl.sld.model.graphs.AbstractGraph
addLineEdge, addNode, getDirection, getHeight, getLineEdges, getNodeToVlGraph, getShiftedPoint, getVoltageLevelGraph, getVoltageLevelInfos, getWidth, setCoordinatesSerialized, setSize, writeJson, writeJson
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.sld.model.graphs.Graph
addLineEdge, addNode, getDirection, getHeight, getLineEdges, getNodeToVlGraph, getShiftedPoint, getVoltageLevelGraph, getVoltageLevelInfos, getWidth, setCoordinatesSerialized, writeJson, writeJson
-
-
-
-
Constructor Detail
-
VoltageLevelGraph
public VoltageLevelGraph(VoltageLevelInfos voltageLevelInfos, Graph parentGraph)
-
-
Method Detail
-
getId
public String getId()
-
isForVoltageLevelDiagram
public boolean isForVoltageLevelDiagram()
-
getNextCellNumber
public int getNextCellNumber()
-
removeUnnecessaryFictitiousNodes
public void removeUnnecessaryFictitiousNodes()
-
logCellDetectionStatus
public void logCellDetectionStatus()
-
addNode
public void addNode(Node node)
-
removeNode
public void removeNode(Node node)
- Specified by:
removeNode
in interfaceGraph
- Overrides:
removeNode
in classAbstractGraph
-
getVoltageLevel
public VoltageLevelGraph getVoltageLevel(String voltageLevelId)
-
getVoltageLevels
public List<VoltageLevelGraph> getVoltageLevels()
-
getVoltageLevelStream
public Stream<VoltageLevelGraph> getVoltageLevelStream()
-
addEdge
public Edge addEdge(Node n1, Node n2)
Add an edge between the two nodes- Parameters:
n1
- first noden2
- second node
-
setMaxBusPosition
public void setMaxBusPosition()
-
insertFictitiousNodesAtFeeders
public void insertFictitiousNodesAtFeeders()
Insert fictitious node(s) before feeders in order for the feeder to be properly displayed: feeders need at least one inserted fictitious node to have enough space to display the feeder arrows. Some special cases: - feeders connected directly to a bus need 3 additional nodes (1 BusConnection, 2 InternalNode) to obey the Leg/Body/Feeder structure - feeders connected to a bus through a disconnector need 2 additional InternalNode to obey the Leg/Body/Feeder structure - 3WT do not need any fictitious node inserted here as they already have the fictitious Middle3WTNode
-
extendFirstOutsideNode
public void extendFirstOutsideNode()
-
extendSwitchBetweenBuses
public void extendSwitchBetweenBuses()
-
extendSwitchBetweenBuses
public void extendSwitchBetweenBuses(SwitchNode nodeSwitch)
-
extendBusConnectedToBus
public void extendBusConnectedToBus()
-
insertInternalNode
public InternalNode insertInternalNode(Node node1, Node node2, String id)
-
substituteNode
public void substituteNode(Node nodeOrigin, Node newNode)
Substitute a node with another node already in the graph.- Parameters:
nodeOrigin
- : node which will be substitutednewNode
- : node which will substitute the first one
-
substituteFictitiousNodesMirroringBusNodes
public void substituteFictitiousNodesMirroringBusNodes()
-
substituteSingularFictitiousByFeederNode
public void substituteSingularFictitiousByFeederNode()
-
addCell
public void addCell(Cell c)
-
removeCell
public void removeCell(Cell c)
-
getFeederNodes
public List<FeederNode> getFeederNodes()
-
getInternCellStream
public Stream<InternCell> getInternCellStream()
-
getExternCellStream
public Stream<ExternCell> getExternCellStream()
-
getCell
public Optional<Cell> getCell(Node node)
- Specified by:
getCell
in interfaceGraph
- Overrides:
getCell
in classAbstractGraph
-
getVoltageLevelInfos
public VoltageLevelInfos getVoltageLevelInfos()
-
getCoord
public Point getCoord()
-
setCoord
public void setCoord(double x, double y)
-
getX
public double getX()
-
getY
public double getY()
-
isPositionNodeBusesCalculated
public boolean isPositionNodeBusesCalculated()
-
writeJson
public void writeJson(com.fasterxml.jackson.core.JsonGenerator generator, boolean includeCoordinates) throws IOException
- Specified by:
writeJson
in classAbstractGraph
- Throws:
IOException
-
resetCoords
public void resetCoords()
-
getMaxH
public int getMaxH()
-
getMaxV
public int getMaxV()
-
getMaxHorizontalBusPosition
public int getMaxHorizontalBusPosition()
-
setMaxHorizontalBusPosition
public void setMaxHorizontalBusPosition(int maxHorizontalBusPosition)
-
getMaxVerticalBusPosition
public int getMaxVerticalBusPosition()
-
setMaxVerticalBusPosition
public void setMaxVerticalBusPosition(int maxVerticalBusPosition)
-
getFirstBusY
public double getFirstBusY()
-
getLastBusY
public double getLastBusY(double verticalSpaceBus)
-
getInnerHeight
public double getInnerHeight(double verticalSpaceBus)
-
-