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

RA Toolkit Integration #1094

Merged
merged 55 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2a4dbdc
Working scenario structure with hydro year iterations; hydro data doe…
anamileva Nov 3, 2023
37e15fb
working version with hydro iterations
anamileva Nov 3, 2023
1ae7daf
Some comments and formatting
anamileva Nov 3, 2023
d7d77bb
Working version with hydro years, all tests pass
anamileva Nov 7, 2023
affdd99
Get scenario structure from database in importing results
anamileva Nov 7, 2023
e3dd452
Copyright update
anamileva Nov 7, 2023
1e36a11
remove notes file
anamileva Nov 7, 2023
a13e290
Merge branch 'develop' into ra_toolkit
anamileva Nov 7, 2023
029465a
Rename hydro years to more generic iterations
anamileva Nov 7, 2023
1c39bf4
Save work on weather iterations
anamileva Nov 7, 2023
4439c87
save work on adding weather years (to writing inputs)
anamileva Nov 8, 2023
cd1f6d7
Get inputs & run scenario with weather years
anamileva Nov 9, 2023
572b348
Working version with hydro years; need to fix tests
anamileva Nov 9, 2023
be347f7
Structural changes
anamileva Nov 10, 2023
45e96eb
Various fixes
anamileva Nov 10, 2023
7899006
Weather years, all tests pass
anamileva Nov 14, 2023
a595cdc
Fix some remaining bugs
anamileva Nov 15, 2023
6c8c712
Rename 'years' to 'iterations'
anamileva Nov 15, 2023
0da6f1f
Rename 'years' to 'iterations'
anamileva Nov 15, 2023
8437ea2
Consolidate getting hydro inputs with and without iterations; create …
anamileva Nov 16, 2023
9663d54
Change hydro ophar _iterations table to say year_month for clarity
anamileva Nov 16, 2023
11bb997
Load hydro year/month input data directly from CSV
anamileva Nov 16, 2023
41d8820
Rename table
anamileva Nov 16, 2023
4865097
Working version with weather and hydro iterations, data flows all the…
anamileva Nov 17, 2023
2e19ee1
Add availability iterations to temporal subscenarios
anamileva Nov 29, 2023
22226f3
Scenario structure; test example works E2E
anamileva Nov 29, 2023
e9e9154
Add availability iteration to scenario structure, all tests pass, non…
anamileva Nov 29, 2023
3a0cc28
Working version with availability iterations, all tests pass
anamileva Nov 30, 2023
3a537e1
Add availability iteration index to inputs
anamileva Nov 30, 2023
ec7a355
Some fixes for a working version with availability iteration directories
anamileva Nov 30, 2023
0d63f49
Working version e2e
anamileva Nov 30, 2023
6648093
RA Toolkit
anamileva Jan 25, 2024
0a2aae4
tweaks
anamileva Jan 26, 2024
263f440
save instructions
anamileva Jan 31, 2024
4687014
Lint and comments on hybrids
anamileva Jan 31, 2024
8550aa0
Proper treatment of hybrids
anamileva Jan 31, 2024
9b957be
Add testing for RA Toolkit
anamileva Feb 2, 2024
82ecaff
Toy case, save some work
anamileva Feb 2, 2024
9385283
Make test examples smaller
anamileva Feb 2, 2024
6005d5a
Add test examples
anamileva Feb 3, 2024
8cf7f48
Add temporal iteration seed for reproducibility
anamileva Feb 8, 2024
afe0a16
Merge develop
anamileva Feb 8, 2024
6bd0f2b
Apply Moment copyright and delete unnecessary files
anamileva Feb 8, 2024
796a4f4
Partially fix tests
anamileva Feb 9, 2024
4ca29f5
Merge develop & resolve conflicts
anamileva Feb 14, 2024
0ea6410
Resolve conflicts and merge develop
anamileva Feb 15, 2024
f92989f
Inputs determinism
anamileva Feb 15, 2024
2524a4e
fix bug in writing availability tab files
anamileva Feb 15, 2024
ea881e8
Add the test examples
anamileva Feb 15, 2024
ac9b289
remove references to hydro bins
anamileva Feb 15, 2024
bc02838
Schema minor cleanup
anamileva Feb 15, 2024
361764a
Ignore RA example CSV results
anamileva Feb 15, 2024
0394e8a
remove unnecessary table
anamileva Feb 15, 2024
c8ae2e1
Some updates to README
anamileva Feb 15, 2024
98266cd
Iterations not necessary as tmps are unique
anamileva Feb 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
4 changes: 3 additions & 1 deletion db/csvs_test_examples/csv_structure.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ path,feature,subscenario,table,subscenario_type,custom_method,project_input,proj
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_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
Loading
Loading