Skip to content

NetworkLV

Low-voltage network model supporting unbalanced analysis.

Import

python
from pyptp import NetworkLV

Quick Start

python
# Load from file
network = NetworkLV.from_file("input.gnf")

# Access elements
for node in network.nodes.values():
    print(node.general.name)

# Save to file
network.save("output.gnf")

Properties

The network's global properties are stored in the properties attribute:

Element Collections

The network stores elements in typed collections:

Dict Collections

Elements indexed by key (typically GUID):

CollectionKey TypeElement Type
framesGuidFrameLV
profilesGuidProfileLV
gmtypesintGMTypeLV
sheetsGuidSheetLV
nodesGuidNodeLV
cablesGuidCableLV
linksGuidLinkLV
homesGuidConnectionLV
legendsGuidLegendLV
sourcesGuidSourceLV
fusesGuidFuseLV
transformersGuidTransformerLV
special_transformersGuidSpecialTransformerLV
reactance_coilsGuidReactanceCoilLV
syn_generatorsGuidSynchronousGeneratorLV
async_generatorsGuidAsynchronousGeneratorLV
async_motorsGuidAsynchronousMotorLV
earthing_transformersGuidEarthingTransformerLV
shunt_capacitorsGuidShuntCapacitorLV
batteriesGuidBatteryLV
loadsGuidLoadLV
circuit_breakersGuidCircuitBreakerLV
pvsGuidPVLV
load_switchesGuidLoadSwitchLV
measure_fieldsGuidMeasureFieldLV

List Collections

Elements stored in ordered lists:

CollectionElement Type
commentsCommentLV
selectionsSelectionLV

Methods

Class Methods

MethodDescription
from_file(path: str | Path) -> NetworkLVCreate LV network from GNF file.

Instance Methods

MethodDescription
delete_transformer(guid: str) -> boolRemove transformer from network by GUID string.
get_cable_guid_by_name(name: str) -> strFind cable GUID by name.
get_link(guid: Guid) -> LinkLV | NoneFind link by GUID.
get_node_guid_by_name(name: str) -> strFind node GUID by name.
get_sheet_guid_by_name(name: str) -> strFind sheet GUID by name.
get_transformer(guid: str) -> TransformerLV | NoneFind transformer by GUID string.
save(path: str | Path) -> NoneSave network to GNF file.