Create new transmission df for each case
Reusing the df added duplicate capacity reserve columns.
@@ -309,22 +309,6 @@ def main():
if args.transmission:
if args.gens is False:
model_regions_gdf = load_ipm_shapefile(_settings)
- else:
- model_regions_gdf = gc.model_regions_gdf
- transmission = agg_transmission_constraints(
- pg_engine=pg_engine, settings=_settings
- )
- transmission = (
- transmission.pipe(
- transmission_line_distance,
- ipm_shapefile=model_regions_gdf,
- settings=_settings,
- units="mile",
- )
- .pipe(network_line_loss, settings=_settings)
- .pipe(network_max_reinforcement, settings=_settings)
- .pipe(network_reinforcement_cost, settings=_settings)
- )
# genx_settings = make_genx_settings_file(pudl_engine, _settings)
# write_case_settings_file(
@@ -445,8 +429,19 @@ def main():
# transmission = agg_transmission_constraints(
# pudl_engine=pudl_engine, settings=_settings
# )
+ model_regions_gdf = gc.model_regions_gdf
transmission = (
- transmission.pipe(network_max_reinforcement, settings=_settings)
+ agg_transmission_constraints(
+ pg_engine=pg_engine, settings=_settings
+ )
+ .pipe(
+ transmission_line_distance,
+ ipm_shapefile=model_regions_gdf,
+ settings=_settings,
+ units="mile",
+ )
+ .pipe(network_line_loss, settings=_settings)
+ .pipe(network_max_reinforcement, settings=_settings)
.pipe(network_reinforcement_cost, settings=_settings)
.pipe(set_int_cols)
.pipe(round_col_values)
