IscGroup
The IscGroup class provides access to all IPSA group types to get and set the group members and to modify group specific information.
Field Values
Get and Set functions through field index are only exposed for demand groups and fault level groups. The exposed field values are specific to the group type, so it is advised to always check group type before using the Get and Set functions to ensure the desired behaviour occurs.
Type |
Field Name |
Description |
|---|---|---|
Float |
FirmCapacityNonSeasonalMVA |
Demand group property: The firm capacity non-seasonal apparent power in MVA. |
Float |
FirmCapacitySummerMVA |
Demand group property: The firm capacity summer apparent power in MVA. |
Float |
FirmCapacityWinterMVA |
Demand group property: The firm capacity winter apparent power in MVA. |
Float |
MaxLoadingNonSeasonalMVA |
Demand group property: The maximum non-coincidental load non-seasonal apparent power in MVA. |
Float |
MaxLoadingSummerMVA |
Demand group property: The maximum non-coincidental load summer apparent power in MVA. |
Float |
MaxLoadingWinterMVA |
Demand group property: The maximum non-coincidental load winter apparent power in MVA. |
Float |
MaxLoadingNonSeasonalPowerFactor |
Demand group property: The maximum non-coincidental load non-seasonal power factor. |
Float |
MaxLoadingSummerPowerFactor |
Demand group property: The maximum non-coincidental load summer power factor. |
Float |
MaxLoadingWinterPowerFactor |
Demand group property: The maximum non-coincidental load winter power factor. |
String |
FirmCapacityDescription |
Demand group property: The firm capacity description. |
String |
MaxLoadingDescription |
Demand group property: The maximum non-coincidental load description. |
Integer |
FaultKind |
Fault level group property: Describes whether the fault level results are from a three-phase or single-phase fault.
|
Float |
DCComponentkA |
Fault level group property: The decaying (aperiodic) component of short-circuit current in kA. It is a mean value between the top and the bottom envelope of a short-circuit current decaying from an initial value to zero. |
Float |
InitSymmPowerMVA |
Fault level group property: The initial symmetrical short-circuit power in MVA. It is a fictitious value determined as a product of the initial symmetrical short-circuit current, the nominal system voltage, and the factor square root of 3. |
Float |
InitSymmCurrentkA |
Fault level group property: The initial symmetrical short-circuit current in kA. It is a root mean square (RMS) value of the alternate current (AC) symmetrical component of a prospective (available) short-circuit current, applicable at the instant of short circuit if the impedance remains at zero-time value. |
Float |
SymmBreakCurrentkA |
Fault level group property: The symmetrical short-circuit breaking current in kA. It is an RMS value of an integral cycle of the symmetrical AC component of the prospective short-circuit current at the instant of contact separation of the first pole to open of a switching device. |
Float |
SymmBreakAngleDeg |
Fault level group property: The symmetrical short-circuit breaking current angle in dgrees. It is the angle of an RMS value of an integral cycle of the symmetrical AC component of the prospective short-circuit current at the instant of contact separation of the first pole to open of a switching device. |
Float |
PeakCurrentkA |
Fault level group property: The peak short-circuit current in kA. It is the maximum possible instantaneous value of prospective (available) short-circuit current. |
Float |
MaxSteadyCurrentkA |
Fault level group property: The maximum steady state short-circuit current in kA. |
Float |
MinSteadyCurrentkA |
Fault level group property: The minimum steady state short-circuit current in kA. |
Float |
SteadyCurrentkA |
Fault level group property: The steady state short-circuit current in kA. It is an RMS value of the short-circuit current which remains after the decay of the transient phenomena. |
Float |
PosSeqResistanceOhm |
Fault level group property: The resistance in Ohms of the positive-sequence system as viewed from the short-circuit location. |
Float |
PosSeqReactanceOhm |
Fault level group property: The reactance in Ohms of the positive-sequence system as viewed from the short-circuit location. |
Float |
ZeroSeqResistanceOhm |
Fault level group property: The resistance in Ohms of the zero-sequence system as viewed from the short-circuit location. |
Float |
ZeroSeqReactanceOhm |
Fault level group property: The reactance in Ohms of the zero-sequence system as viewed from the short-circuit location. |
String |
FaultLevelDescription |
Fault level group property: A description of the fault level analysis that produces the fault level results. |
IscGroup Class
- class ipsa.IscGroup
The IscGroup class provides access to an IPSA group to set and get group members. Note the extension functions will only work for general groups and may not function for other groups e.g., areas, transformer groups.
- GetName() str
Returns the user defined group name as a string.
- Returns:
The user defined group name.
- Return type:
- SetName(strName: str) None
Sets the name as a string.
- Parameters:
strName (str) – The selected string name.
- GetGroupType() int
Returns the type of the group where:
0 = No group type
1 = Area type group – contains all busbars in an area
2 = Mixed item group
3 = Load scaling group
4 = Load transfer group
5 = Protection device group
8 = Generator scaling group
9 = Region group
10 = Transformer group (master slave operation)
11 = Feeder group
12 = Demand group
13 = Fault level group
- Returns:
The group type.
- Return type:
- SetMembers(nUIDs: List[int]) bool
Overwrites the current list of group members with the given list of component UIDs. This replaces any existing members with the supplied list of UIDs.
NB. The user may not set the members of a Feeder group.
- ClearMembers() bool
Sets the group members to an empty list. This clears any existing members.
NB. The user may not clear the members of a Feeder group.
- Returns:
True if the members have been set.
- Return type:
- AddMember(nUID: int) bool
Appends the component with the given UID to the list of component UIDs if the UID is not present. All existing group member UIDs are unaffected.
NB. The user may not add members to a Feeder group.
- RemoveMember(nUID: int) bool
Removes the component with the given UID from the list of component UIDs if the UID is present. All other existing group member UIDs are unaffected.
NB. The user may not remove members from a Feeder group.
- IsMember(nUID: int) bool
Checks whether the component with the given UID is present in the list of component UIDs. The list of group member UIDs will be unaffected.
- CompareGroups(nGroupUID: int, bUseIntersection: bool = False) List[int]
Compares the current group with the group with UID given by nGroupUID. By default, will perform a difference operation returning a list of component UIDs present in the current group but not present in the group with UID given by nGroupUID. If bUseIntersection is True it will return a list of component UIDs present in both lists. Both lists of group member UIDs will be unaffected.
- MergeGroups(nGroupUID: int, bDeleteGroup: bool = False) bool
Appends the list of component UIDs from the group with the given UID onto the current group’s UID list. By default the group with the given UID will be unnaffected, unless bDeleteGroup is True, in which case it will be deleted.
- GetLoadScalingReal() float
Returns the per unit scaling factor on the active power for the loads in the group. NB. This will only work for load scaling groups.
- Returns:
The per unit scaling factor for the load active power.
- Return type:
- GetLoadScalingReactive() float
Returns the per unit scaling factor on the reactive power for the loads in the group. NB. This will only work for load scaling groups.
- Returns:
The per unit scaling factor for the load reactive power.
- Return type:
- SetLoadScaling(fRealScale: float, fReactiveScale: float) bool
Sets the per unit scaling factors for the active and reactive parts of the loads in the group. NB. This will only work for load scaling groups.
- GetGeneratorScalingReal() float
Returns the per unit scaling factor on the active power for the generators in the group. NB. This will only work for generator scaling groups.
- Returns:
The per unit scaling factor for the generator active power.
- Return type:
- GetGeneratorScalingReactive() float
Returns the per unit scaling factor on the reactive power for the generators in the group. NB. This will only work for generator scaling groups.
- Returns:
The per unit scaling factor for the generator reactive power.
- Return type:
- SetGeneratorScaling(fRealScale: float, fReactiveScale: float) bool
Sets the per unit scaling factors for the active and reactive parts of the generators in the group. NB. This will only work for generator scaling groups.
- GetFeederScalingActive() bool
Returns whether the group feeder active and reactive scaling is in use. NB. This will only work for feeder groups.
- Returns:
True if the group feeder scaling is active.
- Return type:
- SetFeederScalingActive(bUseFeederScaling) bool
Sets whether the group feeder active and reactive scaling is in use. NB. This will only work for feeder groups.
- GetFeederScalingReal() float
Returns the per unit scaling factor on the active power for the feeder group. NB. This will only work for feeder groups.
- Returns:
The per unit scaling factor for the active power.
- Return type:
- GetFeederScalingReactive() float
Returns the per unit scaling factor on the reactive power for the feeder group. NB. This will only work for feeder groups.
- Returns:
The per unit scaling factor for the reactive power.
- Return type:
- SetFeederScaling(fRealScale: float, fReactiveScale: float) bool
Sets the per unit scaling factors for the active and reactive parts for the feeder group. NB. This will only work for feeder groups.
- GetDemandGroupDValue(nFieldIndex: int) float
Gets double value by field index for demand groups. NB. This will only work for demand groups.
- Parameters:
nFieldIndex (int) – The field index.
- Returns:
The double value. Returns -99999999.0 if the field value is not successfully retrieved.
- Return type:
double
- GetDemandGroupSValue(nFieldIndex: int) str
Gets string value by field index for demand groups. NB. This will only work for demand groups.
- SetDemandGroupDValue(nFieldIndex: int, dValue: float) bool
Sets double value by field index for demand groups. NB. This will only work for demand groups.
- SetDemandGroupSValue(nFieldIndex: int, strValue: str) bool
Sets string value by field index for demand groups. NB. This will only work for demand groups.
- SetDemandGroupByDataMaps(mNumericData: dict[int, float], mStrData: dict[int, str]) bool
Update demand group data attributes with two dicts of numerical values and string values. NB. This will only work for demand groups.
- Parameters:
mNumericData (dict(int, float)) – Dict of data to be set into demand group properties that are of type double. The dict key represents the field index to set data into, and the dict value represents the double value to be set.
mStrData (dict(int, float)) – The given string value to set. Dict of data to be set into demand group properties that are of type string. The dict key represents the field index to set data into, and the dict value represents the string value to be set.
- Returns:
True if successful. False if any field in either dict has failed to be set.
- Return type:
- GetFaultLevelGroupIValue(nFieldIndex: int) float
Gets integer value by field index for fault level groups. NB. This will only work for fault level groups.
- Parameters:
nFieldIndex (int) – The field index.
- Returns:
The integer value. Returns -9999999 if the field value is not successfully retrieved.
- Return type:
Integer
- GetFaultLevelGroupDValue(nFieldIndex: int) float
Gets double value by field index for fault level groups. NB. This will only work for fault level groups.
- Parameters:
nFieldIndex (int) – The field index.
- Returns:
The double value. Returns -99999999.0 if the field value is not successfully retrieved.
- Return type:
double
- GetFaultLevelGroupSValue(nFieldIndex: int) str
Gets string value by field index for fault level groups. NB. This will only work for fault level groups.
- SetFaultLevelGroupIValue(nFieldIndex: int, nValue: int) bool
Sets integer value by field index for fault level groups. NB. This will only work for fault level groups.
- SetFaultLevelGroupDValue(nFieldIndex: int, dValue: float) bool
Sets double value by field index for fault level groups. NB. This will only work for fault level groups.
- SetFaultLevelGroupSValue(nFieldIndex: int, strValue: str) bool
Sets string value by field index for fault level groups. NB. This will only work for fault level groups.
- SetFaultLevelGroupByDataMaps(mNumericData: dict[int, float], mStrData: dict[int, str]) bool
Update fault level group data attributes with two dicts of numerical values and string values. NB. This will only work for fault level groups.
- Parameters:
mNumericData (dict(int, float)) – Dict of data to be set into fault level group properties that are numeric (double or int). The dict key represents the field index to set data into, and the dict value represents the numeric value to be set. NB. The numeric data is presented with float type. When setting into a field with the type int, the float value will be truncacted to the integer part.
mStrData (dict(int, float)) – The given string value to set. Dict of data to be set into fault level group properties that are of type string. The dict key represents the field index to set data into, and the dict value represents the string value to be set.
- Returns:
True if successful. False if any field in either dict has failed to be set.
- Return type:
- AddDataExtension(strName: str, default: int | float | str | bool) int
Adds an integer/float/string/double extension data field and returns the new field index. Sets the default value.
This only has to be called once per component type - not for every instance of the component!
Note: The variable of the function is not called default.
You can use either nDefault, dDefault, strDefault or bDefault to specify the default value depending on the type of data extension being added.
- AddListIntDataExtension(strName: str) int
Adds a data field for a list of integers and returns the new field index. Sets the default value to an empty list.
This only has to be called once per component type - not for every instance of the component!
- AddListDblDataExtension(strName: str) int
Adds a data field for a list of doubles and returns the new field index. Sets the default value to an empty list.
This only has to be called once per component type - not for every instance of the component!
- AddListStrDataExtension(strName: str) int
Adds a data field for a list of strings and returns the new field index. Sets the default value to an empty list.
This only has to be called once per component type - not for every instance of the component!
- DeleteDataExtensionField(nFieldIndex: int) bool
- DeleteDataExtensionField(strName: str) bool
Deletes the extension field identified by the name strName or index nFieldIndex. This will delete the data in this extension field from this group and all other groups of the same type. It is advised to call NonDefaultExtensionInstanceCount prior to deleting the data extension field to ensure the expected amount of data shall be deleted.
This only has to be called once per component type - not for every instance of the component!
- NonDefaultExtensionInstanceCount(nFieldIndex: int) int
- NonDefaultExtensionInstanceCount(strName: str) int
Returns the number of groups of the same type where the extension field identified by strName or nFieldIndex is set to a non-default value. That is, the count of the components where data will be destroyed by calling DeleteDataExtensionField.
- GetListIntExtensionValue(nFieldIndex: int, nIndex: int) int
Get a single integer value from the list within the given enumerated field.
Note, the PyIPSA nIndex starts from 0, while the UI index starts from 1.
- GetListDblExtensionValue(nFieldIndex: int, nIndex: int) float
Get a single float value from the list within the given enumerated field.
Note, the PyIPSA nIndex starts from 0, while the UI index starts from 1.
- GetListStrExtensionValue(nFieldIndex: int, nIndex: int) str
Get a single string value from the list within the given enumerated field.
Note, the PyIPSA nIndex starts from 0, while the UI index starts from 1.
- GetListIntSize(nFieldIndex: int) int
Gets the size of the list of integers for the given enumerated field.
- GetListDblSize(nFieldIndex: int) int
Gets the size of the list of doubles for the given enumerated field.
- GetListStrSize(nFieldIndex: int) int
Gets the size of the list of strings for the given enumerated field.
- SetIntExtensionValue(nFieldIndex: int, nValue: int) bool
Set the integer value for the given extension field.
- SetDblExtensionValue(nFieldIndex: int, dValue: float) bool
Set the float value for the given extension field.
- SetStrExtensionValue(nFieldIndex: int, sValue: str) bool
Set the string value for the given extension field.
- SetBoolExtensionValue(nFieldIndex: int, bValue: bool) bool
Set the boolean value for the given extension field.
- SetListIntExtensionValue(nFieldIndex: int, nIndex: int, nValue: int) bool
Sets the value of a specified element in a list of integers within the given enumerated field.
Note the index within the list, nIndex, must already exist - that is, the size of the list (i.e., GetListIntSize) must be larger than nIndex. Note also that the PyIPSA nIndex starts from 0, while the UI index starts from 1.
- SetListDblExtensionValue(nFieldIndex: int, nIndex: int, dValue: float) bool
Sets the value of a specified element in a list of doubles within the given enumerated field.
Note the index within the list, nIndex, must already exist - that is, the size of the list (i.e., GetListDblSize) must be larger than nIndex. Note also that the PyIPSA nIndex starts from 0, while the UI index starts from 1.
- SetListStrExtensionValue(nFieldIndex: int, nIndex: int, strValue: str) bool
Sets the value of a specific element in a list of strings within the given enumerated field.
Note the index within the list, nIndex, must already exist - that is, the size of the list (i.e., GetListStrSize) must be larger than nIndex. Note also that the PyIPSA nIndex starts from 0, while the UI index starts from 1.
- PushBackListIntExtensionValue(nFieldIndex: int, nValue: int) bool
Adds an item with the given value to the end of a list of integers within the given enumerated field.
- PushBackListDblExtensionValue(nFieldIndex: int, dValue: float) bool
Adds an item with the given value to the end of a list of doubles within the given enumerated field.
- PushBackListStrExtensionValue(nFieldIndex: int, strValue: str) bool
Adds an item with the given value to the end of a list of strings within the given enumerated field.
- GetExtensionFieldIndex(strName: str) int
Returns the field index for the extended data field of a specified name.
- 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.