Conversation
Bill-Becker
commented
Jan 10, 2024
- Fixes an error from the /summary endpoint for off-grid evaluations when there is no ElectricTariffInputs
- Updates REopt.jl for the HiGHS solver environment
ElectricTariff doesn't exist for off-grid, and this was causing an error when trying to add None's together
| for m in tariffOuts: | ||
| summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = (m.year_one_energy_cost_before_tax_bau + m.year_one_demand_cost_before_tax_bau + m.year_one_fixed_cost_before_tax_bau + m.year_one_min_charge_adder_before_tax_bau) - (m.year_one_energy_cost_before_tax + m.year_one_demand_cost_before_tax + m.year_one_fixed_cost_before_tax + m.year_one_min_charge_adder_before_tax) | ||
| if len(tariffInputs) > 0: | ||
| summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = (m.year_one_energy_cost_before_tax_bau + m.year_one_demand_cost_before_tax_bau + m.year_one_fixed_cost_before_tax_bau + m.year_one_min_charge_adder_before_tax_bau) - (m.year_one_energy_cost_before_tax + m.year_one_demand_cost_before_tax + m.year_one_fixed_cost_before_tax + m.year_one_min_charge_adder_before_tax) |
There was a problem hiding this comment.
I'm curious why we don't just use the outputs year_one_bill_before_tax and year_one_bill_before_tax_bau here, since those are equivalent to the summations done here? I also don't know what exactly year_one_savings_us_dollars is meant to represent but should it include year_one_export_benefit_before_tax?
There was a problem hiding this comment.
Good points. the "us_dollars" thing also seems like legacy v2 naming convention - but maybe we kept it instead of updating the web tool. If we changed it to year_one_bill_before_tax - ..._bau, would that include the export benefit? Or do we still need to account for that separately?
There was a problem hiding this comment.
We would still need to account for that separately. The year_one_bill_before_tax does not account for the value of exports.
There was a problem hiding this comment.
Updated to use year_one_bill and included export_benefit
| for m in tariffOuts: | ||
| summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = (m.year_one_energy_cost_before_tax_bau + m.year_one_demand_cost_before_tax_bau + m.year_one_fixed_cost_before_tax_bau + m.year_one_min_charge_adder_before_tax_bau) - (m.year_one_energy_cost_before_tax + m.year_one_demand_cost_before_tax + m.year_one_fixed_cost_before_tax + m.year_one_min_charge_adder_before_tax) | ||
| if len(tariffInputs) > 0: | ||
| summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = (m.year_one_bill_before_tax_bau + m.year_one_export_benefit_before_tax_bau) - (m.year_one_bill_before_tax + m.year_one_export_benefit_before_tax) |
There was a problem hiding this comment.
@Bill-Becker m.year_one_export_benefit_before_tax is actually a positive value if it's a benefit, so we should subtract this here if we want to account for it. However, I wonder if it makes more sense to just use year_one_bill_before_tax until we confirm how the value is used in the UI?
There was a problem hiding this comment.
Oops, and I agree - I updated
adfarth
left a comment
There was a problem hiding this comment.
Approving and noting that the REopt version will get updated in the highs folder with later updates