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

feat: add function to create transformers within substations #218

Merged
merged 2 commits into from
Sep 10, 2021

Conversation

danielolsen
Copy link
Contributor

@danielolsen danielolsen commented Sep 8, 2021

Pull Request doc

Purpose

Closes #206. This is a draft PR right now, since it relies on code from #210. It could also become part of #210.

What the code is doing

Using buses, grouped by substation, for each substation with more than one bus, a transformer is added between the highest-voltage bus in the substation and each other bus. This is an arbitrary topology that seems reasonable enough, although it is by no means the best one.

Testing

A new unit test is added which covers the bases of: no transformers within a substation, one transformer within a substation, multiple transformers within a substation.

Usage Example

>>> from prereise.gather.griddata.hifld.data_process.transmission import (
...     build_transmission,
...     create_buses,
...     create_transformers,
... )
>>> lines, substations = build_transmission()
dropping 6892 substations of 70857 total due to LINES parameter equal to 0
dropping 759 lines with one or more substations listed as 'NOT AVAILABLE' out of a starting total of 71554
dropping 3143 lines with one or more substations not found in substations table out of a starting total of 70795
Evaluating endpoint location mismatches... (this may take several minutes)
dropping 120 lines with one or more substations with non-matching coordinates out of a starting total of 67652
dropping 143 lines with matching SUB_1 and SUB_2 out of a starting total of 67532
2119 line voltages can't be found via neighbor consensus
310 line voltages can't be found via neighbor minimum
>>> bus, bus2sub = create_buses(lines)
>>> transformers = create_transformers(bus, bus2sub)
>>> transformers
      from_bus_id  to_bus_id
0               0          1
1               2          3
2               5          6
3              12         13
4              20         21
...           ...        ...
5394        58235      58236
5395        58239      58240
5396        58246      58247
5397        58258      58259
5398        58262      58263

[5399 rows x 2 columns]

Time estimate

15 minutes.

@danielolsen danielolsen self-assigned this Sep 8, 2021
@danielolsen danielolsen force-pushed the daniel/hifld_create_transformers branch 2 times, most recently from 1c4c0cd to 2b8cb34 Compare September 8, 2021 21:40
@danielolsen danielolsen force-pushed the daniel/hifld_create_bus_table branch from 6716ebb to 53e2296 Compare September 9, 2021 15:56
Base automatically changed from daniel/hifld_create_bus_table to hifld September 9, 2021 16:01
@danielolsen danielolsen force-pushed the daniel/hifld_create_transformers branch from 2b8cb34 to b01ffe1 Compare September 9, 2021 16:03
@danielolsen danielolsen marked this pull request as ready for review September 9, 2021 16:05
@danielolsen
Copy link
Contributor Author

With #210 merged, this is now ready for a full review.

Copy link
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danielolsen danielolsen added the hifld Related to ingestion of the HIFLD data label Sep 9, 2021
@danielolsen danielolsen merged commit 4784204 into hifld Sep 10, 2021
@danielolsen danielolsen deleted the daniel/hifld_create_transformers branch September 10, 2021 14:20
danielolsen added a commit that referenced this pull request Sep 22, 2021
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Dec 8, 2021
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Jan 5, 2022
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Jan 8, 2022
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Jan 31, 2022
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Feb 25, 2022
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Mar 15, 2022
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Apr 1, 2022
…transformers

feat: add function to create transformers within substations
danielolsen added a commit that referenced this pull request Apr 5, 2022
…transformers

feat: add function to create transformers within substations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hifld Related to ingestion of the HIFLD data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants