Package com.powsybl.sld.model
Class VoltageLevelGraph
- java.lang.Object
-
- com.powsybl.sld.model.AbstractGraph
-
- com.powsybl.sld.model.AbstractLineGraph
-
- com.powsybl.sld.model.AbstractBaseGraph
-
- com.powsybl.sld.model.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 Modifier and Type Field Description protected static int
VALUE_SHIFT_FEEDER
-
Fields inherited from class com.powsybl.sld.model.AbstractBaseGraph
multiTermNodes, twtEdges
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
VoltageLevelGraph(VoltageLevelInfos voltageLevelInfos, boolean useName, boolean forVoltageLevelDiagram)
-
Method Summary
-
Methods inherited from class com.powsybl.sld.model.AbstractBaseGraph
addMultiTermNode, addTwtEdge, getMultiTermNodes, getTwtEdges, writeBranchFields
-
Methods inherited from class com.powsybl.sld.model.AbstractLineGraph
addLineEdge, getLineEdges
-
Methods inherited from class com.powsybl.sld.model.AbstractGraph
getHeight, getWidth, isGenerateCoordsInJson, setGenerateCoordsInJson, 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.Graph
getHeight, getWidth, isGenerateCoordsInJson, setGenerateCoordsInJson, writeJson, writeJson
-
Methods inherited from interface com.powsybl.sld.model.LineGraph
addLineEdge, getLineEdges
-
-
-
-
Field Detail
-
VALUE_SHIFT_FEEDER
protected static final int VALUE_SHIFT_FEEDER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VoltageLevelGraph
protected VoltageLevelGraph(VoltageLevelInfos voltageLevelInfos, boolean useName, boolean forVoltageLevelDiagram)
-
-
Method Detail
-
create
public static VoltageLevelGraph create(VoltageLevelInfos voltageLevelInfos, boolean useName, boolean forVoltageLevelDiagram)
-
getId
public String getId()
-
isUseName
public boolean isUseName()
-
isForVoltageLevelDiagram
public boolean isForVoltageLevelDiagram()
-
getNextCellIndex
public int getNextCellIndex()
-
removeUnnecessaryFictitiousNodes
public void removeUnnecessaryFictitiousNodes()
-
logCellDetectionStatus
public void logCellDetectionStatus()
-
addNode
public void addNode(Node node)
-
removeNode
public void removeNode(Node node)
-
getVLGraph
public VoltageLevelGraph getVLGraph(String voltageLevelId)
-
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 fictitious disconnector, 2 internal nodes) to obey the Leg/Body/Feeder structure - feeders connected to a bus through a disconnector need 2 additional internal nodes 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()
-
conditionalExtensionOfNodeConnectedToBus
public void conditionalExtensionOfNodeConnectedToBus(Predicate<Node> condition)
-
extendBusConnectedToBus
public void extendBusConnectedToBus()
-
extendSwitchBetweenBus
public void extendSwitchBetweenBus(SwitchNode nodeSwitch)
-
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. UsereplaceNode(com.powsybl.sld.model.Node, com.powsybl.sld.model.Node)
instead if the node newNode is not already in the graph.- Parameters:
nodeOrigin
- : node which will be substitutednewNode
- : node which will substitute the first one
-
replaceNode
public void replaceNode(Node nodeOrigin, Node newNode)
Replace a node with another node which is not yet in the graph. UsesubstituteNode(com.powsybl.sld.model.Node, com.powsybl.sld.model.Node)
instead if the node newNode is already in the graph.- Parameters:
nodeOrigin
- : node which will be replacednewNode
- : node which will replace the first one
-
substituteFictitiousNodesMirroringBusNodes
public void substituteFictitiousNodesMirroringBusNodes()
-
substituteSingularFictitiousByFeederNode
public void substituteSingularFictitiousByFeederNode()
-
getVHNodeBus
public BusNode getVHNodeBus(int v, int h)
-
addCell
public void addCell(Cell c)
-
removeCell
public void removeCell(Cell c)
-
getFeederNodes
public List<FeederNode> getFeederNodes()
-
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) throws IOException
- Specified by:
writeJson
in classAbstractGraph
- Throws:
IOException
-
resetCoords
public void resetCoords()
-
getMaxH
public int getMaxH()
-
getMaxV
public int getMaxV()
-
getExternCellHeight
public Double getExternCellHeight(BusCell.Direction direction)
-
setExternCellHeight
public void setExternCellHeight(Map<BusCell.Direction,Double> externCellHeight)
-
getMaxHorizontalBusPosition
public int getMaxHorizontalBusPosition()
-
setMaxHorizontalBusPosition
public void setMaxHorizontalBusPosition(int maxHorizontalBusPosition)
-
getMaxVerticalBusPosition
public int getMaxVerticalBusPosition()
-
setMaxVerticalBusPosition
public void setMaxVerticalBusPosition(int maxVerticalBusPosition)
-
handleMultiTermsNodeRotation
public void handleMultiTermsNodeRotation()
- Overrides:
handleMultiTermsNodeRotation
in classAbstractBaseGraph
-
getFirstBusY
public double getFirstBusY(LayoutParameters layoutParam)
-
getLastBusY
public double getLastBusY(LayoutParameters layoutParam)
-
-