Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default attributes of pypowsybl df to be based on the topology model (Node-Breaker or BB) #600

Open
AnkurArohi opened this issue Apr 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@AnkurArohi
Copy link

AnkurArohi commented Apr 28, 2023

Describe the current behavior

currently when user wants to create a load at one of the transformer busses, there is an error that the node should be specified as the current voltage level id is of node breaker type.

The whole network is in node breaker type but the transformer df has bus1 and bus2, both of the voltage levels are node breaker type so I was expecting node1 and node2 instead of busses.

Nevertheless, I tried to still create the load at one of the busses of the trafo which lead to the following error

*** pypowsybl._pypowsybl.PyPowsyblError: Load 'LOAD-1': voltage level --vlevel-- has a node/breaker topology, a node connection should be specified instead of a bus connection

Next I tried to get the node breaker topology and then the nodes for the same voltage level id this leads to empty string series

(Pdb) for id,ds in net.get_2_windings_transformers().loc[trafo_matches][["bus2_id","voltage_level2_id"]].iterrows(): net.create_loads(id='LOAD-1', voltage_level_id=ds.voltage_level2_id, node=ds.bus2_id, p0=10, q0=3)
*** pypowsybl._pypowsybl.PyPowsyblError: Data of column "node" has the wrong type, expected int

(Pdb) net.get_node_breaker_topology('--vlevel--').nodes
connectable_id
node
0
1
2
3
4
5
6
7
8
9
10
11
12
13 someid-non-int
14 someid-non-int
15 someid-non-int
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 someid-non-int
47 someid-non-int

Describe the expected behavior

The problem is actually solved when one provides all_attributes=True as a parameter in the get function but if we have a node breaker topology one should by default return the nodes and not the busses when calling that function.
This should be corrected according to me because it is not so intuitive.

Ideally the node breaker topology voltage level id should not have bus ids in transformers df or any other df, when then atleast also the nodes should be present in the df.

creating the loads should function as described in the documentation

Describe the steps

  • load a network

  • take the voltage level 2 of trafo and bus2_id

  • use the following to create a load

  • for id,ds in net.get_2_windings_transformers().loc[trafo_matches][["bus2_id","voltage_level2_id"]].iterrows(): net.create_loads(id='LOAD-1', voltage_level_id=ds.voltage_level2_id,
    bus_id=ds.bus2_id, p0=10, q0=3)

  • try this

  • net.get_node_breaker_topology(' --vlevel-- ').nodes

Environment

  • fedora
  • pypowsybl 0.19

Relevant Log Output

No response

Extra Information

No response

@AnkurArohi AnkurArohi added the bug Something isn't working label Apr 28, 2023
@AnkurArohi AnkurArohi changed the title creating load leads to error, get_node_breaker_topology for voltage level id has empty strings creating load leads to error, get_node_breaker_topology for voltage level id has empty strings (solved using all_attributes=True in func parameter) May 5, 2023
@AnkurArohi AnkurArohi added enhancement New feature or request and removed bug Something isn't working labels May 5, 2023
@AnkurArohi AnkurArohi changed the title creating load leads to error, get_node_breaker_topology for voltage level id has empty strings (solved using all_attributes=True in func parameter) Default attributes of pypowsybl df to be based on the topology model (Node-Breaker or BB) Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant