IscBoundary

The IscBoundary class provides access to the IPSA Boundary class, to set and get data values which are important for interfacing with Network Reduction.

Field Values

IscBoundary Field Values

Type

Field Name

Description

String

Name

The name of the boundary.

String

Description

The description of the boundary.

Boolean

UseBoundaryConfigMode

True if using directions method, False if using reduced area method.

List[int]

BoundaryBusbarUIDs

The list of boundary busbars.

List[int]

BoundaryBranchUIDs

The list of branches that are connected from the boundary busbars.

List[int]

ReducedBusbarUIDs

The list of reduced (that is equivalenced) busbars.

Boolean

ShowBoundaryBranchMessages

If True, the boundary branch messages will be shown.

Boolean

ShowBoundaryBusMessages

If True, the boundary bus messages will be shown.

IscBoundary Class

class ipsa.IscBoundary

Provides access to a network boundary.

SetName(strName: str) bool

Sets the name as a string. If the boundary name is not unique, the name will not be set.

Parameters:

strName (str) – The selected string name.

Returns:

True if successful.

Return type:

bool

IsBoundaryValidated() bool

Returns whether the boundary is validated.

Returns:

True if validated.

Return type:

bool

IsBoundaryStale() bool

Returns whether the boundary is stale. That is whether the topology of the network has been changed since the boundary busbars were set.

Returns:

True if stale.

Return type:

bool

IsDirectionsActivated() bool

Returns whether the boundary direction mode is activated. This will be True when using the direction method and False when using the reduced area method.

Returns:

True if using directions method, False if using reduced area method.

Return type:

bool

SetDirectionsActivated(bDirections: bool) bool

Sets whether the boundary direction mode is activated. bDirections should be true to use the direction method and False to use the reduced area method.

Parameters:

bDirections (bool) – True to use the directions method, False to use the reduced area method.

Returns:

True if successful.

Return type:

bool

GetReducedBusbars() list[int]

Returns the list of reduced busbars.

Returns:

the list of reduced busbar UIDs.

Return type:

list[int]

GetBoundaryBusbars() list[int]

Returns the list of boundary busbars.

Returns:

The list of boundary busbar UIDs.

Return type:

list[int]

GetBoundaryBranchDirections() dict[int, int]

Returns a dict of the boundary branch UIDs and their associated directions. The directions will be one of:

  • 0 = ipsa.IscBoundary.BoundaryIn : The branch is in the intact direction

  • 1 = ipsa.IscBoundary.BoundaryOut : The branch is in the reduced direction

Returns:

A dict of the boundary branch UIDs to their boundary directions.

Return type:

dict[int, int]

SetReducedBusbars(lBusbarUIDs: list[int]) bool

Sets the reduced busbars to be the list provided. This will fail if the boundary is not in reduced area mode.

Parameters:

lBusbarUIDs (list[int]) – The busbar UIDs to set as boundaries

Returns:

True if successful.

Return type:

bool

SetBoundaryBusbars(lBusbarUIDs: list[int], bForceReloadBranches: bool = False) bool

Sets the boundary busbars to be the list provided. This will fail if the boundary is not in directions mode.

If the network topology has changed but the list of boundary busbars has not changed, setting bForceReloadBranches to True will ensure that the boundary branches are consistent with the current topology.

Parameters:
  • lBusbarUIDs (list[int]) – The busbar UIDs to set as boundaries

  • bForceReloadBranches (bool) – An optional bool to force the boundary to reevaluate the potential boundary branches even when the list of boundary busbars is unchanged.

Returns:

True if successful.

Return type:

bool

SetBoundaryBranchDirections(mBranchDirections: dict[int, int]) bool

Set the boundary branch directions from a dict of the boundary branch UIDs and their associated directions. This will fail if the boundary is not in directions mode, or if any keys are not recognised boundary branches.

The directions must be one of:

  • 0 = ipsa.IscBoundary.BoundaryIn : The branch is in the intact direction

  • 1 = ipsa.IscBoundary.BoundaryOut : The branch is in the reduced direction

Parameters:

mBranchDirections (dict[int, int]) – A dict of the boundary branch UIDs to their boundary directions.

Returns:

True if successful.

Return type:

bool

SetBoundaryBranchDirection(nBranchUID: int, nDirection: int) bool

Set the boundary branch direction to nDirection for a specific branch specified by nBranchUID. This will fail if the boundary is not in directions mode, or if the branch is not a recognised boundary branch.

The direction, nDirection, must be one of:

  • 0 = ipsa.IscBoundary.BoundaryIn : The branch is in the intact direction

  • 1 = ipsa.IscBoundary.BoundaryOut : The branch is in the reduced direction

Parameters:
  • nBranchUID (int) – The UID of the specified boundary branch.

  • nDirection (int) – The direction that the branch should have.

Returns:

True if successful.

Return type:

bool

GetIValue(nFieldIndex: int) int

Returns an integer value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The integer value.

Return type:

int

GetDValue(nFieldIndex: int) float

Returns a float value for the enumerated field.

Parameters:

nFieldIndex (int) – The given enumerated field.

Returns:

The float value for the field.

Return type:

float

GetSValue(nFieldIndex: int) str

Returns a string value for the enumerated field.

Parameters:

nFieldIndex (int) – The given enumerated field.

Returns:

The string value for the field.

Return type:

str

GetBValue(nFieldIndex: int) bool

Returns a boolean value for the enumerated field.

Parameters:

nFieldIndex (int) – The given enumerated field.

Returns:

The boolean value for the field.

Return type:

bool

GetListIValue(nFieldIndex: int) List[int]

Returns a list of integer values for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The list of values.

Return type:

list[int]

SetIValue(nFieldIndex: int, nValue: int) bool

Sets the integer value for the enumerated field.

Parameters:
  • nFieldIndex (int) – The given enumerated field.

  • nValue (int) – The integer value that will be set.

Returns:

True if successful.

Return type:

bool

SetDValue(nFieldIndex: int, dValue: float) bool

Sets the float value for the enumerated field.

Parameters:
  • nFieldIndex (int) – The given enumerated field.

  • dValue (float) – The float value that will be set.

Returns:

True if successful.

Return type:

bool

SetSValue(nFieldIndex: int, strValue: str) bool

Sets the string value for the enumerated field.

Parameters:
  • nFieldIndex (int) – The given enumerated field.

  • strValue (str) – The string value that will be set.

Returns:

True if successful.

Return type:

bool

SetBValue(nFieldIndex: int, bValue: bool) bool

Sets the boolean value for the enumerated field.

Parameters:
  • nFieldIndex (int) – The given enumerated field.

  • bValue (bool) – The boolean value that will be set.

Returns:

True if successful.

Return type:

bool