|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.maps.model.ElectricalConnectivityNode
public class ElectricalConnectivityNode
A node in an electrical distribution connectivity network. Nodes are identified with their rover data id, which allows you to directly look up the associated data and highlights in the map set. The various flags used for tracing, the type of the node, and the phasing and switching positions are all stored in binary form in a single two-byte short integer value. This is the same format used to store it on disk, so keeping it in that form eliminates the need to parse it for every node when you load the connectivity. Also, I'm not sure how big booleans variables really are when you store them in a Java object; they may or may not be efficient and we need this thing as tight as possible to save memory. However, convenience functions are provided to make life easy for programmers and scripters.
| Field Summary | |
|---|---|
int[] |
connections
|
static int |
FLAG_A_CURRENT
|
static int |
FLAG_A_NORMAL
|
static int |
FLAG_APHASE
|
static int |
FLAG_B_CURRENT
|
static int |
FLAG_B_NORMAL
|
static int |
FLAG_BPHASE
|
static int |
FLAG_C_CURRENT
|
static int |
FLAG_C_NORMAL
|
static int |
FLAG_CPHASE
|
static int |
FLAG_VISITED
|
short |
flags
|
static int |
MASK_CURRENT
The fifth three bits are the phases currently on. |
static int |
MASK_NORMAL
The fourth three bits are the phases normally on. |
static int |
MASK_PHASE
The third three bits are the available phases. |
static int |
MASK_SUBTYPE
The second three bits are the node subtype. |
static int |
MASK_TYPE
The first three bits are the node type. |
static int |
MASK_VISITED
And finally, a single bit to indicate whether the node has been visited during a traversal. |
static Naming |
nameToType
|
int |
nodeID
|
static int |
SUBTYPE_ARRESTOR
|
static int |
SUBTYPE_BREAKER
|
static int |
SUBTYPE_CAPACITOR
|
static int |
SUBTYPE_FEEDER
|
static int |
SUBTYPE_FUSE
|
static int |
SUBTYPE_GENERATOR
|
static int |
SUBTYPE_LIGHT
|
static int |
SUBTYPE_METER
|
static int |
SUBTYPE_METER_ON_POLE
|
static int |
SUBTYPE_NONE
|
static int |
SUBTYPE_PRIMARY_DEVICE
|
static int |
SUBTYPE_PRIMARY_LINE
|
static int |
SUBTYPE_PRIMARY_METER
|
static int |
SUBTYPE_PRIMARY_OH
|
static int |
SUBTYPE_PRIMARY_OPEN
|
static int |
SUBTYPE_PRIMARY_PROTECTION
|
static int |
SUBTYPE_PRIMARY_SWITCH
|
static int |
SUBTYPE_PRIMARY_UG
|
static int |
SUBTYPE_RECLOSER
|
static int |
SUBTYPE_REGULATOR
|
static int |
SUBTYPE_SECONDARY_DEVICE
|
static int |
SUBTYPE_SECONDARY_LINE
|
static int |
SUBTYPE_SECONDARY_OH
|
static int |
SUBTYPE_SECONDARY_UG
|
static int |
SUBTYPE_SECONDARY_UNDERBUILT
|
static int |
SUBTYPE_SECTIONALIZER
|
static int |
SUBTYPE_SERVICE
|
static int |
SUBTYPE_SOURCE
|
static int |
SUBTYPE_STEP_TRANSFORMER
|
static int |
SUBTYPE_SUBSTATION
|
static int |
SUBTYPE_TRANSFORMER
|
static int |
SUBTYPE_TRANSFORMER_OH
|
static int |
SUBTYPE_TRANSFORMER_UG
|
static int |
SUBTYPE_VOLTMETER
|
static int |
TYPE_PRIMARY_DEVICE
|
static int |
TYPE_PRIMARY_LINE
|
static int |
TYPE_PRIMARY_PROTECTION
|
static int |
TYPE_PRIMARY_SWITCH
|
static int |
TYPE_SECONDARY_DEVICE
|
static int |
TYPE_SECONDARY_LINE
|
static int |
TYPE_SOURCE
|
static int |
TYPE_TRANSFORMER
|
static java.lang.String[] |
typeToName
|
| Constructor Summary | |
|---|---|
ElectricalConnectivityNode()
|
|
| Method Summary | |
|---|---|
static java.lang.String[] |
decodeNodeData(int data)
|
static java.lang.String |
decodePhasing(int phasing)
|
static short |
encodeNodeData(java.lang.String typeName,
java.lang.String phasing,
java.lang.String switching)
|
static short |
encodeNodeData(java.lang.String typeName,
java.lang.String phasing,
java.lang.String switching,
java.lang.String current)
|
static short |
encodeNodeData(java.lang.String typeName,
java.lang.String phasing,
java.lang.String switching,
java.lang.String current,
boolean visited)
|
static byte |
encodePhasing(java.lang.String phasing)
|
java.lang.String |
getCurrentPhaseString()
|
java.lang.String |
getDescription()
|
java.lang.String |
getNormalPhaseString()
|
java.lang.String |
getPresentPhaseString()
|
java.lang.String |
getSubtype()
|
int |
getSubtypeCode()
Returns the six-bit subtype code (including the type code). |
int |
getTypeCode()
Returns the three-bit type code. |
boolean |
isAPhaseCurrentlyOn()
Returns true if "A" phase is currently on (connected). |
boolean |
isAPhaseNormallyOn()
Returns true if "A" phase is normally on (connected). |
boolean |
isAPhasePresent()
Returns true if "A" phase is present in this node. |
boolean |
isBPhaseCurrentlyOn()
Returns true if "B" phase is currently on (connected). |
boolean |
isBPhaseNormallyOn()
Returns true if "B" phase is normally on (connected). |
boolean |
isBPhasePresent()
Returns true if "B" phase is present in this node. |
boolean |
isConnectedTo(int nodeIndex)
|
boolean |
isCPhaseCurrentlyOn()
Returns true if "A" phase is currently on (connected). |
boolean |
isCPhaseNormallyOn()
Returns true if "A" phase is normally on (connected). |
boolean |
isCPhasePresent()
Returns true if "C" phase is present in this node. |
boolean |
isDevice()
Returns true if the node represents a primary device or switch. |
boolean |
isPhasingNormal()
Returns true if the phases currently on differ from those normally on. |
boolean |
isPrimary()
Returns true if the node represents a primary section or device. |
boolean |
isProtective()
Returns true if the device is a protective device (fuse, recloser, etc.) |
boolean |
isSource()
Returns true if the node represents a source for electrical power - generally a substation or substation breaker. |
boolean |
isSwitchable()
Returns true if the device is normally considered a switch. |
boolean |
isTransformer()
Returns true if the node represents a primary-to-secondary transformer. |
boolean |
isVisited()
|
void |
resetPhaseCurrentlyOn()
Resets current phasing to normal phasing. |
void |
setAPhaseCurrentlyOn(boolean tizit)
Set current setting of "A" phase. |
void |
setBPhaseCurrentlyOn(boolean tizit)
Set current setting of "B" phase. |
void |
setCPhaseCurrentlyOn(boolean tizit)
Set current setting of "C" phase. |
void |
setVisited(boolean tizit)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MASK_TYPE
public static final int MASK_SUBTYPE
public static final int MASK_PHASE
public static final int MASK_NORMAL
public static final int MASK_CURRENT
public static final int MASK_VISITED
public static final int TYPE_SOURCE
public static final int TYPE_PRIMARY_LINE
public static final int TYPE_PRIMARY_DEVICE
public static final int TYPE_PRIMARY_PROTECTION
public static final int TYPE_PRIMARY_SWITCH
public static final int TYPE_TRANSFORMER
public static final int TYPE_SECONDARY_LINE
public static final int TYPE_SECONDARY_DEVICE
public static final int SUBTYPE_NONE
public static final int SUBTYPE_SOURCE
public static final int SUBTYPE_BREAKER
public static final int SUBTYPE_SUBSTATION
public static final int SUBTYPE_FEEDER
public static final int SUBTYPE_PRIMARY_LINE
public static final int SUBTYPE_PRIMARY_OH
public static final int SUBTYPE_PRIMARY_UG
public static final int SUBTYPE_PRIMARY_DEVICE
public static final int SUBTYPE_CAPACITOR
public static final int SUBTYPE_REGULATOR
public static final int SUBTYPE_ARRESTOR
public static final int SUBTYPE_GENERATOR
public static final int SUBTYPE_VOLTMETER
public static final int SUBTYPE_STEP_TRANSFORMER
public static final int SUBTYPE_PRIMARY_PROTECTION
public static final int SUBTYPE_FUSE
public static final int SUBTYPE_RECLOSER
public static final int SUBTYPE_PRIMARY_SWITCH
public static final int SUBTYPE_PRIMARY_OPEN
public static final int SUBTYPE_SECTIONALIZER
public static final int SUBTYPE_PRIMARY_METER
public static final int SUBTYPE_TRANSFORMER
public static final int SUBTYPE_TRANSFORMER_OH
public static final int SUBTYPE_TRANSFORMER_UG
public static final int SUBTYPE_SECONDARY_LINE
public static final int SUBTYPE_SECONDARY_OH
public static final int SUBTYPE_SECONDARY_UG
public static final int SUBTYPE_SECONDARY_UNDERBUILT
public static final int SUBTYPE_SECONDARY_DEVICE
public static final int SUBTYPE_LIGHT
public static final int SUBTYPE_SERVICE
public static final int SUBTYPE_METER
public static final int SUBTYPE_METER_ON_POLE
public static final int FLAG_APHASE
public static final int FLAG_BPHASE
public static final int FLAG_CPHASE
public static final int FLAG_A_NORMAL
public static final int FLAG_B_NORMAL
public static final int FLAG_C_NORMAL
public static final int FLAG_A_CURRENT
public static final int FLAG_B_CURRENT
public static final int FLAG_C_CURRENT
public static final int FLAG_VISITED
public static java.lang.String[] typeToName
public static Naming nameToType
public int nodeID
public short flags
public int[] connections
| Constructor Detail |
|---|
public ElectricalConnectivityNode()
| Method Detail |
|---|
public static short encodeNodeData(java.lang.String typeName,
java.lang.String phasing,
java.lang.String switching)
public static short encodeNodeData(java.lang.String typeName,
java.lang.String phasing,
java.lang.String switching,
java.lang.String current)
public static short encodeNodeData(java.lang.String typeName,
java.lang.String phasing,
java.lang.String switching,
java.lang.String current,
boolean visited)
public static java.lang.String[] decodeNodeData(int data)
public static byte encodePhasing(java.lang.String phasing)
public static java.lang.String decodePhasing(int phasing)
public boolean isSource()
public boolean isPrimary()
public boolean isDevice()
public boolean isSwitchable()
public boolean isProtective()
public boolean isTransformer()
public int getTypeCode()
public int getSubtypeCode()
public boolean isAPhasePresent()
public boolean isBPhasePresent()
public boolean isCPhasePresent()
public boolean isAPhaseNormallyOn()
public boolean isBPhaseNormallyOn()
public boolean isCPhaseNormallyOn()
public boolean isAPhaseCurrentlyOn()
public boolean isBPhaseCurrentlyOn()
public boolean isCPhaseCurrentlyOn()
public void setAPhaseCurrentlyOn(boolean tizit)
public void setBPhaseCurrentlyOn(boolean tizit)
public void setCPhaseCurrentlyOn(boolean tizit)
public void resetPhaseCurrentlyOn()
public boolean isPhasingNormal()
public boolean isVisited()
public void setVisited(boolean tizit)
public boolean isConnectedTo(int nodeIndex)
public java.lang.String getPresentPhaseString()
public java.lang.String getNormalPhaseString()
public java.lang.String getCurrentPhaseString()
public java.lang.String getSubtype()
public java.lang.String getDescription()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||