Package edu.ie3.datamodel.graph
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 Summary
ConstructorsConstructorDescriptionSubGridGate(TransformerInput link, NodeInput superiorNode, NodeInput inferiorNode) Creates an instance of aSubGridGaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SubGridGatefromTransformer2W(Transformer2WInput transformer) Creates a sub grid gate from two winding transformer.static SubGridGatefromTransformer3W(Transformer3WInput transformer, ConnectorPort inferiorPort) Creates a sub grid gate from three winding transformer.Deprecated.since 3.0.intgetLink()Deprecated.since 3.0.Deprecated.since 3.0.intfinal inthashCode()Returns a hash code value for this object.Returns the value of theinferiorNoderecord component.link()Returns the value of thelinkrecord component.Returns the value of thesuperiorNoderecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
SubGridGate
Creates an instance of aSubGridGaterecord class.- Parameters:
link- the value for thelinkrecord componentsuperiorNode- the value for thesuperiorNoderecord componentinferiorNode- the value for theinferiorNoderecord component
-
-
Method Details
-
fromTransformer2W
Creates a sub grid gate from two winding transformer.- Parameters:
transformer- Two winding transformer to create gate for- Returns:
- A
SubGridGatewith 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 forinferiorPort- Choose, which 1-to-1-gate should be created- Returns:
- A
SubGridGatewith transformer, its higher voltage node and either the medium or low voltage node
-
getLink
Deprecated.since 3.0. Uselink()instead -
getSuperiorNode
Deprecated.since 3.0. UsesuperiorNode()instead -
getInferiorNode
Deprecated.since 3.0. UseinferiorNode()instead -
getSuperiorSubGrid
public int getSuperiorSubGrid() -
getInferiorSubGrid
public int getInferiorSubGrid() -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
link
Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-
superiorNode
Returns the value of thesuperiorNoderecord component.- Returns:
- the value of the
superiorNoderecord component
-
inferiorNode
Returns the value of theinferiorNoderecord component.- Returns:
- the value of the
inferiorNoderecord component
-