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

Calculate transformer costs based on per-MW values #312

Merged
merged 4 commits into from
Oct 20, 2020

Conversation

danielolsen
Copy link
Contributor

Purpose

Address to-do-list item from #297: calculate transformer upgrade costs on a per-MW basis, rather than per-transformer.

What is the code doing

Real functionality updates are in investment_costs.py:

  • we load a CSV for transformer costs, which is upper-triangular only, and mirror it across the diagonal
  • we find the closest indices (kV rating of 'from' bus, kV rating of 'to' bus) of the transformer cost table, and multiply this per-MW cost by the capacity upgrade.
  • the private function select_kV is removed (functionality rolled into the main body), since we don't use it for transformers anymore, just lines.

Everything else is data, data locations, and test updates.

Time to review

15 minutes.

@danielolsen
Copy link
Contributor Author

The transformer cost calculation method has been updated to use the regional multipliers for AC lines (using the highest voltage from either the from_bus or to_bus side of the transformer). The code is ugly, but the logic works for both the unit tests as well as large upgrade scenarios.

@danielolsen danielolsen force-pushed the nina/investment_costs branch from 5fba797 to d66f26e Compare October 15, 2020 23:51
@danielolsen danielolsen force-pushed the daniel/transformer_costs branch from 86de56d to 3ea22a8 Compare October 15, 2020 23:55
@danielolsen danielolsen force-pushed the nina/investment_costs branch from d66f26e to 3f4f546 Compare October 16, 2020 17:21
@danielolsen danielolsen force-pushed the daniel/transformer_costs branch from 6ee0237 to bfd100d Compare October 16, 2020 17:25
@danielolsen danielolsen force-pushed the nina/investment_costs branch from 81000c3 to 6ce9719 Compare October 16, 2020 19:34
@danielolsen danielolsen force-pushed the daniel/transformer_costs branch from bfd100d to e1bd05b Compare October 16, 2020 19:54
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.

Thanks for updating the test.

@danielolsen danielolsen force-pushed the daniel/transformer_costs branch from e1bd05b to 4e0eca4 Compare October 20, 2020 17:50
@danielolsen danielolsen merged commit b6269ae into nina/investment_costs Oct 20, 2020
@danielolsen danielolsen deleted the daniel/transformer_costs branch October 20, 2020 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants