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

found out load/gen buses doesn't include the index in the data frame....

found out load/gen buses doesn't include the index in the data frame. Thinkning if this need to be fixed or not.

Signed-off-by: default avatarTaeyoung Kim <taeyoung.kim@eonerc.rwth-aachen.de>
parent 59668031
No related branches found
No related tags found
No related merge requests found
bus.csv 0 → 100644
index,type,name,voltage,voltage_pu,base_voltage,base_current,power,power_pu,base_apparent_power,uuid,ideal_connected_with
0,3,busbar-AD102000201CSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,0j,0j,25,_d7b675ce-e46a-11ef-9750-9c2dcdd0b0d4,
1,3,busbar-AD102002005NSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.15135-0.0454j),(-0.006054-0.0018160000000000001j),25,_d7b6efb5-e46a-11ef-9ddd-9c2dcdd0b0d4,
2,3,busbar-AD102000268CSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.13012-0.03903j),(-0.005204800000000001-0.0015612j),25,_d7b716af-e46a-11ef-9a45-9c2dcdd0b0d4,
3,1,busbar-AD001090024254_AD102425N-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,0j,0j,25,_d7b73dac-e46a-11ef-9fff-9c2dcdd0b0d4,
4,3,busbar-AD102005376CSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.18562-0.05569j),(-0.0074248000000000005-0.0022276j),25,_9246cec5-e468-11ef-b682-9c2dcdd0b0d4,
5,3,busbar-AD102005220NSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,0j,0j,25,_92463281-e468-11ef-b80d-9c2dcdd0b0d4,
6,3,busbar-AD102005097CSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,0j,0j,25,_92476c85-e468-11ef-a56e-9c2dcdd0b0d4,
7,3,busbar-AD102005377CSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.00293-0.00088j),(-0.00011719999999999999-3.52e-05j),25,_924659a9-e468-11ef-9687-9c2dcdd0b0d4,
8,3,busbar-AD102005094CSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.00092-0.00028j),(-3.68e-05-1.12e-05j),25,_9246cec3-e468-11ef-b316-9c2dcdd0b0d4,
9,3,busbar-AD102005076NSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.17043-0.05113j),(-0.0068172-0.0020452j),25,_92460b78-e468-11ef-bfa2-9c2dcdd0b0d4,
10,3,busbar-AD102005297NSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.00108-0.00032j),(-4.32e-05-1.2800000000000001e-05j),25,_924659a7-e468-11ef-9aaf-9c2dcdd0b0d4,
11,1,busbar-AD001090060253_AD106025N-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,0j,0j,25,_9246f5ca-e468-11ef-9c0e-9c2dcdd0b0d4,
12,3,busbar-AD102005015NSA-8.4kV,(8.4+0j),(1+0j),8.4,1.7183043725881721,(-0.00293-0.00088j),(-0.00011719999999999999-3.52e-05j),25,_9246a7b7-e468-11ef-90be-9c2dcdd0b0d4,
INFO:cimpy.cimimport:START of parsing file "c:\Users\tki\Local\CIM_Read\pyvolt-docker\examples\sample_data\AD102425N.xml"
INFO:cimpy.cimimport:START of parsing file "c:\Users\tki\Local\CIM_Read\pyvolt-docker\examples\sample_data\AD106025N.xml"
INFO:cimpy.cimimport:END of parsing file "c:\Users\tki\Local\CIM_Read\pyvolt-docker\examples\sample_data\AD102425N.xml"
INFO:cimpy.cimimport:END of parsing file "c:\Users\tki\Local\CIM_Read\pyvolt-docker\examples\sample_data\AD106025N.xml"
INFO:cimpy.cimimport:START of parsing file "/home/ubuntu/code/CIM_Read/pyvolt-docker/examples/sample_data/AD102425N.xml"
INFO:cimpy.cimimport:START of parsing file "/home/ubuntu/code/CIM_Read/pyvolt-docker/examples/sample_data/AD106025N.xml"
INFO:cimpy.cimimport:END of parsing file "/home/ubuntu/code/CIM_Read/pyvolt-docker/examples/sample_data/AD102425N.xml"
INFO:cimpy.cimimport:END of parsing file "/home/ubuntu/code/CIM_Read/pyvolt-docker/examples/sample_data/AD106025N.xml"
WARNING:cimpy.cimimport:Package information not found for class type : 275 times
WARNING:cimpy.cimimport:Package information not found for class SvPowerFlow, attribute p : 11 times
WARNING:cimpy.cimimport:Package information not found for class SvPowerFlow, attribute q : 11 times
......@@ -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.03297877311706543s
INFO:cimpy.cimimport:Created totally 275 CIM objects in 0.02631092071533203s
......@@ -56,7 +56,7 @@ class PPexporter(Exporter):
voltage_pu = node.voltage_pu#
df.loc[k]=[
index, bus_type, name, voltage, voltage_pu, baseVoltage, base_current, power, power_pu, base_apparent_power, uuid, ideal_connected_with
int(index), bus_type, name, voltage, voltage_pu, baseVoltage, base_current, power, power_pu, base_apparent_power, uuid, ideal_connected_with
]
return df
......@@ -88,17 +88,18 @@ class PPexporter(Exporter):
index = k #
df.loc[k]=[
index, start_node_index, end_node_index, r, r_pu, x, x_pu, y, y_pu, z, z_pu, baseVoltage, base_apparent_power, base_current, base_impedance, uuid
int(index), int(start_node_index), int(end_node_index), r, r_pu, x, x_pu, y, y_pu, z, z_pu, baseVoltage, base_apparent_power, base_current, base_impedance, uuid
]
return df
def createLoads(self):
"""
this file create Loads dataframe from read CIM file
this file create Loads dataframe from read CIM file.
For now, it skips whole index when it is not PQ bus, which means, when there is no PQ bus at index 3, dataframe[3] is not exist.
"""
df = pd.DataFrame(columns = ["index", "bus_index", "power", "power_pu", "power_real","power_imag", "power_pu_real","power_pu_imag"])
for k,node in enumerate(self.node):
if node.type.value == 3:
if node.type.value == 3: #We only look PQ bus
baseVoltage = node.baseVoltage#
base_apparent_power = node.base_apparent_power#
base_current = node.base_current#
......@@ -120,17 +121,18 @@ class PPexporter(Exporter):
load_index = k
df.loc[k] = [
load_index, index, power, power_pu, power_real, power_imag, power_pu_real, power_pu_imag
int(load_index), int(index), power, power_pu, power_real, power_imag, power_pu_real, power_pu_imag
]
return df
def createGens(self):
"""
this function create generation dataframe from read CIM file.
For now, it skips whole index when it is not PQ bus, which means, when there is no PQ bus at index 3, dataframe[3] is not exist.
"""
df = pd.DataFrame(columns = ["index", "bus_index", "power", "power_pu", "power_real","power_imag", "power_pu_real","power_pu_imag"])
for k, node in enumerate(self.node):
if node.type.value == 2:
if node.type.value == 2: #We only look PV bus
baseVoltage = node.baseVoltage#
base_apparent_power = node.base_apparent_power#
base_current = node.base_current#
......@@ -152,7 +154,7 @@ class PPexporter(Exporter):
load_index = k
df.loc[k] = [
load_index, index, power, power_pu, power_real, power_imag, power_pu_real, power_pu_imag
int(load_index), int(index), power, power_pu, power_real, power_imag, power_pu_real, power_pu_imag
]
return df
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment