Class VoltageLevelGraph

  • All Implemented Interfaces:
    BaseGraph, Graph, LineGraph

    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
    • Constructor Detail

      • VoltageLevelGraph

        protected VoltageLevelGraph​(VoltageLevelInfos voltageLevelInfos,
                                    boolean useName,
                                    boolean forVoltageLevelDiagram)
    • Method Detail

      • getId

        public String getId()
      • isUseName

        public boolean isUseName()
      • isForVoltageLevelDiagram

        public boolean isForVoltageLevelDiagram()
      • getNextCellIndex

        public int getNextCellIndex()
      • removeUnnecessaryFictitiousNodes

        public void removeUnnecessaryFictitiousNodes()
      • logCellDetectionStatus

        public void logCellDetectionStatus()
      • toJgrapht

        public org.jgrapht.Graph<Node,​Edge> toJgrapht()
      • addNode

        public void addNode​(Node node)
      • removeNode

        public void removeNode​(Node node)
      • addEdge

        public Edge addEdge​(Node n1,
                            Node n2)
        Add an edge between the two nodes
        Parameters:
        n1 - first node
        n2 - 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)
      • substituteNode

        public void substituteNode​(Node nodeOrigin,
                                   Node newNode)
        Substitute a node with another node already in the graph. Use replaceNode(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 substituted
        newNode - : node which will substitute 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)
      • getNodes

        public List<Node> getNodes()
      • getEdges

        public List<Edge> getEdges()
      • getNodeSet

        public Set<Node> getNodeSet()
      • getEdgeSet

        public Set<Edge> getEdgeSet()
      • getCells

        public Set<Cell> getCells()
      • getCoord

        public Point getCoord()
      • setCoord

        public void setCoord​(double x,
                             double y)
      • getX

        public double getX()
      • getY

        public double getY()
      • isPositionNodeBusesCalculated

        public boolean isPositionNodeBusesCalculated()
      • 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)