To build branch ratings and impedances for the HIFLD grid, use assumptions which start with the physical parameters of typical line designs (with non-typical overrides as necessary), rather than relying on processed averages from the TAMU grid.
What the code is doing
We add a table of 'typical' tower/conductor designs (line_designs.csv). Within transmission.py, the default choice for a given voltage level is the single-circuit design with the minimum number of conductors per bundle.
Within const.py:
we add the system power base that will be used to calculate per-unit values (s_base).
~we make a change to the impedance of 161/500 kV transformers. The existing value produces severe transmission infeasibilities, while the new value fixes them (and is consistent with examination of real world data).~ EDIT: removed for now in favor of more extensive transformer re-working within #286.
we add a new mapping of lines to voltage (line_voltage_assumptions), to be used to override the algorithms within transmission.py when problems are encountered.
we add a set of assumptions about lines which should be built using the non-default line designs.
Within transmission.py:
We apply the line voltage assumptions from const.py before performing the neighbor search algorithm to assign voltage to unknown-voltage lines.
We add a new function add_impedance_and_rating which builds Tower objects for each of the designs in line_designs.csv, and associates each transmission line in the HIFLD dataset with one of these designs (using either the default or the overrides in const.py) before passing this augmented dataframe (original data plus Tower designs) to the existing lower-level estimate_branch_impedance and estimate_branch_rating functions.
We modify the estimate_branch_impedance and estimate_branch_rating functions to use the Tower objects plus the line lengths to calculate the appropriate values for transmission lines (transformer logic is unchanged).
EDIT: within test_transmission.py: several new tests aimed at improving the overall test coverage of the transmission module.
Testing
Tested manually to build the HIFLD grid. Preliminary tests show the built grid having much less transmission violation energy and many fewer lines violating, compared to when the grid is built using the assumed values from the TAMU data. Full results to be added later.
~Unit tests still need to be updated.~ EDIT: done.
Usage Example/Visuals
All code changes will be used by calling the build_transmission function (either directly or via create_csvs or create_grid in the orchestration module).
Time estimate
30 minutes to an hour, provided they already have a good understanding of the line parameter calculation logic, or are willing to trust the previous reviews of that code (#272). ~This branch depends on #272, so is a draft for now.~
Pull Request doc
Purpose
To build branch ratings and impedances for the HIFLD grid, use assumptions which start with the physical parameters of typical line designs (with non-typical overrides as necessary), rather than relying on processed averages from the TAMU grid.
What the code is doing
line_designs.csv
). Withintransmission.py
, the default choice for a given voltage level is the single-circuit design with the minimum number of conductors per bundle.const.py
:s_base
).line_voltage_assumptions
), to be used to override the algorithms withintransmission.py
when problems are encountered.transmission.py
:const.py
before performing the neighbor search algorithm to assign voltage to unknown-voltage lines.add_impedance_and_rating
which buildsTower
objects for each of the designs inline_designs.csv
, and associates each transmission line in the HIFLD dataset with one of these designs (using either the default or the overrides inconst.py
) before passing this augmented dataframe (original data plus Tower designs) to the existing lower-levelestimate_branch_impedance
andestimate_branch_rating
functions.estimate_branch_impedance
andestimate_branch_rating
functions to use theTower
objects plus the line lengths to calculate the appropriate values for transmission lines (transformer logic is unchanged).test_transmission.py
: several new tests aimed at improving the overall test coverage of thetransmission
module.Testing
Tested manually to build the HIFLD grid. Preliminary tests show the built grid having much less transmission violation energy and many fewer lines violating, compared to when the grid is built using the assumed values from the TAMU data. Full results to be added later.
~Unit tests still need to be updated.~ EDIT: done.
Usage Example/Visuals
All code changes will be used by calling the
build_transmission
function (either directly or viacreate_csvs
orcreate_grid
in theorchestration
module).Time estimate
30 minutes to an hour, provided they already have a good understanding of the line parameter calculation logic, or are willing to trust the previous reviews of that code (#272). ~This branch depends on #272, so is a draft for now.~