Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Becker committed Jan 18, 2024
2 parents 50fbf38 + 5468d26 commit bb0716b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Classify the change according to the following categories:
### Patches


## v3.3.0
## v3.4.0
### Minor Updates
#### Added
- Added the following BAU outputs: lifecycle_chp_standby_cost_after_tax, lifecycle_elecbill_after_tax, lifecycle_production_incentive_after_tax, lifecycle_outage_cost, lifecycle_MG_upgrade_and_fuel_cost
Expand All @@ -37,6 +37,10 @@ Classify the change according to the following categories:
- Fixed setting of default Generator `installed_cost_per_kw` so that user inputs are not overridden
- Avoid /summary endpoint error with off-grid runs where there is no ElectricTariff

## v3.3.0
### Changed
- Updates to REopt.jl for passing API key

## v3.2.3
### Minor Updates
##### Changed
Expand Down
19 changes: 16 additions & 3 deletions reoptjl/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,17 @@ def queryset_for_summary(api_metas,summary_dict:dict):
summary_dict[str(m.meta.run_uuid)]['focus'] = "Financial"
else:
summary_dict[str(m.meta.run_uuid)]['focus'] = "Resilience"


# Use settings to find out if it is an off-grid evaluation
settings = Settings.objects.filter(meta__run_uuid__in=run_uuids).only(
'meta__run_uuid',
'off_grid_flag'
)
if len(settings) > 0:
for m in settings:
if m.off_grid_flag:
summary_dict[str(m.meta.run_uuid)]['focus'] = "Off-grid"

tariffInputs = ElectricTariffInputs.objects.filter(meta__run_uuid__in=run_uuids).only(
'meta__run_uuid',
'urdb_rate_name'
Expand Down Expand Up @@ -858,7 +868,7 @@ def queryset_for_summary(api_metas,summary_dict:dict):
if (m.year_one_bill_before_tax_bau is not None) and (m.year_one_bill_before_tax is not None):
summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = m.year_one_bill_before_tax_bau - m.year_one_bill_before_tax
else:
summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = 0.0
summary_dict[str(m.meta.run_uuid)]['year_one_savings_us_dollars'] = None

load = ElectricLoadInputs.objects.filter(meta__run_uuid__in=run_uuids).only(
'meta__run_uuid',
Expand All @@ -880,7 +890,10 @@ def queryset_for_summary(api_metas,summary_dict:dict):
)
if len(fin) > 0:
for m in fin:
summary_dict[str(m.meta.run_uuid)]['npv_us_dollars'] = m.npv
if m.npv is not None:
summary_dict[str(m.meta.run_uuid)]['npv_us_dollars'] = m.npv
else:
summary_dict[str(m.meta.run_uuid)]['npv_us_dollars'] = None
summary_dict[str(m.meta.run_uuid)]['net_capital_costs'] = m.initial_capital_costs_after_incentives

batt = ElectricStorageOutputs.objects.filter(meta__run_uuid__in=run_uuids).only(
Expand Down

0 comments on commit bb0716b

Please sign in to comment.