Skip to content
Snippets Groups Projects
Commit 3e44faf2 authored by Taeyoung Kim's avatar Taeyoung Kim
Browse files

changing network.py to extract line length

parent 29f5fc46
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ INFO:cimpy.cimimport:CIM object Line created : 11 times
INFO:cimpy.cimimport:CIM object SubGeographicalRegion created : 2 times
INFO:cimpy.cimimport:CIM object BusbarSection created : 13 times
INFO:cimpy.cimimport:CIM object TopologicalIsland created : 2 times
INFO:cimpy.cimimport:Created totally 275 CIM objects in 0.02504444122314453s
INFO:cimpy.cimimport:Created totally 275 CIM objects in 0.02340245246887207s
WARNING:pandapower.auxiliary:numba cannot be imported and numba functions are disabled.
......
......@@ -597,7 +597,7 @@ class PandapowerWork(Exporter):
length_km= 1,
r_ohm_per_km= branch['r'],
x_ohm_per_km=branch['x'],
c_nf_per_km= branch['c']*(1e6),
c_nf_per_km= branch['c']*(1e3),
name= lcl_name,
max_i_ka = branch['base_current'])
......
......@@ -40,7 +40,7 @@ class Node():
class Branch():
def __init__(self, uuid='', r=0.0, x=0.0, start_node=None, end_node=None,
base_voltage=1.0, base_apparent_power=1.0):
base_voltage=1.0, base_apparent_power=1.0, length=0.0):
self.uuid = uuid
self.baseVoltage = base_voltage
self.base_apparent_power = base_apparent_power
......@@ -56,6 +56,7 @@ class Branch():
self.x_pu = x / self.base_impedance
self.z_pu = self.r_pu + 1j * self.x_pu
self.y_pu = 1 / self.z_pu if (self.z_pu != 0) else float("inf")
self.length = length
def __str__(self):
string = 'class=Branch\n'
......@@ -223,7 +224,7 @@ class System():
base_voltage = ACLineSegment.BaseVoltage.nominalVoltage
self.branches.append(Branch(uuid=uuid_ACLineSegment, r=ACLineSegment.r, x=ACLineSegment.x,
start_node=start_node, end_node=end_node,
base_voltage=base_voltage, base_apparent_power=base_apparent_power))
base_voltage=base_voltage, base_apparent_power=base_apparent_power, length=ACLineSegment.length))
#create branches type powerTransformer
for power_transformer in list_PowerTransformer:
......
......@@ -76,6 +76,6 @@ INFO:cimpy.cimimport:CIM object Line created : 11 times
INFO:cimpy.cimimport:CIM object SubGeographicalRegion created : 2 times
INFO:cimpy.cimimport:CIM object BusbarSection created : 13 times
INFO:cimpy.cimimport:CIM object TopologicalIsland created : 2 times
INFO:cimpy.cimimport:Created totally 275 CIM objects in 0.04641366004943848s
INFO:cimpy.cimimport:Created totally 275 CIM objects in 0.038202524185180664s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment