feat/data: update HIFLD data to April 2022 version, refactor line assignment#289
Merged
danielolsen merged 17 commits intohifldfrom May 11, 2022
Merged
feat/data: update HIFLD data to April 2022 version, refactor line assignment#289danielolsen merged 17 commits intohifldfrom
danielolsen merged 17 commits intohifldfrom
Conversation
jenhagg
reviewed
Apr 9, 2022
| raise ValueError("Interconnections were not separated successfully") | ||
| interconnect_sizes = [len(c) for c in sorted_interconnects] | ||
| raise ValueError( | ||
| f"Interconnections were not separated successfully {interconnect_sizes}" |
Collaborator
There was a problem hiding this comment.
Just realized we require python 3.8 now, so we can add the equals sign to print name=value, e.g.
In [1]: x = [1,2]
In [2]: f"wow so cool {x=}"
Out[2]: 'wow so cool x=[1, 2]'
867a7d2 to
94f6245
Compare
b2594d1 to
c220149
Compare
89c7873 to
a83c3da
Compare
rouille
reviewed
May 2, 2022
rouille
reviewed
May 2, 2022
rouille
reviewed
May 2, 2022
| .round({"VOLTAGE": 3}) | ||
| ) | ||
| # Drop columns which aren't relevant to us. Some names are inconsistent b/w versions | ||
| shape_lengths = {"SHAPE_Length", "SHAPE__Length"} |
Collaborator
There was a problem hiding this comment.
Indeed. And this looks familiar to me which reminds me the days playing with country names from different datasets.
BainanXia
reviewed
May 2, 2022
BainanXia
reviewed
May 2, 2022
Contributor
Author
a83c3da to
9aca491
Compare
rouille
reviewed
May 9, 2022
9aca491 to
9152bd1
Compare
9152bd1 to
caeb98f
Compare
caeb98f to
a2df748
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request doc
Purpose
What the code is doing
load.py, we're a bit more accommodating of the inconsistent naming of the Shape Length columns that we want to drop.topology.py, we make sure that we tag all of the separated/reconnected lines with their appropriate interconnects.transmission.py:map_lines_to_substations_using_coordsfunction so that if there are no substations 'close' to a line's endpoint (as defined by our new optional parameter), we create a new proxy substation for it. We do the KDTree/query process twice, where the first time just collects a list of transmission line endpoints with no substation, then we add proxy substations, and the second time we actually re-map all the lines.LINES= 0, since this information seems to be very noisy.Testing
Tested manually to generate static grid components.
The resulting static grid components haven't been tested for network feasibility yet, so we may also need to update some of the line assumptions that were introduced in #276.EDIT: update: the results of this new code have been tested alongside the new code in #286 and new line/substation assumptions have been added which seem to ensure generator-side feasibility.Usage Example/Visuals
The call signature to
map_lines_to_substations_using_coordsremains the same, we just add one more optional parameter that controls how far away from any substation a line's endpoint can be before we create a new proxy substation for it (instead of connecting it to an existing one).Time estimate
30 minutes? The code changes are fairly light, most of the changes are in the constants which required a tedious guess-and-check process.
This is a draft PR for now, since the functionality depends partially on #283, and since we may want to make some modifications to the underlying logic, but the code that's here creates the interconnections as we expect.EDIT: #283 is merged, so this is ready to go.