Skip to content

Commit

Permalink
Merge pull request #1104 from blue-marble/develop
Browse files Browse the repository at this point in the history
GridPath v2024.1.0
  • Loading branch information
anamileva authored Feb 28, 2024
2 parents 3f0f24e + f38e925 commit caddcf0
Show file tree
Hide file tree
Showing 1,395 changed files with 485,518 additions and 7,574 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ examples/*/results/*.csv
examples/*/*/results/*.csv
# Multi-horizon, multi-stage prod cost run
examples/*/*/*/results/*.csv
# RA iteration runs
# Weather/hydro/availability iterations + subproblems
examples/*/*/*/*/*/results/*.csv

# Don't track pass-through inputs directory in multi-stage runs
examples/*/*/pass_through_inputs/
Expand Down
3 changes: 1 addition & 2 deletions db/common_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def connect_to_database(db_path="../db/io.db", timeout=5, detect_types=0):
Connect to a database and return the connection object.
"""

if not os.path.isfile(db_path):
raise OSError(
"The database file {} was not found. Did you mean to "
Expand Down Expand Up @@ -152,7 +151,7 @@ def spin_on_database_lock_generic(
else:
time.sleep(interval)
else:
print("Error while running the following query:\n", sql)
print("Error while running the following query:\n", command)
traceback.print_exc()
sys.exit()
# Do this if exception not caught
Expand Down
13 changes: 8 additions & 5 deletions db/csvs_test_examples/csv_structure.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
path,feature,subscenario,table,subscenario_type,custom_method,project_input,project_is_tx,filename,cols_to_exclude_str,base_table,base_subscenario
solver,core,solver_options_id,options_solver,simple,,0,0,,,,
temporal,core,temporal_scenario_id,temporal,dir_subsc_only,,0,0,,"ignore
temporal,core,temporal_scenario_id,temporal,dir_subsc_only,,0,0,,"ignore
",,
temporal,core,temporal_scenario_id,temporal_iterations,dir_aux,,0,0,iterations.csv,,,
temporal,core,temporal_scenario_id,temporal_periods,dir_aux,,0,0,period_params.csv,,,
temporal,core,temporal_scenario_id,temporal_superperiods,dir_aux,,0,0,superperiods.csv,,,
temporal,core,temporal_scenario_id,temporal_horizons,dir_aux,,0,0,horizon_params.csv,,,
Expand Down Expand Up @@ -35,7 +36,8 @@ project/project_operational_chars,core,project_operational_chars_scenario_id,pro
,data_dependent,supply_curve_scenario_id,project_shiftable_load_supply_curve,simple,,0,0,,,,
project/project_availability/project_availability_types,data_dependent,project_availability_scenario_id,project_availability,simple,,0,0,,,,
project/project_availability/project_availability_endogenous,data_dependent,endogenous_availability_scenario_id,project_availability_endogenous,simple,,1,0,,,inputs_project_availability,project_availability_scenario_id
project/project_availability/project_availability_exogenous,data_dependent,exogenous_availability_scenario_id,project_availability_exogenous,simple,,1,0,,,inputs_project_availability,project_availability_scenario_id
project/project_availability/project_availability_exogenous,data_dependent,exogenous_availability_independent_scenario_id,project_availability_exogenous_independent,simple,,1,0,,,inputs_project_availability,project_availability_scenario_id
project/project_availability/weather,data_dependent,exogenous_availability_weather_scenario_id,project_availability_exogenous_weather,simple,,1,0,,,inputs_project_availability,project_availability_scenario_id
fuels/fuel_chars,fuels,fuel_scenario_id,fuels,simple,,0,0,,,,
fuels/fuel_prices,fuels,fuel_price_scenario_id,fuel_prices,simple,,0,0,,,,
transmission/transmission_portfolios,transmission,transmission_portfolio_scenario_id,transmission_portfolios,simple,,0,0,,,,
Expand Down Expand Up @@ -96,7 +98,7 @@ policy/energy_targets/horizon_targets,energy_target,horizon_energy_target_scenar
policy/energy_targets/horizon_targets,energy_target,horizon_energy_target_scenario_id,system_horizon_energy_target_load_zone_map,dir_aux,,0,0,load_zone_mapping.csv,,,
policy/transmission_targets/zones,transmission_target,transmission_target_zone_scenario_id,geography_transmission_target_zones,simple,,0,0,,,,
policy/transmission_targets/tx_line_zones,transmission_target,tx_line_transmission_target_zone_scenario_id,tx_line_transmission_target_zones,simple,,0,0,,,,
policy/transmission_targets/period_targets,transmission_target,period_transmission_target_scenario_id,system_period_transmission_targets,simple,,0,0,,,,
policy/transmission_targets/targets,transmission_target,transmission_target_scenario_id,system_transmission_targets,simple,,0,0,,,,
policy/carbon_cap/geography_carbon_cap_zones,carbon_cap,carbon_cap_zone_scenario_id,geography_carbon_cap_zones,simple,,0,0,,,,
policy/carbon_cap/project_carbon_cap_zones,carbon_cap,project_carbon_cap_zone_scenario_id,project_carbon_cap_zones,simple,,0,0,,,,
policy/carbon_cap/system_carbon_cap_targets,carbon_cap,carbon_cap_target_scenario_id,system_carbon_cap_targets,simple,,0,0,,,,
Expand All @@ -112,9 +114,10 @@ policy/performance_standard/project_performance_standard_zones,performance_stand
policy/performance_standard/system_performance_standard,performance_standard,performance_standard_scenario_id,system_performance_standard,simple,,0,0,,,,
policy/performance_standard/carbon_credits,carbon_credits,performance_standard_zones_carbon_credits_zones_scenario_id,system_performance_standard_zones_carbon_credits_zones,simple,,0,0,,,,
policy/carbon_credits/zones,carbon_credits,carbon_credits_zone_scenario_id,geography_carbon_credits_zones,simple,,0,0,,,,
policy/carbon_credits/project_zones,carbon_credits,project_carbon_credits_zone_scenario_id,project_carbon_credits_zones,simple,,0,0,,,,
policy/carbon_credits/project_generation_zones,carbon_credits,project_carbon_credits_generation_zone_scenario_id,project_carbon_credits_generation_zones,simple,,0,0,,,,
policy/carbon_credits/project_purchase_zones,carbon_credits,project_carbon_credits_purchase_zone_scenario_id,project_carbon_credits_purchase_zones,simple,,0,0,,,,
policy/carbon_credits/project_credits,carbon_credits,project_carbon_credits_scenario_id,project_carbon_credits,simple,,0,0,,,,
policy/carbon_credits/prices,carbon_credits,carbon_credits_price_scenario_id,system_carbon_credits_prices,simple,,0,0,,,,
policy/carbon_credits/params,carbon_credits,carbon_credits_params_scenario_id,system_carbon_credits_params,simple,,0,0,,,,
policy/fuel_burn_limits/bas,fuel_burn_limit,fuel_burn_limit_ba_scenario_id,geography_fuel_burn_limit_balancing_areas,simple,,0,0,,,,
policy/fuel_burn_limits/project_bas,fuel_burn_limit,project_fuel_burn_limit_ba_scenario_id,project_fuel_burn_limit_balancing_areas,simple,,0,0,,,,
policy/fuel_burn_limits/limits,fuel_burn_limit,fuel_burn_limit_scenario_id,system_fuel_burn_limits,simple,,0,0,,,,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
carbon_credits_zone,period,allow_carbon_credits_infinite_demand,carbon_credits_demand_tco2,carbon_credits_demand_price,allow_carbon_credits_infinite_supply,carbon_credits_supply_tco2,carbon_credits_supply_price
Carbon_Credits_Zone1,2020,0,0,,0,0,
Carbon_Credits_Zone1,2030,0,,,0,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
carbon_credits_zone,period,allow_carbon_credits_infinite_demand,carbon_credits_demand_tco2,carbon_credits_demand_price,allow_carbon_credits_infinite_supply,carbon_credits_supply_tco2,carbon_credits_supply_price
Carbon_Credits_Zone1,2020,1,,100000000,0,0,
Carbon_Credits_Zone1,2030,0,80,100000000,0,0,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
carbon_credits_zone,period,allow_carbon_credits_infinite_demand,carbon_credits_demand_tco2,carbon_credits_demand_price,allow_carbon_credits_infinite_supply,carbon_credits_supply_tco2,carbon_credits_supply_price
Carbon_Credits_Zone1,2020,0,0,,1,,100
Carbon_Credits_Zone1,2030,0,0,,0,80,100
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
carbon_credits_zone,period,allow_carbon_credits_infinite_demand,carbon_credits_demand_tco2,carbon_credits_demand_price,allow_carbon_credits_infinite_supply,carbon_credits_supply_tco2,carbon_credits_supply_price
Carbon_Credits_Zone1,2020,1,0,100000000,0,80,100
Carbon_Credits_Zone1,2030,1,,100000000,1,,200000000

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ project,period,intensity_threshold_emissions_toCO2_per_MWh,absolute_threshold_em
DAC,2020,,0
DAC,2030,,0
Coal,2020,,2000000
Coal,2030,,2000000
Coal,2030,,2000000
Gas_CCGT,2020,,0
Gas_CCGT,2030,,0
Gas_CT,2020,,0
Gas_CT,2030,,0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project,carbon_credits_zone
Coal,Carbon_Credits_Zone1
DAC,Carbon_Credits_Zone1
Gas_CCGT,Carbon_Credits_Zone1
Gas_CT,Carbon_Credits_Zone1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project,carbon_credits_zone
Coal,Carbon_Credits_Zone1
DAC,Carbon_Credits_Zone1
Gas_CCGT,Carbon_Credits_Zone1
Gas_CT,Carbon_Credits_Zone1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
project,carbon_credits_zone
Coal,Carbon_Credits_Zone1
DAC,Carbon_Credits_Zone1
DAC,Carbon_Credits_Zone1
Gas_CCGT,Carbon_Credits_Zone1
Gas_CT,Carbon_Credits_Zone1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
transmission_target_zone,subproblem_id,stage_id,balancing_type,horizon,transmission_target_pos_dir_min_mwh,transmission_target_pos_dir_max_mwh,transmission_target_neg_dir_min_mwh,transmission_target_neg_dir_max_mwh
TxTargetZone1,1,1,period,2020,,,2,
TxTargetZone1,1,1,period,2030,,,2,
TxTargetZone2,1,1,period,2020,2,,,
TxTargetZone2,1,1,period,2030,2,,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
transmission_target_zone,subproblem_id,stage_id,balancing_type,horizon,transmission_target_pos_dir_min_mwh,transmission_target_pos_dir_max_mwh,transmission_target_neg_dir_min_mwh,transmission_target_neg_dir_max_mwh
TxTargetZone1,1,1,period,2020,,,,0.01
TxTargetZone1,1,1,period,2030,,,,0.01
TxTargetZone2,1,1,period,2020,,,,4
TxTargetZone2,1,1,period,2030,,,,4
Loading

0 comments on commit caddcf0

Please sign in to comment.