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: calculate interzone capacity #504

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

ywang303
Copy link
Contributor

@ywang303 ywang303 commented Jun 16, 2021

Pull Request doc

Purpose

The method calculates the aggregate transmission capacity (from + to) at zone level for each zone id. It is implemented in a similar way as "calculate_substation_capacity" method, but mapping for zone level.

What the code is doing

  • assign corresponding zone_id to the ends of each branch according to 'from_bus_id' and 'to'_bus_id'

  • filter branches: exclude those branches from and to the same zone

  • calculate the marginal transmission capacities by each unique 'from_zone_id" and by each unique 'to_zone_id' from filtered branches

  • calculate total transmission capacity for each zone by adding up 'from capacity' and 'to capacity' by each zone id

Value -> Values

grid->total transmission capacity by each zone for the grid

Testing

from powersimdata.design.transmission.substations import calculate_zone_capacity
from powersimdata.input.grid import Grid
grid = Grid("Western")
calculate_interzone_capacity(grid)

Screen Shot 2021-06-16 at 12 16 19 PM

@rouille rouille assigned rouille and ywang303 and unassigned rouille Jun 16, 2021
@rouille rouille added the new feature Feature that is currently in progress. label Jun 16, 2021
@rouille
Copy link
Collaborator

rouille commented Jun 16, 2021

I am wondering if the name of the function clearly communicate what is being done. I feel like discarding intra-zone branches should be reflected somehow in the name of the function. What about calculate_interzone_capacity?

@rouille
Copy link
Collaborator

rouille commented Jun 16, 2021

We have a git guide available here where you will find our commit message convention. You can reword your commit message to follow our convention with an interactive rebase.

@ywang303 ywang303 changed the title Josephine/calculate zone capacity Josephine/calculate interzone capacity Jun 16, 2021
@ywang303
Copy link
Contributor Author

Finished all the script revision, would you please recheck to see if I shall make any modifications @BainanXia @jon-hagg @rouille

@ywang303 ywang303 requested review from BainanXia and jenhagg June 17, 2021 19:30
@rouille rouille force-pushed the josephine/calculate_zone_capacity branch from 4b4e90d to 546bc44 Compare June 17, 2021 23:12
@rouille rouille force-pushed the josephine/calculate_zone_capacity branch from 546bc44 to 4c677c8 Compare June 17, 2021 23:17
@rouille rouille marked this pull request as ready for review June 17, 2021 23:21
Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

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

Clean.

@ywang303 ywang303 merged commit 06b3d44 into develop Jun 17, 2021
@ywang303 ywang303 deleted the josephine/calculate_zone_capacity branch June 17, 2021 23:57
@danielolsen danielolsen changed the title Josephine/calculate interzone capacity feat: calculate interzone capacity Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Feature that is currently in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants