Skip to content

Conversation

@Bill-Becker
Copy link
Collaborator

PR:

Which is a combo of these two PR's plus a new results spreadsheet table for rate comparison:

rathod-b and others added 30 commits September 29, 2025 13:26
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.
gellwood and others added 22 commits November 7, 2025 07:27
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.
ElectricTariff Outputs, Peak Load Scaling, Endpoint Updates
Copy link
Contributor

Copilot AI left a 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_kw input to ElectricLoad for peak-based load scaling
  • Added extensive ElectricTariff outputs for monthly cost and rate breakdowns
  • Introduced new /get_load_metrics endpoint for load profile analysis
  • Added custom_table_rates configuration 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>
@Bill-Becker Bill-Becker requested a review from rathod-b November 19, 2025 04:39
@Bill-Becker Bill-Becker merged commit dec8745 into master Nov 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants