-
Notifications
You must be signed in to change notification settings - Fork 64
v3.17.0 Peak Load Scaling and ElectricTariff Cost/Rate Outputs #683
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
Conversation
Deleted the migration file 0093_electricloadoutputs_annual_peak_kw_and_more.py and added the year_one_billed_energy_rate_series ArrayField to the ElectricTariffOutputs model. This change likely reflects a schema update and migration reset to accommodate the new field.
Introduces multiple new fields to ElectricLoadOutputs and ElectricTariffOutputs models for tracking annual peak kW, monthly energy and peak demand, export series, and various billed rate series. Updates Julia HTTP handler to log processing steps and ensures certain result matrices are converted to vectors before response.
Added multiple new fields to the ElectricTariffOutputs model and migration to store URDB-related metadata, including label, rate name, utility, effective date, voltage level, rate description, peak kW capacity min/max, additional info, energy and demand comments, and URL link. These changes support enhanced storage and retrieval of utility rate information.
Adds custom_table_anccr with a comprehensive configuration including general info, rate analysis, annual and monthly costs, load metrics, URDB rate info, and detailed monthly breakdowns.
…on field instead of separate
…fix check for urdb_metadata
… input monthly_peaks_kw
Added ANCCR-specific calculation formulas for year 1 charges and percent changes. Updated and standardized keys and labels for URDB-related fields. Modified scenario_value logic for installation, site, utility, and rate fields. Changed monthly energy and demand cost fields to use BAU series. Implemented monthly total bill cost calculations using fixed, energy, and demand BAU values.
Modified custom_table_anccr to use scenario values instead of BAU for monthly cost fields. Updated Excel export logic to hide all BAU columns for ANCCR tables and use rate names as headers for scenario columns. Also updated the generate_excel_workbook function to accept scenarios and handle new header logic.
Note, will have to delete deployed db associated with this API branch for the new monthly_fixed_cost_... name to work
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Clarifies comments and logic for hiding BAU columns in non-rates tables within the Excel workbook generation. No functional changes, only improved code readability.
This reverts commit bcfd5c2.
This reverts commit 2e8a043.
…rse"" This reverts commit ee1d57b.
ElectricTariff Outputs, Peak Load Scaling, Endpoint Updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds peak load scaling capabilities and ElectricTariff cost/rate outputs to REopt API v3.17.0. The changes enable users to scale loads to monthly peak demands while maintaining energy consumption, and provide detailed monthly and annual utility rate analysis outputs.
Key Changes
- Added
monthly_peaks_kwinput to ElectricLoad for peak-based load scaling - Added extensive ElectricTariff outputs for monthly cost and rate breakdowns
- Introduced new
/get_load_metricsendpoint for load profile analysis - Added
custom_table_ratesconfiguration for utility rate comparison in Excel reports
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| reoptjl/views.py | Added get_load_metrics endpoint, round_values helper, updated simulated_load validation logic, and enhanced Excel workbook generation to support rate comparison table without BAU columns |
| reoptjl/urls.py | Registered new /get_load_metrics endpoint |
| reoptjl/models.py | Added monthly_peaks_kw input field to ElectricLoadInputs, new load metric outputs to ElectricLoadOutputs, urdb_metadata to ElectricTariffInputs, and extensive monthly/rate outputs to ElectricTariffOutputs |
| reoptjl/src/process_results.py | Added ElectricTariffInputs to update handling for urdb_metadata persistence |
| reoptjl/custom_table_config.py | Added comprehensive custom_table_rates configuration with 740+ lines of rate comparison metrics and calculations |
| reoptjl/custom_table_helpers.py | Enhanced flatten_dict to handle arrays with indexed keys, updated sum_vectors to preserve monthly series |
| reoptjl/test/test_job_endpoint.py | Removed obsolete SteamTurbine federal_itc_fraction test skip |
| reoptjl/test/posts/*.json | Added monthly_peaks_kw test data and updated sector defaults |
| reoptjl/migrations/0110_*.py | Django migration for new ElectricLoad and ElectricTariff fields |
| julia_src/http.jl | Added get_load_metrics function, updated type conversions to Float64, added ElectricTariff metadata handling, and new info logging |
| julia_src/Manifest.toml | Updated REopt.jl dependency from v0.55.1 to v0.56.2 |
| CHANGELOG.md | Documented new features and fixes for v3.17.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PR:
Which is a combo of these two PR's plus a new results spreadsheet table for rate comparison: