IscNetComponent
The IscNetComponent
class is the base class for all IPSA components. All functions that are exposed (described below) are accessible via the derived component classes. The functions in this section should therefore be used in conjunction with one of the IPSA component classes, e.g. for accessing busbar data the following code would be used:
busbar = ipsa_network.GetBusbar(“Busbar1”)
nBusbarUID = busbar.GetUID()
Extension Data
It is possible to add extension data to an object of any type. The definitions of the data extension fields are held as static data associated with the component, i.e. all components of the same type have the same extension data fields. The actual field values on each component are stored with the component.
All extension data is handled transparently by the IPSA filing modules and is not currently used for analysis by IPSA. All extension data fields are persistent when filed.
The field names for extended data fields should not contain spaces. Only alphanumeric characters and underscores are permitted.
Field Values
Below is a list of the field values for IscNetComponent which map each derived component object to a field value, sometimes used within the code.
Field Name |
PyIPSA class |
---|---|
Unknown |
An unknown IscNetComponent object |
Busbar |
IscBusbar |
Load |
IscLoad |
Generator |
IscSynMachine |
IndMachine |
IscIndMachine |
Harmonic |
IscHarmonic |
HarmonicFilter |
IscFilter |
MechSwCapacitor |
IscMechSwCapacitor |
StaticVArC |
IscStaticVC |
Battery |
IscBattery |
DCMachine |
IscDCmachine |
UniMachine |
IscUMachine |
GridInfeed |
IscGridInfeed |
Line |
IscBranch |
Transformer |
IscTransformer |
ThreeWTransformer |
Isc3WTransformer |
ACDCConverter |
IscConverter |
DCDCConverter |
IscChopper |
MGset |
IscMGset |
AVR |
(Not mapped to PyIPSA) |
Governor |
(Not mapped to PyIPSA) |
DCConverterCtl |
(Not mapped to PyIPSA) |
ACConverterCtl |
(Not mapped to PyIPSA) |
DCMachineCtl |
(Not mapped to PyIPSA) |
PluginModel |
IscPlugin |
CircuitBreaker |
IscCircuitBreaker |
SeriesRegulator |
IscVoltageRegulator |
ProtectionContainer |
(Not mapped to PyIPSA) |
Annotation |
IscAnnotation |
AnalysisLF |
IscAnalysisLF |
AnalysisFL |
IscAnalysisFL |
AnalysisMS |
(Not mapped to PyIPSA) |
AnalysisBD |
(Not mapped to PyIPSA) |
AnalysisTS |
(Not mapped to PyIPSA) |
AnalysisHM |
IscAnalysisHM |
AnalysisProt |
(Not mapped to PyIPSA) |
Automation |
(Not mapped to PyIPSA) |
Contingency |
(Not mapped to PyIPSA) |
Study |
(Not mapped to PyIPSA) |
Network |
IscNetwork |
ResultsDisplayStyle |
(Not mapped to PyIPSA) |
ResultsDisplayLF |
(Not mapped to PyIPSA) |
SQL |
(Not mapped to PyIPSA) |
IscNetComponent Class
- class ipsa.IscNetComponent
The base class for all IPSA components.
- GetUID() int
Returns the unique ID of the component.
- Returns:
The unique ID of the component.
- Return type:
- GetName() str
Gets the name as a string - this is the name Python knows the object by (only identical to the IPSA name for busbars).
- Returns:
The name of the component.
- Return type:
- SetName(strName: str) None
Sets the name to the component to the specified name.
- Parameters:
strName (str) – The component name.
- GetRealName(strName: str) str
Gets the user defined component name as a string for the specified component name.
- SetRealName(strName: str) None
Sets the user defined IPSA component name.
- Parameters:
strName (str) – The IPSA component name.
- GetFieldType(nFieldIndex: int) str
Returns the field type as a string for the given enumerated field.
- GetFieldName(nFieldIndex: int) str
Returns the field name as a string for the given enumerated field.
- GetType() int
Returns an integer that matches one of the class field indices (e.g., IscNetComponent.Busbar).
- Returns:
The integer that matches one of the class’ field indices.
- Return type:
- AddDataExtension(strName: str, default: int | float | str) int
Adds an integer data field and returns the new field index. Sets the default value.
Note: The variable of the function is not called default.
You can use either nDefault, dDefault, or strDefault specifying the default value.
- AddListIntDataExtension(strName: str) int
Adds a list of integers data field and returns the new field index. Sets the default value to an empty list.
- AddListDblDataExtension(strName: str) int
Adds a list of doubles data field and returns the new field index. Sets the default value to an empty list.
- AddListStrDataExtension(strName: str) int
Adds a list of strings data field and returns the new field index. Sets the default value to an empty list.
- GetListIntExtensionValue(nFieldIndex: int, nIndex: int) int
Get a single integer value from the list for the enumerated field.
- GetListDblExtensionValue(nFieldIndex: int, nIndex: int) float
Get a single float value from the list for the enumerated field.
- GetListStrExtensionValue(nFieldIndex: int, nIndex: int) str
Get a single string value from the list for the enumerated field.
- SetListIntExtensionValue(nFieldIndex: int, nIndex: int, nValue: int) bool
Sets the value of an element in a list of integers for the enumerated field at given position to given value.
- SetListDblExtensionValue(nFieldIndex: int, nIndex: int, dValue: float) bool
Sets the value of an element in a list of doubles for the enumerated field at given position to given value.
- SetListStrExtensionValue(nFieldIndex: int, nIndex: int, strValue: str) bool
Sets the value of an element in a list of strings for the enumerated field at given position to given value.
- PushBackListIntExtensionValue(nFieldIndex: int, nValue: int) bool
Adds an item to the end of a list of integers for the enumerated field with the given value.
- PushBackListDblExtensionValue(nFieldIndex: int, dValue: float) bool
Adds an item to the end of a list of doubles for the enumerated field with the given value.
- PushBackListStrExtensionValue(nFieldIndex: int, strValue: str) bool
Adds an item to the end of a list of strings for the enumerated field with the given value.
- GetExtensionNames() Dict[int, str]
Returns a dictionary of extension field indexes and field names. The dictionary keys are integers representing all the extended data fields. The dictionary values are the field names of the individual extended data fields. Each extended data field is therefore represented by {nIndex:strName}, where integer nIndex is the field index and string strName is the field name.
- GetNumberOfDataComponents() int
Deprecated. Returns the number of data components within the IscNetComponent object. For most IscNetComponents this will return 1. To obtain the number of sections in a branch the function
IscBranch.GetSections()
should instead be used- Returns:
Number of data components in the IscNetComponent object.
- Return type: