Record Class SubGridGate

java.lang.Object
java.lang.Record
edu.ie3.datamodel.graph.SubGridGate
All Implemented Interfaces:
Serializable

public record SubGridGate(TransformerInput link, NodeInput superiorNode, NodeInput inferiorNode) extends Record implements Serializable
Defines gates between SubGridContainers and serves as edge definition for SubGridTopologyGraph
See Also:
  • Constructor Details

    • SubGridGate

      public SubGridGate(TransformerInput link, NodeInput superiorNode, NodeInput inferiorNode)
      Creates an instance of a SubGridGate record class.
      Parameters:
      link - the value for the link record component
      superiorNode - the value for the superiorNode record component
      inferiorNode - the value for the inferiorNode record component
  • Method Details

    • fromTransformer2W

      public static SubGridGate fromTransformer2W(Transformer2WInput transformer)
      Creates a sub grid gate from two winding transformer.
      Parameters:
      transformer - Two winding transformer to create gate for
      Returns:
      A SubGridGate with given transformer and its nodes
    • fromTransformer3W

      public static SubGridGate fromTransformer3W(Transformer3WInput transformer, ConnectorPort inferiorPort)
      Creates a sub grid gate from three winding transformer. Define, which of the two superior sub grids should be taken by the inferior port flag.
      Parameters:
      transformer - Three winding transformer to create gate for
      inferiorPort - Choose, which 1-to-1-gate should be created
      Returns:
      A SubGridGate with transformer, its higher voltage node and either the medium or low voltage node
    • getLink

      @Deprecated(since="3.0") public TransformerInput getLink()
      Deprecated.
      since 3.0. Use link() instead
    • getSuperiorNode

      @Deprecated(since="3.0") public NodeInput getSuperiorNode()
      Deprecated.
      since 3.0. Use superiorNode() instead
    • getInferiorNode

      @Deprecated(since="3.0") public NodeInput getInferiorNode()
      Deprecated.
      since 3.0. Use inferiorNode() instead
    • getSuperiorSubGrid

      public int getSuperiorSubGrid()
    • getInferiorSubGrid

      public int getInferiorSubGrid()
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • link

      public TransformerInput link()
      Returns the value of the link record component.
      Returns:
      the value of the link record component
    • superiorNode

      public NodeInput superiorNode()
      Returns the value of the superiorNode record component.
      Returns:
      the value of the superiorNode record component
    • inferiorNode

      public NodeInput inferiorNode()
      Returns the value of the inferiorNode record component.
      Returns:
      the value of the inferiorNode record component