IscBranch

The IscBranch class provides access to an IPSA branch, to set and get data values and to retrieve analysis results.

Note that the branch rating sets are defined in the IscNetwork class.

Field Values

IscBranch Field Values

Type

Field Name

Description

Integer

FromUID

Gets the unique component ID for the “From” busbar.

Integer

ToUID

Gets the unique component ID for the “To” busbar.

String

FromBusName

Gets the sending busbar name.

String

ToBusName

Gets the receiving busbar name.

String

Name

Gets the branch name.

Boolean

HideLabel

True if the branch label (usually the name and any results) should be hidden on the diagram.

Integer

Type

Gets the branch/line type as defined below.

  • 0 = Unset

  • 1 = Overhead lines

  • 2 = Cable

  • 3 = Ducted

  • 4 = Mixed

Integer

Status

Line status as defined below:

  • 0 = Switched in.

  • 1 = Switched in, sending end will be opened in transient stability.

  • 2 = Switched in, receiving end will be opened in transient stability.

  • 3 = Switched in, both ends will be opened in transient stability.

  • -1 = Switched out, sending end will be closed in transient stability.

  • -2 = Switched out, receiving end will be closed in transient stability.

  • -3 = Switched out, both ends will be closed in transient stability.

Float

ResistancePU

Positive sequence resistance.

Float

MinResistancePU

Positive sequence minimum resistance.

Float

ReactancePU

Positive sequence reactance.

Float

SusceptancePU

Positive sequence susceptance.

Float

ZSResistancePU

Zero sequence resistance.

Float

ZSReactancePU

Zero sequence reactance.

Boolean

ZeroImpedance

True if treated as a zero impedance line.

Boolean

ZeroSequence

True if treated as a zero sequence only line.

Float

SwitchTime1Sec

Line switching time 1.

Float

SwitchTime2Sec

Line switching time 2.

Float

HarmRC0 HarmRC12 HarmRC1 HarmRC2 HarmRC3

Harmonic polynomial constants RC0, RC12, RC1, RC2 and RC3 in:

\(R_{h} = R[RC0 + RC12.h^{0.5} 0 + RC1.h + RC2.h^2 + RC3.h^3]\)

Float

HarmXC0 HarmXC1 HarmXC2 HarmXC3 HarmXCEX HarmXEX

Harmonic polynomial constants XC0, XC1, XC2, XC3, XCEX and XEX in:

\(X{h} = X[XC0 + XC1.h + XC2.h^2 + XC3.h^3] + XCEX.X.h^{XEX}\)

Float

FailureRateYr

Branch failure rate per annum.

Float

RepairTimeHr

Branch repair time in hours.

String

DbType1

Branch database type. For representing the cable at the From end of the transformer.

String

DbType2

Second cable database type representing the cable at the To end of the transformer.

Float

DbLength1 or LengthKm

First cable database length.

Float

DbLength2

Second cable database length (for transformers only).

Integer

DbPar1

Gets the number of lines of database type 1 in parallel.

Integer

DbPar2

Gets the number of lines of database type 2 in parallel.

String

DbTranType

Gets the transformer database type (only for transformers).

Integer

DbTranPar

Gets the number of transformers in parallel (database only and only for transformers).

String

UdmID

Gets the UDM ID.

Integer

UdmDevEnd

Gets the device end.

Integer

UdmCtrlType

Gets the UDM type.

Integer

UdmCtrlUID

Gets the UDM control ID.

String

PluginID

Plugin Name, empty string means no plugin is assigned.

IscBranch Class

class ipsa.IscBranch

Provides access to the IPSA branch.

SetName(strName: str) bool

Sets the name as a string.

Parameters:

strName (str) – The selected string name.

Returns:

True if successful.

Return type:

bool

AddSections(nSections: int) None

Add sections to the branch. All branches start with one section.

Parameters:

nSections (int) – The number of sections.

GetSections() int

Returns the number of sections in the branch. All branches have at least one section.

Returns:

The number of sections in the branch.

Return type:

int

GetIValue(nFieldIndex: int) int
GetIValue(nSection: int, nFieldIndex: int) int

Returns an integer value for the enumerated field.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

Returns:

The integer value.

Return type:

int

GetDValue(nFieldIndex: int) float
GetDValue(nSection: int, nFieldIndex: int) float

Returns a double value for the enumerated field.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

Returns:

The double value.

Return type:

float

GetSValue(nFieldIndex: int) str
GetSValue(nSection: int, nFieldIndex: int) str

Returns a string value for the enumerated field.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

Returns:

The string value.

Return type:

str

GetBValue(nFieldIndex: int) bool
GetBValue(nSection: int, nFieldIndex: int) bool

Returns a boolean value for the enumerated field.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

Returns:

The boolean value.

Return type:

bool

SetIValue(nFieldIndex: int, nValue: int) bool
SetIValue(nSection: int, nFieldIndex: int, nValue: int) bool

Sets the value for the enumerated field from an integer.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

  • nValue (int) – The given integer value.

Returns:

True if successful.

Return type:

bool

SetDValue(nFieldIndex: int, dValue: float) bool
SetDValue(nSection: int, nFieldIndex: int, dValue: float) bool

Sets the value for the enumerated field from a double.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

  • dValue (float) – The given double value.

Returns:

True if successful.

Return type:

bool

SetSValue(nFieldIndex: int, strValue: int) bool
SetSValue(nSection: int, nFieldIndex: int, strValue: int) bool

Sets the value for the enumerated field from a string.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

  • strValue (str) – The given string value.

Returns:

True if successful.

Return type:

bool

SetBValue(nFieldIndex: int, bValue: bool) bool
SetBValue(nSection: int, nFieldIndex: int, bValue: bool) bool

Sets the value for the enumerated field from boolean.

Parameters:
  • nSection (int) – The index of the section.

  • nFieldIndex (int) – The field index.

  • bValue (bool) – The given boolean value.

Returns:

True if successful.

Return type:

bool

GetRatingMVA(nRatingIndex: int) float
GetRatingMVA(nSection: int, nRatingIndex: int) float

Returns the MVA rating associated with the rating set given by the rating index. Set 0 for details of branch rating indices.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

Returns:

The MVA rating associated with the rating set.

Return type:

float

GetRatingSendkA(nRatingIndex: int) float
GetRatingSendkA(nSection: int, nRatingIndex: int) float

Returns the send end kA rating associated with the rating set given by the rating index. Set 0 for details of branch rating indices.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

Returns:

The send end kA rating associated with the rating set.

Return type:

float

GetRatingReceivekA(nRatingIndex: int) float
GetRatingReceivekA(nSection: int, nRatingIndex: int) float

Returns the receiving end kA rating associated with the rating set given by the rating index. Set 0 for details of branch rating indices.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

Returns:

The receiving end kA rating associated with the rating set.

Return type:

float

SetRatingMVA(nRatingIndex: int, dRatingMVA: float) None
SetRatingMVA(nSection: int, nRatingIndex: int, dRatingMVA: float) None

Sets the MVA rating to the specified rating MVA for the rating set given by the rating index.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

  • dRatingMVA (float) – The rating MVA.

SetRatingkA(nRatingIndex: int, dRatingkA: float) None
SetRatingkA(nSection: int, nRatingIndex: int, dRatingkA: float) None

Sets the kA rating to the specified rating kA for the rating set given by the rating index.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

  • dRatingkA (float) – The rating kA.

SetRatingSendkA(nRatingIndex: int, dRatingkA: float) None
SetRatingSendkA(nSection: int, nRatingIndex: int, dRatingkA: float) None

Sets the send end kA rating to the specified rating kA for the rating set given by the rating index.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

  • dRatingkA (float) – The rating kA.

SetRatingReceivekA(nRatingIndex: int, dRatingkA: float) None
SetRatingReceivekA(nSection: int, nRatingIndex: int, dRatingkA: float) None

Sets the receiving end kA rating to the specified rating kA for the rating set given by the rating index.

Parameters:
  • nSection (int) – The index of the section.

  • nRatingIndex (int) – The rating index.

  • dRatingkA (float) – The rating kA.

PopulateByDBEntry(strLineDataName: str, dLength: float, nParallel: int) bool

Populates the object data with database information from the first database that was loaded.

Parameters:
  • strLineDataName (str) – The name of the branch.

  • dLength (float) – The length of the branch.

  • nParallel (int) – The number of parallel components.

Returns:

Returns True if successful.

Return type:

bool

GetSendPowerMagnitudeMVA() float

Returns the branch sending end power in MVA.

Returns:

The branch sending end power in MVA.

Return type:

float

GetSendPowerMagnitudekVA() float

Returns the branch sending end power in kVA.

Returns:

The branch sending end power in kVA.

Return type:

float

GetSendRealPowerMW() float

Returns the branch sending end power in MW.

Returns:

The branch sending end power in MW.

Return type:

float

GetSendReactivePowerMVAr() float

Returns the branch sending end power in MVAr.

Returns:

The branch sending end power in MVAr.

Return type:

float

GetSendRealPowerkW() float

Returns the branch sending end power in kW.

Returns:

The branch sending end power in kW.

Return type:

float

GetSendReactivePowerkVAr() float

Returns the branch sending end power in kVAr.

Returns:

The branch sending end power in kVAr.

Return type:

float

GetReceivePowerMagnitudeMVA() float

Returns the branch receiving end power in MVA.

Returns:

The branch receiving end power in MVA.

Return type:

float

GetReceivePowerMagnitudekVA() float

Returns the branch receiving end power in kVA.

Returns:

The branch receiving end power in kVA.

Return type:

float

GetReceiveRealPowerMW() float

Returns the branch receiving end power in MW.

Returns:

The branch receiving end power in MW.

Return type:

float

GetReceiveReactivePowerMVAr() float

Returns the branch receiving end power in MVAr.

Returns:

The branch receiving end power in MVAr.

Return type:

float

GetReceiveRealPowerkW() float

Returns the branch receiving end power in kW.

Returns:

The branch receiving end power in kW.

Return type:

float

GetReceiveReactivePowerkVAr() float

Returns the branch receiving end power in kVAr.

Returns:

The branch receiving end power in kVAr.

Return type:

float

GetLargestPowerMagnitudeMVA() float
GetLargestPowerMagnitudeMVA(nStudyUID: int) float

Returns the highest branch power in MVA.

Parameters:

nStudyUID (int) – If supplied, the automation or contingency study UID which the results are for

Returns:

The highest branch power in MVA.

Return type:

float

GetLargestPowerMagnitudekVA() float

Returns the highest branch power in kVA.

Returns:

The highest branch power in kVA.

Return type:

float

GetLargestRealPowerMW() float

Returns the highest branch power in MW.

Returns:

The highest branch power in MW.

Return type:

float

GetLargestReactivePowerMVAr() float

Returns the highest branch power in MVAr.

Returns:

The highest branch power in MVAr.

Return type:

float

GetLargestRealPowerkW() float

Returns the highest branch power in kW.

Returns:

The highest branch power in kW.

Return type:

float

GetLargestReactivePowerkVAr() float

Returns the highest branch power in kVAr.

Returns:

The highest branch power in kVAr.

Return type:

float

GetLossesMW() float

Returns the branch losses in MW.

Returns:

The branch losses in MW.

Return type:

float

GetLossesMVAr() float

Returns the branch losses in MVAr.

Returns:

The branch losses in MVAr.

Return type:

float

GetLosseskW() float

Returns the branch losses in kW.

Returns:

The branch losses in kW.

Return type:

float

GetLosseskVAr() float

Returns the branch losses in kVAr.

Returns:

The branch losses in kVAr.

Return type:

float

GetFaultRedComponentMVA() float

Returns the red phase level component in MVA.

Returns:

The red phase level component in MVA.

Return type:

float

GetFaultYellowComponentMVA() float

Returns the yellow phase fault level component in MVA.

Returns:

The yellow phase fault level component in MVA.

Return type:

float

GetFaultBlueComponentMVA() float

Returns the blue phase fault level component in MVA.

Returns:

The blue phase fault level component in MVA.

Return type:

float

GetFaultPositiveComponentMVA() float

Returns the positive sequence fault level component in MVA.

Returns:

The positive sequence fault level component in MVA.

Return type:

float

GetFaultNegativeComponentMVA() float

Returns the negative sequence fault level component in MVA.

Returns:

The negative sequence fault level component in MVA.

Return type:

float

GetFaultZeroComponentMVA() float

Returns the zero sequence fault level component in MVA.

Returns:

The zero sequence fault level component in MVA.

Return type:

float

GetFaultRedComponentkA() float

Returns the red phase component of fault current in kA.

Returns:

The red phase component of fault current in kA.

Return type:

float

GetFaultYellowComponentkA() float

Returns the yellow phase component of fault current in kA.

Returns:

The yellow phase component of fault current in kA.

Return type:

float

GetFaultBlueComponentkA() float

Returns the blue phase component of fault current in kA.

Returns:

The blue phase component of fault current in kA.

Return type:

float

GetFaultPositiveComponentkA() float

Returns the positive sequence component of fault current in kA.

Returns:

The positive sequence component of fault current in kA.

Return type:

float

GetFaultNegativeComponentkA() float

Returns the negative sequence component of fault current in kA.

Returns:

The negative sequence component of fault current in kA.

Return type:

float

GetFaultZeroComponentkA() float

Returns the zero sequence component of fault current in kA.

Returns:

The zero sequence component of fault current in kA.

Return type:

float

GetFaultRedComponentAngleDeg() float

Returns the red phase component of fault angle in degrees.

Returns:

The red phase component of fault angle in degrees.

Return type:

float

GetFaultYellowComponentAngleDeg() float

Returns the yellow phase component of fault angle in degrees.

Returns:

The yellow phase component of fault angle in degrees.

Return type:

float

GetFaultBlueComponentAngleDeg() float

Returns the blue phase component of fault angle in degrees.

Returns:

The blue phase component of fault angle in degrees.

Return type:

float

GetFaultPositiveComponentAngleDeg() float

Returns the positive sequence component of fault angle in degrees.

Returns:

The positive sequence component of fault angle in degrees.

Return type:

float

GetFaultNegativeComponentAngleDeg() float

Returns the negative sequence component of fault angle in degrees.

Returns:

The negative sequence component of fault angle in degrees.

Return type:

float

GetFaultZeroComponentAngleDeg() float

Returns the zero sequence component of fault angle in degrees.

Returns:

The zero sequence component of fault angle in degrees.

Return type:

float

GetCurrentMagnitude(dOrder: float) float

Returns the current magnitude in per unit on the network base for the harmonic order.

Parameters:

dOrder (float) – The harmonic order.

Returns:

The current magnitude in per unit.

Return type:

float

GetCurrentAngle(dOrder: float) float

Returns the current angle in radians for the harmonic order.

Parameters:

dOrder (float) – The harmonic order.

Returns:

The current angle in radians.

Return type:

float

GetResistance(dOrder: float) float

Returns the branch harmonic resistance in per unit on the network base for the harmonic order.

Parameters:

dOrder (float) – The harmonic order.

Returns:

The branch harmonic resistance in per unit.

Return type:

float

GetReactance(dOrder: float) float

Returns the branch harmonic reactance in per unit on the network base for the harmonic order.

Parameters:

dOrder (float) – The harmonic order.

Returns:

The branch harmonic reactance in per unit.

Return type:

float

GetSusceptance(dOrder: float) float

Returns the branch harmonic susceptance in per unit on the network base for the harmonic order.

Parameters:

dOrder (float) – The harmonic order.

Returns:

The branch harmonic susceptance in per unit.

Return type:

float

GetProfileMinimumFlowMVA() float

Returns the minimum branch flow in MVA from the profile study results.

Returns:

The minimum branch flow in MVA from the profile study results.

Return type:

float

GetProfileMinimumFlowkA() float

Returns the minimum branch flow in kA from the profile study results.

Returns:

The minimum branch flow in kA from the profile study results.

Return type:

float

GetProfileMaximumFlowMVA() float

Returns the maximum branch flow in MVA from the profile study results.

Returns:

The maximum branch flow in MVA from the profile study results.

Return type:

float

GetProfileMaximumFlowkA() float

Returns the maximum branch flow in kA from the profile study results.

Returns:

The maximum branch flow in kA from the profile study results.

Return type:

float

GetProfileMedianFlowMVA() float

Returns the median of the branch flow in MVA from the profile study results.

Returns:

The median of the branch flow in MVA from the profile study results.

Return type:

float

GetProfileMedianFlowkA() float

Returns the median of the branch flow in kA from the profile study results.

Returns:

The median of the branch flow in kA from the profile study results.

Return type:

float

GetMinimumProfileIndex() int

Returns the category index which identifies the minimum branch flow from the profile study results.

Returns:

The minimum category index.

Return type:

int

GetMaximumProfileIndex() int

Returns the category index which identifies the maximum branch flow from the profile study results.

Returns:

The maximum category index.

Return type:

int

GetDCLFSendPowerMagnitudeMVA() float

Returns the branch sending end power in MVA.

Returns:

The branch sending end power in MVA.

Return type:

float

GetDCLFSendPowerMagnitudekVA() float

Returns the branch sending end power in kVA.

Returns:

The branch sending end power in kVA.

Return type:

float

GetDCLFSendRealPowerMW() float

Returns the branch sending end power in MW.

Returns:

The branch sending end power in MW.

Return type:

float

GetDCLFSendRealPowerkW() float

Returns the branch sending end power in kW.

Returns:

The branch sending end power in kW.

Return type:

float

GetDCLFReceivePowerMagnitudeMVA() float

Returns the branch receiving end power in MVA.

Returns:

The branch receiving end power in MVA.

Return type:

float

GetDCLFReceivePowerMagnitudekVA() float

Returns the branch receiving end power in kVA.

Returns:

The branch receiving end power in kVA.

Return type:

float

GetDCLFReceiveRealPowerMW() float

Returns the branch receiving end power in MW.

Returns:

The branch receiving end power in MW.

Return type:

float

GetDCLFReceiveRealPowerkW() float

Returns the branch receiving end power in kW.

Returns:

The branch receiving end power in kW.

Return type:

float

GetDCLFLargestPowerMagnitudeMVA() float

Returns the highest branch power in MVA.

Returns:

The highest branch power in MVA.

Return type:

float

GetDCLFLargestPowerMagnitudekVA() float

Returns the highest branch power in kVA.

Returns:

The highest branch power in kVA.

Return type:

float

GetDCLFLargestRealPowerMW() float

Returns the highest branch power in MW.

Returns:

The highest branch power in MW.

Return type:

float

GetDCLFLargestRealPowerkW() float

Returns the highest branch power in kW.

Returns:

The highest branch power in kW.

Return type:

float

GetDCLFLossesMW() float

Returns the branch losses in MW.

Returns:

The branch losses in MW.

Return type:

float

GetDCLFLosseskW() float

Returns the branch losses in kW.

Returns:

The branch losses in kW.

Return type:

float