-
Notifications
You must be signed in to change notification settings - Fork 64
After Tax Savings and Updates to Results Table Spreadsheet #631
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ng the GHX residual value
bpulluta
reviewed
Mar 6, 2025
reoptjl/custom_table_config.py
Outdated
| "key" : "total_electric_utility_costs", | ||
| "bau_value" : lambda df: safe_get(df, "outputs.Financial.lifecycle_elecbill_after_tax_bau"), | ||
| "scenario_value": lambda df: safe_get(df, "outputs.Financial.lifecycle_elecbill_after_tax") | ||
| "bau_value" : lambda df: safe_get(df, "outputs.Financial.lifecycle_elecbill_after_tax_bau") - safe_get(df, "outputs.Financial.lifecycle_export_benefit_after_tax_bau") + safe_get(df, "outputs.CHP.lifecycle_chp_standby_cost_after_tax_bau"), |
Collaborator
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.
If you want this to show the formula I would reformulate this, like this for example:
- Set these to empty strings
"label" : "Total Electric Costs ($)",
"key" : "total_electric_utility_costs",
"bau_value": lambda df: "",
"scenario_value": lambda df: ""- Define the values in the table:
"label" : "Lifecycle Export After Tax ($)",
"key" : "lifecycle_export_after_tax",
"bau_value": lambda df: "outputs.Financial.lifecycle_export_benefit_after_tax_bau",
"scenario_value": lambda df: "outputs.Financial.lifecycle_export_benefit_after_tax"
"label" : "CHP Lifecycle Standby Cost After Tax($)",
"key" : "chp_lifecycle_export_after_tax",
"bau_value": lambda df: "outputs.CHP.lifecycle_chp_standby_cost_after_tax_bau",
"scenario_value": lambda df: "outputs.CHP.lifecycle_chp_standby_cost_after_tax"- Add it as a formula like this:
"name": "Total Electric Costs ($)",
"formula": lambda col, bau, headers: f'={col}{headers["Lifecycle Export After Tax ($)"] + 2}+{col}{headers["CHP Lifecycle Standby Cost After Tax($)"] + 2}'didnt focus too much on accuracy but you get the point, same with the others
bpulluta
approved these changes
Mar 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a bunch of year one after-tax cost outputs and one capital cost output that were added to REopt.jl#after-tax-savings (to be merged into the main branch), and then adds a select number of those outputs along with some updates to the results table spreadsheet to calculate a modified after-tax payback. See the attached example comparison_table.xlsx doc with a highlight of the additions and updates to the table.
comparison_table Example for PR with Notes.xlsx
Not related to the above, this also includes a fix for cooling load:
monthly_fractionin thesimulated_loadfunction injulia_src/http.jl.For reference, this is what GitHub Copilot produced for a PR summary:
======================================
This pull request includes various updates across configuration files, Julia scripts, Django migrations, and model definitions to enhance functionality and improve maintainability. Key changes include updates to
docker-compose.ymlfor better dependency management, modifications to Julia scripts and dependencies, and significant additions and refinements to Django models and migrations.Configuration Updates
docker-compose.ymlto use a more robust Julia command for dependency instantiation and script execution. Thecommandnow includesPkg.instantiate()and script inclusion for better dependency handling.Julia Code and Dependencies
monthly_fraction, to thevector_typesarray injulia_src/http.jlfor more comprehensive data processing.REoptdependency injulia_src/Manifest.tomlto version0.51.1, including a newgit-tree-sha1.Django Migrations
FinancialOutputs,ElectricTariffOutputs,ElectricUtilityOutputs) to support additional financial and operational metrics, such as year-one costs and peak grid demand. [1] [2] [3] [4] [5] [6] [7]FinancialOutputsfor improved clarity, such ascapital_costs_after_incentives_without_macrstocapital_costs_after_non_discounted_incentives_without_macrs.Django Models
ElectricUtilityOutputsfor calculating and saving peak grid demand (calculate_peak_demandandsave). These methods dynamically compute peak values based on input series.FinancialOutputsto include new fields for year-one operational costs and savings, both before and after tax, enhancing the granularity of financial reporting. [1] [2]These updates collectively improve the robustness, clarity, and functionality of the codebase, addressing both backend processing and data modeling requirements.