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

After Tax Savings and Updates to Results Table Spreadsheet #631

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from

Conversation

Bill-Becker
Copy link
Collaborator

@Bill-Becker Bill-Becker commented Mar 3, 2025

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:

  • Added a new vector type monthly_fraction in the simulated_load function in julia_src/http.jl.

(For reference, this is what GitHub Copilot autogenerated for the PR)

This pull request includes several changes to the docker-compose.yml, julia_src/Manifest.toml, julia_src/http.jl, and reoptjl/custom_table_config.py files. The changes primarily focus on updating configurations, modifying commands, and enhancing the table configurations with new fields and calculations.

Key Changes:

Configuration Updates:

  • Updated the docker-compose.yml file to use a new command for the Julia project instantiation and execution.

Dependency Management:

  • Modified the julia_src/Manifest.toml file to include new repository information for the REopt dependency.

Code Enhancements:

  • Added a new vector type monthly_fraction in the simulated_load function in julia_src/http.jl.

Table Configuration Enhancements:

  • Added new fields and updated existing ones in the reoptjl/custom_table_config.py file to include after-tax costs and savings, as well as additional financial metrics. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

@Bill-Becker Bill-Becker requested a review from bpulluta March 3, 2025 21:57
@@ -323,8 +329,8 @@
{
"label" : "Total Electric Costs ($)",
"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"),
Copy link
Collaborator

@bpulluta bpulluta Mar 6, 2025

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

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.

2 participants