IscNetwork

This object provides the main access to an IPSA network. It is generally created as the result to a call to IscInterface().ReadFile(strName). This class provides functions to retrieve, create and delete network components, perform analysis and get network results.

Network Component Functions

Various functions are provided to allow the creation, deletion and editing of network components. The Get… functions return instances of the component objects, for example GetBusbar returns an IscBusbar instance. Once an IscBusbar instance is retrieved the busbar data can then be accessed as described in the IscBusbar section.

Component Access

The dictionary keys are the Python script names of components whilst the values are the instances of components. The Python script name can be used to access individual components.

The example code below details how it is possible to iterate through all the components of a particular type in a network:

# retrieve the busbar collection
busbars = net.GetBusbars()
# cycle each busbar, retrieve its name and voltage
for bus in busbars.values():
   # do something with the bus
    name = bus.GetName()

Two functions are also provided to return dictionaries of the unique component IDs. The dictionary keys are the Python script names while the dictionary values are the integer IDs.

Setting bFetchFromSystem to True forces IPSA to rebuild its internal component data maps. Setting bFetchFromSystem to False will only rebuild the internal component data maps if components have been added or deleted since the last Get… function call. If the script creates new data components during its execution then the internal component data maps will always be rebuilt and bFetchFromSystem can be True or False.

Component Ratings

Rating sets determine the thermal limits that branches and transformers can tolerate. Each component can be given a set of MVA or kA values which are checked after a load flow calculation to identify if the component is overloaded. In IPSA 1.x four rating sets were provided, namely Standard, Summer, Winter and Short. In IPSA 2 these rating sets are provided by default but users can add additional rating sets. The ratings sets defined by the user, either through the IPSA interface or via scripting, are stored with the network model.

The functions used to access the rating data have therefore been changed from IPSA 1.x in order to address the user-defined rating sets.

Profiles

Profiles represent a set of categories with associated MW and MVAr values. Profiles can be assigned to loads, synchronous machines and universal machines. Each network can have any number of profiles which can used to provide absolute or scaled MW and MVAr values. Every load, generator and universal machine in the network can be assigned one of the profiles and load flow analysis or profile analysis can then be performed. Scaling profiles cannot be assigned to universal machines.

Refer to section 0 for the function to run a profile study.

Different types of profiles are represented by different classes as follows;

  • Actual load profile class - IscLoadProfilePQActual

  • Scaled load profile class - IscLoadProfilePQScale

  • Actual generator profile class - IscGeneratorProfilePQActual

  • Scaled generator profile class - IscGeneratorProfilePQScale

  • Actual universal machine profile class - IscUMachineProfilePQActual

Add Profile Categories

Profiles comprise a number of categories and associated MW and MVAr values. Each category is simply a string which identifies the category name. Examples of profile categories could be:

  • Spring, Summer, Autumn, Winter

  • Normal, Max Load, Min Load, Emergency

  • 00:00hrs, 01:00hrs, 02:00hrs, 03:00hrs etc.

The category names are only for user interaction and do not relate to other network components or analysis settings such as equipment ratings.

Add Profile Data

Each profile category can be assigned a specific MW and MVAr load for the various profile types. The MW or MVAr value assigned to each category is either an actual value or a per unit scaling value depending on the profile type.

Add Profiles to Components

Once a profile has been created it can then be assigned to any number of individual loads, generators and universal machines in the network. The field index ProfileUID is set to assign a profile to a network load, generator or universal machine. This is detailed in the corresponding component sections and the code below illustrates the use of all the load profile functions.

# define the categories and loads
categories = {0:"00:00",
              1:"06:00",
              2:"12:00",
              3:"18:00"}

mw = {0: 0.8,
      1: 0.775,
      2: 0.75,
      3: 0.712}
mvar = {0: 0.48,
        1: 0.465,
        2: 0.45,
        3: 0.4272}

# create a load profile
profileUID = ipsanetwork.CreateLoadProfilePQActual('Test Profile')

# get the profile ID
profile = ipsanetwork.GetLoadProfilePQActual(profileUID)

# add the categories to the profile and set the data
profile.SetCategoryNames(categories)
profile.SetPMW(mw)
profile.SetQMVAr(mvar)

# finally assign the profile to all network loads
loads = ipsa_network.GetLoads()
for load in loads.values():
    load.SetIValue(ipsa.IscLoad.ProfileUID)

Running Profile Studies

All categories in the selected profiles are run and the results are obtained from the functions provided in each component class. All profiles must have the same set of category names. The load flow solution parameters are set using the IscAnalysisLF class.

IscNetwork Class

class ipsa.IscNetwork

Class providing the main access to an IPSA network.

SetBusbarSlack(strBusbar: str) None

Sets the busbar as the slack busbar for a particular part of the network.

Parameters:

strBusbar (str) – The Python busbar name which is returned by IscNetComponent.GetName().

RefreshSystem() None

Forces IPSA to rebuild its internal component data maps. This function can be used if the network has been modified outside of scripting while a script is running.

WriteFile(strName: str) bool

Saves the current network file at the path and the file name.

Parameters:

strName (str) – The file name.

Returns:

Denoting whether the file is saved.

Return type:

bool

WriteArea(nAreaUID: int, strName: str) bool

Saves the area group UID as a new IPSA i2f network file. The file is saved in the current working directory. The file name should include the .i2f extension.

Parameters:
  • nAreaUID – The area group UID. nAreaUID can be obtained using the IscGroup functions.

  • strName (str) – The file name.

Returns:

Denoting whether the file is saved.

Return type:

bool

MergeFile(strMergeName: str) bool

Merges the file into the current network file.

Parameters:

strMergeName (str) – The merged file name.

Returns:

Denoting whether the file is successfully saved.

Return type:

bool

ValidatedMergeFile(strMergeName: str) bool

Performs a consistency check to determine if the IPSA I2F file can be merged into the current network. Use the GetFilingErrors() function to get details of the merge errors.

Parameters:

strMergeName (str) – The merged file name.

Returns:

Denoting whether the file is successfully saved.

Return type:

bool

CommitVersion(strVersionName: str) int

Creates a new network version which includes all non-versioned network changes.

Parameters:

strVersionName (str) – The new network version name.

Returns:

An integer representing the version ID.

Return type:

int

GetVersionUuid(nVersion: int) str

Returns a unique string (UUID) representing the version name for the given version.

Parameters:

nVersion (int) – The selected version.

Returns:

The version name.

Return type:

str

SetToVersion(nVersion: int) bool

Selects the version of the current network.

Parameters:

nVersion (int) – The selected version.

Returns:

Denoting whether the version is successfully set or whether it does not exist.

Return type:

bool

CreateChangeFile(nVersion: int, strMergeName: str) bool

Creates an IPSA merge file based on the network differences between the given version and the current version.

Parameters:
  • nVersion (int) – The selected version.

  • strMergeName (str) – The merged file name.

Returns:

Denoting whether the file is successfully created.

Return type:

bool

GetCurrentVersion() int

Returns the current working version. Any changes to the network are made to this version.

Returns:

The current version.

Return type:

int

GetParentVersion(nVersion: int) int

Returns the parent version for the selected version.

Parameters:

nVersion (int) – The selected version.

Returns:

The parent version.

Return type:

int

GetVersionDiffAdded(nVersion: int) List[int]

Returns a list of component UIDs which have been added to the network in the current selected version and that were not in the selected version.

Parameters:

nVersion (int) – The selected version.

Returns:

List of component UIDs.

Return type:

int

GetVersionDiffChanged(nVersion: int) List[int]

Returns a list of component UIDs which have been edited in the current selected version compared to the selected version.

Parameters:

nVersion (int) – The selected version.

Returns:

List of component UIDs.

Return type:

int

GetVersionDiffDeleted(nVersion: int) List[int]

Returns a list of component UIDs which have been deleted from the network in the current selected version and that were in the selected version.

Parameters:

nVersion (int) – The selected version.

Returns:

List of component UIDs.

Return type:

int

ResetResults() None

Reset all analysis results.

GetSystemBaseMVA() float

Returns the current system MVA defined for the IPSA network Default: 100 MVA

Returns:

Network system MVA value

Return type:

float

GetNumberOfIslands() int

Returns the number of islands.

Returns:

The number of islands.

Return type:

int

GetIslandsUIDs() Dict[str, List[int]]

Returns a dictionary of integer busbar nUIDs belonging to the islands. The keys are the island slack busbar names or the first busbar names if no slack busbar is set for that island.

Returns:

The busbars belonging to each island.

Return type:

dict(str,list(int))

GetNoSlackIslandsUIDs() Dict[str, List[int]]

Returns a dictionary of integer busbar UIDs belonging to islands with no slack busbars. The keys are the first busbar names.

Returns:

The busbars with no slack belonging to each island.

Return type:

dict(str,list(int))

GetNoGeneratorIslandsUIDs() Dict[str, List[int]]

Returns a dictionary of integer busbar UIDs belonging to the islands with no generators or grid infeeds. The keys are the island slack busbar names or the first busbar names if no slack busbar is set for that island.

Returns:

The busbars with no generators or grid infeeds belonging to each island.

Return type:

dict(str,list(int))

GetBusbars(bFetchFromSystem: bool = True)

Returns a dictionary of busbars. The keys are the busbar names.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of busbars.

Return type:

dict(str,IscBusbar)

GetBusbarsOrderedByVoltage(bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple of busbar UIDs, sorted in ascending order of voltage and then by busbar name.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Tuple of busbars UIDs.

Return type:

tuple(int)

GetBusbarAttachedBranches(nBusbarUID: int, bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple of branch UIDs attached to the busbar specified by busbar UID. Only branches are returned, not transformers.

Parameters:
  • nBusbarUID (int) – The selected busbar UID.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Tuple of busbars UIDs.

Return type:

tuple(int)

GetBusbarAttachedTransformers(nBusbarUID: int, bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple of transformer UIDs attached to the busbar specified by busbar UID. Only transformers are returned, not branches or 3W transformers.

Parameters:
  • nBusbarUID (int) – The selected busbar UID.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Tuple of transformer UIDs.

Return type:

tuple(int)

GetBusbarAttached3WTransformers(nBusbarUID: int, bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple of 3-winding transformer UIDs attached to the busbar specified by busbar UID. Only 3-winding transformers are returned, not 2-winding transformers or branches.

Parameters:
  • nBusbarUID (int) – The selected busbar UID.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Tuple of 3-winding transformer UIDs.

Return type:

tuple(int)

GetBusbarAttachedUnbalancedBranches(nBusbarUID: int, bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple of unbalanced branch UIDs attached to the busbar specified by busbar UID. Only unbalanced branches are returned, not unbalanced transformers.

Parameters:
  • nBusbarUID (int) – The selected busbar UID.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Tuple of unbalanced branch UIDs.

Return type:

tuple(int)

GetBusbarAttachedUnbalancedTransformers(nBusbarUID: int, bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple of unbalanced transformer UIDs attached to the busbar specified by busbar UID. Only unbalanced transformers are returned, not unbalanced branches.

Parameters:
  • nBusbarUID (int) – The selected busbar UID.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Tuple of unbalanced transformer UIDs.

Return type:

tuple(int)

GetBranches(bFetchFromSystem: bool = True)

Returns a dictionary of IscBranch instances. Key values (sPyName) are the Python names and the associated values are IscBranch instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of branches.

Return type:

dict(str,IscBranch)

GetTransformers(bFetchFromSystem: bool = True)

Returns a dictionary of IscTransformer instances. Keys (sPyName) are the Python names and the associated values are IscTransformer instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of transformers.

Return type:

dict(str,IscTransformer)

Get3WTransformers(bFetchFromSystem: bool = True)

Returns a dictionary of Isc3WTransformer instances. Keys (sPyName) are the Python names and the associated values are Isc3WTransformer instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of 3WTransformers.

Return type:

dict(str,Isc3WTransformer)

GetLoads(bFetchFromSystem: bool = True)

Returns a dictionary of IscLoad instances. Keys (sPyName) are the Python names and the associated values are IscLoad instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of loads.

Return type:

dict(str,IscLoad)

GetSynMachines(bFetchFromSystem: bool = True)

Returns a dictionary of IscSynMachine instances. Keys (sPyName) are the Python names and the associated values are IscSynMachine instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of synchronous machines.

Return type:

dict(str,IscSynMachine)

GetGridInfeeds(bFetchFromSystem: bool = True)

Returns a dictionary of IscGridInfeed instances. Keys (sPyName) are the Python names and the associated values are IscGridInfeed instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of grid infeeds.

Return type:

dict(str,IscGridInfeed)

GetFilters(bFetchFromSystem: bool = True)

Returns a dictionary of IscFilter instances. Keys (sPyName) are the Python names and the associated values are IscFilter instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of filters.

Return type:

dict(str,IscFilter)

GetIndMachines(bFetchFromSystem: bool = True)

Returns a dictionary of IscIndMachine instances. Keys (sPyName) are the Python names and the associated values are IscIndMachine instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of induction machines.

Return type:

dict(str,IscIndMachine)

GetMechSwCapacitors(bFetchFromSystem: bool = True)

Returns a dictionary of IscMechSwCapacitor instances. Keys (sPyName) are the Python names and the associated values are IscMechSwCapacitor instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of mechanical switch capacitors.

Return type:

dict(str,IscMechSwCapacitor)

GetStaticVCs(bFetchFromSystem: bool = True)

Returns a dictionary of IscStaticVC instances. Keys (sPyName) are the Python names and the associated values are IscStaticVC instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of static var compensators.

Return type:

dict(str,IscStaticVC)

GetUMachines(bFetchFromSystem: bool = True)

Returns a dictionary of IscUMachine instances. Keys (sPyName) are the Python names and the associated values are IscUMachine instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of universal machines.

Return type:

dict(str,IscUMachine)

GetHarmonics(bFetchFromSystem: bool = True)

Returns a dictionary of IscHarmonic instances. Keys (sPyName) are the Python names and the associated values are IscHarmonic instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of harmonics.

Return type:

dict(str,IscHarmonic)

GetCircuitBreakers(bFetchFromSystem: bool = True)

Returns a dictionary of IscCircuitBreaker instances. Keys (sPyName) are the Python names and the associated values are IscCircuitBreaker instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of circuit breakers.

Return type:

dict(str,IscCircuitBreaker)

GetBatteries(bFetchFromSystem: bool = True)

Returns a dictionary of IscBattery instances. Keys (sPyName) are the Python names and the associated values are IscBattery instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of batteries.

Return type:

dict(str,IscBattery)

GetDCMachines(bFetchFromSystem: bool = True)

Returns a dictionary of IscDCMachine instances. Keys (sPyName) are the Python names and the associated values are IscDCMachine instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of DC machines.

Return type:

dict(str,IscDCMachine)

GetConverters(bFetchFromSystem: bool = True)

Returns a dictionary of IscConverter instances. Keys (sPyName) are the Python names and the associated values are IscConverter instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of converters.

Return type:

dict(str,IscConverter)

GetChoppers(bFetchFromSystem: bool = True)

Returns a dictionary of IscChopper instances. Keys (sPyName) are the Python names and the associated values are IscChopper instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of choppers.

Return type:

dict(str,IscChopper)

GetMGSets(bFetchFromSystem: bool = True)

Returns a dictionary of IscMGSet instances. Keys (sPyName) are the Python names and the associated values are IscMGSet instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of MG sets.

Return type:

dict(str,IscMGSet)

GetProtectionDevices(bFetchFromSystem: bool = True)

Returns a dictionary of IscProtectionDevice instances. Keys (sPyName) are the Python names and the associated values are IscProtectionDevice instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of protection devices.

Return type:

dict(str,IscProtectionDevice)

GetUnbalancedLoads(bFetchFromSystem: bool = True)

Returns a dictionary of IscUnbalancedLoad instances. Keys (sPyName) are the Python names and the associated values are IscUnbalancedLoad instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of unbalanced loads.

Return type:

dict(str,IscUnbalancedLoad)

GetUnbalancedLines(bFetchFromSystem: bool = True)

Returns a dictionary of IscUnbalancedLine instances. Keys (sPyName) are the Python names and the associated values are IscUnbalancedLine instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of unbalanced lines.

Return type:

dict(str,IscUnbalancedLine)

GetUnbalancedTransformers(bFetchFromSystem: bool = True)

Returns a dictionary of IscUnbalancedTransformer instances. Keys (sPyName) are the Python names and the associated values are IscUnbalancedTransformer instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of unbalanced transformers.

Return type:

dict(str,IscUnbalancedTransformer)

GetVoltageRegulators(bFetchFromSystem: bool = True)

Returns a dictionary of IscVoltageRegulator instances. Keys (sPyName) are the Python names and the associated values are IscVoltageRegulator instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of voltage regulators.

Return type:

dict(str,IscVoltageRegulator)

GetAnnotations(bFetchFromSystem: bool = True)

Returns a dictionary of IscAnnotation instances. Keys (sPyName) are the Python names and the associated values are IscAnnotation instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of annotations.

Return type:

dict(str,IscAnnotation)

GetGroups(bFetchFromSystem: bool = True)

Returns a dictionary of IscGroup instances. Keys (sPyName) are the Python names and the associated values are IscGroup instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of groups.

Return type:

dict(str,IscGroup)

GetGroupsForItem(nUID: int, bFetchFromSystem: bool = True) Tuple[int]

Returns a tuple containing the group UIDs for each group that the component UID is a member of.

Parameters:
  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

  • nUID (int) – Component UID.

Returns:

Tuple of group UIDs.

Return type:

tuple(int)

GetIntertrips(bFetchFromSystem: bool = True)

Returns a dictionary of IscIntertrip instances. Keys (sPyName) are the Python names and the associated values are IscIntertrip instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of intertrips.

Return type:

dict(str,IscIntertrip)

GetPlugins(bFetchFromSystem: bool = True)

Returns a dictionary of IscPlugin instances. Keys (sPyName) are the Python names and the associated values are IscPlugin instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of plugins.

Return type:

dict(str,IscPlugin)

TraceBusbarUIDs(nBranchUID: int, bOpenBreakers: bool, nGroupUID: int) List[int]

Performs a network trace to identify all busbars that are connected to the selected branch. The network trace stops when it reaches any busbar that is a member of the group of the selected group UID or when it reaches a transformer.

Parameters:
  • nBranchUID (int) – The selected branch UID.

  • bOpenBreakers (bool) – If True then the trace also stops if it finds an open circuit breaker.

  • nGroupUID (int) – The selected group UID.

Returns:

List of all busbar UIDs found by the trace.

Return type:

list(int)

GetBusbarSlacks() List[str]

Returns a list of all the busbar names contained in the network busbar slack list.

Returns:

List of busbar names.

Return type:

list(str)

GetBusbar(nUID: int)
GetBusbar(strPythonName: str)

Returns an IscBusbar instance for the busbar identified by the UID or the Python name.

You can use either nUID specifying the busbar UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected busbar UID.

  • strPythonName (str) – The selected busbar name.

Returns:

The busbar instance or None if such is not found.

Return type:

IscBusbar

GetBranch(nUID: int)
GetBranch(strPythonName: str)

Returns an IscBranch instance for the branch identified by the UID or the Python name.

You can use either nUID specifying the branch UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected branch UID.

  • strPythonName (str) – The selected branch name.

Returns:

The branch instance or None if such is not found.

Return type:

IscBranch

GetTransformer(nUID: int)
GetTransformer(strPythonName: str)

Returns an IscTransformer instance for the transformer identified by the UID or the Python name.

You can use either nUID specifying the transformer UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected transformer UID.

  • strPythonName (str) – The selected transformer name.

Returns:

The transformer instance or None if such is not found.

Return type:

IscTransformer

Get3WTransformer(nUID: int)
Get3WTransformer(strPythonName: str)

Returns an Isc3WTransformer instance for the three winding transformer identified by the UID or the Python name.

You can use either nUID specifying the three winding transformer UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected three winding transformer UID.

  • strPythonName (str) – The selected three winding transformer name.

Returns:

The three winding transformer instance or None if such is not found.

Return type:

Isc3WTransformer

GetLoad(nUID: int)
GetLoad(strPythonName: str)

Returns an IscLoad instance for the load identified by the UID or the Python name.

You can use either nUID specifying the load UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected load UID.

  • strPythonName (str) – The selected load name.

Returns:

The load instance or None if such is not found.

Return type:

IscLoad

GetSynMachine(nUID: int)
GetSynMachine(strPythonName: str)

Returns an IscSynMachine instance for the synchronous machine identified by the UID or the Python name.

You can use either nUID specifying the synchronous machine UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected synchronous machine UID.

  • strPythonName (str) – The selected synchronous machine name.

Returns:

The synchronous machine instance or None if such is not found.

Return type:

IscSynMachine

GetGridInfeed(nUID: int)
GetGridInfeed(strPythonName: str)

Returns an IscGridInfeed instance for the grid infeed identified by the UID or the Python name.

You can use either nUID specifying the grid infeed UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected grid infeed UID.

  • strPythonName (str) – The selected grid infeed name.

Returns:

The grid infeed instance or None if such is not found.

Return type:

IscGridInfeed

GetIndMachine(nUID: int)
GetIndMachine(strPythonName: str)

Returns an IscIndMachine instance for the induction motor identified by the UID or the Python name.

You can use either nUID specifying the induction motor UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected induction motor UID.

  • strPythonName (str) – The selected induction motor name.

Returns:

The induction motor instance or None if such is not found.

Return type:

IscIndMachine

GetFilter(nUID: int)
GetFilter(strPythonName: str)

Returns an IscFilter instance for the harmonic filter identified by the UID or the Python name.

You can use either nUID specifying the harmonic filter UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected harmonic filter UID.

  • strPythonName (str) – The selected harmonic filter name.

Returns:

The harmonic filter instance or None if such is not found.

Return type:

IscFilter

GetMechSwCapacitor(nUID: int)
GetMechSwCapacitor(strPythonName: str)

Returns an IscMechSwCapacitor instance for the mechanically switched capacitor identified by the UID or the Python name.

You can use either nUID specifying the mechanically switched capacitor UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected mechanically switched capacitor UID.

  • strPythonName (str) – The selected mechanically switched capacitor name.

Returns:

The mechanically switched capacitor instance or None if such is not found.

Return type:

IscMechSwCapacitor

GetStaticVC(nUID: int)
GetStaticVC(strPythonName: str)

Returns an IscStaticVC instance for the static VAR compensator identified by the UID or the Python name.

You can use either nUID specifying the static VAR compensator UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected static VAR compensator UID.

  • strPythonName (str) – The selected static VAR compensator name.

Returns:

The static VAR compensator instance or None if such is not found.

Return type:

IscStaticVC

GetUMachine(nUID: int)
GetUMachine(strPythonName: str)

Returns an IscUMachine instance for the universal machine identified by the UID or the Python name.

You can use either nUID specifying the universal machine UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected universal machine UID.

  • strPythonName (str) – The selected universal machine name.

Returns:

The universal machine instance or None if such is not found.

Return type:

IscUMachine

GetHarmonic(nUID: int)
GetHarmonic(strPythonName: str)

Returns an IscHarmonic instance for the harmonic source identified by the UID or the Python name.

You can use either nUID specifying the harmonic source UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected harmonic source UID.

  • strPythonName (str) – The selected harmonic source name.

Returns:

The harmonic source instance or None if such is not found.

Return type:

IscHarmonic

GetCircuitBreaker(nUID: int)
GetCircuitBreaker(strPythonName: str)

Returns an IscCircuitBreaker instance for the circuit breaker identified by the UID or the Python name.

You can use either nUID specifying the circuit breaker UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected circuit breaker UID.

  • strPythonName (str) – The selected circuit breaker name.

Returns:

The circuit breaker instance or None if such is not found.

Return type:

IscCircuitBreaker

GetBattery(nUID: int)
GetBattery(strPythonName: str)

Returns an IscBattery instance for the DC battery identified by the UID or the Python name.

You can use either nUID specifying the DC battery UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected DC battery UID.

  • strPythonName (str) – The selected DC battery name.

Returns:

The DC battery instance or None if such is not found.

Return type:

IscBattery

GetDCMachine(nUID: int)
GetDCMachine(strPythonName: str)

Returns an IscDCMachine instance for the DC machine identified by the UID or the Python name.

You can use either nUID specifying the DC machine UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected DC machine UID.

  • strPythonName (str) – The selected DC machine name.

Returns:

The DC machine instance or None if such is not found.

Return type:

IscDCMachine

GetConverter(nUID: int)
GetConverter(strPythonName: str)

Returns an IscConverter instance for the AC/DC convertor identified by the UID or the Python name.

You can use either nUID specifying the AC/DC convertor UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected AC/DC convertor UID.

  • strPythonName (str) – The selected AC/DC convertor name.

Returns:

The AC/DC convertor instance or None if such is not found.

Return type:

IscConverter

GetChopper(nUID: int)
GetChopper(strPythonName: str)

Returns an IscChopper instance for the AC/DC convertor identified by the UID or the Python name.

You can use either nUID specifying the AC/DC convertor UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected AC/DC convertor UID.

  • strPythonName (str) – The selected AC/DC convertor name.

Returns:

The AC/DC chopper instance or None if such is not found.

Return type:

IscChopper

GetMGSet(nUID: int)
GetMGSet(strPythonName: str)

Returns an IscMGSet instance for the motor generator set identified by the UID or the Python name.

You can use either nUID specifying the motor generator set UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected motor generator set UID.

  • strPythonName (str) – The selected motor generator set name.

Returns:

The motor generator set instance or None if such is not found.

Return type:

IscMGSet

GetVoltageRegulator(nUID: int)
GetVoltageRegulator(strPythonName: str)

Returns an IscVoltageRegulator instance for the voltage regulator identified by the UID or the Python name.

You can use either nUID specifying the voltage regulator UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected voltage regulator UID.

  • strPythonName (str) – The selected voltage regulator name.

Returns:

The voltage regulator instance or None if such is not found.

Return type:

IscVoltageRegulator

GetProtectionDevice(nUID: int)
GetProtectionDevice(strPythonName: str)

Returns an IscProtectionDevice instance for the protection device identified by the UID or the Python name.

You can use either nUID specifying the protection device UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected protection device UID.

  • strPythonName (str) – The selected protection device name.

Returns:

The protection device instance or None if such is not found.

Return type:

IscProtectionDevice

GetAnnotation(nUID: int)
GetAnnotation(strPythonName: str)

Returns an IscAnnotation instance for the diagram annotation identified by the UID or the Python name.

You can use either nUID specifying the diagram annotation UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected diagram annotation UID.

  • strPythonName (str) – The selected diagram annotation name.

Returns:

The diagram annotation instance or None if such is not found.

Return type:

IscAnnotation

GetGroup(nUID: int)
GetGroup(strPythonName: str)

Returns an IscGroup instance for the group identified by the UID or the Python name.

You can use either nUID specifying the group UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected group UID.

  • strPythonName (str) – The selected group name.

Returns:

The group instance or None if such is not found.

Return type:

IscGroup

GetIntertrip(nUID: int)
GetIntertrip(strPythonName: str)

Returns an IscIntertrip instance for the intertrip identified by the UID or the Python name.

You can use either nUID specifying the intertrip UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected intertrip UID.

  • strPythonName (str) – The selected intertrip name.

Returns:

The intertrip instance or None if such is not found.

Return type:

IscIntertrip

GetIntertripFromBreaker(nBreakerUID: int) int

” Returns the UID of the intertrip the breaker identified by nBreakerUID belongs to. Returns 0 if no intertrip is found.

Parameters:

nBreakerUID (int) – The breaker UID.

Returns:

The UID of the intertrip associated with the breaker or 0 if none is found.

Return type:

int

GetPlugin(nUID: int)
GetPlugin(strPythonName: str)

Returns an IscPlugin instance for the plugin identified by the UID or the Python name.

You can use either nUID specifying the plugin UID, or strPythonName specifying its name.

Parameters:
  • nUID (int) – The selected plugin UID.

  • strPythonName (str) – The selected plugin name.

Returns:

The plugin instance or None if such is not found.

Return type:

IscPlugin

GetUnbalancedLoad(nUID: int)
GetUnbalancedLoad(strPythonName: str)

Returns an IscUnbalancedLoad instance for the unbalanced load identified by the UID or the Python name.

Parameters:
  • nUID (int) – The selected unbalanced load UID.

  • strPythonName (str) – The selected unbalanced load name.

Returns:

The unbalanced load instance or None if such is not found.

Return type:

IscUnbalancedLoad

GetUnbalancedLine(nUID: int)
GetUnbalancedLine(strPythonName: str)

Returns an IscUnbalancedLine instance for the unbalanced line identified by the UID or the Python name.

Parameters:
  • nUID (int) – The selected unbalanced line UID.

  • strPythonName (str) – The selected unbalanced line name.

Returns:

The unbalanced line instance or None if such is not found.

Return type:

IscUnbalancedLine

GetUnbalancedTransformer(nUID: int)
GetUnbalancedTransformer(strPythonName: str)

Returns an IscUnbalancedTransformer instance for the unbalanced transformer identified by the UID or the Python name.

Parameters:
  • nUID (int) – The selected unbalanced transformer UID.

  • strPythonName (str) – The selected unbalanced transformer name.

Returns:

The unbalanced transformer instance or None if such is not found.

Return type:

IscUnbalancedTransformer

GetNetworkData()

Returns an IscNetworkData instance of the network. The IscNetworkData object provides access to network wide properties such as the base MVA.

Returns:

A network data instance of the network.

Return type:

IscNetworkData

GetBusbarUID(strName: str) int

Returns the UID of a busbar with the given name.

Parameters:

strName (str) – The selected busbar name.

Returns:

The busbar UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetBusbarUIDs(bFetchFromSystem: bool = True) Dict[int, IscBusbar]

Returns a dictionary of all busbar UIDs in the network. The keys are the integer UIDs and the values are the IscBusbar instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all busbar UIDs.

Return type:

dict(int,IscBusbar)

GetBranchUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of a branch with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected branch name.

Returns:

The branch UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetBranchUIDs(bFetchFromSystem: bool = True) Dict[int, IscBranch]
GetBranchUIDs(nFirstBusID: int) List[int]
GetBranchUIDs(nFirstBusID: int, nSecondBusID: int) List[int]

Returns either a dictionary of all branch UIDs in the network or a list of branches connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscBranch instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of branch UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all branches.

Return type:

dict(int,IscBranch)

GetTransformerUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of a transformer with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected transformer name.

Returns:

The transformer UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetTransformerUIDs(bFetchFromSystem: bool = True)
GetTransformerUIDs(nFirstBusID: int) List[int]
GetTransformerUIDs(nFirstBusID: int, nSecondBusID: int) List[int]

Returns either a dictionary of all transformer UIDs in the network or a list of transformers connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscTransformer instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of transformer UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all transformers.

Return type:

dict(int,IscTransformer)

Get3WTransformerUID(nFromID: int, nToID: int, nTeritaryID: int, strName: str) int

Returns the UID of a 3 winding transformer with the given name between three busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • nTeritaryID (int) – The UID of the Teritary busbar.

  • strName (str) – The selected 3 winding transformer name.

Returns:

The 3 winding transformer UID, 0 if no matches or -N if we have N matches.

Return type:

int

Get3WTransformerUIDs(bFetchFromSystem: bool = True) Dict[int, Isc3WTransformer]
Get3WTransformerUIDs(nFirstBusID: int) List[int]
Get3WTransformerUIDs(nFirstBusID: int, nSecondBusID: int, nThirdBusID: int) List[int]

Returns either a dictionary of all 3W transformer UIDs in the network or a list of 3W transformers connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscTransformer instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • nThirdBusID (int) – The UID of the third busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of 3W transformer UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all 3W transformers.

Return type:

dict(int,Isc3WTransformer)

GetLoadUID(nBusID: int, strName: str) int

Returns the UID of a load with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected load name.

Returns:

The load UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetLoadUIDs(nBusID: int) List[int]
GetLoadUIDs(bFetchFromSystem: bool = True) Dict[int, IscLoad]

Returns either a dictionary of all load UIDs in the network or a list of loads connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscLoad instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of load UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all loads.

Return type:

dict(int,IscLoad)

GetSynMachineUID(nBusID: int, strName: str) int

Returns the UID of a synchronous machine with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected synchronous machine name.

Returns:

The synchronous machine UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetSynMachineUIDs(nBusID: int) List[int]
GetSynMachineUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all synchronous machine UIDs in the network or a list of synchronous machines connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscSynMachine instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of synchronous machine UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all synchronous machines.

Return type:

dict(int,IscSynMachine)

GetGridInfeedUID(nBusID: int, strName: str) int

Returns the UID of a grid infeed with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected grid infeed name.

Returns:

The grid infeed UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetGridInfeedUIDs(nBusID: int) List[int]
GetGridInfeedUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all grid infeed UIDs in the network or a list of grid infeeds connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscGridInfeed instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of grid infeed UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all grid infeeds.

Return type:

dict(int,IscGridInfeed)

GetIndMachineUID(nBusID: int, strName: str) int

Returns the UID of an induction machine with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected induction machine name.

Returns:

The induction machine UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetIndMachineUIDs(nBusID: int) List[int]
GetIndMachineUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all induction machine UIDs in the network or a list of induction machines connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscIndMachine instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of induction machine UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all induction machines.

Return type:

dict(int,IscIndMachine)

GetFilterUID(nBusID: int, strName: str) int

Returns the UID of a filter with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected filter name.

Returns:

The filter UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetFilterUIDs(nBusID: int) List[int]
GetFilterUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all filter UIDs in the network or a list of filters connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscFilter instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of filter UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all filters.

Return type:

dict(int,IscFilter)

GetMechSwCapacitorUID(nBusID: int, strName: str) int

Returns the UID of a mechanically switched capacitor with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected mechanically switched capacitor name.

Returns:

The mechanically switched capacitor UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetMechSwCapacitorUIDs(nBusID: int) List[int]
GetMechSwCapacitorUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all mechanically switched capacitor UIDs in the network or a list of mechanically switched capacitors connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscMechSwCapacitor instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of mechanically switched capacitor UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all mechanically switched capacitors.

Return type:

dict(int,IscMechSwCapacitor)

GetStaticVCUID(nBusID: int, strName: str) int

Returns the UID of a static VAr compensator with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected static VAr compensator name.

Returns:

The static VAr compensator UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetStaticVCUIDs(nBusID: int) List[int]
GetStaticVCUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all static VAr compensator UIDs in the network or a list of static VAr compensators connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscStaticVC instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of static VAr compensator UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all static VAr compensators.

Return type:

dict(int,IscStaticVC)

GetUMachineUID(nBusID: int, strName: str) int

Returns the UID of a universal machine with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected universal machine name.

Returns:

The universal machine UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetUMachineUIDs(nBusID: int) List[int]
GetUMachineUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all universal machine UIDs in the network or a list of universal machines connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscUMachine instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of universal machine UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all universal machines.

Return type:

dict(int,IscUMachine)

GetHarmonicUID(nBusID: int, strName: str) int

Returns the UID of a harmonic source with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected harmonic source name.

Returns:

The harmonic source UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetHarmonicUIDs(nBusID: int) List[int]
GetHarmonicUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all harmonic source UIDs in the network or a list of harmonic sources connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscHarmonic instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of harmonic source UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all harmonic sources.

Return type:

dict(int,IscHarmonic)

GetCircuitBreakerUID(nBranchOrTxID: int, nClosestBusbarUID: int) int

Returns the UID of a circuit breaker located on the branch or transformer specified by its UID. The From or To end of the branch is specified by the nClosestBusbarUID parameter.

Parameters:
  • nBranchOrTxID (int) – The UID of the branch or the transformer.

  • nClosestBusbarUID (int) – Identifies the busbar at either the From or To end.

Returns:

The circuit breaker UID, 0 if no matches.

Return type:

int

GetCircuitBreakerUIDs(nBranchID: int) List[int]
GetCircuitBreakerUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all circuit breaker UIDs in the network or a list of circuit breakers connected to the component specified by the given UID.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscCircuitBreaker instances.

Parameters:
  • nBranchID (int) – The UID of the component.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of circuit breaker UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all circuit breakers.

Return type:

dict(int,IscCircuitBreaker)

GetFromCircuitBreakerUID(nBranchOrTxID: int) int

Returns the UID of a circuit breaker located on the “From” end of the branch or transformer specified by its UID.

Parameters:

nBranchOrTxID (int) – The UID of the branch or the transformer.

Returns:

The circuit breaker UID, 0 if no matches.

Return type:

int

GetToCircuitBreakerUID(nBranchOrTxID: int) int

Returns the UID of a circuit breaker located on the “To” end of the branch or transformer specified by its UID.

Parameters:

nBranchOrTxID (int) – The UID of the branch or the transformer.

Returns:

The circuit breaker UID, 0 if no matches.

Return type:

int

GetBatteryUID(nBusID: int, strName: str) int

Returns the UID of a battery with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected battery name.

Returns:

The battery UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetBatteryUIDs(nBusID: int) List[int]
GetBatteryUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all battery UIDs in the network or a list of batteries connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscBattery instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of battery UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all batteries.

Return type:

dict(int,IscBattery)

GetDCMachineUID(nBusID: int, strName: str) int

Returns the UID of a DC Machine with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected DC Machine name.

Returns:

The DC Machine UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetDCMachineUIDs(nBusID: int) List[int]
GetDCMachineUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all DC Machine UIDs in the network or a list of DC Machines connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscDCMachine instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of DC Machine UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all DC Machines.

Return type:

dict(int,IscDCMachine)

GetConverterUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of a converter with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected converter name.

Returns:

The converter UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetConverterUIDs(nFirstBusID: int) List[int]
GetConverterUIDs(nFirstBusID: int, nSecondBusID: int) List[int]
GetConverterUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all converter UIDs in the network or a list of converters connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscConverter instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of converter UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all converters.

Return type:

dict(int,IscConverter)

GetChopperUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of a chopper with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected chopper name.

Returns:

The chopper UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetChopperUIDs(nFirstBusID: int) List[int]
GetChopperUIDs(nFirstBusID: int, nSecondBusID: int) List[int]
GetChopperUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all chopper UIDs in the network or a list of choppers connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscChopper instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of chopper UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all choppers.

Return type:

dict(int,IscChopper)

GetMGSetUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of a motor/generator with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected motor/generator name.

Returns:

The motor/generator UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetMGSetUIDs(nFirstBusID: int) List[int]
GetMGSetUIDs(nFirstBusID: int, nSecondBusID: int) List[int]
GetMGSetUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all motors/generator set UIDs in the network or a list of motors/generator sets connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscMGSet instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of motors/generator set UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all motors/generator sets.

Return type:

dict(int,IscMGSet)

GetUnbalancedLoadUID(nBusID: int, strName: str) int

Returns the UID of an unbalanced load with specified name at busbar specified by its UID.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • strName (str) – The selected unbalanced load name.

Returns:

The unbalanced load UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetUnbalancedLoadUIDs(nBusID: int) List[int]
GetUnbalancedLoadUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all unbalanced load UIDs in the network or a list of unbalanced loads connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscUnbalancedLoad instances.

Parameters:
  • nBusID (int) – The UID of the busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of unbalanced load UIDs connected to the items specified by the given UID.

Return type:

list(int)

Returns:

Dictionary of all unbalanced loads.

Return type:

dict(int,IscUnbalancedLoad)

GetUnbalancedLineUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of an unbalanced line with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected unbalanced line name.

Returns:

The unbalanced line UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetUnbalancedLineUIDs(nFirstBusID: int) List[int]
GetUnbalancedLineUIDs(nFirstBusID: int, nSecondBusID: int) List[int]
GetUnbalancedLineUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all unbalanced line UIDs in the network or a list of unbalanced lines connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscUnbalancedLine instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of unbalanced line UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all unbalanced lines.

Return type:

dict(int,IscUnbalancedLine)

GetUnbalancedTransformerUID(nFromID: int, nToID: int, strName: str) int

Returns the UID of an unbalanced transformer with the given name between two busbars that are specified by their UIDs.

Parameters:
  • nFromID (int) – The UID of the From busbar.

  • nToID (int) – The UID of the To busbar.

  • strName (str) – The selected unbalanced transformer name.

Returns:

The unbalanced transformer UID, 0 if no matches or -N if we have N matches.

Return type:

int

GetUnbalancedTransformerUIDs(nFirstBusID: int) List[int]
GetUnbalancedTransformerUIDs(nFirstBusID: int, nSecondBusID: int) List[int]
GetUnbalancedTransformerUIDs(bFetchFromSystem: bool = True)

Returns either a dictionary of all unbalanced transformer UIDs in the network or a list of unbalanced transformers connected to the busbars specified by the given UIDs.

If a dictionary is returned, the keys are the integer UIDs and the values are the IscUnbalancedTransformer instances.

Parameters:
  • nFirstBusID (int) – The UID of the first busbar.

  • nSecondBusID (int) – The UID of the second busbar.

  • bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

List of unbalanced transformer UIDs connected to the items specified by the given UIDs.

Return type:

list(int)

Returns:

Dictionary of all unbalanced transformers.

Return type:

dict(int,IscUnbalancedTransformer)

GetVoltageRegulatorUID(nBranchID: int) int

Returns the UID of a voltage regulator at branch specified by its UID.

Parameters:

nBranchID (int) – The UID of the branch.

Returns:

The voltage regulator UID.

Return type:

int

GetVoltageRegulatorUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all voltage regulator UIDs in the network. The keys are the integer UIDs and the values are the IscVoltageRegulator instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all voltage regulators.

Return type:

dict(int,IscVoltageRegulator)

GetProtectionDeviceUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all protection device UIDs in the network. The keys are the integer UIDs and the values are the IscProtectionDevice instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all protection devices UIDs.

Return type:

dict(int,IscProtectionDevice)

GetAnnotationUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all annotation UIDs in the network. The keys are the integer UIDs and the values are the IscAnnotation instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all annotation UIDs.

Return type:

dict(int,IscAnnotation)

GetGroupUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all group UIDs in the network. The keys are the integer UIDs and the values are the IscGroup instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all group UIDs.

Return type:

dict(int,IscGroup)

GetIntertripUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all intertrip UIDs in the network. The keys are the integer UIDs and the values are the IscIntertrip instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all intertrip UIDs.

Return type:

dict(int,IscIntertrip)

GetPluginUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all Plugin UIDs in the network. The keys are the integer UIDs and the values are the IscPlugin instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all Plugin UIDs.

Return type:

dict(int,IscPlugin)

GetProfileUID(nUID: int) int

Returns the integer UID of the profile for the component UID.

Parameters:

nUID (int) – The UID of component. nUID may be the UID of a load, generator, grid infeed or Universal Machine.

Returns:

The profile for the component UID, 0 if the component nUID does not have a profile assigned to it, or if nUID is not a load, generator, grid infeed or universal machine.

Return type:

int

GetLoadProfilePQActualUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all PQ Actual Load profile UIDs in the network. The keys are the integer UIDs and the values are the IscLoadProfilePQActual instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all PQ Actual Load profile UIDs.

Return type:

dict(int,IscLoadProfilePQActual)

GetLoadProfilePQScaleUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all PQ Scale Load profile UIDs in the network. The keys are the integer UIDs and the values are the IscLoadProfilePQScale instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all PQ Actual Load profile UIDs.

Return type:

dict(int,IscLoadProfilePQScale)

GetGeneratorProfilePQActualUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all PQ Actual Generator profile UIDs in the network. The keys are the integer UIDs and the values are the IscGeneratorProfilePQActual instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all PQ Actual Generator profile UIDs.

Return type:

dict(int,IscGeneratorProfilePQActual)

GetGeneratorProfilePQScaleUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all PQ Scale Generator profile UIDs in the network. The keys are the integer UIDs and the values are the IscGeneratorProfilePQScale instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all PQ Scale Generator profile UIDs.

Return type:

dict(int,IscGeneratorProfilePQScale)

GetUMachineProfilePQActualUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of all PQ Actual UMachine profile UIDs in the network. The keys are the integer UIDs and the values are the IscUMachineProfilePQActual instances.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the data maps. If set to False, it only rebuilds if a new component has been built since last Get() function.

Returns:

Dictionary of all PQ Actual UMachine profile UIDs.

Return type:

dict(int,IscUMachineProfilePQActual)

CreateBusbar(strName: str) int

Returns the UID for the newly created busbar.

Warning: It is up to the script to ensure that the busbar name is unique.

Parameters:

strName (str) – The branch name string if required.

Returns:

The UID for the newly created busbar, 0 on failure.

Return type:

int

CreateBusbarNoGraphics(strName: str)

Returns an IscBusbar object for the newly created busbar.

Warning: It is up to the script to ensure that the busbar name is unique.

Parameters:

strName (str) – The busbar name string if required.

Returns:

The IscBusbar object for the newly created busbar.

Return type:

IscBusbar

CreateBranch(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateBranch(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscBranch object for the newly created branch.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The branch name string if required.

Returns:

The UID for the newly created branch, 0 on failure.

Return type:

int

Returns:

The IscBranch object for the newly created branch.

Return type:

IscBranch

CreateTransformer(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateTransformer(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscTransformer object for the newly created transformer.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The transformer name string if required.

Returns:

The UID for the newly created transformer, 0 on failure.

Return type:

int

Returns:

The IscTransformer object for the newly created transformer.

Return type:

IscTransformer

Create3WTransformer(nFromBusbarUID: int, nToBusbarUID: int, nTeritaryBusUID: int, strName: str) int
Create3WTransformer(pFromBusbar, pToBusbar, pTeritaryBus, strName: str)

Returns the UID or an Isc3WTransformer object for the newly created 3-winding transformer.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • nTeritaryBusUID (int) – The “Teritary” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • pTeritaryBus (IscBusbar) – The “Teritary” busbar.

  • strName (str) – The 3-winding transformer name string if required.

Returns:

The UID for the newly created 3-winding transformer, 0 on failure.

Return type:

int

Returns:

The Isc3WTransformer object for the newly created 3-winding transformer.

Return type:

Isc3WTransformer

CreateLoad(nAtBusbarUID: int, strName: str) int
CreateLoad(pAtBusbar, strName: str)

Returns the UID or an IscLoad object for the newly created load.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The load name string if required.

Returns:

The UID for the newly created load, 0 on failure.

Return type:

int

Returns:

The IscLoad object for the newly created load.

Return type:

IscLoad

CreateIndMachine(nAtBusbarUID: int, strName: str) int
CreateIndMachine(pAtBusbar, strName: str)

Returns the UID or an IscIndMachine object for the newly created induction machine.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The induction machine name string if required.

Returns:

The UID for the newly created induction machine, 0 on failure.

Return type:

int

Returns:

The IscIndMachine object for the newly created induction machine.

Return type:

IscIndMachine

CreateSynMachine(nAtBusbarUID: int, strName: str) int
CreateSynMachine(pAtBusbar, strName: str)

Returns the UID or an IscSynMachine object for the newly created synchronous machine.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The synchronous machine name string if required.

Returns:

The UID for the newly created synchronous machine, 0 on failure.

Return type:

int

Returns:

The IscSynMachine object for the newly created synchronous machine.

Return type:

IscSynMachine

CreateGridInfeed(nAtBusbarUID: int, strName: str) int
CreateGridInfeed(pAtBusbar, strName: str)

Returns the UID or an IscGridInfeed object for the newly created grid infeed.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The grid infeed name string if required.

Returns:

The UID for the newly created grid infeed, 0 on failure.

Return type:

int

Returns:

The IscGridInfeed object for the newly created grid infeed.

Return type:

IscGridInfeed

CreateFilter(nAtBusbarUID: int, strName: str) int
CreateFilter(pAtBusbar, strName: str)

Returns the UID or an IscFilter object for the newly created filter.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The filter name string if required.

Returns:

The UID for the newly created filter, 0 on failure.

Return type:

int

Returns:

The IscFilter object for the newly created filter.

Return type:

IscFilter

CreateHarmonic(nAtBusbarUID: int, strName: str) int
CreateHarmonic(pAtBusbar, strName: str)

Returns the UID or an IscHarmonic object for the newly created harmonic source.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The harmonic source name string if required.

Returns:

The UID for the newly created harmonic source, 0 on failure.

Return type:

int

Returns:

The IscHarmonic object for the newly created harmonic source.

Return type:

IscHarmonic

CreateMechSwCapacitor(nAtBusbarUID: int, strName: str) int
CreateMechSwCapacitor(pAtBusbar, strName: str)

Returns the UID or an IscMechSwCapacitor object for the newly created mechanically switched capacitor.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The capacitor name string if required.

Returns:

The UID for the newly created mechanically switched capacitor, 0 on failure.

Return type:

int

Returns:

The IscMechSwCapacitor object for the newly created mechanically switched capacitor.

Return type:

IscMechSwCapacitor

CreateCircuitBreaker(nBranchOrTxUID: int, bAtFromEnd: bool, strName: str) int
CreateCircuitBreaker(pBranchOrTx, bAtFromEnd: bool, strName: str)

Returns the UID or an IscCircuitBreaker object for the newly created circuit breaker. In order to draw this component, the function IscDiagram.DrawUndrawnItemsAttachedToBusbar() needs to be called before IscDiagram.DrawLine().

Parameters:
  • nBranchOrTxUID (int) – The UID of the branch or the transformer where the circuit breaker is located.

  • pBranchOrTx (IscBranch or IscTransformer) – The IscBranch or IscTransformer object of the branch or transformer where the circuit breaker is located.

  • bAtFromEnd (bool) – Adds the circuit breaker to the “From” end of the component, if True.

  • strName (str) – The circuit breaker name string if required.

Returns:

The UID for the newly created circuit breaker, 0 on failure.

Return type:

int

Returns:

The IscCircuitBreaker object for the newly created circuit breaker.

Return type:

IscCircuitBreaker

CreateStaticVC(nAtBusbarUID: int, strName: str) int
CreateStaticVC(pAtBusbar, strName: str)

Returns the UID or an IscStaticVC object for the newly created static VAr compensator.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The static VAr compensator name string if required.

Returns:

The UID for the newly created static VAr compensator, 0 on failure.

Return type:

int

Returns:

The IscStaticVC object for the newly created static VAr compensator.

Return type:

IscStaticVC

CreateUMachine(nAtBusbarUID: int, strName: str) int
CreateUMachine(pAtBusbar, strName: str)

Returns the UID or an IscUMachine object for the newly created universal machine.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The universal machine name string if required.

Returns:

The UID for the newly created universal machine, 0 on failure.

Return type:

int

Returns:

The IscUMachine object for the newly created universal machine.

Return type:

IscUMachine

CreateBattery(nAtBusbarUID: int, strName: str) int
CreateBattery(pAtBusbar, strName: str)

Returns the UID or an IscBattery object for the newly created battery.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The battery name string if required.

Returns:

The UID for the newly created battery, 0 on failure.

Return type:

int

Returns:

The IscBattery object for the newly created battery.

Return type:

IscBattery

CreateDCMachine(nAtBusbarUID: int, strName: str) int
CreateDCMachine(pAtBusbar, strName: str)

Returns the UID or an IscDCMachine object for the newly created DC machine.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The DC machine name string if required.

Returns:

The UID for the newly created DC machine, 0 on failure.

Return type:

int

Returns:

The IscDCMachine object for the newly created DC machine.

Return type:

IscDCMachine

CreateConverter(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateConverter(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscConverter object for the newly created AC/DC converter.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The AC/DC converter name string if required.

Returns:

The UID for the newly created AC/DC converter, 0 on failure.

Return type:

int

Returns:

The IscConverter object for the newly created AC/DC converter.

Return type:

IscConverter

CreateChopper(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateChopper(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscChopper object for the newly created chopper.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The DC/DC converter name string if required.

Returns:

The UID for the newly created chopper, 0 on failure.

Return type:

int

Returns:

The IscChopper object for the newly created chopper.

Return type:

IscChopper

CreateMGSet(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateMGSet(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscMGSet object for the newly created motor/generator set.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The motor/generator set name string if required.

Returns:

The UID for the newly created motor/generator set, 0 on failure.

Return type:

int

Returns:

The IscMGSet object for the newly created motor/generator set.

Return type:

IscMGSet

CreateVoltageRegulator(nBranchUID: int, strName: str) int
CreateVoltageRegulator(pBranch, strName: str)

Returns the UID or an IscVoltageRegulator object for the newly created voltage regulator.

Parameters:
  • nBranchUID (int) – The branch the voltage regulator is upon

  • pBranch (IscBranch) – The branch the voltage regulator is upon

  • strName (str) – The voltage regulator name string if required.

Returns:

The UID for the newly created voltage regulator, 0 on failure.

Return type:

int

Returns:

The IscVoltageRegulator object for the newly created voltage regulator.

Return type:

IscVoltageRegulator

CreateUnbalancedLoad(nAtBusbarUID: int, strName: str) int
CreateUnbalancedLoad(pAtBusbar, strName: str)

Returns the UID or an IscUnbalancedLoad object for the newly created unbalanced load.

Parameters:
  • nAtBusbarUID (int) – The busbar UID.

  • pAtBusbar (IscBusbar) – The busbar.

  • strName (str) – The unbalanced load name string if required.

Returns:

The UID for the newly created unbalanced load, 0 on failure.

Return type:

int

Returns:

The IscUnbalancedLoad object for the newly created unbalanced load.

Return type:

IscUnbalancedLoad

CreateUnbalancedLine(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateUnbalancedLine(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscUnbalancedLine object for the newly created unbalanced line.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The unbalanced line name string if required.

Returns:

The UID for the newly created unbalanced line, 0 on failure.

Return type:

int

Returns:

The IscUnbalancedLine object for the newly created unbalanced line.

Return type:

IscUnbalancedLine

CreateUnbalancedTransformer(nFromBusbarUID: int, nToBusbarUID: int, strName: str) int
CreateUnbalancedTransformer(pFromBusbar, pToBusbar, strName: str)

Returns the UID or an IscUnbalancedTransformer object for the newly created unbalanced transformer.

Parameters:
  • nFromBusbarUID (int) – The “From” busbar UID.

  • nToBusbarUID (int) – The “To” busbar UID.

  • pFromBusbar (IscBusbar) – The “From” busbar.

  • pToBusbar (IscBusbar) – The “To” busbar.

  • strName (str) – The unbalanced transformer name string if required.

Returns:

The UID for the newly created unbalanced transformer, 0 on failure.

Return type:

int

Returns:

The IscUnbalancedTransformer object for the newly created unbalanced transformer.

Return type:

IscUnbalancedTransformer

CreateGroup(strName: str, nGroupType: int) int

Create a new empty group of components and returns the group UID. Group types:

  • 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

Parameters:
  • strName (str) – The group name.

  • nGroupType (int) – The group type.

Returns:

The group UID, 0 on failure.

Return type:

int

CreateGroupNoGraphics(strName: str, nGroupType: int)

Create a new empty group of components and returns the group object. Group types:

  • 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

Parameters:
  • strName (str) – The group name.

  • nGroupType (int) – The group type.

Returns:

The IscGroup object.

Return type:

IscGroup

CreateIntertrip(strName: str) int

Create a new empty intertrip and returns the intertrip UID. Note the new intertrip name must be unique or no new intertrip will be created.

Parameters:

strName (str) – The intertrip name.

Returns:

The intertrip UID, 0 on failure.

Return type:

int

CreateIntertripNoGraphics(strName: str)

Create a new empty intertrip and returns the IscIntertrip object. Note the new intertrip name must be unique or no new intertrip will be created.

Parameters:

strName (str) – The intertrip name.

Returns:

The IscIntertrip object or None on failure.

Return type:

IscIntertrip

CreatePlugin(nCompUID: int, sPluginName: str, sName: str) int
CreatePlugin(pComponent, sPluginName: str, sName: str) int

Returns the UID or the IscPlugin object for the newly created plugin. A different plugin UID is required for each component with a plugin, therefore this function should be used every time a plugin is assigned to a component, even if the same type of plugin is being assigned.

Parameters:
  • nCompUID (int) – The UID of the component to which the plugin is to be assigned.

  • pComponent (IscNetComponent) – The component object (i.e., IscBranch, IscUMachine) to which the plugin is to be assigned.

  • sPluginName (str) – The name of the plugin itself, for example ‘Constant Current Load’.

  • sName (str) – The user defined plugin name or empty string.

Returns:

The IscPlugin object for the newly created plugin or None on failure.

Return type:

IscPlugin

Returns:

The plugin UID, 0 on failure.

Return type:

int

ReverseBranch(nBranchUID: int) bool

Reverses the connection of branch or transformer supplied.

Parameters:

nBranchUID (int) – the branch or transformer UID.

Returns:

denotes if the branch has been successfully reversed.

Return type:

bool

SplitBranch(nBranchUID: int, nSection: int, dDistanceRatio: float, strNewBusName: str) int

Splits a branch or transformer into two sections connected by a new busbar.

Parameters:
  • nBranchUID (int) – The branch UID.

  • nSection (int) – Specifies which section of a multi-section branch is split. For branches with only one section then nSection should be set to 0.

  • dDistanceRatio (float) – Specifies how the branch impedances are divided between the new branches. A value of 0.0 sets the split position to be at the “From” end whilst a value of 1.0 specifies the “To” end. Values between 0.0 and 1.0 split the branch in proportion. For multi-section branches dRatio splits the section identified by nSection.

  • strName (str) – The name of the new busbar.

Returns:

The UID of the new branch. If it is not greater than 0, the branch has not been split. This is because there is a protection device or controller on the branch or the branch is connected to an embedded diagram.

Return type:

int

ChangeConnection(nUID: int, nOldBusUID: int, nNewBusUID: int) bool

Changes the connection busbar for the component specified by nUID. nOldBusUID must identify a busbar currently connected to the component, and nNewBusUID but identify an existing busbar which is not already connected to the component.

Parameters:
  • nUID (int) – The UID of the component with the connection to be changed.

  • nOldBusUID (int) – The UID of the connection busbar to be disconnected.

  • nNewBusUID (int) – The UID of the new connection busbar to be connected.

Returns:

denotes if the connection change has been successful.

Return type:

bool

DeleteBusbar(pBusbar) bool

Deletes a busbar by passing the IscBusbar object for deletion.

Parameters:

pBusbar (IscBusbar) – The IscBusbar object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteBranch(pBranch) bool

Deletes a branch by passing the IscBranch object for deletion and all the circuit breakers attached to it.

Parameters:

pBranch (IscBranch) – The IscBranch object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteTransformer(pTransformer) bool

Deletes a transformer by passing the IscTransformer object for deletion.

Parameters:

pTransformer (IscTransformer) – The IscTransformer object for deletion.

Returns:

True if successful.

Return type:

bool

Delete3WTransformer(p3WTransformer) bool

Deletes a 3-winding transformer by passing the Isc3WTransformer object for deletion.

Parameters:

p3WTransformer (Isc3WTransformer) – The Isc3WTransformer object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteLoad(pLoad) bool

Deletes a load by passing the IscLoad object for deletion.

Parameters:

pLoad (IscLoad) – The IscLoad object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteSynMachine(pSynMachine) bool

Deletes a synchronous machine by passing the IscSynMachine object for deletion.

Parameters:

pSynMachine (IscSynMachine) – The IscSynMachine object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteIndMachine(pIndMachine) bool

Deletes an induction machine by passing the IscIndMachine object for deletion.

Parameters:

pIndMachine (IscIndMachine) – The IscIndMachine object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteGridInfeed(pGridInfeed) bool

Deletes a grid infeed by passing the IscSynMachine object for deletion.

Parameters:

pGridInfeed (IscSynMachine) – The IscSynMachine object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteFilter(pFilter) bool

Deletes a filter by passing the IscFilter object for deletion.

Parameters:

pFilter (IscFilter) – The IscFilter object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteMechSwCapacitor(pMechSwCapacitor) bool

Deletes a mechanical switched capacitor by passing the IscMechSwCapacitor object for deletion.

Parameters:

pMechSwCapacitor (IscMechSwCapacitor) – The IscMechSwCapacitor object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteStaticVC(pStaticVC) bool

Deletes a synchronous machine by passing the IscStaticVC object for deletion.

Parameters:

pStaticVC (IscStaticVC) – The IscStaticVC object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteUMachine(pUMachine) bool

Deletes an universal machine by passing the IscUMachine object for deletion.

Parameters:

pUMachine (IscUMachine) – The IscUMachine object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteHarmonic(pHarmonic) bool

Deletes a harmonic source by passing the IscHarmonic object for deletion.

Parameters:

pHarmonic (IscHarmonic) – The IscHarmonic object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteCircuitBreaker(pCircuitBreaker) bool

Deletes a circuit breaker by passing the IscCircuitBreaker object for deletion.

Parameters:

pCircuitBreaker (IscCircuitBreaker) – The IscCircuitBreaker object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteBattery(pBattery) bool

Deletes a battery by passing the IscBattery object for deletion.

Parameters:

pBattery (IscBattery) – The IscBattery object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteDCMachine(pDCMachine) bool

Deletes a DC machine by passing the IscDCMachine object for deletion.

Parameters:

pDCMachine (IscDCMachine) – The IscDCMachine object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteConverter(pConverter) bool

Deletes a converter by passing the IscConverter object for deletion.

Parameters:

pConverter (IscConverter) – The IscConverter object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteChopper(pChopper) bool

Deletes a chopper by passing the IscChopper object for deletion.

Parameters:

pChopper (IscChopper) – The IscChopper object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteMGSet(pMGSet) bool

Deletes a motor/generator set by passing the IscMGSet object for deletion.

Parameters:

pMGSet (IscMGSet) – The IscMGSet object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteVoltageRegulator(pVoltageRegulator) bool

Deletes a voltage regulator by passing the IscVoltageRegulator object for deletion.

Parameters:

pVoltageRegulator (IscVoltageRegulator) – The IscVoltageRegulator object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteAnnotation(pAnnotation) bool

Deletes an annotation by passing the IscAnnotation object for deletion.

Parameters:

pAnnotation (IscAnnotation) – The IscAnnotation object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteUnbalancedLoad(pUnbalancedLoad) bool

Deletes an unbalanced load by passing the IscUnbalancedLoad object for deletion.

Parameters:

pUnbalancedLoad (IscUnbalancedLoad) – The IscUnbalancedLoad object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteUnbalancedLine(pUnbalancedLine) bool

Deletes an unbalanced line by passing the IscUnbalancedLine object for deletion.

Parameters:

pUnbalancedLine (IscUnbalancedLine) – The IscUnbalancedLine object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteUnbalancedTransformer(pUnbalancedTransformer) bool

Deletes an unbalanced transformer by passing the IscUnbalancedTransformer object for deletion.

Parameters:

pUnbalancedTransformer (IscUnbalancedTransformer) – The IscUnbalancedTransformer object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteGroup(pGroup) bool

Deletes a group by passing the IscGroup object for deletion.

Parameters:

pGroup (IscGroup) – The IscGroup object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteIntertrip(pIntertrip) bool

Deletes a group by passing the IscIntertrip object for deletion.

Parameters:

pIntertrip (IscIntertrip) – The IscIntertrip object for deletion.

Returns:

True if successful.

Return type:

bool

DeletePlugin(pPlugin) bool

Deletes a plugin by passing the IscPlugin object for deletion.

Parameters:

pPlugin (IscPlugin) – The IscPlugin object for deletion.

Returns:

True if successful.

Return type:

bool

DeleteAllItems()

Delete all items in the network. This will delete all the components, groups, automations, contingencies and intertrips.

It will delete all versions and the entire undo history.

Analysis settings, network settings and diagrams will be unchanged.

DeleteBusBarSlack(strBusbar: str) bool

Deletes a slack busbar from the network busbar slack list. It does not delete the busbar in the same way as DeleteBusbar(pBusbar), instead it uses the busbar name for deletion.

Parameters:

strBusbar (str) – The slack busbar name.

Returns:

True if successful.

Return type:

bool

GetRatingIndex(strName: str) int

Returns an integer representing the rating set for a specified name.

Parameters:

strName (str) – The specified name.

Returns:

The rating set index, or -1 if no rating set with that name exists in the network.

Return type:

int

GetBranchRatingName(nIndex: int) str

Returns the name representing the rating set identified by an index.

Parameters:

nIndex (int) – The specified index.

Returns:

The rating set name, or empty set if no rating set with that index exists in the network.

Return type:

str

SetRatingName(nIndex: int, strName: str) None

Sets the name of the rating set identified by an index to specified name. If the rating set name does not exist it will be created by the function.

Parameters:
  • nIndex (int) – The specified index.

  • strName (str) – The specified name.

SetLimitsForOverloadChecks(dMaxVoltsPU: float, dMinVoltsPU: float, nRatingIndex: int, strDiagram: str) None

Sets the limits for overload checking on diagrams.

Parameters:
  • dMaxVoltsPU (float) – The maximum voltage in per unit.

  • dMinVoltsPU (float) – The minimum voltage in per unit.

  • nRatingIndex (int) – The index of the rating set to be used for the thermal overload checks.

  • strDiagram (str) – The name of the diagram that these limits will be applied to.

CreateLoadProfilePQActual(strName: str) int

Returns the load profile UID representing a load profile which uses actual MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

The load profile UID, 0 if a load profile cannot be created.

Return type:

int

CreateLoadProfilePQActualNoGraphics(strName: str)

Returns an IscLoadProfilePQActual object representing a load profile which uses actual MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

IscLoadProfilePQActual object.

Return type:

IscLoadProfilePQActual

CreateGeneratorProfilePQActual(strName: str) int

Returns the generator profile UID representing a generator profile which uses actual MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

The generator profile UID, 0 if a generator profile cannot be created.

Return type:

int

CreateGeneratorProfilePQActualNoGraphics(strName: str)

Returns an IscGeneratorProfilePQActual object representing a generator profile which uses actual MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

IscGeneratorProfilePQActual object.

Return type:

IscGeneratorProfilePQActual

CreateUMachineProfilePQActual(strName: str) int

Returns the universal machine profile UID representing a universal machine profile which uses actual MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

The universal machine profile UID, 0 if a universal machine profile cannot be created.

Return type:

int

CreateUMachineProfilePQActualNoGraphics(strName: str)

Returns an IscUMachineProfilePQActual object representing a universal machine profile which uses actual MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

IscUMachineProfilePQActual object.

Return type:

IscUMachineProfilePQActual

CreateLoadProfilePQScale(strName: str) int

Returns the load profile UID representing a load which scales the existing MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

The load profile UID, 0 if a generator profile cannot be created.

Return type:

int

CreateLoadProfilePQScaleNoGraphics(strName: str)

Returns an IscLoadProfilePQScale object representing a load profile which scales the existing MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

IscLoadProfilePQScale object.

Return type:

IscLoadProfilePQScale

CreateGeneratorProfilePQScale(strName: str) int

Returns the generator profile UID representing a generator which scales the existing MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

The generator profile UID, 0 if a generator profile cannot be created.

Return type:

int

CreateGeneratorProfilePQScaleNoGraphics(strName: str)

Returns an IscGeneratorProfilePQScale object representing a generator profile which scales the existing MW and MVAr values. No checking is made on duplicate profile names.

Parameters:

strName (str) – The profile name.

Returns:

IscGeneratorProfilePQScale object.

Return type:

IscGeneratorProfilePQScale

GetLoadProfilePQActuals()

Returns a dictionary of all IscLoadProfilePQActual objects in the network for actual load profiles. The keys are the profile UIDs and the values are the IscLoadProfilePQActual objects.

Returns:

A dictionary of all IscLoadProfilePQActual objects in the network for actual load profiles.

Return type:

dict(int,IscIscLoadProfilePQActual)

GetGeneratorProfilePQActuals()

Returns a dictionary of all IscGeneratorProfilePQActual objects in the network for actual generator profiles. The keys are the profile UIDs and the values are the IscGeneratorProfilePQActual objects.

Returns:

A dictionary of all IscGeneratorProfilePQActual objects in the network for actual generator profiles.

Return type:

dict(int,IscGeneratorProfilePQActual)

GetUMachineProfilePQActuals()

Returns a dictionary of all IscUMachineProfilePQActual objects in the network for actual universal machine profiles. The keys are the profile UIDs and the values are the IscUMachineProfilePQActual objects.

Returns:

A dictionary of all IscUMachineProfilePQActual objects in the network for actual universal machine profiles.

Return type:

dict(int,IscUMachineProfilePQActual)

GetLoadProfilePQScales()

Returns a dictionary of all IscLoadProfilePQScale objects in the network for scaled load profiles. The keys are the profile UIDs and the values are the IscLoadProfilePQScale objects.

Returns:

A dictionary of all IscLoadProfilePQScale objects in the network for scaled load profiles.

Return type:

dict(int,IscLoadProfilePQScale)

GetGeneratorProfilePQScales()

Returns a dictionary of all IscGeneratorProfilePQScale objects in the network for scaled generator profiles. The keys are the profile UIDs and the values are the IscGeneratorProfilePQScale objects.

Returns:

A dictionary of all IscGeneratorProfilePQScale objects in the network for scaled generator profiles.

Return type:

dict(int,IscGeneratorProfilePQScale)

GetLoadProfilePQActual(nUID: int)
GetLoadProfilePQActual(strPythonName: str)

Returns an IscLoadProfilePQActual object for the actual MW/MVAr load profile with a specified UID or python name.

Parameters:
  • nUID (int) – The profile UID.

  • strPythonName (str) – The profile name.

Returns:

IscLoadProfilePQActual object for the actual MW/MVAr load profile. Returns None if a profile cannot be found.

Return type:

IscLoadProfilePQActual

GetGeneratorProfilePQActual(nUID: int)
GetGeneratorProfilePQActual(strPythonName: str)

Returns an IscGeneratorProfilePQActual object for the actual MW/MVAr generator profile with a specified UID or python name.

Parameters:
  • nUID (int) – The profile UID.

  • strPythonName (str) – The profile name.

Returns:

IscGeneratorProfilePQActual object for the actual MW/MVAr generator profile. Returns None if a profile cannot be found.

Return type:

IscGeneratorProfilePQActual

GetUMachineProfilePQActual(nUID: int)
GetUMachineProfilePQActual(strPythonName: str)

Returns an IscUMachineProfilePQActual object for the actual MW/MVAr universal machine profile with a specified UID or python name.

Parameters:
  • nUID (int) – The profile UID.

  • strPythonName (str) – The profile name.

Returns:

IscUMachineProfilePQActual object for the actual MW/MVAr universal machine profile. Returns None if a profile cannot be found.

Return type:

IscUMachineProfilePQActual

GetLoadProfilePQScale(nUID: int)
GetLoadProfilePQScale(strPythonName: str)

Returns an IscLoadProfilePQScale object for the scaled MW/MVAr load profile with a specified UID or python name.

Parameters:
  • nUID (int) – The profile UID.

  • strPythonName (str) – The profile name.

Returns:

IscLoadProfilePQScale object for the scaled MW/MVAr load profile. Returns None if a profile cannot be found.

Return type:

IscLoadProfilePQScale

GetGeneratorProfilePQScale(nUID: int)
GetGeneratorProfilePQScale(strPythonName: str)

Returns an IscGeneratorProfilePQScale object for the scaled MW/MVAr generator profile with a specified UID or python name.

Parameters:

strPythonName (str) – The profile name.

Returns:

IscGeneratorProfilePQScale object for the scaled MW/MVAr generator profile. Returns None if a profile cannot be found.

Return type:

IscGeneratorProfilePQScale

DeleteLoadProfilePQActual(pProfile) bool

Deletes the actual load profile from the network by passing an IscLoadProfilePQActual object.

Parameters:

pProfile (IscLoadProfilePQActual) – The profile to be deleted.

Returns:

True if successful.

Return type:

bool

DeleteLoadProfilePQScale(pProfile) bool

Deletes the scaled load profile from the network by passing an IscLoadProfilePQScale object.

Parameters:

pProfile (IscLoadProfilePQScale) – The profile to be deleted.

Returns:

True if successful.

Return type:

bool

DeleteGeneratorProfilePQActual(pProfile) bool

Deletes the actual generator profile from the network by passing an IscGeneratorProfilePQActual object.

Parameters:

pProfile (IscGeneratorProfilePQActual) – The profile to be deleted.

Returns:

True if successful.

Return type:

bool

DeleteGeneratorProfilePQScale(pProfile) bool

Deletes the scaled generator profile from the network by passing an IscGeneratorProfilePQScale object.

Parameters:

pProfile (IscGeneratorProfilePQScale) – The profile to be deleted.

Returns:

True if successful.

Return type:

bool

DeleteUMachineProfilePQActual(pProfile) bool

Deletes the actual universal machine profile from the network by passing an IscUMachineProfilePQActual object.

Parameters:

pProfile (IscUMachineProfilePQActual) – The profile to be deleted.

Returns:

True if successful.

Return type:

bool

RunProfile() int

Runs the profile study. Returns the calculation UID of the study which has just been run.

Returns:

The calculation UID of the study which has been run.

Return type:

int

GetDiagram(strName: str)
GetDiagram(nUID: int)

Returns an IscDiagram instance for the diagram with name strName or ID nUID contained in the network.

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

  • nUID (int) – The diagram ID.

Returns:

The diagram of the IPSA network.

Return type:

IscDiagram

GetAllDiagrams()

Returns a list of IscDiagram objects for the network.

Returns:

List of IscDiagram objects for the network.

Return type:

list(IscDiagram)

GetAllDiagramsNames() List[str]

Returns a list of the names of the diagrams for the network.

Returns:

The names of the diagrams for the network.

Return type:

list(str)

GetAllDiagramsUIDs(bFetchFromSystem: bool = True)

Returns a dictionary of diagrams for the network. The keys are the Diagram IDs.

Parameters:

bFetchFromSystem (bool) – If set to True, IPSA rebuilds the IscDiagram data maps. If set to False, it only rebuilds if IscDiagrams have been added/deleted since the last Get() function.

Returns:

Dictionary of diagrams for the network.

Return type:

dict(int, IscDiagram)

AddDiagram(strSceneTitle: str, bIsDiagramSingleLine: bool, dGeoSceneScale: float, nSceneMeasurementUnit: int) int
AddDiagram(strSceneTitle: str, bIsDiagramSingleLine: bool, dGeoSceneScale: float, nSceneMeasurementUnit: int, nCopyWhat: int, nDiagramToCopy: int) int

Creates a new diagram for the network based on the supplied parameters. Returns the diagram UID corresponding to the new diagram. Note that this function causes IPSA to rebuild the IscDiagram data maps.

If nCopy what and nDiagramToCopy are provided, they provide a reference diagram and determine what is copied from that diagram into the new diagram. If nDiagramToCopy is provided and doesn’t refer to an existing diagram, no new diagram will be created.

Parameters:
  • strSceneTitle (str) – The name of the new diagram.

  • bIsDiagramSingleLine (bool) – True if a normal single line diagram type is required, False if the diagram is a scaled geographic diagram.

  • dGeoSceneScale (float) – The scaling factor used to locate or size network components on geographic diagrams.

  • nSceneMeasurementUnit (int) –

    The unit used for the geographic scale.

    • 0 if Millimetres

    • 1 if Centimetres

    • 2 if Metres

    • 3 if Kilometres

    • 4 if Inches

    • 5 if Feet

    • 6 if Yards

    • 7 if Miles

  • nCopyWhat (int) –

    Determines what is copied from the provided diagram pDiagramToCopy

    • 0 if copy nothing

    • 1 if copy the busbars as they are

    • 2 if copy the busbars as junctions

    • 3 if copy everything

  • nDiagramToCopy (int) – The UID of the diagram that any components may be copied from.

Returns:

The diagram UID for the newly created diagram.

Return type:

int

AddSLDiagram(strSceneTitle: str) int

Creates a new single line diagram for the network. Returns the diagram UID corresponding to the new diagram. Note that this function causes IPSA to rebuild the IscDiagram data maps. This is equivalent to calling AddDiagram with bIsDiagramSingleLine = True.

Parameters:

strSceneTitle (str) – The name of the new diagram.

Returns:

The diagram UID for the newly created diagram.

Return type:

int

DeleteDiagram(pDiagram: IscDiagram) bool
DeleteDiagram(nUID: int) bool
DeleteDiagram(strName: str) bool

Deletes the diagram identified by name strName, ID nUID or IscDiagram pDiagram.

Parameters:
  • strName (str) – The name of the diagram to be deleted.

  • nUID (int) – The diagram ID to be deleted.

  • pDiagram (IscDiagram) – The diagram to be deleted.

Returns:

True if the diagram is deleted.

Return type:

bool

GetAnalysisLF()

Returns an IscAnalysisLF object which can be used to get and set the load flow analysis parameters.

Returns:

IscAnalysisLF object.

Return type:

IscAnalysisLF

SetResultsForTheseUIDs(nUIDs: int) None

This function restricts the number of results that are returned from the load flow calculation engine to Python in order to reduce the execution time. Call this function before DoLoadFlow() or DoSimpleLoadFlow().

Parameters:

nUIDs (int) – The component UIDs.

DoLoadFlow(bNoEngineLoad: bool, bDontUpdateData: bool, bUseDC: bool = False) bool

Performs a load flow calculation.

Parameters:
  • bNoEngineLoad (bool) – If False (default), loads the engine from the IPSA model before doing a load flow calculation. If True, skips the load from the IPSA model and uses whatever network is currently loaded in the engine.

  • bDontUpdateData (bool) – If False (default), allows the load flow results being written back to the network model data (e.g. Busbar voltages and angles). If True, skips this stage, so the network model remains the same as it was loaded. Note that calling the function with no arguments is allowed and works as if it has been called with bNoEngineLoad and bDontUpdateData set to False.

  • bUseDC (bool) – Tells the user that they can run a DC load flow instead of a normal load flow. If True, the program will run a DC load flow instead of an AC load flow. Default value of bUseDC is False.

Returns:

True if the load flow converges, False on a non-convergence.

Return type:

bool

DoSimpleLoadFlow()

Performs a load flow calculation without prompting the user to confirm analysis options. Identical to the DoLoadFlow(False, False) call with no user interaction.

Returns:

True if the load flow converges, False on a non-convergence.

Return type:

bool

GetAnalysisDCLF()

Returns an IscAnalysisDCLF object which can be used to get and set the DC load flow analysis parameters.

Returns:

IscAnalysisDCLF object.

Return type:

IscAnalysisDCLF

DoDCLoadFlow()

Performs a DC load flow calculation while assuming you do not want to update the engines or results.

Returns:

True if the load flow converges, False on a non-convergence.

Return type:

bool

SetBranchStatus(nUID: int, nStatus: int) None

Changes the status of the branch or transformer UID in the calculation engine. This is a convenience function which can be used when performance is important and the branch status does not need to be stored with the network. Note: If the nUID is not a branch or transformer UID, it does nothing!

Parameters:
  • nUID (int) – The branch or transformer UID.

  • nStatus (int) – The status.

SetLoadStatus(nUID: int, nStatus: int) None

Changes the status of the load UID in the calculation engine. This is a convenience function which can be used when performance is important and the load status does not need to be stored with the network.

Parameters:
  • nUID (int) – The load UID.

  • nStatus (int) – The status.

SetLoadPower(nUID: int, dMW: float, dMVAr: float) None

Changes the power of the load UID in the calculation engine. This is a convenience function which can be used when performance is important and the load power does not need to be stored with the network.

Parameters:
  • nUID (int) – The load UID.

  • dMW (float) – The MW power.

  • dMVAr (float) – The MVAr power.

SetGeneratorStatus(nUID: int, nStatus: int) None

Changes the status of the generator UID in the calculation engine. This is a convenience function which can be used when performance is important and the generator status does not need to be stored with the network.

Parameters:
  • nUID (int) – The generator UID.

  • nStatus (int) – The status.

SetGeneratorPower(nUID: int, dMW: float, dMVAr: float) None

Changes the power of the generator UID in the calculation engine. This is a convenience function which can be used when performance is important and the generator power does not need to be stored with the network.

Parameters:
  • nUID (int) – The generator UID.

  • dMW (float) – The MW power.

  • dMVAr (float) – The MVAr power.

GetLoadFlowMessage() str

Returns the last load flow engine message.

Returns:

The last load flow engine message.

Return type:

str

SetEngineMessageSuppression(nLevel: int) None

Sets the verbosity of the load flow messages that are generated in the IPSA progress window. This can provide a speed improvement for complex scripts

  • 0 = Displays all messages

  • 1 = Shows only error messages

  • 2 = Shows no engine error messages

Parameters:

nLevel (int) – The verbosity of the load flow messages.

GetLFSummaryResults() None

Call this function to obtain the load flow summary results.

GetHighestBusbarVoltagePU() float

Returns the highest busbar voltage in per unit.

Returns:

The highest busbar voltage in per unit.

Return type:

float

GetLowestBusbarVoltagePU() float

Returns the lowest busbar voltage in per unit. GetLFSummaryResults()must be called first.

Returns:

The lowest busbar voltage in per unit.

Return type:

float

GetTotalGenerationOutputMW() float

Returns the total network generation real power, excluding slack generators, in MW. GetLFSummaryResults() must be called first.

Returns:

The total network generation real power, excluding slack generators, in MW.

Return type:

float

GetTotalGenerationOutputMVAr() float

Returns the total network generation reactive power, excluding slack generators, in MVAr. GetLFSummaryResults() must be called first.

Returns:

The total network generation reactive power, excluding slack generators, in MVAr.

Return type:

float

GetTotalLoadInputMW() float

Returns the total network load real power in MW. GetLFSummaryResults() must be called first.

Returns:

The total network load real power in MW.

Return type:

float

GetTotalLoadInputMVAr() float

Returns the total network load reactive power in MVAr. GetLFSummaryResults() must be called first.

Returns:

The total network load reactive power in MVAr.

Return type:

float

GetTotalInductionInputMW() float

Returns the total network induction motor real power in MW. GetLFSummaryResults() must be called first.

Returns:

The total network induction motor real power in MW.

Return type:

float

GetTotalInductionInputMVAr() float

Returns the total network induction motor load in MVAr. GetLFSummaryResults() must be called first.

Returns:

The total network induction motor load in MVAr.

Return type:

float

GetTotalUniMachineOutputMW() float

Returns the total network universal machine generation real power in MW. GetLFSummaryResults() must be called first.

Returns:

The total network universal machine generation real power in MW.

Return type:

float

GetTotalUniMachineOutputMVAr() float

Returns the total network universal machine generation reactive power in MVAr. GetLFSummaryResults() must be called first.

Returns:

The total network universal machine generation reactive power in MVAr.

Return type:

float

GetSlackOutputMW() float

Returns the total network slack generation real power in MW. GetLFSummaryResults() must be called first.

Returns:

The total network slack generation real power in MW.

Return type:

float

GetSlackOutputMVAr() float

Returns the total network slack generation reactive power in MVAr. GetLFSummaryResults() must be called first.

Returns:

The total network slack generation reactive power in MVAr.

Return type:

float

GetNumberOutsideLimits() int

Returns the number of busbars outside voltage limits plus the number of overloaded branches and transformers.

Returns:

The number of busbars outside voltage limits plus the number of overloaded branches and transformers.

Return type:

int

GetOutsideLimitText() str

Returns a string detailing the busbar, branch or transformer with the most excessive overload/overvoltage in percentage terms. GetNumberOutsideLimits() must be called first. The name returned is the Python name of the component, e.g. Busbar1.Busbar2.Transformer

Returns:

A string detailing the busbar, branch or transformer with the most excessive overload/overvoltage in percentage terms.

Return type:

str

AreLFLimitsIdentical() bool

Returns True if the LF limits are identical.

Returns:

True if the LF limits are identical.

Return type:

bool

SaveLFState() int

Saves the current LF state and returns a state handle to restore it with.

Returns:

State handle to restore the current LF state.

Return type:

int

RestoreLFState(nStateIndex: int) bool

Restore the LF state. This function can fail if the number of items in a network is different from when the state was saved, which can happen in a subtle way if zero impedance branches are switched in or out.

Parameters:

nStateIndex (int) – The state index.

Returns:

True if the restore operation succeeded.

Return type:

bool

DeleteAllLFStates() None

Delete all LF saved states.

IsComponentOutsideLimits(pComponent) int

Checks whether a given component has values within limits after a load flow has been run. The function returns 0 if the values are within limits, 1 if they are over limits and if they are under.

Parameters:

pComponent (IscNetComponent) – The component object to be checked.

Returns:

0 if it’s in limits, 1 if it is over limits and 2 if it is under limits.

Return type:

int

GetBusbarsOutsideLimits() Dict[int, bool]

Returns a dictionary of busbar UIDs that are outside voltage limits for the previous load flow study.

Returns:

A dictionary of busbar UIDs that are outside voltage limits for the previous load flow study.

Return type:

dict(int,bool)

GetBranchesOutsideLimits() Dict[int, bool]

Returns a dictionary of branch UIDs that are above their ratings for the previous load flow study.

Returns:

A dictionary of branch UIDs that are above their ratings for the previous load flow study.

Return type:

dict(int,bool)

GetTransformersOutsideLimits() Dict[int, bool]

Returns a dictionary of transformer UIDs that are above their ratings for the previous load flow study.

Returns:

A dictionary of transformer UIDs that are above their ratings for the previous load flow study.

Return type:

dict(int,bool)

RunArcFlashForBusbar(nBusbarUID: int, dBusFaultCurrentkA: float, dOperatingTimeSec: float) bool

Performs an ArcFlash calculation for a single busbar using the fault current in kA and the operating time. The default reduction for comparison is 15% less for the current and 2.5x the arc duration given.

Parameters:
  • nBusbarUID (int) – The UID of the selected busbar.

  • dBusFaultCurrentkA (float) – The fault current in kA.

  • dOperatingTimeSec (float) – The operating time in seconds.

Returns:

Returns True if it is successful.

Return type:

bool

RunTotalArcFlash(bRunIPSAFaultLevel: bool, dOperatingTimeSec: float, dReducedOperatingTimeSec: float) List[Dict[int, bool]]

Runs a thorough arc flash calculation for the whole network. Note that here either the analysis class default for the fault current calculation is used or IPSA can run a fault level to calculate the fault current at each busbar. Returns a list of pairs that map the UID to a boolean of whether the code ran correctly or not.

Parameters:
  • bRunIPSAFaultLevel (bool) – Variable denoting whether it runs the IPSA fault lever before the arc flash.

  • dOperatingTimeSec (float) – The operating time in seconds.

  • dReducedOperatingTimeSec (float) – The reduced operating time in seconds.

Returns:

A a list of pairs that map the UID to a boolean of whether the code ran correctly or not.

Return type:

list(dict(int,bool))

DoFlatStart(bSetBuses: bool, bSetTransformerTaps: bool, bSetIMSlips: bool) None

Runs a flatstart preparation for load flow depending on whether the user wants to flat start the busbar voltages, transformer tap positions, induction machine rotor slips or a combination of all 3.

Parameters:
  • bSetBuses (bool) – Enabling flat start for the busbar voltages.

  • bSetTransformerTaps (bool) – Enabling flat start for the transformer tap positions.

  • bSetIMSlips (bool) – Enabling flat start for the induction machine rotor slips.

GetAnalysisFL()

Returns an IscAnlaysisFL object which can be used to get and set the fault level analysis parameters.

Returns:

IscAnlaysisFL object.

Return type:

IscAnlaysisFL

DoFaultLevel() bool

Performs a fault level calculation.

Returns:

True if successful.

Return type:

bool

DoIECFaultLevel() bool

Performs an IEC 60909 fault calculation.

Returns:

True if successful.

Return type:

bool

GetAnalysisHM()

Returns an IscAnlaysisHM object which can be used to get and set the load flow analysis parameters.

Returns:

IscAnlaysisHM object.

Return type:

IscAnlaysisHM

DoHarmPenetration() bool

Performs a harmonic penetration calculation.

Returns:

True if successful.

Return type:

bool

DoHarmSensitivity() bool

Performs a harmonic voltage sensitivity calculation.

Returns:

True if successful.

Return type:

bool

DoStorageFlip(lGeneratorsUID: List[int]) None

Flips the storage of all defined Energy Storage units in the given list of UIDs.

Parameters:

lGeneratorsUID (list(int)) – The given list of generators UIDs.

DoSingleStorageFlip(nGeneratorUID: int) None

Flips the storage of the Energy Storage unit defined by its UID.

Parameters:

nGeneratorUID (int) – The generator UID.

DoGlobalStorageFlip(bFlipsImports: bool, bFlipExports: bool) None

Flips all the storage units defined in the network depending on whether you want to flip imports to exports or vice versa.

Parameters:
  • bFlipsImports (bool) – Variable denoting whether you want to flip imports to exports.

  • bFlipExports (bool) – Variable denoting whether you want to flip exports to imports.

GetLastSuccessfulAutomationUID() int

Returns the integer UID of the last successful automation. Note these are the UIDs of the automation not the study IDs.

Returns:

The last successful automation UID.

Return type:

int

GetLastSuccessfulContingencyUID() int

Returns the integer UID of the last successful contingency. Note these are the UIDs of the contingency not the study IDs.

Returns:

The last successful contingency UID.

Return type:

int

RunContingency(nUID: int, bUseProfiles: bool) None

Performs the contingency study identified by the integer UID.

Parameters:
  • nUID (int) – The contingency study UID.

  • bUseProfiles (bool) – If False then the contingency study is performed using the standard load and generator data. If True then the contingency study is performed using load and generator profiles assigned in the network. In this instance the switching operation is performed first followed by a load flow calculation for all of the profile categories.

CreateContingency(nDepth: int, bExtendToBreakers: bool) int

Creates a new contingency study and returns the UID of the study created. The depth of the study is configured as follows:

  • 1 = N - 1

  • 2 = N - 2

  • 3 = N - 3

  • 4 = N - 1 - 1

Parameters:
  • nDepth (int) – The depth of the study.

  • bExtendToBreakers (bool) – If False then individual branches and transfers are switched out during the study. If True then the nearest circuit breakers are switched out allowing multiple components to be switched for each study.

Returns:

The UID of the contingency created.

Return type:

int

CreateSpecificContingency(nDepth: int, bExtendToBreakers: bool, lBusbarsRequired) int

Will design and create a specific contingency of given depth with only the busbars defined by the given list.

Parameters:
  • nDepth (int) – The depth of the study.

  • bExtendToBreakers (bool) – If False then individual branches and transfers are switched out during the study. If True then the nearest circuit breakers are switched out allowing multiple components to be switched for each study.

  • lBusbarsRequired (list(IscBusbar)) – The specified list of busbars.

Returns:

The UID of the contingency created.

Return type:

int

GetStudies(nReportType: int) List[str]

Returns a list of strings containing the individual automation or contingency study titles.

Automation studies:
  • 100 = All studies in the order run

  • 101 = All solved studies in the order run

  • 102 = All solved studies listed by severity of overload

  • 103 = All solved studies listed by the number of items exceeding limits

  • 104 = All studies that failed to solve

Contingency studies:
  • 120 = All studies in the order run

  • 121 = All solved studies in the order run

  • 122 = All solved studies listed by severity of overload

  • 123 = All solved studies listed by the number of items exceeding limits

  • 124 = All studies that failed to solve

Parameters:

nReportType (int) – The index denoting an automation or a contingency study.

Returns:

The individual automation or contingency study titles.

Return type:

list(str)

GetStudyRowTitles(nReportType: int) str

Returns a string in html format for the table header row associated with the automation or contingency results.

Automation studies:
  • 100 = All studies in the order run

  • 101 = All solved studies in the order run

  • 102 = All solved studies listed by severity of overload

  • 103 = All solved studies listed by the number of items exceeding limits

  • 104 = All studies that failed to solve

Contingency studies:
  • 120 = All studies in the order run

  • 121 = All solved studies in the order run

  • 122 = All solved studies listed by severity of overload

  • 123 = All solved studies listed by the number of items exceeding limits

  • 124 = All studies that failed to solve

Parameters:

nReportType (int) – The index denoting an automation or a contingency study.

Returns:

String in html format.

Return type:

str

GetStudyRowOutput(nReportType: int, strStudyTitle: str) str

Returns a string in html format for the table rows associated with the specified automation or contingency study.

Automation studies:
  • 100 = All studies in the order run

  • 101 = All solved studies in the order run

  • 102 = All solved studies listed by severity of overload

  • 103 = All solved studies listed by the number of items exceeding limits

  • 104 = All studies that failed to solve

Contingency studies:
  • 120 = All studies in the order run

  • 121 = All solved studies in the order run

  • 122 = All solved studies listed by severity of overload

  • 123 = All solved studies listed by the number of items exceeding limits

  • 124 = All studies that failed to solve

Parameters:
  • nReportType (int) – The index denoting an automation or a contingency study.

  • strStudyTitle (str) – The specified automation or contingency study.

Returns:

String in html format.

Return type:

str

GetStudyIDs(nReportType: int) List[int]

Returns a list containing the individual automation or contingency study IDs.

Automation studies:
  • 100 = All studies in the order run

  • 101 = All solved studies in the order run

  • 102 = All solved studies listed by severity of overload

  • 103 = All solved studies listed by the number of items exceeding limits

  • 104 = All studies that failed to solve

Contingency studies:
  • 120 = All studies in the order run

  • 121 = All solved studies in the order run

  • 122 = All solved studies listed by severity of overload

  • 123 = All solved studies listed by the number of items exceeding limits

  • 124 = All studies that failed to solve

Parameters:

nReportType (int) – The index denoting an automation or a contingency study.

Returns:

The individual automation or contingency study IDs.

Return type:

list(int)

GetContingencyStudyItemResults(nStudyID: int) Dict[int, int]

Returns a dict of the component UIDs to the result ID for each component for the study with the given ID. The result IDs can be understood as followed:

  • 1 = Busbar over voltage (balanced or unbalanced)

  • 2 = Busbar under voltage (balanced or unbalanced)

  • 3 = Branch over rating (balanced or unbalanced)

  • 4 = Transformer over rating (2- or 3- winding, or unbalanced)

  • 0 = Otherwise

Parameters:

nStudyID (int) – The contingency study ID.

Returns:

The map of the component UIDs to the result IDs for the contingency study ID.

Return type:

dict[int, int]

GetAutomationStudyItemResults(nStudyID: int) Dict[int, int]

Returns a dict of the component UIDs to the result ID for each component for the study with the given ID. The result IDs can be understood as followed:

  • 1 = Busbar over voltage (balanced or unbalanced)

  • 2 = Busbar under voltage (balanced or unbalanced)

  • 3 = Branch over rating (balanced or unbalanced)

  • 4 = Transformer over rating (2- or 3- winding, or unbalanced)

  • 0 = Otherwise

Parameters:

nStudyID (int) – The automation study ID.

Returns:

The map of the component UIDs to the result IDs for the automation study ID.

Return type:

dict[int, int]

GetStudyProfileIndex(nStudyID: int) int

Returns the profile category index associated with the contingency or automation study. This is used to identify which profile category is associated with the study ID.

Parameters:

nStudyID (int) – The study ID.

Returns:

The profile category index associated with the contingency or automation study.

Return type:

int

GetStudyItemsSwitchedOutUIDs(nStudyID: int) List[int]

Returns a list of integers containing the component UIDs for switched out components in contingency study ID.

Parameters:

nStudyID (int) – The contingency study ID.

Returns:

The component UIDs for switched out components in contingency study ID.

Return type:

list(int)

GetContingencyStudyResultMagnitude(nStudyID: int, nResultID: int) float

Returns the result magnitude for the result ID in contingency study ID. The nResultID is obtained from the GetContingencyStudyItemResults function. For busbars the return value is the per unit busbar voltage. For branches and transformers the return value is the largest power flow in MVA.

Parameters:
  • nStudyID (int) – The contingency study ID.

  • nResultID (int) – The result ID.

Returns:

The result magnitude for the result ID in contingency study ID.

Return type:

float

GetContingencyStudyDynamicallyOverloadedUIDs(nStudyID: int) List[int]

Returns a list of integers which represent lines which are overloaded due to the action of a dynamic rating plugin. Dynamic rating plugins can be used to model the thermal response of OHLs, transformers and cables and provide ratings which are based on these models. The normal IPSA rating of a component is overridden if it has a dynamic rating plugin applied. In this case this function returns the UIDs of all such overloaded components in contingency study ID.

Parameters:

nStudyID (int) – The contingency study ID.

Returns:

The lines which are overloaded due to the action of a dynamic rating plugin.

Return type:

list(int)

GetContingencyBranchRatingIndex() int

Returns the IPSA rating index of the rating set used during the contingency study.

Returns:

The IPSA rating index.

Return type:

int

GetProtectionDeviceSettings(nProtectionDeviceUID: int) List[str]

Generates the protection devices details for the protection device indicated by the UID. The data is formatted as a list containing the html table filled with the settings, as presented in the protection settings report. Note this formatting may be updated in the future.

Parameters:

nProtectionDeviceUID (int) – The UID of the protection device of interest.

Returns:

The protection device settings in an html table.

Return type:

list(str)

GetAllProtectionDeviceSettings() List[str]

Generates the protection devices details for all the protection devices. The data is formatted as a list containing the html tables filled with the settings, as presented in the protection settings report. Note this formatting may be updated in the future.

Returns:

All the protection device settings as a list of html tables.

Return type:

list(str)

RunReliability() bool

Performs the reliability study on the current network.

Returns:

True if successful.

Return type:

bool

GetReliabilityCI() float

Returns the customer interruptions (CI) for the full network.

Returns:

The customer interruptions (CI) for the full network.

Return type:

float

GetReliabilityCML() float

Returns the customer minutes lost (CMLs) for the full network.

Returns:

The customer minutes lost (CMLs) for the full network.

Return type:

float

GetReliabilitySAIFI() float

Returns the system average interruption frequency index (SAIFI) for the full network.

Returns:

The system average interruption frequency index (SAIFI) for the full network.

Return type:

float

GetReliabilityASIFI() float

Returns the average service interruption frequency index (ASIFI) for the full network.

Returns:

The average service interruption frequency index (ASIFI) for the full network.

Return type:

float

GetReliabilitySAIDI() float

Returns the system average interruption duration index (SAIDI) for the full network.

Returns:

The system average interruption duration index (SAIDI) for the full network.

Return type:

float

GetReliabilityCAIDI() float

Returns the customer average interruption duration index (CAIDI) for the full network.

Returns:

The customer average interruption duration index (CAIDI) for the full network.

Return type:

float

GetReliabilityASIDI() float

Returns the average system interruption duration index (ASIDI) for the full network.

Returns:

The average system interruption duration index (ASIDI) for the full network.

Return type:

float

GetReliabilityASAI() float

Returns the average service availability index (ASAI) for the full network.

Returns:

The average service availability index (ASAI) for the full network.

Return type:

float

GetReliabilityASUI() float

Returns the average service unavailability index (ASUI) for the full network.

Returns:

The average service unavailability index (ASUI) for the full network.

Return type:

float

GetBusbarsWithArcFlashResults() List[int]

Returns a list of busbar UIDs which have arc flash results. This is then used to get arc flash results for individual busbars.

Returns:

Busbar UIDs which have arc flash results.

Return type:

list(int)

GetArcFlashCSV(nBusbarUID: int, bUseLegacyStandard: bool) str

Creates a CSV result for a given busbar arcflash calculation and uses the 2018 standard if bUseLegacyStandard is set to False.

Parameters:
  • nBusbarUID (int) – The busbar UID.

  • bUseLegacyStandard (bool) – Variable denoting whether the legacy standard used.

Returns:

The CSV result for a given busbar arcflash calculation.

Return type:

str

GetTotalArcFlashCSV() str

Returns total CSV formatted function for ArcFlash results from all busbars.

Returns:

The total CSV formatted function for ArcFlash results from all busbars.

Return type:

str

GetArcFlashReportText(nUID: int) str

Returns a string containing the arc flash result for the busbar identified by the UID.

Parameters:

nUID (int) – The busbar ID.

Returns:

The average service unavailability index (ASUI) for the full network.

Return type:

str

GetAnalysisAF()

Returns an IscAnalysisAF object which can be used to get and set the ArcFlash analysis parameters.

Returns:

IscAnlaysisAF object.

Return type:

IscAnlaysisAF

SetBusbarOverloadLimits(dBusVoltHighPU: float, dBusVoltlowPU: float) None

Sets the network global high and low limits for busbar overloads.

Parameters:
  • dBusVoltHighPU (float) – The high limit for busbar overloads in per unit.

  • dBusVoltlowPU (float) – The low limit for busbar overloads in per unit.

SetBranchOverloadLimits(dBranchRatingHighPC: float, dBranchRatingLowPC: float, nRatingIndex: int) None

Sets the network global percentage ratings for branches with a given rating index that is lifted from IscBranch (i.e., Standard, Summer, Winter, Short).

Parameters:
  • dBranchRatingHighPC (float) – The high network global percentage rating limit.

  • dBranchRatingLowPC (float) – The low network global percentage rating limit.

  • nRatingIndex (int) – The given rating index.

GetNetworkCapacity()

Returns an IscNetworkCapacity object, which can be used to get and set the Network Capacity parameters and results.

Returns:

IscNetworkCapacity object.

Return type:

IscNetworkCapacity

DoNetworkCapacity() bool

Performs the Network Capacity tool on the network.

Returns:

True if successful.

Return type:

bool

SetBranchOverloadIndex(nRatingIndex: int)

Sets the branch index rating only and doesn’t change the percentages (branch percentages not useful in Network Capacity).

Parameters:

nRatingIndex (int) – The given rating index.

SetNetworkCapacityLimits(dHighVPU: float, dLowVPU: float, nRatingIndex: int)

Sets the over and under voltages and the branch index - three limit factors that are important to customise before using the Network Capacity tool.

Parameters:
  • dHighVPU – The defined overvoltage in per unit.

  • dLowVPU – The defined undervoltage in per unit.

  • nRatingIndex (int) – The given rating index.

Profile Class Functions

The functions for the 5 profile classes (IscLoadProfilePQActual, IscLoadProfilePQScale, IscGeneratorProfilePQActual, IscGeneratorProfilePQScale, IscUMachineProfilePQActual) are as follows:

class ipsa.Isc__ProfilePQ__

Provides access to the actual given profile class.

SetName(strName: str) bool

Sets the name as a string.

Parameters:

strName (str) – The selected string name.

Returns:

True if successful.

Return type:

bool

SetCategoryNames(dictCategories: Dict[int, str]) None

Sets up the profile categories for the profile instance. The dictionary should comprise a set of integer keys and string values. The string values are used as the individual category labels whilst the integer keys are only used internally. It is recommended that the keys are numbered sequentially starting from 0.

For example, passing the following dictionary would add 3 categories to the profile with the strings as the categories:

categories = {0: “00:00”, 1: “00:30”, 2: “01:00”}

Parameters:

dictCategories (dict(int,str)) – The profile categories for the profile instance.

GetCategoryNames() Dict[int, str]

Returns the profile categories for the profile instance. The string values are used as the individual category labels whilst the integer keys are only used internally.

Returns:

The profile categories for the profile instance.

Return type:

dict(int,str)

SetPMW(dictCategoryToMW: Dict[int, float]) None

Assigns MW values to the profile categories. The dictionary should comprise a set of integer keys and float values. The float values are the MW data values whilst the integer keys should be identical to those being used when defining the categories. For scaling profiles the values are the per unit scaling values. For example, passing the following dictionary would set the MW data:

dictCategoryToMW = {0: 1.23, 1: 3.73, 2: 5.67}

Parameters:

dictCategoryToMW (dict(int,float)) – MW or pu values to the profile categories.

GetPMW() Dict[int, float]

Returns the MW values assigned to the profile categories. The float values are the MW data values whilst the integer keys should be identical to those used defining the categories. For scaling profiles the values are the per unit scaling values.

Returns:

MW or pu values to the profile categories.

Return type:

dict(int,float)

SetQMVAr(dictCategoryToMVAr: Dict[int, float]) None

Assigns MVAr values to the profile categories. The dictionary should comprise a set of integer keys and float values. The float values are the MVAr data values whilst the integer keys should be identical to those being used when defining the categories. For scaling profiles the values are the per unit scaling values. For example, passing the following dictionary would set the MVAr data:

dictCategoryToMVAr = {0: 1.23, 1: 3.73, 2: 5.67}

Parameters:

dictCategoryToMVAr (dict(int,float)) – MVAr or pu values to the profile categories.

GetQMVAr(dictCategoryToMVAr: Dict[int, float]) None

Returns the MVAr values assigned to the profile categories. The float values are the MVAr data values whilst the integer keys should be identical to those used defining the categories. For scaling profiles the values are the per unit scaling values.

Returns:

MVAr or pu values to the profile categories.

Return type:

dict(int,float)