IscGroup

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.

GetUID() int

Returns the UID of the group.

Returns:

The group UID.

Return type:

int

GetName() str

Returns the user defined group name as a string.

Returns:

The user defined group name.

Return type:

str

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)

Returns:

The group type.

Return type:

int

GetMembers() List[int]

Returns a list containing the UIDs of the components in the group.

Returns:

The UIDs of the components in the group.

Return type:

list(int)

SetMembers(nUIDs: List[int]) None

Sets the group members to the list of component integers. This replaces any existing members with the supplied list of UIDs.

Parameters:

nUIDs (list(int)) – List of component integers.

GetLoadScalingReal() float

Returns the per unit scaling factor for the active power load.

Returns:

The per unit scaling factor for the active power load.

Return type:

float

GetLoadScalingReactive() float

Returns the per unit scaling factor for the reactive power load.

Returns:

The per unit scaling factor for the reactive power load.

Return type:

float

SetLoadScaling(fMW: float, fMVAr: float) bool

Sets the per unit scaling factors for the active and reactive parts of the load.

Parameters:
  • fMW (float) – The active part of the load.

  • fMVAr (float) – The reactive part of the load.

Returns:

True if successful.

Return type:

bool

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 to specify the default value depending on the type of dta extension being added.

Parameters:
  • strName (str) – The name of the field.

  • nDefault (int) – The integer default value.

  • dDefault (float) – The float default value.

  • strDefault (str) – The string default value.

Returns:

The new field index.

Return type:

int

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.

Parameters:

strName (str) – The name of the field.

Returns:

The new field index.

Return type:

int

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.

Parameters:

strName (str) – The name of the field.

Returns:

The new field index.

Return type:

int

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.

Parameters:

strName (str) – The name of the field.

Returns:

The new field index.

Return type:

int

GetListIntExtensionValue(nFieldIndex: int, nIndex: int) int

Get a single integer value from the list within the given enumerated field.

Parameters:
  • nFieldIndex (int) – The field index.

  • nIndex (int) – The index of the selected element.

Returns:

The element value.

Return type:

int

GetListDblExtensionValue(nFieldIndex: int, nIndex: int) float

Get a single float value from the list within the given enumerated field.

Parameters:
  • nFieldIndex (int) – The field index.

  • nIndex (int) – The index of the selected element.

Returns:

The element value.

Return type:

float

GetListStrExtensionValue(nFieldIndex: int, nIndex: int) str

Get a single string value from the list within the given enumerated field.

Parameters:
  • nFieldIndex (int) – The field index.

  • nIndex (int) – The index of the selected element.

Returns:

The element value.

Return type:

str

GetListIntSize(nFieldIndex: int) int

Gets the size of the list of integers for the given enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The size of the field list.

Return type:

int

GetListDblSize(nFieldIndex: int) int

Gets the size of the list of doubles for the given enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The size of the field list.

Return type:

int

GetListStrSize(nFieldIndex: int) int

Gets the size of the list of strings for the given enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The size of the field list.

Return type:

int

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.

Parameters:
  • nFieldIndex (int) – The field index.

  • nIndex (int) – The index of the selected element.

  • nValue (int) – The selected value.

Returns:

True if the operation was successful.

Return type:

bool

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.

Parameters:
  • nFieldIndex (int) – The field index.

  • nIndex (int) – The index of the selected element.

  • dValue (float) – The selected value.

Returns:

True if the operation was successful.

Return type:

bool

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.

Parameters:
  • nFieldIndex (int) – The field index.

  • nIndex (int) – The index of the selected element.

  • strValue (str) – The selected value.

Returns:

True if the operation was successful.

Return type:

bool

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.

Parameters:
  • nFieldIndex (int) – The field index.

  • nValue (int) – The selected value.

Returns:

True if the operation was successful.

Return type:

bool

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.

Parameters:
  • nFieldIndex (int) – The field index.

  • dValue (float) – The selected value.

Returns:

True if the operation was successful.

Return type:

bool

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.

Parameters:
  • nFieldIndex (int) – The field index.

  • strValue (str) – The selected value.

Returns:

True if the operation was successful.

Return type:

bool

GetExtensionFieldIndex(strName: str) int

Returns the field index for the extended data field of a specified name.

Parameters:

strName (str) – The name of the extended data field.

Returns:

The field index.

Return type:

int

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.

Returns:

Dictionary of extension field indexes and field names.

Return type:

dict(int, str)