Open SanPen opened 1 year ago
I assume you are attempting to avoid having a dependency on pandapower? If that is not the case it would be far simpler to work with data from the pandas dataframes when they are loaded in pandapower.
The structure in the json matches the structure of the corresponding element in the pandapower documentation. From that you can see how the indeces are used.
From the Documentation of net.line: Parameter | Datatype | Value Type | Explanation |
---|---|---|---|
from_bus* | integer | Index of bus where the line starts | |
to_bus* | integer | Index of bus where the line ends |
the integers stored there are an index of the net.bus
dataframe.
For the net.trafo table accordingly there exists: Parameter | Datatype | Value Range | Explanation |
---|---|---|---|
hv_bus* | integer | high voltage bus index of the transformer | |
lv_bus* | integer | low voltage bus index of the transformer |
There is no direct correlation of the index of a line or trafo to a index of a bus.
Indices have nothing to do with the name of a bus. If the bus is named "Bus 0" that does not mean it has index 0. Sorting by name vs sorting by index thus may result in different sequences. Names are for better Identification by the user. They should not be used to match up the data from the different dataframes.
Hi folks,
I'm writing a GridCal backend for Grid2Op and I need to read your json format (this file particularly)
In the file, the line and transformer indices don't seem to match the bus indices or the bus names properly.
The function I'm using is this:
When applied, the computed conductance matrix is:
However the hugely verified one is this:
Observe the index shuffling.
So my question is, how do you assign the bus indices and what is the relation to those in the loads, generators, etc..
Thanks!